-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·40 lines (32 loc) · 1.21 KB
/
setup.sh
File metadata and controls
executable file
·40 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash -e x
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5
# This only works for Ubuntu rightnow
# Anyone want to write a Chef recipe?
apt-get update
# install ec2 tools package dependencies
apt-get -y install grub kpartx gdisk
# update CA certs
# fixes intermediate "SSL certificate problem" errors from curl
# See https://forums.aws.amazon.com/thread.jspa?messageID=341463񓗗
#
update-ca-certificates
# setup ruby env
apt-get -y install ruby1.9.1
apt-get -y install ruby1.9.1-dev
update-alternatives --set ruby /usr/bin/ruby1.9.1
update-alternatives --set gem /usr/bin/gem1.9.1
gem install bundler --no-rdoc --no-ri
bundle
export TOOLS_DIR=/tmp/ec2tools
mkdir -p $TOOLS_DIR
# install EC2 tools v1.5 or greater
wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.6.13.0.zip
unzip ec2-api-tools-1.6.13.0.zip -d $TOOLS_DIR
wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools-1.5.0.0.zip
unzip ec2-ami-tools-1.5.0.0.zip -d $TOOLS_DIR
# setup ec2 tools env
#
export EC2_HOME=$TOOLS_DIR/ec2-api-tools-1.6.13.0
export PATH=$TOOLS_DIR/ec2-api-tools-1.6.13.0/bin:${PATH}
export EC2_AMITOOL_HOME=$TOOLS_DIR/ec2-ami-tools-1.5.0.0
export PATH=$TOOLS_DIR/ec2-ami-tools-1.5.0.0/bin:${PATH}