Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Deploying on offline servers

Geert edited this page May 25, 2018 · 6 revisions

Occasionally people come across a situation where they need to deploy a slush-marklogic-node application on a server that has limited or no direct internet access for security reasons. Upon request access to github.com and npm registries is usually denied.

It is possible to deploy slush-marklogic-node in such situations just as well. It will take more effort though. Then again, keep in mind you don't need to deploy the full development tooling as well. You only need what is necessary to bootstrap MarkLogic, and run the middle-tier (in production mode).

The best approach you can take is to use two environments:

  • one to build and package (connected to internet, could be your laptop, or a vm on your laptop)
  • one to deploy and run (disconnected from internet)

Pre-requisites

The vm or machine you use to build and package will need the full development setup. The production server should only really need:

  • MarkLogic Server (potentially with Converters & Filters)
  • Node.js (which comes with NPM)
  • Java Runtime
  • and potentially the PM2 node pacakge for running the front-end as a service

Prep on dev

  1. git clone
  2. cd folder
  3. node and npm installed
  4. npm install -g bower / gulp / mlpm (install with -g)
  5. git command line tools installed. done
  6. npm install, bower install, mlpm install
  7. gulp build —-ignoreErrors
  8. roxy.jar in the local folder.
  9. mlcp in the local folder.
  10. zip the project folder.

Prod steps to deploy and run

  1. Unzip the package
  2. cd to package home
  3. Configure
    1. prod.json -
      • ml-host with hostname
    2. deploy\prod.properties
      • prod-server with hostname
      • admin username and password
      • mlcp-home with full path of mlcp904 directory
  4. Run roxy - java -jar roxy.jar prod install
  5. Import grace data - prod-import-grace.bat
  6. start application with node node_modules/pm2/bin/pm2 start ecosystem.json --env=prod
Clone this wiki locally