Wikimedia Apps/Team/RESTBase services for apps/Deployment process/Setup notes

Setup
Here are the detailed notes to get ready to update the deployment repo for our mobileapps RESTBase service on a Ubuntu box setup (inside a VirtualBox VM):

You may also need to set your email and name in git if you haven't done so. (I'm mentioning it here since I ran into this myself because I was running that in a fresh Ubuntu install inside VirtualBox.) Adjust the values, of course:

The easiest way to install Docker: Then, you need to add your user to the  group, follow the note at the end of the docker commands to do that. In other words: After all of that, reboot your VM. Then, in the repo dir in the VM, type:

Nagios Setup
Checking the service with Nagios before building the deploy repo can help to identify problems and prevent deployment reverts.

(Note: These instructions are only the minimum required for command line usage, adapted from the Nagios Ubuntu Quickstart guide.)

Install prereqs:

Create a Nagios user:

Download, build, and install Nagios:

Download, build, and install nagios-plugin:

Start Nagios:

Download the WMF service checker plugin:

Now, to run the endpoint checks, start the service, then do:

Once that is all working you can prepare the deploy repo as part of the deployment process.

Git tag setup
Git tags are cryptographically signed and a GPG signing key is therefore required.

(or get GPG if you need it)

If no keys are listed or you just installed GPG, create a new signing key with:

Then configure the new key (or desired existing key) as the signing key for the mobileapps repo:

(add the   flag if you want to use this signing key for all repos)

For more information straight from the source: https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work