Skip to content

Deploying Ogre on Windows Server

Ben Fousek edited this page Nov 4, 2015 · 2 revisions

An Ogre deployment strategy on Windows Server as a service. This has been successful on Windows Server 2012 R2.

Install prerequisites:

  1. Install Node.
  2. Install the core GDAL libraries http://www.gisinternals.com/query.html?content=filelist&file=release-1600-x64-gdal-1-11-1-mapserver-6-4-1.zip.
  3. Add GDAL directory to PATH environmental variable.

Install ogre and node-windows:

  1. Create directory C:\ogre and open Powershell in said directory.
  2. npm install ogre
  3. npm install -g node-windows
  4. npm link node-windows

Create install/uninstall scripts in C:\ogre:

install.js

var Service = require('node-windows').Service;

var svc = new Service({
  name:'Ogre Web Client',
  description: 'Local Ogre Web Client',
  script: 'C:\\ogre\\node_modules\\ogre\\bin\\ogre.js'
});

svc.on('install', function(){
  svc.start();
});

svc.install();

uninstall.js

var Service = require('node-windows').Service;

var svc = new Service({
  name:'Ogre Web Client',
  script: 'C:\\ogre\\node_modules\\ogre\\bin\\ogre.js'
});

svc.on('uninstall', function(){
  console.log('Uninstall complete.');
  console.log('The service exists: ',svc.exists);
});

svc.uninstall();

Run and test:

  1. In C:\ogre run node install.js.
  2. Open http://localhost:3000 or http://SEVER_NAME:3000 in a browser.

Optionally use IIS URL Rewrite to reverse-proxy to an IIS web site URL. If the UI is not needed the convert and convertJson endpoints can each have an independent rewrite rule.