Introduction
This modules provides the mechanism to integrate with 3rd party Git Providers.
Objective
Git Repositories
Git Repositories contain your code that can be categories as one of the 3 options below:
- Microservice
- Daemon
- Multi Repo
When activating a repository, the Dashboard attempts to load a config.js file from the root level of that repository and parse it to learn what this repository contains.
Once a repository is activated and based on what it contains, you will be able to see a new service/daemon.
Microservice
A microservice is a Restful HTTP server that contains APIs. Click here to see how to build a microservice.
If the repository contains only 1 microservice, then the config.js file should have a schema similar to:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
'use strict'; module.exports = { type: 'service', //type is service prerequisites: { cpu: '', memory: '' }, serviceVersion: 1, serviceName: "example03", serviceGroup: "SOAJS Example Service", requestTimeout: 30, requestTimeoutRenewal: 5, servicePort: 4012, extKeyRequired: true, session: true, oauth:true, errors: {}, schema: { //api list } }; |
Note | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
SOAJS needs the following properties to be static in order to identify it as a service :
|
Daemon
A Daemon is nodeJS script that supplies jobs to be executed in a certain order. Click here to see how to build a daemon.
If the repository contains only 1 daemon, then the config.js file should have a schema similar to:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
'use strict'; module.exports = { 'type': 'daemon', //type is daemon 'prerequisites': { 'cpu': '', 'memory': '' }, 'serviceName': 'myDaemon', 'serviceGroup': 'myDaemonGroup', 'servicePort': 4177, 'errors': { 400: 'Mongo Database connection error', 401: 'Error while executing Count Query.', 402: 'Model not found' }, 'schema': { //job list } }; |
Note | ||||||||
---|---|---|---|---|---|---|---|---|
SOAJS needs the following properties to be static in order to identify it as a daemon :
|
Multi Repo
A multi repo is a collection of any of the above.
If the repository contains a multi repo, then the config.js file should have a schema similar to:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
"use strict"; module.exports = { "type":"multi", "folders": [ "mySrv1/", //service "myDaemon/", //daemon "myUI/", //static content "mySrv2/" //service ] }; |
Activate and turn CI on Repositories
Anchor | ||||
---|---|---|---|---|
|
Click the configuration button next to your repository.
Select the Continuous Deliver Tab and configure the strategy to use for your service in each environment it is deployed in.
You get to choose in which environment(s) and branch you want to have Continuous Delivery.
In addition, there is 2 kinds of CD strategies: Notify and Update.
- If you set the strategy to Notify, then the API will insert a new update notification received in the ledger only.
- If you set the strategy to Update, then the API will update all affected services and insert for each one of them an auto update notification entry in the ledger.