#!/bin/bash set -e # This script assumes Ubuntu 14.04 is being used. # It will create a standard Cobbler environment that can be used for acceptance testing. # With this enviornment spun up, the config should be: # COBBLER_URL=http://127.0.0.1:25151 # COBBLER_USERNAME=cobbler # COBBLER_PASSWORD=cobbler sudo apt-get update sudo apt-get install -y build-essential git mercurial cd echo 'export PATH=$PATH:$HOME/terraform:$HOME/go/bin' >> ~/.bashrc export PATH=$PATH:$HOME/terraform:$HOME/go/bin sudo wget -O /usr/local/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme sudo chmod +x /usr/local/bin/gimme /usr/local/bin/gimme 1.6 >> ~/.bashrc eval "$(/usr/local/bin/gimme 1.6)" mkdir ~/go echo 'export GOPATH=$HOME/go' >> ~/.bashrc echo 'export GO15VENDOREXPERIMENT=1' >> ~/.bashrc export GOPATH=$HOME/go source ~/.bashrc go get github.com/tools/godep go get github.com/hashicorp/terraform cd $GOPATH/src/github.com/hashicorp/terraform godep restore # Cobbler sudo apt-get install -y cobbler cobbler-web debmirror dnsmasq sudo tee /etc/cobbler/modules.conf <