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.
Check whether any spiders are running in Scrapyd, by clicking Jobs and looking under Running:
kingfisher-main: Access Scrapyd’s web interface
If any spiders are running, deploy without restarting Scrapyd. On
kingfisher-main, you can alternatively get the consent of the data team.On
kingfisher-mainonly:SSH into
kingfisher-mainas therootuser.Check if any long-running tasks are running, by attaching to each session in
tmuxto 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
If the
postgresservice 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 astateofactiveand atimegreater than an hour, don’t deploy without the consent of the data team, who should be identified by theusename,client_addror comment at the start ofquery.