← CMS

Calculator Updates

Getting the update

  1. You should receive a URL, username and password from Dinkytown, probably forwarded from either the webdev team or support team.
  2. Check that the update is intended for use on: data2.profitstarscms.com. You do not want to copy over the KJE.js or KJESiteSpecific.js files if not. They will cause licensing error statements to appear on the calculators if copied.
  3. Go to the URL and it will prompt for the username and password.
  4. Once you’ve entered it should present you with a terms of agreement page with an “agree” link at the bottom of the page. Click that and it’ll display a page with links for downloading the update.
  5. We typically only require the “Update only” zip file. It’ll be something like “Download KJEUpdate.zip”. Download that and decompress the files.

Merging the changes into banno-cms

  1. Copy the files into: services/cms/public/calculators and services/platform-cms/public/calculators in the banno-cms project.
  2. Do a search/replace for the URL “http://www.dinkytown.net” and update it to use https protocol (some browsers will throw security complaints otherwise when our calculator pages render over https with the Dinkytown http links). Typically that’s just in the KJE.js and KJESpanish.js files.
  3. Run test-only models.calculators.Calculator* locally to check that the calculator tests are still passing.
  4. Repeat the previous two steps for both cms and platform-cms

One thing to keep an eye on is that some updates are specifically tailored for a single site with the KJESiteSpecific.js file. There is a mechanism that the webdevs can use to override this file by inserting a file into the template assets (zip file). For the default version that the CMS should serve up we want the KJE.ReportHeader to contain the value data2.profitstarscms.com (check the diff or open up KJESiteSpecific.js and check). This value appears to be compared against for licensing purposes elsewhere in Dinkytown’s code. If this value is altered it will cause licensing errors to appear on the calculators that make use of the default license. So in most cases if you see this file updated you’ll want to manually inspect the changes made.

Deploying the changes

  1. Once merged, the changes can be run up to the staging and UAT environments.
  2. As soon as the deploy is complete on UAT
    1. IMPORTANT Restart cms-varnish in Marathon
    2. Message whomever requested the update and ask them to verify.
  3. As soon as the deploy is complete on Production
    1. IMPORTANT Restart cms-varnish in the production-2 environment using the Jenkins Marathon restart tool. Note that cached versions of the Javascript files can cause flapping with Monitor checks and generate lots of unnecessary alerts to clients.
    2. Post an update on the ticket that the calculator updates are on Production.