Showing posts with label boot strapping. Show all posts
Showing posts with label boot strapping. Show all posts

Monday, June 23, 2014

AWS EC2 user data

You can perform any bootstrapping action you would like using user data.  Here is an example of installing Apache, PHP, and MySQL.  Then Apache, PHP and MySQL are started.  Then a sample application is installed on Apache.

#!/bin/sh
yum -y install httpd php mysql php-mysql
chkconfig httpd on
/etc/init.d/httpd start
cd /tmp
wget http://us-east-1-aws-training.s3.amazonaws.com/self-paced-lab-4/examplefiles-as.zip
unzip examplefiles-as.zip
mv examplefiles-as/* /var/www/html

Tuesday, December 3, 2013

Boot strapping - automatically install and start Apache on EC2 launch

Here is a very common user data boot strapping script for installing Apache, PHP, and starting the Apache server:
#!/bin/sh
yum -y install httpd php
chkconfig httpd on
/etc/init.d/httpd start

Saturday, August 10, 2013

Boot strapping with user data and CloudFormation

For simple bootstrapping, user data text/scripts may be adequate.  Keep in mind the limit on size is 16K for user data.


s3cmd is often used to load the bootstrap scripts for S3. More on this can be found here:

A very good document on using user data, CloudFormation, Chef, Puppet and other tools to bootstrap EC2 instances can be found here: