Skip to content

Commit

Permalink
Add proxyconf settings (#1198)
Browse files Browse the repository at this point in the history
* Add proxyconf settings

* Specify versions and offer vagrant-proxyconf
  • Loading branch information
amplifi authored Mar 6, 2017
1 parent fedadaf commit 2b3b601
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
22 changes: 14 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ Install for development

Install:

- `VirtualBox <https://www.virtualbox.org/>`_
- `Vagrant <https://www.vagrantup.com/>`_
- `Ansible <http://www.ansible.com/>`_ (For Linux and Mac, install Ansible 2 via pip. For Windows(Windows isn’t supported for the control machine) go through `Ansible Documentation <http://docs.ansible.com/ansible/intro_windows.html>`_ or this `Blog <https://www.jeffgeerling.com/blog/running-ansible-within-windows>`_.)
* `VirtualBox <https://www.virtualbox.org/>`_
* Version 5.0.x
* `Vagrant <https://www.vagrantup.com/>`_
* Version 1.8.1
* If you are behind a proxy, you may need to install and configure the `vagrant-proxyconf <https://rubygems.org/gems/vagrant-proxyconf/versions/1.5.2>`_ plugin
* `Ansible <http://www.ansible.com/>`_
* Version 2.1.3.0
* For Linux and Mac, install Ansible 2 via pip
* For Windows (unsupported), go through `Ansible Documentation <http://docs.ansible.com/ansible/intro_windows.html>`_ or this `blog <https://www.jeffgeerling.com/blog/running-ansible-within-windows>`_

Clone the `repository <https://github.com/cadasta/cadasta-platform>`_ to your local machine and enter the cadasta-platform directory.
Run the following commands to access the virtual machine.

Clone the `repository <https://github.com/cadasta/cadasta-platform>`_ to your local machine and enter that directory.
After cloning it go inside to cadasta-platform directory and run below command to provision the virtual machine.
Provision the VM::

vagrant up --provision

SSH into to the VM (this automatically activates the Python virtual
environment)::
SSH into the VM (automatically activates the Python virtual environment)::

vagrant ssh
Expand All @@ -29,7 +35,7 @@ Enter the cadasta directory and start the server::
cd cadasta
./runserver

Open ``http://localhost:8000/`` in your local machine's browser, this will forward you to the port on the VM and you should see the front page of the platform site.
Open ``http://localhost:8000/`` in your local machine's browser. This will forward you to the web server port on the VM and you should see the front page of the platform site.

See the wiki (`here <https://devwiki.corp.cadasta.org/Installation>`_ and `here <https://devwiki.corp.cadasta.org/Run%20for%20development>`_) for detailed instructions on installation and running the platform for development.

Expand Down
16 changes: 15 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
if ENV["http_proxy"]
puts "http_proxy: " + ENV["http_proxy"]
config.proxy.http = ENV["http_proxy"]
end
if ENV["https_proxy"]
puts "https_proxy: " + ENV["https_proxy"]
config.proxy.https = ENV["https_proxy"]
end
if ENV["no_proxy"]
config.proxy.no_proxy = ENV["no_proxy"]
end
end

config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 8000, host: 8000

Expand All @@ -11,7 +25,7 @@ Vagrant.configure(2) do |config|
end

config.vm.provision "ansible" do |ansible|
# ansible.verbose = "vvv"
# ansible.verbose = "vvv"
ansible.playbook = "provision/vagrant.yml"
end

Expand Down

0 comments on commit 2b3b601

Please sign in to comment.