view deploy/README @ 1628:9c5f8e24dadc live tip

Quieten this cron script
author Chris Cannam
date Tue, 25 Aug 2020 11:38:49 +0100
parents 7e2de1c811b3
children
line wrap: on
line source

Deploying the SoundSoftware site
================================

These scripts can be used for test or staging deployments reproducing
much of the configuration of the live site. Currently it's assumed
that you are providing a database dump to load -- there is no
provisioning step to initialise a new database.

The provisioning process consists mostly of running the scripts found
in provisioning.d/ in numerical order (see those scripts themselves
for details) and installing appropriately modified versions of the
various config files found in config/. Please refer to these files for
documentary purposes, but don't try to run or install them by hand -
there are scripts to coordinate it. Read on for instructions.


You will need
-------------

Required:

 * A database dump to load. This should be left in a file called
   postgres-dumpall in the soundsoftware-site root. The actual live
   site creates regular database dumps which it saves in
   /var/files/backups/postgres-dumpall-<date>.bz2, so one of these or
   a backup, if available, could be copied over to seed the new site

 * The database password and /sys API key for the target site. (This
   can be queried from the db: settings table, name "sys_api_key". You
   can change it in the admin UI; grep API config/*.in to see the
   files you'll need to update if you change it)

 * The (copyrighted) web font files used in our deployment. Leave
   these in /public/themes/soundsoftware/stylesheets/fonts/

Optional (or required for proper deployments):

 * HTTPS key/cert files


Three ways to deploy
--------------------

 1. Using Vagrant to set up a development VM: Run ./vagrant/start.sh

 2. Using Docker to set up a development container: Run ./docker/start.sh

 3. On a "real" VM or server:

    * Ensure the soundsoftware-site repo is checked out at /code-to-deploy
    * Run /code-to-deploy/deploy/any/run-provisioning.sh as root

    But be very careful with this! You could screw up a dev box -- or
    an existing live server! -- if you accidentally provision the site
    directly onto it when you should have used Vagrant or a container.


After deployment
----------------

There is a smoke test script at test/smoketest.sh which checks that
the home page, a project page, a repo page etc can be retrieved. Some
of the pages it tries to retrieve are dependent on their generating
cron scripts having run at least once since the server was set up.