setup information and scripts to get a local dev environment running in a VM
NOTE: This is purely for local development and needs heavy modifications to configure a production environment.
- Install the appropriate version of VirtualBox for your system.
- Install the appropriate version of Vagrant
- In your BIOS, make sure that Intel Virtualization Technology is enabled.
- Clone this repository. On Windows command prompt can be used.
- Open Terminal (or Command Prompt on Windows) and cd into the repository directory.
- Run
vagrant upandvagrant provision - SSH to
localhost:20022. The login username and password are bothvagrant. - cd to the
websitedirectory and enter virtualenv:source ./venv/bin/activate. - Follow the website setup instructions in Final Stretch: Getting Django to run.
- Access the website at
localhost:20080. If this does not work, you can also use192.168.55.55:8000You should now see the UPE website locally! - Wrapping up: you can do Ctrl-C to stop the server, and then run
deactivatein the terminal to stop the virtualenv.
If steps 1 and 2 for Windows/OS X work on Linux, follow the instructions above. On certain Linux systems VirtualBox may not install properly due to kernel version mismatch and other issues. In that case:
- Install puppet:
sudo apt-get install puppet - Install puppet's vcsrepo module:
sudo puppet module install puppetlabs/vcsrepo - Move manifests directory into
/etc/puppet/manifests:sudo mv ./puppet/manifests/* /etc/puppet/manifests/(Assuming current directory is the vagrant repo) - Move modules into
/etc/puppet/modules:sudo mv ./puppet/modules/* /etc/puppet/modules/ cd /etc/puppet/modules/upeweb/filesandsudo vim venv_setup.sh- Replace
HOMEDIRwith the home directory of your username (typewhoamiin console to find out) - Optional: change
WEBDIRto your desired path. - Save the changes and then
cd ../manifests, thensudo vim init.pp - Replace
$cmd_userwith your username. - Replace
$cmd_groupwith your group. You can find this by typing in consolegroups. Use somthing likeusersor your username. - Replace
$homedirand$webdirto values you modified in steps 6,7. - Save the changes and
cd /etc/puppet - Run
sudo puppet apply /etc/puppet/manifests/default.pp - A bunch out text will be output to the screen. The setup is complete if you see something like
Notice: Finished catalog run in n seconds.