-
-
Save dorancemc/6d6cab59c86416732b14e572441bc71c to your computer and use it in GitHub Desktop.
Setup CentOS server with AWS CFN bootstrap
This file contains 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 | |
# Setup CentOS 7 host as AMI | |
# Update base OS update, and install EPEL repo and Python Pip | |
sudo yum -y update && | |
sudo yum -y install epel-release && | |
sudo yum -y install python-pip && | |
# Install Python add-ons: | |
sudo pip install pystache && | |
sudo pip install argparse && | |
sudo pip install python-daemon && | |
sudo pip install requests && | |
# Install CFN-BootStrap from source | |
curl -sSL https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz | sudo tar -xpf -C - /opt | |
cd /opt/aws-cfn-bootstrap-1.4/ | |
sudo python setup.py build | |
sudo python setup.py install | |
# Configure CFN | |
sudo ln -s /usr/init/redhat/cfn-hup /etc/init.d/cfn-hup | |
sudo chmod 775 /usr/init/redhat/cfn-hup | |
cd /opt | |
sudo mkdir aws | |
cd aws | |
sudo mkdir bin | |
ln -s /usr/bin/cfn-hup /opt/aws/bin/cfn-hup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment