Skip to content
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

[deprecated] Initial ansible proof of concept #3588

Closed
wants to merge 1 commit into from

Conversation

ventifus
Copy link
Collaborator

@ventifus ventifus commented May 20, 2024

What this PR does / why we need it:

We have been running smoketests in regions manually. This is error-prone and needs to be automated. As a first step here is the minimum viable Ansible playbook that creates a cluster, waits for it to become healthy via kube api, runs az aro update, then deletes the cluster. This is designed to run Ansible from a container so that users' development hosts don't need to have Ansible installed and will facilitate running smoketests in an automated fashion in the future.

This will allow us to evaluate the following questions:

Test plan for issue:

To test, make sure you've got a valid az login session. This is passed through to the container via your ~/.azure directory.

Then run

$ make smoketest

This will first build the required aro-smoketest container image if it doesn't exist, then it will execute ansible-playbook in the container. By default, the /smoketest files are baked into the container image to ensure when this is automated in the future the ansible playbook is in a known state. To test local changes, use the

$ make smoketest-dev

target; this will mount your /smoketest tree into the container.

To personalize the resulting resource groups, set the CLUSTERPREFIX as desired. For example

$ make smoketest CLUSTERPREFIX=${USER}

The default region used is eastus. Set the REGION parameter to choose a different region:

$ make smoketest REGION=centraluseuap

To choose one or more cluster configurations, set the CLUSTERPATTERN parameter to a wildcard string that matches the cluster scenarios you wish to test:

$ make smoketest CLUSTERPATTERN=smoketest-udr

Currently implemented cluster configurations are:

  • smoketest-basic: Simplest cluster, nothing fancy
  • smoketest-private: Simple cluster with apiserver and ingress visibility set to private
  • smoketest-enc: Encryption-at-host enabled
  • smoketest-udr: UserDefinedRouting with a blackhole Route Table
  • smoketest-byok: Disk encryption using bring-your-own-key

Is there any documentation that needs to be updated for this PR?

Yes

How do you know this will function as expected in production?

@ventifus ventifus force-pushed the smoke-test branch 9 times, most recently from 216cc2c to 5cecdc6 Compare May 24, 2024 21:58
Copy link

github-actions bot commented Jun 6, 2024

Please rebase pull request.

@github-actions github-actions bot added the needs-rebase branch needs a rebase label Jun 6, 2024
@ventifus ventifus force-pushed the smoke-test branch 6 times, most recently from 9e35cd3 to 3d7560b Compare June 11, 2024 16:42
@github-actions github-actions bot removed the needs-rebase branch needs a rebase label Jun 11, 2024
@github-actions github-actions bot added the needs-rebase branch needs a rebase label Jun 12, 2024
Copy link

Please rebase pull request.

@pepedocs
Copy link
Collaborator

pepedocs commented Jun 13, 2024

Looks good, I ran make smoketest and I was getting the following error.

docker run --rm -t -v ${AZURE_CONFIG_DIR:-~/.azure}:/opt/app-root/src/.azure:O aro-smoketest:83860bc -i regions/eastus -l smoketest-basic* -e CLUSTERPREFIX=smoketest  smoketest.yaml                                                                                                     
docker: Error response from daemon: invalid mode: O.
See 'docker run --help'.
make: *** [Makefile:304: smoketest] Error 125

I think the error is caused by docker volume mount mode to O which it doesn't support? I thought it was meant for podman overlay.

I guess this is just a nit: I think it would be helpful if we can run a dry-run and see what's going to be installed or add an interactive option for semi-automated use cases (e.g. just want to run it in my laptop and see what's going to be changed before the actual installation).

@ventifus ventifus changed the title Initial ansible proof of concept [deprecated] Initial ansible proof of concept Jun 14, 2024
@bitoku
Copy link
Collaborator

bitoku commented Jun 25, 2024

Why is this deprecated?

@ventifus ventifus closed this Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase branch needs a rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants