Skip to content
Ben Grawi edited this page Mar 11, 2014 · 5 revisions

Pre-deployment Notes

  • First ensure the schema definitions in both CAS_Web and CAS_CodeRepoAnalyzer match exactly by going through each model and comparing any differences.
  • Also ensure that the master branch is up to date on github, just as a precaution.
  • If you are installing CAS_Web for the first time, run npm install to install its dependencies. You should only need to run this command once. You also need to ensure that grunt and obviously npm are installed globally to run the required commands.

Non-schema-changing deployment checklist

CAS_Web

Please refer to the repository's README for deployment instructions.

Notes:

  • Run forever stop app.js to terminate the server. Apache should throw a 503 Service Unavailable to any incoming requests. If it can't find the process, run ps aux | grep forever and sudo kill [forever pid].
  • After restarting, Apache may still throw a 503 error for 30-60 seconds. In order to verify that the server started correctly, navigate your browser to port 3500 on whatever the hostname happens to be. If there is no response, check the log file that forever outputted when the server was first started (or run forever list to find the log location) to check if there were any fatal errors, in which case, run git reset --hard ORIG_HEAD to bring the web server back to it's previous state and then try the deployment again.

CAS_CodeRepoAnalyzer

  1. Navigate to the root CAS_CodeRepoAnalyzer folder.
  2. Christoffer will add stopping instructions here, (presumably killing the process, not sure?)
  3. Run git pull to bring in the upstream changes from Github.
  4. Start the server by running python script.py &, which will run in the background, bringing the service back online.
  5. Verify the service is back online (how?)

Schema-changing deployment checklist

  1. Follow the CAS_Web Non-schema-changing deployment checklist in its respective README
  2. Follow the CAS_CodeRepoAnalyzer Non-schema-changing deployment checklist steps TBD only
  3. Ensure that both services are offline and inactive.
  4. In the CAS_CodeRepoAnalyzer directory (assuming you are already inside the virtual environment), run python script.py initDb to apply any schema changes.
  5. Continue to bring CAS_CodeRepoAnalyzer back online as per the checklist.
  6. If there are no errors, also bring the CAS_Web service back online and verify everything is working correctly.
Clone this wiki locally