Skip to content

Changes to test scripts for docker install #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025

Conversation

rishagg01
Copy link
Collaborator

🗣 Description

API test code

💭 Motivation and context

Changes are required to test the dev code changes in pipeline.

📷 Screenshots (DELETE IF UNAPPLICABLE)

🧪 Testing

Tests passed in local environment. Need to run them in pipeline for further testing.

✅ Pre-approval checklist

  • Changes are limited to a single goal AND
    the title reflects this in a clear human readable format
  • Issue that this PR solves has been selected in the Development section
  • I have read and agree to LME's CONTRIBUTING.md document.
  • The PR adheres to LME's requirements in RELEASES.md
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.

✅ Pre-merge Checklist

  • All tests pass
  • PR has been tested and the documentation for testing is above
  • Squash and merge all commits into one PR level commit

✅ Post-merge Checklist

  • Delete the branch to keep down number of branches

@cbaxley cbaxley changed the base branch from cbaxley-644-docker-pipeline to develop May 8, 2025 13:42
@cbaxley cbaxley changed the base branch from develop to cbaxley-644-docker-pipeline May 8, 2025 13:42
@NVivero NVivero moved this from 🆕 Product Backlog to 👀 In Review in LME-Development May 9, 2025
@NVivero NVivero requested a review from cbaxley May 20, 2025 17:07
@NVivero NVivero merged commit 79ee4aa into cbaxley-644-docker-pipeline May 20, 2025
2 of 5 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in LME-Development May 20, 2025
cbaxley added a commit that referenced this pull request May 24, 2025
* Adds the one-click installer and removes the docker ansible installer

* Setting up the pipeline to use the one-click installer

* Removes ansible from the pipeline installer

* Break out ansible roles into separate files

* Add debug to the install script the pipelines use

* Remove the call to the elastic role in site.yml

* Remove the call to the wazuh role in site.yml

* Have the ansible playbook run as the root user

* Unmask passwords in linux_only workflow to see if quoting is the issue

* Do not run the entire playbook as root, just when needed

* Become root when reading then lme-environment.env file

* Become root whenever reading the lme-environment.env file

* Don't remove azure resources so we can debug the tests

* Makes sure adding dashboards to Kibana is done as root

* Stops removing azure resources so that we can debug the cluster

* Refactor to use more new roles

* Adds timing to the playbook to keep track of what has been done

* Copy the dashboards and check that they are correct

* Adds some debugging information to the dashboards playbook

* Uses curl to upload dashboards

* Uploads files using the ansible uri module

* Slurps dashboard files and uploads them to Kibana

* Use ansible.builtin.slurp instead of slurp

* Use a multipart form to upload dashboards to Kibana

* Try slurping the files in a different way

* Remove the loop from loading the dashboards

* Allows retries for the dashboard uploads

* Breaks apart ubuntu installs to show version specific installs

* Cleaned up roles and dockerfiles

* Move the secrets to the setup_secrets.yml file

* Refactor the variables up to the site.yml file

* Adds authentication debug info to fleet playbook

* Tests to make sure the fleet agent is installed correctly

* Updates for 24.04 docker image

* Adding debian 12.10 support to docker

* Update the dockerfiles to remove unneeded packages

* Hide the passwords in linux_only.yml

* Fixes the dev container docker compose file

* Allow workflow dispatch with region on docker and linux_only workflows

* Change vm sizes to burstable in the workflows

* Remove the docker workflow from the PR runs

* Increase the vm size to B16s_v2 in the cluster workflow

* Updates the docker workflow to use the path to the password file

* Change back to the E series of VMs in the cluster workflow

* Allow the docker workflow to run on the PRs

* Fixes the arguments to the call to the copy_ssh_key.sh script

* Runs the first container in the docker workflow

* Stops docker workflow from running automatically

* Updates the README.md and install.sh to include the new changes

* Increase the timeout for the wazuh rbac fix

* Fixes a bug with the ansible installer and the debug mode

* Adds Debian 12 entry as well as 12.10 entry

* Fix the kibana bug where it wouldn't connect to elasticsearch

* Refactor kibana to its own role for easier management

* Drying up the ansible roles by centralizing the environment variables

* Updates the resource group name in the docker pipeline

* Gets the docker pipeline running on PRs

* Checks out the correct branch on the remote machine

* Update docker to automatically install instead of prompting

* Watch for the LME setup to complete in docker

* Start running tests on the ubuntu 22.04 container

* Fixes spacing in the docker pipeline

* Installs python3.10-venv in the docker pipeline

* Fixes the testing path in the docker pipeline

* Retrieve Elastic password from Ubuntu 22.04 container

* Adds retrieval of Elastic and Kibana passwords from Ubuntu 22.04 container

* Change the path to get the ip address

* Change the path inside of the container to get the secrets

* Modify the escaping on extract secrets

* Prints the secrets to the console

* Test excaping output of extract secrets

* Escape the output of extract secrets

* Comment out the tests that are failing

* Update the docker image to pass the tests

* Creates the ability to build the docker image and deploy LME in a container

* Removes the check for the Elasticsearch indices/data streams

* Waits longer before rerunning Fleet setup

* Shuts down and destroys Ubuntu 22.04 container after running tests

* Shuts down and destroys Ubuntu 22.04 container after running tests

* Builds a loop to test all container versions

* Adds a sleep to allow time for the containers to start

* Creates more robust Ansible installation

* Fixes Dockerfiles to not use systemd service

* Run all container builds in parallel

* Adds back in the linux_only workflow and adds a script to run all the containers with act

* Adds selenium tests to the docker pipeline

* Corrects the path to the selenium tests

* Adds chrome to the docker pipeline for selenium tests

* Changes to test scripts for docker install (#663)

* Changes to test scripts for docker install

* Auto approve docker install

---------

Co-authored-by: Clint Baxley <Clinon.Baxley@ecstech.com>

* api test changes for docker (#668)

* api test changes for docker

* Update test_server.py

Updated Elastic agent version assertion

* Update test_server.py for agent version

* Change the version check to check for 8.15.3 instead of 8.15.5

---------

Co-authored-by: Clint Baxley <Clinon.Baxley@ecstech.com>
Co-authored-by: rishagg01 <149525835+rishagg01@users.noreply.github.com>
@cbaxley cbaxley deleted the rishagg-649-docker-pipeline branch June 13, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants