Flatcar icon indicating copy to clipboard operation
Flatcar copied to clipboard

[RFE] Add Openstack to Flatcar test coverage

Open tormath1 opened this issue 3 years ago • 2 comments

Current situation

Mantle does support openstack platform and Flatcar has Openstack releases but we do not have a deployed Openstack infrastructure to run tests against.

Impact

No Openstack coverage.

Ideal future situation

Having an Openstack test environment.

Implementation options

  • https://github.com/flatcar-linux/mantle/pull/350
  • https://github.com/flatcar-linux/mantle/pull/349

Additional information

TBD

tormath1 avatar Jun 23 '22 12:06 tormath1

A devstack instance has been deployed and Mantle codebase updated to work with only one public IP. The last thing to do: add vendor script to flatcar-linux/script to implement the kola logic.

tormath1 avatar Aug 05 '22 14:08 tormath1

OpenStack CI scripts are missing on the two pipelines:

  • https://github.com/flatcar-linux/scripts/tree/main/ci-automation/vendor-testing
  • https://github.com/flatcar-linux/scripts/tree/main/jenkins/kola

Implementation options

Flatcar OpenStack image first needs to be created on the OpenStack infra using the URL of the build image, example:

IMAGE_ID=$(ore openstack create-image --name test-ore --file https://alpha.release.flatcar-linux.net/amd64-usr/3305.0.0/flatcar_production_openstack_image.img.gz --config-file ./openstack.json)

Then the IMAGE_ID can be used to run the test:

kola run --openstack-network public --openstack-domain default --platform openstack --openstack-flavor m1.medium --openstack-user openstack-user --openstack-host 1.2.3.4 --openstack-keyfile ./id_rsa --openstack-image "${IMAGE_ID}" --openstack-config-file ./openstack.json "*"

config-file can be stored as a credential, same for the keyfile, the user and OpenStack host. Here's the expected content of the config-file: https://github.com/flatcar-linux/mantle/blob/c833f695503b47a166d3305e0b781edaf521135b/auth/openstack.go#L27-L33

Additional information

Garbage collector can also be implemented here: https://github.com/flatcar-linux/scripts/blob/main/ci-automation/garbage_collect_cloud.sh

tormath1 avatar Aug 16 '22 08:08 tormath1