Created
January 28, 2016 20:22
-
-
Save the2hill/5207564f12a0d54b3733 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is meant to be executed from packer | |
if [ -z "$PACKER_BUILD_NAME" ] && [ -z "$PACKER_BUILDER_TYPE" ]; then | |
echo "Do not run by hand, this is run by packer" | |
exit 1 | |
fi | |
export DEBIAN_FRONTEND=noninteractive | |
# Install required packages | |
apt-get install -q -y haproxy \ | |
snmpd \ | |
openssh-sftp-server \ | |
python-pip \ | |
python-dev \ | |
libffi-dev \ | |
libssl-dev \ | |
git | |
pip install -U 'pyroute2>=0.3.10' | |
pip install --upgrade Werkzeug | |
# Setup Octavia, build from source for now | |
rm -rf /opt/octavia | |
git clone https://github.com/openstack/octavia.git /opt/octavia | |
cd /opt/octavia | |
git fetch https://[email protected]/openstack/octavia refs/changes/21/237421/7 && git cherry-pick FETCH_HEAD | |
git fetch https://[email protected]/openstack/octavia refs/changes/94/232294/27 && git cherry-pick FETCH_HEAD | |
cp etc/initd/amphora-agent /etc/init.d/ | |
chmod +x /etc/init.d/amphora-agent | |
insserv amphora-agent | |
pip install -r requirements.txt | |
python setup.py install | |
# Remove base haproxy init.d script | |
rm /etc/init.d/haproxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment