ONYX - MMC - ONYX Mapping Management Console/en
Différence entre versions
(Page créée avec « <u>Note</u>: The mapping-spooler-api command never gives the hand back and does not have an option to run in background. To run the command in background, we do as follow... ») |
(Page créée avec « ====With Docker==== ») |
||
Ligne 70 : | Ligne 70 : | ||
− | ==== | + | ====With Docker==== |
L’API Spooler doit absolument être installé sur le même hôte que le serveur Mapping Onyx. | L’API Spooler doit absolument être installé sur le même hôte que le serveur Mapping Onyx. |
Version du 29 octobre 2021 à 14:39
Sommaire
Introduction
The centralised console of MAPPING (Mapping Management Console : MMC) gives the possibility to monitore multiple MAPPING servers at the same time through a very intuitive Graphical User Interface.
Prerequisites
- one (or multiple) ONYX MAPPING servers installed and configured
- Install NodeJS (v14 minimum) (Node.js )
Example of installation of NodeJS oncentos :
curl -sL https://rpm.nodesource.com/setup_14.x | bash - && yum -y install nodejs
Installation
Installation on a VM
Command of mapping-spooler-api
You use npm to installe the command
The registry npm used is private, and then requires an authentification.
Authentification
npm login --registry http://npm-registry.mappingsuite.com:4873
username : partnermappingsuite
password : (Ask MAPPING, password on LastPass : [M-S] IT> NPM Registry for Partner )
email : partner_mappingsuite@mappingsuite.com
Installation
npm install -g mapping-spooler-api --registry http://npm-registry.mappingsuite.com:4873
Configuration
one the command installed, you need to configure each ONYX server to define the HTTP porte used by the spooler APIs.
This can be done using the mapping.conf entry SPOOLER_API_PORT on each MAPPING server to monitore.
This value must be unique on each ONYX server installed on the VM.
Example
<block name="WEB CONFIG"> <group> <element> <info name="[SPOOLER_API_PORT]">8080</info> </element> </group> </block>
Note:These port numbers will be useful when adding the server to the MMC server interface.
starting the API service
To start the HTTP API, you simply need to run the mapping-spooler-api, while the MAPPING_PATH environmeent variable define on the desired Onyx server.
This kind be done using the mappingenv command to select the desired Onyx environment, then run the mapping-spooler-api.
Note: The mapping-spooler-api command never gives the hand back and does not have an option to run in background.
To run the command in background, we do as follow :
mapping-spooler-api > /dev/null 2>&1 &
(or using tools as supervisor) The SPOOLER_API_PORT option of the mapping.conf is optionnal. If it is not present, the API will look for a environment variable PORT.
With Docker
L’API Spooler doit absolument être installé sur le même hôte que le serveur Mapping Onyx.
Il faut donc ajouter l’installation de l’api spooler à l’image docker Mapping Onyx.
Exemple de Dockerfile
# Base Image Mapping Suite Server FROM mappingsuite.azurecr.io/onyxserver:10.2.0 # NPM Registry Token for Authentication ARG npm_token # Update & Supervisor (for running Onyx + Rest API in parrallel) RUN yum -y install epel-release && \ yum -y update && \ yum -y install supervisor # Install NodeJS RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash - && \ yum -y install nodejs # NPM Private Registry Authentication RUN npm set //npm-registry.mappingsuite.com:4873//:_authToken ${npm_token} # NPM install mapping-spooler-api with private NPM Registry RUN npm install -g mapping-spooler-api --registry http://npm-registry.mappingsuite.com:4873 # Required env var for API REST ENV PORT=8080 ENV MAPPING_PATH=/apps/mapping/data/conf/mapping.conf # Supervisor Configuration RUN echo "[supervisord]" > /etc/supervisord.conf && \ echo "nodaemon=true" >> /etc/supervisord.conf && \ echo "[program:spooler-api]" >> /etc/supervisord.conf && \ echo "command=bash -c 'sleep 5 && exec mapping-spooler-api'" >> /etc/supervisord.conf && \ echo "[program:onyx-server]" >> /etc/supervisord.conf && \ echo "command=/home/docker/scripts/init.sh" >> /etc/supervisord.conf EXPOSE 8080 # Run Supervisor ENTRYPOINT ["/usr/bin/supervisord"]