Skip to content

Sandboxing the frontend from Primo's Backend

Steven Bassett edited this page Nov 5, 2013 · 3 revisions

Creating namespaced deployments to the same Primo instance

We are limited in development since we only have one sandbox environment in which to develop, work and test. By namespacing out the view IDs we can separate some of the frontend code and configuration.

For example I have three views configured in our sandbox that show different points in the development cycle:

  • Development - NUdev - is mapped to a developers address on a local machine where the CSS and JS are recompiled on save so that the developer can see the changes live.
  • Staging - NUstaging - is mapped to a staging address for assets where the developer can push up changes for others to look at and for testing before moving to the production site.
  • Production - NU - this is where you can see the latest "stable" version of the front end. This should be the default view id.

Deploying to different environments

Solved by using the Grunt tasks:

grunt.registerTask('deploy-prod', ['default', 'sftp:prod']);
grunt.registerTask('deploy-staging', ['default', 'sftp:staging']);
grunt.registerTask('deploy-dev', ['default', 'sftp:dev']);

Each task has the exact directory corresponding the the primo backend configuration.


...
"path": "/exlibris/primo/p4_1/ng/primo/home/system/thirdparty/jbossas/server/search/deploy/primo_library-app.ear/primo_library-libweb.war/customized/NUprod/",
...

Northeastern View Codes for the staging server.

As @nestochan put it

  • NUdev: You mix the batter --- READ can peek in at the cake in the oven while it cooks (if desired).
  • NUstaging: READ can start poking into the cake with broom straws to check done-ness here.
  • NU: is the steadfast soldier view.