diff options
Diffstat (limited to 'docs/installing')
-rw-r--r-- | docs/installing/deploy.md | 2 | ||||
-rw-r--r-- | docs/installing/macos.md | 14 | ||||
-rw-r--r-- | docs/installing/manual_install.md | 7 | ||||
-rw-r--r-- | docs/installing/next_steps.md | 14 | ||||
-rw-r--r-- | docs/installing/vagrant.md | 51 |
5 files changed, 61 insertions, 27 deletions
diff --git a/docs/installing/deploy.md b/docs/installing/deploy.md index a0a4c0abb..355c4f8a2 100644 --- a/docs/installing/deploy.md +++ b/docs/installing/deploy.md @@ -175,7 +175,7 @@ for the config that you've set up). Ensure you've got a `config/deploy.yml` file with the correct settings for your site. If there are other people in your team who need to deploy, you'll need to share it with them too -- it might be a good idea to keep the latest -version in a [Gist](http://gist.github.com/). +version in a private [Gist](http://gist.github.com/). * to deploy to staging, just run `cap deploy` * to deploy to production, run `cap -S stage=production deploy` diff --git a/docs/installing/macos.md b/docs/installing/macos.md index e93ea452f..2c08be0e5 100644 --- a/docs/installing/macos.md +++ b/docs/installing/macos.md @@ -71,7 +71,7 @@ Read `rvm notes` and `rvm requirements` carefully for further instructions. Then The `mahoro` and `pg` gems require special installation commands. Rubygems must be downgraded to 1.6.2 to avoid deprecation warnings when running tests. rvm 1.8.7 - gem update --system 1.6.2 + gem update --system 2.1.11 gem install mahoro -- --with-ldflags="-L/usr/local/Cellar/libmagic/5.09/lib" --with-cppflags="-I/usr/local/Cellar/libmagic/5.09/include" env ARCHFLAGS="-arch x86_64" gem install pg @@ -96,8 +96,9 @@ Create a `foi` user from the command line, like this: createuser -s -P foi -_Note:_ Leaving the password blank will cause great confusion if you're new to -PostgreSQL. +_Note:_ After running this command you will be prompted to set a +password for the user. Don't leave it blank if you are new to +PostgreSQL, or it could be difficult to set later for you. We'll create a template for our Alaveteli databases: @@ -112,18 +113,11 @@ Then create the databases: ### Clone Alaveteli -We don't want to vendor Rails, as it causes problems locally. - git clone https://github.com/mysociety/alaveteli.git cd alaveteli git submodule init - - sed -i~ 's/\\[submodule "vendor\/rails"\\]//' .git/config - - sed -i~ 's/url = git:\/\/github.com\/rails\/rails.git//' .git/config git submodule update -**Note:** Due to Markdown bugs, the first `sed` command above does not display properly if it appears in blockquote. ### Configure Alaveteli diff --git a/docs/installing/manual_install.md b/docs/installing/manual_install.md index 8c9e2a8d6..9cad6b5b9 100644 --- a/docs/installing/manual_install.md +++ b/docs/installing/manual_install.md @@ -351,7 +351,12 @@ Example `development` section of `config/database.yml`: Make sure that the user specified in `database.yml` exists, and has full permissions on these databases. -As the user needs the ability to turn off constraints whilst running the tests they also need to be a superuser. If you don't want your database user to be a superuser, you can add this line to the `test` section in `database.yml` (as seen in `config/database.yml-example`): +As the user needs the ability to turn off constraints whilst running the tests +they also need to be a superuser (clarification: a <em>Postgres</em> superuser, +not an Alaveteli +<a href="{{ site.baseurl }}docs/glossary/#super" class="glossary__link">superuser</a>). +If you don't want your database user to be a superuser, you can add this line +to the `test` section in `database.yml` (as seen in `config/database.yml-example`): constraint_disabling: false diff --git a/docs/installing/next_steps.md b/docs/installing/next_steps.md index d5c4675f0..2c6e84e1b 100644 --- a/docs/installing/next_steps.md +++ b/docs/installing/next_steps.md @@ -8,13 +8,22 @@ title: Next Steps OK, you've installed a copy of Alaveteli, and can see the site in a browser. What next? </p> + * [Create a superuser admin account](#create-a-superuser-admin-account) + * [Load sample data](#load-sample-data) + * [Test out the request process](#test-out-the-request-process) + * [Import Public Authorities](#import-public-authorities) + + + ## Create a superuser admin account Alaveteli ships with an <a href="{{site.baseurl}}docs/glossary/#emergency" class="glossary__link">emergency user</a> that has access to the admin. So when you've just created a new site, you should sign up to create your own account, then log into admin as the emergency -user to promote your new account to be an administrator with *super* privileges. +user to promote your new account to be an administrator with +<a href="{{ site.baseurl }}docs/glossary/#super" class="glossary__link">super</a> +privilege. As soon as that's done, disable the emergency user, because you don't need to use it any more: you've superseded it with your new admin account. @@ -116,7 +125,8 @@ follow the steps described in the previous section. Alaveteli can import a list of public authorities and their contact email addresses from a CSV file. -You can find the uploader in under the "Authorities" tab of the admin section, or go straight to `/admin/body/import_csv`. +Follow the instructions for +[uploading public authority data]({{ site.baseurl }}docs/running/admin_manual/#creating-changing-and-uploading-public-authority-data). ## Set the amount of time authorities will be given to respond to requests diff --git a/docs/installing/vagrant.md b/docs/installing/vagrant.md index 8938d496b..a0b058da5 100644 --- a/docs/installing/vagrant.md +++ b/docs/installing/vagrant.md @@ -5,35 +5,38 @@ title: Vagrant # Alaveteli using Vagrant <p class="lead"> -Vagrant provides an easy method to set up virtual development environments; for -further information see <a href="http://www.vagrantup.com">the Vagrant website</a>. -We bundle an example Vagrantfile in the repository, which runs the -<a href="{{ site.baseurl }}docs/installing/script/">install script</a> for you. + <a href="https://www.vagrantup.com">Vagrant</a> provides an easy method to set + up virtual development environments We bundle an example Vagrantfile in the + repository, which runs the + <a href="{{ site.baseurl}}docs/installing/script/">install script</a> for you. </p> Note that this is just one of [several ways to install Alaveteli]({{ site.baseurl }}docs/installing/). The included steps will use vagrant to create a development environment -where you can run the test suite, the development server and make +where you can run the test suite and the development server, and make changes to the codebase. -The basic process is to create a base virtual machine, and then +The basic process is to create a base virtual machine (VM), and then provision it with the software packages and setup needed. The supplied scripts will create you a Vagrant VM based on the server edition of Ubuntu 12.04 LTS that contains everything you need to work on Alaveteli. -1. Get a copy of Alaveteli from GitHub and create the Vagrant instance. - This will provision the system and can take some time - usually at - least 20 minutes. +1. Get a copy of Alaveteli from + <a href="{{ site.baseurl }}docs/glossary/#git" class="glossary__link">GitHub</a>: # on your machine $ git clone git@github.com:mysociety/alaveteli.git $ cd alaveteli $ git submodule update --init + +2. Create the Vagrant VM. This will provision the system and can take some time + — sometimes as long as 20 minutes. + $ vagrant --no-color up -2. You should now be able to ssh in to the Vagrant guest OS and run the - test suite: +3. You should now be able to log in to the Vagrant guest OS with `ssh` and run + the test suite: $ vagrant ssh @@ -42,12 +45,34 @@ Ubuntu 12.04 LTS that contains everything you need to work on Alaveteli. $ bundle exec rake spec -3. Run the rails server and visit the application in your host browser - at http://10.10.10.30:3000 +4. Run the rails server: # in the virtual machine terminal bundle exec rails server +You can now visit the application in your browser (on the same machine that is +running Vagrant) at `http://10.10.10.30:3000`. + +If you need to stop the server, simply press **Ctl-C** within that shell. + +It's also possible to stop the server from a different terminal shell in the +Vagrant VM. Log in, find the process ID for the Alaveteli server (in the example +below, this is `1234`), and issue the `kill` command: + + $ vagrant ssh + + # now in a terminal on the virtual machine + $ cat /home/vagrant/alaveteli/tmp/pids/server.pid + 1234 + $ kill -2 1234 + +Alternatively, you can shut down the whole VM without deleting it with the +command <code>vagrant halt</code> +on the host command line. To start it up again, go to step 2, above — it +won't take so long this time, because the files are already in place. +See [the Vagrant documentation](https://docs.vagrantup.com/v2/) +for full instructions on using Vagrant. + ## What next? Check out the [next steps]({{ site.baseurl }}docs/installing/next_steps/). |