Skip to content
Sarah edited this page Feb 4, 2017 · 23 revisions

Getting Started

This page will help you install and configure Vagrant on your local machine for local development.

Configuring

To get up and running right away without having to install the many dependencies needed to get Local Ground to run, you have the option of creating a Virtual Machine with all of the dependencies defined and configured. Follow these steps:

  1. Download VirtualBox for your operating system.
  • Download Vagrant for your operating system.

  • At the command line, clone the Git Repository on your local machine:

    git clone https://github.com/LocalGround/localground.git

  • Checkout the redesign branch (other branches will soon be deprecated, but master has not yet been updated).

  • Navigate to your Local Ground directory at the command line, and type vagrant up

  • Wait about 45 minutes for Vagrant to configure your new virtual machine instance (using this shell script).

  • Now, open your web browser to http://localhost:7777. Vagrant has been configured to forward all requests to the :7777 port to Apache on your Virtual Server that you just created. You should see a functioning instance of Local Ground operating in your web browser.

  • In the /localground/apps/settings_local.py file, add a valid SendGrid API key (required for you to register an account).

  • Restart apache (see commands below), and then open your web browser and register for a local account here: http://localhost:7777/accounts/register/.:

shell
vagrant ssh
sudo service apache2 restart
exit

Other Useful Information

  • You should rarely have to ssh into your VM (other than to restart apache), and can edit files on your local machine using a text editor of your choice.
  • If you edit python files on your local machine, make sure you restart your VM instance of apache to see the changes take effect in your web browser:
    • vagrant ssh
    • sudo service apache2 restart
  • The password for the vagrant user on your VM is also "vagrant"
  • If you ssh to your VM instance, all of the source code is located here: /localground.
  • If you delete a file in the /localground directory of your VM, it will also be deleted on your local machine (and vice versa), as the folder is shared.
  • Useful Vagrant commands:
    • To ssh into your machine using Vagrant, just type "vagrant ssh" at the command line in your localground root folder.
    • To pause your vagrant VM, type: vagrant suspend
    • To restart your vagrant VM. type: vagrant up
    • To reload dependencies / changes to either the Vagrantfile or to the /deploy_tools/bootstrap.sh file, type: vagrant reload --provision

Clone this wiki locally