annotate deploy/README @ 1621:3a510bf6a9bc

Merge from live branch
author Chris Cannam
date Fri, 13 Jul 2018 10:44:33 +0100
parents 18643ab36008
children 7e2de1c811b3
rev   line source
Chris@1595 1
Chris@1595 2 Deploying the SoundSoftware site
Chris@1601 3 ================================
Chris@1595 4
Chris@1601 5 These scripts can be used for test or staging deployments reproducing
Chris@1601 6 much of the configuration of the live site. Currently it's assumed
Chris@1601 7 that you are providing a database dump to load -- there is no
Chris@1601 8 provisioning step to initialise a new database.
Chris@1601 9
Chris@1601 10
Chris@1601 11 You will need
Chris@1601 12 -------------
Chris@1601 13
Chris@1601 14 Required:
Chris@1601 15
Chris@1601 16 * A database dump to load. This should be left in a file called
Chris@1601 17 postgres-dumpall in the soundsoftware-site root
Chris@1601 18
Chris@1605 19 * The database password and /sys API key for the target site. (This
Chris@1605 20 can be queried from the db: settings table, name "sys_api_key". You
Chris@1605 21 can change it in the admin UI; grep API config/*.in to see the
Chris@1605 22 files you'll need to update if you change it)
Chris@1601 23
Chris@1601 24 * The (copyrighted) web font files used in our deployment. Leave
Chris@1601 25 these in /public/themes/soundsoftware/stylesheets/fonts/
Chris@1601 26
Chris@1601 27 Optional (or required for proper deployments):
Chris@1601 28
Chris@1601 29 * HTTPS key/cert files
Chris@1601 30
Chris@1601 31
Chris@1601 32 Three ways to deploy
Chris@1601 33 --------------------
Chris@1601 34
Chris@1601 35 1. Using Vagrant to set up a development VM: Run ./vagrant/start.sh
Chris@1601 36
Chris@1601 37 2. Using Docker to set up a development container: Run ./docker/start.sh
Chris@1601 38
Chris@1601 39 3. On a "real" VM or server:
Chris@1601 40
Chris@1601 41 * Ensure the soundsoftware-site repo is checked out at /code-to-deploy
Chris@1601 42 * Run /code-to-deploy/deploy/any/run-provisioning.sh as root
Chris@1601 43
Chris@1601 44 But be very careful with this! You could screw up a dev box -- or
Chris@1601 45 an existing live server! -- if you accidentally provision the site
Chris@1601 46 directly onto it when you should have used Vagrant or a container.
Chris@1597 47
Chris@1597 48
Chris@1597 49 After deployment
Chris@1597 50 ----------------
Chris@1597 51
Chris@1597 52 There is a smoke test script at test/smoketest.sh which checks that
Chris@1597 53 the home page, a project page, a repo page etc can be retrieved. Some
Chris@1597 54 of the pages it tries to retrieve are dependent on their generating
Chris@1597 55 cron scripts having run at least once since the server was set up.
Chris@1597 56