Keepalived supporting amphorae image

Added support of keepalived in the amphora image as follows:
1. diskimage-create.sh: append the vrrp-octavia by default.
2. image-test.sh: checks if the image has keepalived installed.
3. 77-vrrp: checkout the right keepalived source code version, compile, and
install binaries.
4. svc-map: clone the keepalived rep.
5. fixed some typos in comments and readme

Change-Id: I483a66590fc343c07ca37bc11c2ad5482594d4cc
This commit is contained in:
Sherif Abdelwahab 2015-07-16 09:17:13 -07:00
parent 17193a0dde
commit 3ba7505761
7 changed files with 34 additions and 0 deletions

View File

@ -148,6 +148,8 @@ AMP_IMAGESIZE=${AMP_IMAGESIZE:-5}
OCTAVIA_ELEMENTS_PATH=$OCTAVIA_REPO_PATH/elements
if ! [ -d $OCTAVIA_ELEMENTS_PATH ]; then
echo "ERROR: Octavia elements directory not found at: " $OCTAVIA_ELEMENTS_PATH " Exiting."
exit 1
@ -328,6 +330,9 @@ fi
# Add the Octavia Amphora agent.py element
AMP_element_sequence="$AMP_element_sequence amphora-agent"
# Add the vrrp Octacia element
AMP_element_sequence="$AMP_element_sequence vrrp-octavia"
# Allow full elements override
if [ "$DIB_ELEMENTS" ]; then
AMP_element_sequence="$DIB_ELEMENTS"

View File

@ -86,5 +86,17 @@ else
echo "HAProxy package found in the Amphora image"
fi
# Check for KeepAlived
virt-inspector $AMP_IMAGE_LOCATION | \
virt-inspector --xpath \
'/operatingsystems/operatingsystem/applications/application/name[text()="keepalived"]' \
| grep -q '<name>keepalived</name>'
if [ $? != 0 ]; then
echo "ERROR: Amphora image is missing the keepalived package"
exit 1
else
echo "keepalived package found in the Amphora image"
fi
echo "Amphora image looks good."
exit 0

View File

@ -0,0 +1,3 @@
Element to install keepalived.

View File

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

View File

@ -0,0 +1,9 @@
#!/bin/bash
set -eux
#Checks out keepalived version 1.2.13, compiles and installs binaries.
cd /opt/vrrp-octavia/
git checkout v1.2.13
./configure
make
make install

View File

@ -0,0 +1,2 @@
# Clone source for keepalived version 1.2.13. Correct version is in the installation script
vrrp-octavia git /opt/vrrp-octavia https://github.com/acassen/keepalived

View File

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