-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovision.sh
More file actions
executable file
·51 lines (40 loc) · 1.31 KB
/
provision.sh
File metadata and controls
executable file
·51 lines (40 loc) · 1.31 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
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash -ex
sudo \
DOCKER_VER="1.12.3" \
DOCKER_URL="https://apt.dockerproject.org/repo" \
COMPOSE_VER="1.9.0" \
DOCKER_USER=`whoami` \
sh <<'EOF'
apt-key adv \
--keyserver hkp://p80.pool.sks-keyservers.net:80 \
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb $DOCKER_URL ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
DEBIAN_FRONTEND=noninteractive \
apt-get -y update && \
apt-get -y upgrade
apt-get -y --force-yes install \
docker-engine=${DOCKER_VER}-0~trusty \
linux-image-extra-$(uname -r) \
ack-grep git make unzip vim
dpkg-divert \
--local --divert /usr/bin/ack \
--rename --add /usr/bin/ack-grep
cd /tmp
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
apt-get -y purge unzip
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
rm -rf awscli-bundle*
compose_url="https://github.com/docker/compose/releases/download"
compose_pkg="docker-compose-`uname -s`-`uname -m`"
curl -sSL "$compose_url/$COMPOSE_VER/$compose_pkg" > docker-compose
mv docker-compose /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
usermod -aG docker ${DOCKER_USER}
usermod -aG docker $(whoami)
echo dev-vm > /etc/hostname
EOF
ln -snf /vagrant/projects ~/projects
cat > ~/.bashrc <<'EOF'
export EDITOR=vim
EOF