@Niharika said she would like to take a shot at this to learn a bit about Scap and prod deployments. Hopefully @thcipriani and I can help her find a good example to follow and get reviews of the needed changes.

The fact that scholarships uses a .env file for configuration in the root directory of the repo that isn't checked into git will be a bit of a stumbling block. It's not insurmountable -- the easiest thing to do would be to move it outside of the repository, I think.

The reason for this is that scap3 does symlink swapping for deployment, i.e. it creates a directory structure where /srv/deployment/scholarships/scholarships is a symlink to /srv/deployment/scholarships/scholarships-cache/revs/[sha1]. When you deploy a new revision, a new directory is created under revs, e.g. /srv/deployment/scholarships/scholarships-cache/revs/[new-sha1] and then swaps the symlink. Currently, it is not trivial to have untracked code in the repository.

The fact that scholarships uses a .env file for configuration in the root directory of the repo that isn't checked into git will be a bit of a stumbling block. It's not insurmountable -- the easiest thing to do would be to move it outside of the repository, I think.

We can easily make a change in the app to look for the local environment settings outside of the app root. I was being a bit of a 12-factor app prima donna when I originally coded that stuff. The .env file itself was a compromise when techops rejected injecting all of the settings via the apache environment.

git deploy start Tell Trebuchet we want to start a deployment
git reset --hard origin/master Low-level git command to force it to be same as master branch
git deploy sync // Push out the changes to the server (krypton in our case)

Ops will do at least part of those steps. The step that will be different for the deployer is that once the puppet patches are merged, and puppet is run on tin, you'll run scap deploy --init in /srv/deployment/scholarships/scholarships. After that puppet will be run on krypton and then it'll just be a regular deployment to confirm that everything is working.

Then we'll have to find someone who can do all the puppet wrangling necessary.

I haven't used cumin or run puppet before. Sounds fun. I will need some guidance for this part. :)

I don't think anyone but roots has access to cumin and (mostly) running puppet on these machines. @fgiunchedi has a good amount of scap3 experience. @fgiunchedi do you have some time this week to assist with scholarships deployment?

$ cd /srv/deployment/scholarships/scholarships$ git fetch # Fetch the latest things from master$ git log --stat HEAD..@{upstream} # Show what has changed in master so you don't get surprised$ git reset --hard origin/master # Make the checkout match master exactly# Wait here for a root to do steps 3-5 from https://wikitech.wikimedia.org/wiki/Scap3/Migration_Guide#First_Deployment$ scap deploy --init# Wait here for a root to do step 7 from https://wikitech.wikimedia.org/wiki/Scap3/Migration_Guide#First_Deployment$ scap deploy -v "Message for IRC" # Push out the changes to the server (krypton in our case)