On Fedora 31 passworless root login is no longer working. We already
install a ssh key, may as well use it.
This also reduces the live boot timeout to 2s from 60s, which should
help with timeout problems when booting.
This splits out the lorax-composer specific execution so that the built
image can be downloaded from the build vm and booted by the host instead
of using nested virt to try and boot it inside the build vm.
Also adds copying the ssh key from the build vm so that it can log into
the image and run the test_boot_* scripts.
Nested virt is not reliable enough, especially on other arches, to rely
on for testing the created images. This moves the test code into
test_boot_* scripts to be run from inside the booted images.
It also adds copying the results of the build into
/var/tmp/test-results/, and includes the generated ssh key so that
whatever boots the image can also log in.
The tests/test_image.sh script has been added to handle running the
test_boot_* scripts without any of the extra lorax-composer specific
setup.
These are two sides of the same variable (domacboot) so sphinx-argparse
generated docs are a bit confusing. Override the docs for them to clear
things up.
The 'enabled' field in the /compose/types output now reflects whether or
not the type is supported on the current architecture. Disabled types
are not allowed to be built, and will raise an error like:
Compose type 'alibaba' is disabled on this architecture
The python modules that Ansible depends on for Azure support are old,
and incompatible with Fedora. Drop support until the azure playbook is
supported with Fedora packages.
This outputs a TOML template of the settings needed for setting the
upload credentials. It can be passed to 'upload start' and to 'compose
start', as well as used to set the profile for 'providers push'
This uses a new Ansible module, ec2_snapshot_import, which is included
here until it is available from upstream.
It will upload the AMI to s3, convert it to a snapshot, and then
register the snapshot as an AMI. The s3 object is deleted when it has
been successfully uploaded.
Since we have both compose uuids and upload uuids they need to be
clearly named. This updates the upload naming to use 'upload_uuid' in
the inputs, and 'upload_id' in the output (_id instead of _uuid for
consistency with build_id naming in the status responses).
This also adds 'upload_id' to the /upload/log response.
This tests the routes for saving a profile, listing profiles, deleting
profiles, as well as composing with upload.
The composes run fake composes with upload data, one selects a profile
the other passes in the settings. No actual upload is done, but it tests
that the info, log, and cancel routes work.
This also updates the test setup to copy over the share/lifted directory
so that the providers are available to the tests.
This allows deleting a provider's profile. Pass the provider and profile
name like:
/api/v1/upload/providers/delete/azure/test-settings
A standard json response will be returned.
This extends the /compose/ route to support uploading with either an
existing profile, or with one-time use settings passed in the POST.
To select a profile include the provider and profile, as returned by
`/uploads/providers`:
"upload": {
"image_name": "My Image",
"provider": "azure",
"profile": "production-azure-settings"
}