GoogleCloudPlatform / google-cloud-ops-agents-ansible

Ansible Role for Google Cloud Ops
https://cloud.google.com/products/operations
Apache License 2.0
100 stars 55 forks source link

Change molecule tests to use gcp delegated driver instead of docker. #59

Closed rmoriar1 closed 3 years ago

rmoriar1 commented 3 years ago

Use GCP as a delegated driver for our molecule tests so they can be run on Kokoro.

Add test that checks that the agent is running after the playbook run. Add directory that includes custom configs (default config + comment) which we verify was moved onto the VM successfully. Delete github actions CI workflow.

go/sdi-ansible#molecule is a high level overview of what molecule is doing. Not mentioned there is the create.yml file which creates the delegated driver VMs and destroy.yml which deletes them.

This is step 1 as outlined in go/ansible-ops-agent-tests-migration.

b/183216024

rmoriar1 commented 3 years ago

I've removed the uninstall test scenarios and instead added that test to the verify.yml playbook which should simplify things considerably.

rmoriar1 commented 3 years ago

Ok the tests are succeeding modulo two minor issues 1. we're limited to 21 static addresses per region so we need to hard code different regions for each agent test to run in until we get a quota increase 2. the ansible-lint check is failing with due to some sort of version incompatibility issue so I've excluded it for the time being

rmoriar1 commented 3 years ago
  1. we're limited to 21 static addresses per region so we need to hard code different regions for each agent test to run in until we get a quota increase

This was resolved by removing the create_address step and just defaulting to using ephemeral addresses. Still debugging 2.

rmoriar1 commented 3 years ago
  1. the ansible-lint check is failing with due to some sort of version incompatibility issue so I've excluded it for the time being

Downloading the latest version of ansible-lint onto the GCP_UBUNTU VM is non-trivial. So I will leave this as a todo and add it back in once an updated version of ansible-lint is available through pip.

rmoriar1 commented 3 years ago

@martijnvans @qingling128 This is ready for another pass when you get the chance. All tests are green.

martijnvans commented 3 years ago

Looks good! Nice work!