Fixes Octavia Amphora RHEL based images

A few elements were needed to define specific repositories.

    amphora-agent: Updated and now buids with sysvinit instead
of upstart Octavia requries the use_upstart parameter to be set
to False to work with RHEL systems.
    amphora-agent-ubuntu: original element that supported upstart
    keepalived-octavia: Supports RHEL repositories

Change-Id: I961663d105ad09e7f05c77cb92efaa469f386fdc
Closes-Bug: #1531092
This commit is contained in:
ptoohill1 2016-01-26 23:15:12 -06:00
parent 6f786fdad7
commit 63111acc90
12 changed files with 50 additions and 12 deletions

View File

@ -327,17 +327,18 @@ if [ "$AMP_ROOTPW" ]; then
export DIB_PASSWORD=$AMP_ROOTPW
fi
# Add the devstack no-resolvconf hack
AMP_element_sequence="$AMP_element_sequence no-resolvconf"
# Add the Octavia Amphora agent.py element
AMP_element_sequence="$AMP_element_sequence amphora-agent"
# Add pyroute2 element
AMP_element_sequence="$AMP_element_sequence pyroute2"
# Add the keepalived Octavia element
AMP_element_sequence="$AMP_element_sequence keepalived-octavia-ubuntu"
# Add the Octavia keepalived, Amphora Agent and Pyroute elements
if [ "$AMP_BASEOS" = "ubuntu" ]; then
AMP_element_sequence="$AMP_element_sequence no-resolvconf"
AMP_element_sequence="$AMP_element_sequence amphora-agent-ubuntu"
AMP_element_sequence="$AMP_element_sequence pyroute2"
AMP_element_sequence="$AMP_element_sequence keepalived-octavia-ubuntu"
else
AMP_element_sequence="$AMP_element_sequence no-resolvconf"
AMP_element_sequence="$AMP_element_sequence amphora-agent"
AMP_element_sequence="$AMP_element_sequence pyroute2"
AMP_element_sequence="$AMP_element_sequence keepalived-octavia"
fi
# Allow full elements override
if [ "$DIB_ELEMENTS" ]; then

View File

@ -0,0 +1,3 @@
Element to install an Octavia Amphora agent.

View File

@ -0,0 +1 @@
source-repositories

View File

@ -0,0 +1,13 @@
#!/bin/bash
set -eux
install-packages libffi-dev libssl-dev
cd /opt/amphora-agent/
pip install -r requirements.txt
python setup.py install
cp etc/init/amphora-agent.conf /etc/init/
mkdir /etc/octavia
# we assume certs, etc will come in through the config drive
mkdir /etc/octavia/certs
mkdir /var/lib/octavia

View File

@ -0,0 +1,2 @@
# This is temporary until we have a pip package
amphora-agent git /opt/amphora-agent https://review.openstack.org/openstack/octavia

View File

@ -0,0 +1,2 @@
amphora-agent:
default: amphora-agent

View File

@ -5,7 +5,7 @@ install-packages libffi-dev libssl-dev
cd /opt/amphora-agent/
pip install -r requirements.txt
python setup.py install
cp etc/init/amphora-agent.conf /etc/init/
cp etc/initd/amphora-agent /etc/init.d/
mkdir /etc/octavia
# we assume certs, etc will come in through the config drive
mkdir /etc/octavia/certs

View File

@ -0,0 +1,3 @@
Element to install an Octavia Amphora with keepalived backend.

View File

@ -0,0 +1,2 @@
os-svc-install
package-installs

View File

@ -0,0 +1,3 @@
{
"keepalived": null
}

View File

@ -0,0 +1,6 @@
#!/bin/bash
set -eu
set -o pipefail
chkconfig keepalived on

View File

@ -0,0 +1,2 @@
vrrp-octavia:
default: vrrp-octavia