Page MenuHomePhabricator

Add basic CI/CD scripts for deploying to Toolforge
Closed, ResolvedPublic

Description

Now that we've done a successful test deployment, we need to setup some simple CI/CD scripts to simplify/automate the process.

Scripts to add:

  • Build docker image
  • Check build logs
  • Start web service
  • Stop web service
  • Restart web service
  • Check web service logs

Event Timeline

Tekneos changed the task status from Open to In Progress.Aug 11 2026, 2:18 AM
Tekneos moved this task from Backlog to In-Progress on the Tool-wd-act board.

After the scripts are written and checked in, I have to figure out how to copy them onto the toolforge build server so I can actually use them.

Knocked this out in this merge request: https://gitlab.wikimedia.org/toolforge-repos/wd-act/-/merge_requests/1

After looking at this some, I decided there are multiple things the scripts need to do.
In addition to simply starting/restarting the web server, etc., the scripts also need to securely connect to the Toolforge bastion server. And once connected, it needs to authenticate as the Tool account.

Because of these extra complexities, I decided to wrap the scripts in Ansible playbooks - because Ansible has a nice workflow/separation of concerns for SSHing to hosts vs running scripts.

All that being said:
According to this draft page, it looks like running CI jobs in wikimedia GitLab may be possible. If this is correct - it may be worth migrating this work over into GitLab CI jobs - as it would provide a much simplified deployment experience, compared to every developer having to run Ansible on their local machine.
Something to look at in the future. For now though, I'll go ahead and merge/close this out.

I forgot to post the link - here's the page about GitLab CI in wikimedia: https://www.mediawiki.org/wiki/GitLab/Workflows/CI