Allows the OpenStack base image, flavor, and ssh_keyname to be configured per instance
This change allows the OpenStack base image, flavor, and ssh keyname settings to be made on the instance and its appservers, instead of globally for the app. The default values are pulled from the global .env settings.
Testing instructions:
-
Snapshot your opencraft VM, since there are database migrations you may want to be able to revert.
-
Checkout this branch, and
make migrate
to update the database schema. -
Create an instance using
production_instance_factory
. -
Set the instance's openstack settings to use a different base image, e.g. this one which is available on our Dev OVH:
instance.openstack_server_base_image = {"name": "xenial-server-cloudimg-amd64-disk1-unmodified-20161214"}
-
Spawn a new appserver, and note that it uses the instance's base image. Provisioning will fail because
/usr/bin/python
is missing from the xenial base image (ref https://github.com/edx/configuration/pull/3606). -
Unset
instance.openstack_server_base_image = None
, and spawn another appserver. That server's settings should default to your.env
file'sOPENSTACK_SANDBOX_BASE_IMAGE
settings.
Reviewers
-
@haikuginger