mirror of https://github.com/zulip/zulip.git
Run provision.py as a provisioner.
This way, vagrant up for the first time will set up the developer's VM correctly (imported from commit cee17b15e2f53a1b6de1f1ee16dbad00071ba55c)
This commit is contained in:
parent
e2d416ad8b
commit
0d7f749ad8
21
README.dev
21
README.dev
|
@ -6,29 +6,12 @@ Using Vagrant
|
||||||
|
|
||||||
This is the recommended approach, and is tested on OS X 10.10 as well as Ubuntu 14.04.
|
This is the recommended approach, and is tested on OS X 10.10 as well as Ubuntu 14.04.
|
||||||
|
|
||||||
If your host is OS X, download VirtualBox from <http://download.virtualbox.org/virtualbox/4.3.30/VirtualBox-4.3.30-101610-OSX.dmg>. Then run:
|
If your host is OS X, download VirtualBox from <http://download.virtualbox.org/virtualbox/4.3.30/VirtualBox-4.3.30-101610-OSX.dmg>.
|
||||||
vagrant up
|
|
||||||
vagrant ssh
|
|
||||||
|
|
||||||
If your host is Ubuntu 14.04:
|
If your host is Ubuntu 14.04:
|
||||||
sudo apt-get install vagrant lxc lxc-templates cgroup-lite redir
|
sudo apt-get install vagrant lxc lxc-templates cgroup-lite redir
|
||||||
vagrant plugin install vagrant-lxc
|
|
||||||
vagrant up --provider=lxc
|
|
||||||
vagrant ssh
|
|
||||||
|
|
||||||
All versions, inside the container:
|
Once that's done, simply run `vagrant up`. Congrats, you can now visit <http://localhost:9991/> in your browser.
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install python-pbs
|
|
||||||
cd /srv/zulip && python provision.py
|
|
||||||
|
|
||||||
To run the development server:
|
|
||||||
vagrant ssh -- -L9991:localhost:9991
|
|
||||||
# Now inside the container
|
|
||||||
cd /srv/zulip
|
|
||||||
source /srv/zulip-venv/bin/activate
|
|
||||||
./tools/run-dev.py
|
|
||||||
|
|
||||||
You can now visit <http://localhost:9991/> in your browser.
|
|
||||||
|
|
||||||
By hand
|
By hand
|
||||||
-------
|
-------
|
||||||
|
|
|
@ -19,4 +19,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||||
vb.memory = 2048
|
vb.memory = 2048
|
||||||
end
|
end
|
||||||
|
|
||||||
|
$provision_script = <<SCRIPT
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y python-pbs
|
||||||
|
python /srv/zulip/provision.py
|
||||||
|
SCRIPT
|
||||||
|
|
||||||
|
config.vm.provision "shell",
|
||||||
|
# We want provision.py to be run with the permissions of the vagrant user.
|
||||||
|
privileged: false,
|
||||||
|
inline: $provision_script
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue