This is the current process for deploying custom script updates to v5. Currently the only game using custom scripts is Scattergories.

Skipping over the boring details of how this all works, this is exactly what you need to do in order to deploy changes made to the scripts inside the squash_server beanstalk repo.

Step 1: Make changes and push them to that repo.

There is a staging branch and a master branch, and in the same methodology as we do in the v5-nodestack repo, anything merged into the staging branch can be assumed to be deployed (or soon to be deployed) to staging and when that passes, merge staging into master and deploy the code from master.

Step 2: Create the import file

Inside squash_server/scripts/ there is a python script that will generate the lua file that gets imported on the redis command line. If you are doing a prod deployment, you will have to edit the file: change line 3 to environment = 'Prod'

Run the script like so:

python MakeRedisImportFile.py

Step 3: Notify the Service Notifications email group

Send an email to the Service Notifications group that you’re about to make this change. Visibility is important.

Step 4: Import

Local Redis Server

Deploy to your local redis server for development testing:

redis-cli --eval redis-import-20170116_095943-Staging.lua

Staging or Prod redis instance

Note, you must be connected to an amazon machine in order to access the real redis instances. I like to use the hope-beta machine (34.230.148.248) and you can see a history of commands there if you get lost.

First, copy your import script over to the machine you’re going to use:

scp -i path/to/pem/magmic-aws-2012.pem redis-import-20170116_095943-Prod.lua ubuntu@34.230.148.248:~/.

Then ssh into that machine:

ssh -i path/to/pem/magmic-aws-2012.pem ubuntu@34.230.148.248 # hope-staging / cupcake

And run the command to import into redis:

# Staging
redis-cli -h helix-staging-001.yme9mj.0001.use1.cache.amazonaws.com --eval redis-import-20170526_164753-Staging.lua
# Prod
redis-cli -h squash-prod-001.yme9mj.0001.use1.cache.amazonaws.com --eval redis-import-20170526_164753-Prod.lua

The response on a successful import is simply:

(nil)

Anything else indicates an error.

Step 5: Notify the Service Notifications email group again

Send a reply to the previous email to let them know that the deployment was successful and testing can be done if necessary.