Created
July 20, 2015 15:18
-
-
Save phondanai/f8bfb76f12e80e9fc622 to your computer and use it in GitHub Desktop.
Open edX provision script for vagrant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Set default locale in vagrant env | |
sudo sed -i '1 i\LC_ALL="en_US.UTF-8"' /etc/default/locale | |
# Set default timezone in vagrant env | |
cd /etc | |
sudo ln -sf /usr/share/zoneinfo/Asia/Bangkok localtime | |
sudo cp /vagrant/sources.list /etc/apt/sources.list | |
sudo apt-get update -y | |
sudo apt-get upgrade -y | |
sudo apt-get install -y build-essential software-properties-common python-software-properties \ | |
curl git-core libxml2-dev libxslt1-dev libfreetype6-dev python-pip python-apt python-dev \ | |
libxmlsec1-dev swig | |
sudo pip install --upgrade virtualenv | |
cd /var/tmp | |
git clone https://github.com/edx/configuration | |
cd /var/tmp/configuration | |
git checkout named-release/birch | |
git fetch | |
sed -i '/force=no/a \ \ \ \ validate_certs=no' /var/tmp/configuration/playbooks/roles/elasticsearch/tasks/main.yml | |
cd /var/tmp/configuration | |
sudo pip install -r requirements.txt | |
sudo chown -R vagrant:vagrant /var/tmp/configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vbguest.auto_update = false | |
config.vm.define :edx do |edx_config| | |
edx_config.vm.box = "ubuntu/precise64" | |
edx_config.vm.hostname = "edx" | |
edx_config.vm.network :private_network, ip: "10.0.15.20" | |
edx_config.vm.network "forwarded_port", guest: 80, host: 8080 | |
edx_config.vm.provider "virtualbox" do |vb| | |
vb.memory = "4096" | |
vb.cpus = 2 | |
end | |
edx_config.vm.provision "shell", path: "edx-provision.sh" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment