Setup infrastructure to make builds & deploys of meteor apps

It can be done with simple script running on Ubuntu 14.04 in AWS:

# Prepare
apt-get update -y
apt-get install -y gcc g++ make curl python2.7

# Install Docker
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get purge lxc-docker
apt-cache policy docker-engine
apt-get update
apt-get install linux-image-extra-$(uname -r) -y
apt-get install docker-engine -y

# Install Git
add-apt-repository ppa:git-core/ppa -y
apt-get update
apt-get install git -y

# Install EB CLI
curl -O https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py
pip install awsebcli

# Install node
wget http://nodejs.org/dist/v0.10.41/node-v0.10.41.tar.gz
tar -zxf node-* && cd node-*
./configure
make
make install

# Install meteor
curl https://install.meteor.com/ | sh

# Update npm
npm install npm -g

# Cleanup
rm -rf /scripts/node-*
rm -f /scripts/get-pip.py
rm -f /scripts/node-*

# Check results
apt-get update -y
node --version > /scripts/initialScriptresults.txt
npm --version >> /scripts/initialScriptresults.txt
meteor --version >> /scripts/initialScriptresults.txt
git --version >> /scripts/initialScriptresults.txt
docker --version >> /scripts/initialScriptresults.txt
python --version >> /scripts/initialScriptresults.txt
eb --version >> /scripts/initialScriptresults.txt

 

Results:

Screen Shot 2015-12-21 at 19.25.49

 

 

Pin It

Leave a Reply