Updates to vagrantfile and adding in extra provisioning
This commit is contained in:
parent
9c98414c85
commit
dea3f597ad
2 changed files with 62 additions and 61 deletions
8
Vagrantfile
vendored
8
Vagrantfile
vendored
|
@ -19,10 +19,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
|
|
||||||
# Drone by default runs on port 80. Forward from host to guest
|
# Drone by default runs on port 80. Forward from host to guest
|
||||||
config.vm.network :forwarded_port, guest: 80, host: 8080
|
config.vm.network :forwarded_port, guest: 80, host: 8080
|
||||||
config.vm.network :private_network, ip: "192.168.56.101"
|
|
||||||
|
# Sync this repo
|
||||||
|
config.vm.synced_folder ".", "/opt/drone"
|
||||||
|
|
||||||
# system-level initial setup
|
# system-level initial setup
|
||||||
config.vm.provision "shell" do |s|
|
config.vm.provision "shell", path: "scripts/provision.sh"
|
||||||
s.path = "scripts/provision.sh"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,68 +15,69 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# apt-get update.
|
# apt-get update.
|
||||||
if [ -e /root/package-list-updated ]; then
|
#if [ -e /root/package-list-updated ]; then
|
||||||
echo "Skipping package cache update. To force, remove /root/package-list-updated and re-provision."
|
# echo "Skipping package cache update. To force, remove /root/package-list-updated and re-provision."
|
||||||
else
|
#else
|
||||||
echo "Updating package cache."
|
# echo "Updating package cache."
|
||||||
sudo apt-get update -qq
|
# sudo apt-get update -qq
|
||||||
touch /root/package-list-updated
|
# touch /root/package-list-updated
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
echo "Installing Packages..."
|
# FIXME: Don't run this every time?
|
||||||
|
sudo apt-get update -qq
|
||||||
|
|
||||||
|
echo "Installing Base Packages"
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
( sed -e 's/#.*$//' | xargs sudo apt-get install -qqy --force-yes ) <<-EOF
|
( sed -e 's/#.*$//' | xargs sudo apt-get install -qqy --force-yes ) <<-EOF
|
||||||
|
build-essential
|
||||||
|
|
||||||
|
# These are needed for go get
|
||||||
|
bzr
|
||||||
git
|
git
|
||||||
|
mercurial
|
||||||
|
|
||||||
|
# Other
|
||||||
|
vim
|
||||||
|
|
||||||
# Stuff required by medley
|
# Stuff required by medley
|
||||||
python-software-properties # TODO why do we need this?
|
#python-software-properties # TODO why do we need this?
|
||||||
build-essential # needed to compile parts of packages
|
#curl # many scripts expect this to fetch urls.
|
||||||
curl # many scripts expect this to fetch urls.
|
#python-dev # for compiling python modules
|
||||||
python-dev # for compiling python modules
|
#python-setuptools # for installing/making packages
|
||||||
python-imaging # Useful if you do not want to compile PIL
|
#python-unittest2 # standard unit testing library
|
||||||
python-pip # for installing things
|
#python-virtualenv # for partioning python projects
|
||||||
python-psycopg2 # python postgresql library
|
|
||||||
python-setuptools # for installing/making packages
|
|
||||||
python-unittest2 # standard unit testing library
|
|
||||||
python-virtualenv # for partioning python projects
|
|
||||||
pv # "pipe viewer", for nice progressbars in med
|
|
||||||
exuberant-ctags # required by 'med tags'
|
|
||||||
|
|
||||||
# geospatial libraries
|
#python-lxml # TODO why do we need this?
|
||||||
libgdal1-dev
|
#libxml2 # TODO why do we need this?
|
||||||
libgdal1-1.7.0
|
#libxml2-dev # TODO why do we need this?
|
||||||
libgeos-3.2.2
|
#libxslt1-dev # TODO why do we need this?
|
||||||
libgeos-c1
|
|
||||||
libgeos-dev
|
|
||||||
|
|
||||||
python-lxml # TODO why do we need this?
|
|
||||||
libxml2 # TODO why do we need this?
|
|
||||||
libxml2-dev # TODO why do we need this?
|
|
||||||
libxslt1-dev # TODO why do we need this?
|
|
||||||
|
|
||||||
postgresql-9.0 # our database.
|
|
||||||
postgresql-contrib-9.0 # django wants this
|
|
||||||
postgresql-server-dev-9.0 # TODO why do we need this?
|
|
||||||
|
|
||||||
# postgresql-9.0-postgis is not available in standard repos, so we install
|
|
||||||
# my custom package later.
|
|
||||||
#postgresql-9.0-postgis # utilize geo stuff in postgres
|
|
||||||
|
|
||||||
|
|
||||||
# Development helpers that I'm asserting don't need to be installed by
|
|
||||||
# default for everyone using this thing, they can just install them when
|
|
||||||
# they need them.
|
|
||||||
# ack-grep # adreyer thinks you should have it
|
|
||||||
# ipython # adreyer thinks you should have it
|
|
||||||
# bpython # nksmith thinks you should have it
|
|
||||||
# memcached # django can work around not having this
|
|
||||||
# proj # TODO apt says it is transitional. wtf is it for?
|
|
||||||
# pyflakes # adreyer thinks you should have it
|
|
||||||
# pylint # adreyer thinks you should have it
|
|
||||||
# python-pycryptopp # adreyer thinks you should have it
|
|
||||||
# virtualenvwrapper # convenience tool
|
|
||||||
# rabbitmq-server # adreyer thinks you should have it
|
|
||||||
# vim # adreyer thinks you should have it
|
|
||||||
|
|
||||||
openjdk-7-jre-headless # needed to run solr
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
# Install Go
|
||||||
|
go_version="1.2"
|
||||||
|
go_tarball="go${go_version}.linux-amd64.tar.gz"
|
||||||
|
go_root=/usr/local/go
|
||||||
|
go_path=/opt/go
|
||||||
|
|
||||||
|
echo "Installing Go $go_version"
|
||||||
|
if [ ! $(which go) ]; then
|
||||||
|
echo " Downloading $go_tarball"
|
||||||
|
wget --quiet --directory-prefix=/tmp https://go.googlecode.com/files/$go_tarball
|
||||||
|
|
||||||
|
echo " Extracting $go_tarball to $go_root"
|
||||||
|
sudo tar -C /usr/local -xzf /tmp/$go_tarball
|
||||||
|
|
||||||
|
echo " Configuring GOPATH"
|
||||||
|
sudo mkdir -p $go_path/src $go_path/bin $go_path/pkg
|
||||||
|
sudo chown -R vagrant $go_path
|
||||||
|
|
||||||
|
echo " Configuring env vars"
|
||||||
|
echo "export PATH=\$PATH:$go_root/bin" | sudo tee /etc/profile.d/golang.sh > /dev/null
|
||||||
|
echo "export GOROOT=$go_root" | sudo tee --append /etc/profile.d/golang.sh > /dev/null
|
||||||
|
echo "export GOPATH=$go_path" | sudo tee --append /etc/profile.d/golang.sh > /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
sudo apt-get autoremove
|
||||||
|
|
Loading…
Add table
Reference in a new issue