Merge "Create Compass build script."
[genesis.git] / compass / deploy / prepare.sh
1 sudo apt-get update -y
2 sudo apt-get install git python-pip python-dev -y
3 vagrant --version
4 if [[ $? != 0 ]]; then
5     vagrant_pkg_url=https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.2_x86_64.deb
6     wget ${vagrant_pkg_url}
7     sudo dpkg -i $(basename ${vagrant_pkg_url})
8 else
9     echo "vagrant is already installed"
10 fi
11 sudo apt-get install libxslt-dev libxml2-dev libvirt-dev build-essential qemu-utils qemu-kvm libvirt-bin virtinst libmysqld-dev -y
12 sudo service libvirt-bin restart
13
14 for plugin in vagrant-libvirt vagrant-mutate; do
15     vagrant plugin list |grep $plugin
16     if [[ $? != 0 ]]; then
17         vagrant plugin install $plugin --plugin-source https://ruby.taobao.org
18     else
19         echo "$plugin plugin is already installed"
20     fi
21 done
22 sudo pip install --upgrade ansible virtualenv
23 #precise_box_vb_url=https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
24 #precise_box_vb_filename=$(basename ${precise_box_vb_url})
25 centos65_box_vb_url=https://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.5-x86_64-v20140504.box
26 centos65_box_vb_filename=$(basename ${centos65_box_vb_url})
27 #wget ${precise_box_vb_url}
28 vagrant box list |grep centos65
29 if [[ $? != 0 ]]; then
30     wget ${centos65_box_vb_url}
31     mv ${centos65_box_vb_filename} centos65.box
32     vagrant mutate centos65.box libvirt
33 else
34     echo "centos65 box already exists"
35 fi