Solum supports following deployment configurations:
- Deploying application containers (which we call as 'Deployment Units' or DU) using nova-docker (deploy-direct-container configuration)
- Deploying application containers (DU) on VM (deploy-container-on-vm configuration)
Workings of each of these configurations is described below.
Deploying DU using nova-docker
This configuration is characterized by three things. First nova needs to be configured with the nova-docker compute driver. This is done by adding following line to /etc/nova/nova.conf: compute_driver = novadocker.virt.docker.driver.DockerDriver
Second, the DU images need to be stored in Glance for the nova-docker driver to deploy it. In Solum there is a configuration parameter that you can set that will cause the DU images to be stored in Glance. This is done by setting the image_storage property in /etc/solum/solum.conf to 'glance'.
Third, internally Solum performs the deployment using the 'basic' heat template, which is available at: https://github.com/openstack/solum/blob/master/etc/solum/templates/basic.yaml
Deploying DU on VM
At a high-level this configuration works by first spinning up a VM and then running the DU image on it. Solum achieves this by:
- storing the DU image in Swift - generating a Swift tempURL for the DU - passing instructions as part of the cloud-init section for the Heat template for deploying a VM to download the DU image from Swift, load it, and run it. Internally Solum performs the deployment using the 'coreos' heat template for deployment, which is available at: https://github.com/openstack/solum/blob/master/etc/solum/templates/coreos.yaml Following script lists the steps that get executed upon cloud-init https://github.com/openstack/solum/blob/master/contrib/common/robust-du-handling.sh
In order to make this work, following settings are required.
In nova's /etc/nova/nova.conf, set the compute_driver value to 'libvirt.LibvirtDriver'.
Restart nova services through their respective screen sessions. Nova services have names that start with 'n-'. You can restart these nova services by shutting them down (Cntrl-C) and starting them (load the previous command from the screen session and execute it).
In solum's /etc/solum/solum.conf set the following configuration variables:
- image_storage value to 'swift' - image_format value to 'vm' - add a variable 'image' and set its value to the id of the VM image (from Glance) that you want to use to spin up the VM. This VM image needs to have Docker installed on it. One option is to use a Coreos image (check: https://coreos.com/os/docs/latest/booting-on-openstack.html) You need to upload the Coreos image to glance as outlined in https://coreos.com/os/docs/latest/booting-on-openstack.html. Then specify the name that you used in uploading the image to Glance as the value of the 'image' variable. - add a variable 'flavor' and set its value to the flavor of the VM. You can set this value to '3' which corresponds to m1.medium flavor.
Restart solum services through their respective screen sessions. Solum services have names that start with 'solum-'