Skip to content

Commit

Permalink
install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Aug 16, 2016
1 parent bf37b48 commit 7dbcf97
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 20 deletions.
3 changes: 3 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,8 @@ install: bin/nomad
travis:
@sudo apt-get install -y qemu
@sh -c "'$(PWD)/scripts/update_docker.sh'"
@sh -c "'$(PWD)/scripts/install_rkt.sh'"
@sh -c "'$(PWD)/scripts/install_consul.sh'"
@sh -c "'$(PWD)/scripts/install_vault.sh'"

.PHONY: all bin cov integ test vet web web-push test-nodep
24 changes: 4 additions & 20 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ VAGRANTFILE_API_VERSION = "2"

DEFAULT_CPU_COUNT = 2
$script = <<SCRIPT
GO_VERSION="1.7.0"
CONSUL_VERSION="0.6.4"
VAULT_VERSION="0.6.0"
GO_VERSION="1.7"
# Install Prereq Packages
sudo apt-get update
Expand Down Expand Up @@ -45,22 +43,6 @@ sudo mv /tmp/gopath.sh /etc/profile.d/gopath.sh
sudo chmod 0755 /etc/profile.d/gopath.sh
source /etc/profile.d/gopath.sh
echo Fetching Consul...
cd /tmp/
wget https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip -O consul.zip
echo Installing Consul...
unzip consul.zip
sudo chmod +x consul
sudo mv consul /usr/bin/consul
echo Fetching Vault...
cd /tmp/
wget https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault${VAULT_VERSION}_linux_amd64.zip -O vault.zip
echo Installing Vault...
unzip vault.zip
sudo chmod +x consul
sudo mv vault /usr/bin/vault
# Install Docker
echo deb https://apt.dockerproject.org/repo ubuntu-`lsb_release -c | awk '{print $2}'` main | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Expand All @@ -76,8 +58,10 @@ sudo usermod -aG docker vagrant
# Setup Nomad for development
cd /opt/gopath/src/github.com/hashicorp/nomad && make bootstrap
# Install rkt
# Install rkt, consul and vault
bash scripts/install_rkt.sh
bash scripts/install_consul.sh
bash scripts/install_vault.sh
# CD into the nomad working directory when we login to the VM
grep "cd /opt/gopath/src/github.com/hashicorp/nomad" ~/.profile || echo "cd /opt/gopath/src/github.com/hashicorp/nomad" >> ~/.profile
Expand Down
15 changes: 15 additions & 0 deletions scripts/install_consul.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -ex

CONSUL_VERSION="0.6.4"
CURDIR=`pwd`

echo Fetching Consul...
cd /tmp/
wget https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip -O consul.zip
echo Installing Consul...
unzip consul.zip
sudo chmod +x consul
sudo mv consul /usr/bin/consul
cd ${CURDIR}
15 changes: 15 additions & 0 deletions scripts/install_vault.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -ex

VAULT_VERSION="0.6.0"
CURDIR=`pwd`

echo Fetching Vault ${VAULT_VERSION}...
cd /tmp/
wget https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip -O vault.zip
echo Installing Vault...
unzip vault.zip
sudo chmod +x vault
sudo mv vault /usr/bin/vault
cd ${CURDIR}

0 comments on commit 7dbcf97

Please sign in to comment.