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:
parent
17193a0dde
commit
3ba7505761
@ -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"
|
||||
|
@ -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
|
||||
|
3
elements/vrrp-octavia/README.rst
Normal file
3
elements/vrrp-octavia/README.rst
Normal file
@ -0,0 +1,3 @@
|
||||
Element to install keepalived.
|
||||
|
||||
|
1
elements/vrrp-octavia/element-deps
Normal file
1
elements/vrrp-octavia/element-deps
Normal file
@ -0,0 +1 @@
|
||||
source-repositories
|
9
elements/vrrp-octavia/install.d/77-vrrp
Executable file
9
elements/vrrp-octavia/install.d/77-vrrp
Executable 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
|
2
elements/vrrp-octavia/source-repository-vrrp-octavia
Normal file
2
elements/vrrp-octavia/source-repository-vrrp-octavia
Normal 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
|
2
elements/vrrp-octavia/svc-map
Normal file
2
elements/vrrp-octavia/svc-map
Normal file
@ -0,0 +1,2 @@
|
||||
vrrp-octavia:
|
||||
default: vrrp-octavia
|
Loading…
Reference in New Issue
Block a user