Octavia Base Image¶
Launchpad blueprint:
https://blueprints.launchpad.net/octavia/+spec/base-image
Octavia is an operator-grade reference implementation for Load Balancing as a Service (LBaaS) for OpenStack. The component of Octavia that does the load balancing is known as amphora. Amphora may be a virtual machine, may be a container, or may run on bare metal. Creating images for bare metal amphora installs is outside the scope of this 0.5 specification but may be added in a future release.
Amphora will need a base image that can be deployed by Octavia to provide load balancing.
Problem description¶
Octavia needs a method for generating base images to be deployed as load balancing entities.
Proposed change¶
Leverage the OpenStack diskimage-builder project [1] tools to provide a script that builds qcow2 images or a tar file suitable for use in creating containers. This script will be modeled after the OpenStack Sahara [2] project’s diskimage-create.sh script.
This script and associated elements will build Amphora images. Initial support with be with an Ubuntu OS and HAProxy. The script will be able to use Fedora or CentOS as a base OS but these will not initially be tested or supported. As the project progresses and/or the diskimage-builder project adds support for additional base OS options they may become available for Amphora images. This does not mean that they are necessarily supported or tested.
The script will use environment variables to customize the build beyond the Octavia project defaults, such as adding elements.
The initial supported and tested image will be created using the diskimage-create.sh defaults (no command line parameters or environment variables set). As the project progresses we may add additional supported configurations.
Command syntax:
Container support
The Docker command line required to import a tar file created with this script is [3]:
$ docker import - image:amphora-x64-haproxy < amphora-x64-haproxy.tar
Alternatives¶
Deployers can manually create an image or container, but they would need to make sure the required components are included.
Data model impact¶
None
REST API impact¶
None
Security impact¶
None
Notifications impact¶
None
Other end user impact¶
None
Performance Impact¶
None
Other deployer impact¶
This script will make creating an Octavia Amphora image or container simple.
Developer impact¶
None
Implementation¶
Assignee(s)¶
Michael Johnson <johnsom>
Work Items¶
- Write diskimage-create.sh script based on Sahara project’s script.
- Identify the list of packages required for Octavia Amphora.
- Create required elements not provided by the diskimage-builder project.
- Create unit tests
Dependencies¶
This script will depend on the OpenStack diskimage-builder project.
Testing¶
Initial testing will be completed using the default settings for the diskimage-create.sh tool.
- Unit tests with tox
- Validate that the image is the correct size and mounts via loopback
- Check that a valid kernel is installed
- Check that HAProxy and all required packages are installed
- tempest tests