Setup

Before deploying, run the tasks below. If you haven’t already, follow the Get started guide.

1. Update deploy repositories

Ensure the deploy, pillar/private and salt/private repositories are up-to-date and on the default branch:

./script/update

Check the output in case there are any issues switching to the default branch or any conflicts pulling from GitHub.

2. Check if the server is busy

Note

Skip this step for servers other than kingfisher-main and registry.

  1. Check whether any spiders are running in Scrapyd, by clicking Jobs and looking under Running:

    If any spiders are running, deploy without restarting Scrapyd. On kingfisher-main, you can alternatively get the consent of the data team.

  2. On kingfisher-main only:

    1. SSH into kingfisher-main as the root user.

    2. Check if any long-running tasks are running, by attaching to each session in tmux to see which commands are running. If any commands would be interrupted by the deployment, don’t deploy without the consent of the data team, who should be identified by the session names.

      To list all sessions:

      for i in root $(ls -1 /home); do echo $i; su $i -c "tmux ls"; done
      
    3. If the postgres service would be restarted (for example, due to a configuration change or a package upgrade), check if any long-running queries are running. If there are queries with a state of active and a time greater than an hour, don’t deploy without the consent of the data team, who should be identified by the usename, client_addr or comment at the start of query.