Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 2.01 KB

deploying-updates.md

File metadata and controls

59 lines (43 loc) · 2.01 KB

Deploying Updates

Before deploying changes, you are expected to test them locally by rebuilding the relevant containers.

Rebuilding containers

To rebuild the ul-website container, run a command like the following from the root of this repository:

docker build . -t ul-website:latest

To rebuild the ul-imports container, see the documentation in the ul-imports repository.

Once you have a new container image to test, you can deploy it locally using commands like the following from the root of this repository:

docker-compose down
docker-compose up -d.

Performing QA

At a minimum, you should verify that the website functions as expected, and that imports run. To verify that the website functions as expected:

  1. Start the composition (see above).
  2. Synchronise your CouchDB container with production.
  3. Connect a browser to https://localhost:4896/.
  4. Verify that all static pages are served as expected.
  5. Test the search functionality (the first search may fail or take a long time as the Lucene index is rebuilt).
  6. Navigate to an individual record and verify that that content appears as expected.
  7. Verify that logging in works as expected.
  8. Perform a full synchronisation using the ul-imports VM works without errors (see the README for details).

Deploying to Production

Once you are satisfied that the updated container(s) are working as expected, you will need to copy the container image to production. From your local machine, save the updated container(s) using commands like:

docker save ul-website | gzip > /tmp/ul-website.tar.gz
docker save ul-imports | gzip > /tmp/ul-imports.tar.gz
scp /tmp/ul-*.tar.gz ul-vm:

You'll then need to SSH to the ul-vm, and run commands like the following:

gunzip ul-website.tar.gz
sudo docker import ul-website
cd /srv/ul-website
sudo docker-compose down
sudo docker-compose up -d

You should perform the same QA steps following deployment.