From b460deaead10e238a375bdcd4cc0dcbfeb9da539 Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Sat, 8 Mar 2014 10:45:51 +0000 Subject: [PATCH] Added some docs for Vagrant usage. It doesn't currently recomment using Vagrant - there are probably some bugs to work out in the process before we can do that. --- INSTALL.md | 5 +++-- VAGRANT.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 VAGRANT.md diff --git a/INSTALL.md b/INSTALL.md index 2f954d106..41c6a1d9b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -3,11 +3,12 @@ These instructions are designed for setting up The Rails Port for development and testing. If you want to deploy the software for your own project, then see the notes at the end. +You can install the software directly on your machine, which is the traditional and probably best-bupported approach. However, there is an alternative which may be easier: Vagrant. This installs the software into a virtual machine, which makes it easier to get a consistent development environment and may avoid installation difficulties. For Vagrant instructions, see [VAGRANT.md](VAGRANT.md). + These instructions are based on Ubuntu 12.04 LTS, which is the platform used by the OSMF servers. The instructions also work, with only minor amendments, for all other current Ubuntu releases, Fedora and MacOSX -We don't recommend attempting to develop or deploy this software on Windows. If you need to use Windows, then -try developing this sofware using Ubuntu in a virtual machine. +We don't recommend attempting to develop or deploy this software on Windows. If you need to use Windows, then try developing this sofware using Ubuntu in a virtual machine, or use [Vagrant](VAGRANT.md). ## Dependencies diff --git a/VAGRANT.md b/VAGRANT.md new file mode 100644 index 000000000..03861e18f --- /dev/null +++ b/VAGRANT.md @@ -0,0 +1,34 @@ +# Installing Vagrant + +On Ubuntu, it should be as simple as: + +``` +sudo apt-get install vagrant +``` + +Other Linux distributions should have similar installation instructions using `yum` or similar. + +Installers are available for Mac OS X and Windows, please see the [Vagrant project download page](http://www.vagrantup.com/downloads) for more information. + +# Setting up openstreetmap-website + +Once Vagrant has been installed, you can start an environment by changing to the directory which contains the Vagrantfile and typing: + +``` +vagrant up +``` + +This will take a few minutes to download required software from the internet and set it up as a running system. Once it is complete, you should be able to log into the running VM by typing: + +``` +vagrant ssh +``` + +Within this login shell, you can do development, run the server or the tests. For example, to run the tests: + +``` +cd /srv/openstreetmap-website/ +rake test +``` + +You should run the tests before submitting any patch or Pull Request back to the original repository. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more information. -- 2.43.2