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@1627
|
10 The provisioning process consists mostly of running the scripts found
|
Chris@1627
|
11 in provisioning.d/ in numerical order (see those scripts themselves
|
Chris@1627
|
12 for details) and installing appropriately modified versions of the
|
Chris@1627
|
13 various config files found in config/. Please refer to these files for
|
Chris@1627
|
14 documentary purposes, but don't try to run or install them by hand -
|
Chris@1627
|
15 there are scripts to coordinate it. Read on for instructions.
|
Chris@1627
|
16
|
Chris@1601
|
17
|
Chris@1601
|
18 You will need
|
Chris@1601
|
19 -------------
|
Chris@1601
|
20
|
Chris@1601
|
21 Required:
|
Chris@1601
|
22
|
Chris@1601
|
23 * A database dump to load. This should be left in a file called
|
Chris@1627
|
24 postgres-dumpall in the soundsoftware-site root. The actual live
|
Chris@1627
|
25 site creates regular database dumps which it saves in
|
Chris@1627
|
26 /var/files/backups/postgres-dumpall-<date>.bz2, so one of these or
|
Chris@1627
|
27 a backup, if available, could be copied over to seed the new site
|
Chris@1601
|
28
|
Chris@1605
|
29 * The database password and /sys API key for the target site. (This
|
Chris@1605
|
30 can be queried from the db: settings table, name "sys_api_key". You
|
Chris@1605
|
31 can change it in the admin UI; grep API config/*.in to see the
|
Chris@1605
|
32 files you'll need to update if you change it)
|
Chris@1601
|
33
|
Chris@1601
|
34 * The (copyrighted) web font files used in our deployment. Leave
|
Chris@1601
|
35 these in /public/themes/soundsoftware/stylesheets/fonts/
|
Chris@1601
|
36
|
Chris@1601
|
37 Optional (or required for proper deployments):
|
Chris@1601
|
38
|
Chris@1601
|
39 * HTTPS key/cert files
|
Chris@1601
|
40
|
Chris@1601
|
41
|
Chris@1601
|
42 Three ways to deploy
|
Chris@1601
|
43 --------------------
|
Chris@1601
|
44
|
Chris@1601
|
45 1. Using Vagrant to set up a development VM: Run ./vagrant/start.sh
|
Chris@1601
|
46
|
Chris@1601
|
47 2. Using Docker to set up a development container: Run ./docker/start.sh
|
Chris@1601
|
48
|
Chris@1601
|
49 3. On a "real" VM or server:
|
Chris@1601
|
50
|
Chris@1601
|
51 * Ensure the soundsoftware-site repo is checked out at /code-to-deploy
|
Chris@1601
|
52 * Run /code-to-deploy/deploy/any/run-provisioning.sh as root
|
Chris@1601
|
53
|
Chris@1601
|
54 But be very careful with this! You could screw up a dev box -- or
|
Chris@1601
|
55 an existing live server! -- if you accidentally provision the site
|
Chris@1601
|
56 directly onto it when you should have used Vagrant or a container.
|
Chris@1597
|
57
|
Chris@1597
|
58
|
Chris@1597
|
59 After deployment
|
Chris@1597
|
60 ----------------
|
Chris@1597
|
61
|
Chris@1597
|
62 There is a smoke test script at test/smoketest.sh which checks that
|
Chris@1597
|
63 the home page, a project page, a repo page etc can be retrieved. Some
|
Chris@1597
|
64 of the pages it tries to retrieve are dependent on their generating
|
Chris@1597
|
65 cron scripts having run at least once since the server was set up.
|
Chris@1597
|
66
|