Skip to content

Allows the OpenStack base image, flavor, and ssh_keyname to be configured per instance

Jillian Vogel requested to merge jill/configure_base_image into master

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:

  1. Snapshot your opencraft VM, since there are database migrations you may want to be able to revert.

  2. Checkout this branch, and make migrate to update the database schema.

  3. Create an instance using production_instance_factory.

  4. 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"}
  5. 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).

  6. Unset instance.openstack_server_base_image = None, and spawn another appserver. That server's settings should default to your .env file's OPENSTACK_SANDBOX_BASE_IMAGE settings.

Reviewers

  • @haikuginger

Merge request reports