Upgrade from 1.x to 2.x

Objective


Learn how to upgrade SOAJS Core Database from 1.x to 2.x.



Prerequisites


The SOAJS Upgrader is built using NodeJS.

Before you begin:

  1. Make sure you have NodeJS on your machine



Download and install


  1. Download the attached script.zip 
  2. Uncompress the compressed script.zip file. 
  3. Follow the instructions below
Download, Install and Star the installer
# Navigate to the script
> cd script

# download the npm dependacy
> npm install



Profile Configuration


The script requires a mongo profile to connect to your mongo database.

You can provide a custom profile or use the default config.js found on the root level of the script folder.

sample config.js
"use strict";
module.exports = {
	"servers": [
		{
			"host": "127.0.0.1",
			"port": 27017
		}
	],
	"credentials": {},
	"URLParam": {
		"connectTimeoutMS": 0,
		"socketTimeoutMS": 0,
		"maxPoolSize": 5,
		"wtimeoutMS": 0,
		"slaveOk": true
	},
	"streaming": {},
	"name": "core_provision",
	"prefix": ""
};



Run the script 


Download, Install and Star the installer
# run the script
> node index.js



Script Functionality


  1. Creates a backup of your core_provision database on ur local machine depending on the location path you provide( default: script root level ). 
  2. Ask for the protocol (http|https), port (80|443|...) and deployment port (2376|...) for each environment.
  3. Update your core_provision database

Deployment port is not required for Manual Deployment