Bootstrap the orchestration service from a common configuration
This commit is contained in:
parent
a8f4c889fe
commit
21a4ebadcc
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
orchestrator:
|
||||||
|
host: OR_HOST
|
||||||
|
port: OR_PORT
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
orchestrator:
|
||||||
|
host: localhost
|
||||||
|
port: 3030
|
|
@ -0,0 +1,4 @@
|
||||||
|
= Otto Orchestrator
|
||||||
|
|
||||||
|
The Otto Orchestration service is responsible for provisioning agents to do their
|
||||||
|
necessary work.
|
|
@ -3,4 +3,20 @@ require('module-alias/register');
|
||||||
import logger from '@otto/logger';
|
import logger from '@otto/logger';
|
||||||
import { serveApp } from '@otto/server'
|
import { serveApp } from '@otto/server'
|
||||||
|
|
||||||
|
import feathers from '@feathersjs/feathers';
|
||||||
|
import configuration from '@feathersjs/configuration';
|
||||||
|
import express from '@feathersjs/express';
|
||||||
|
|
||||||
logger.info('Starting orchestrator');
|
logger.info('Starting orchestrator');
|
||||||
|
|
||||||
|
const app = express(feathers());
|
||||||
|
|
||||||
|
// We need to fish out the orchestrator specific settings
|
||||||
|
const settings = configuration()(app);
|
||||||
|
app.configure((app) => {
|
||||||
|
Object.keys(settings['orchestrator']).forEach((key) => {
|
||||||
|
app.set(key, settings['orchestrator'][key]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
serveApp(app);
|
||||||
|
|
Loading…
Reference in New Issue