diff --git a/config/custom-environment-variables.yml b/config/custom-environment-variables.yml new file mode 100644 index 0000000..f920cf7 --- /dev/null +++ b/config/custom-environment-variables.yml @@ -0,0 +1,4 @@ +--- +orchestrator: + host: OR_HOST + port: OR_PORT diff --git a/config/default.yml b/config/default.yml new file mode 100644 index 0000000..5671616 --- /dev/null +++ b/config/default.yml @@ -0,0 +1,4 @@ +--- +orchestrator: + host: localhost + port: 3030 diff --git a/services/orchestrator/README.adoc b/services/orchestrator/README.adoc new file mode 100644 index 0000000..9bcd501 --- /dev/null +++ b/services/orchestrator/README.adoc @@ -0,0 +1,4 @@ += Otto Orchestrator + +The Otto Orchestration service is responsible for provisioning agents to do their +necessary work. diff --git a/services/orchestrator/src/index.ts b/services/orchestrator/src/index.ts index 69a6ffc..21813a8 100644 --- a/services/orchestrator/src/index.ts +++ b/services/orchestrator/src/index.ts @@ -3,4 +3,20 @@ require('module-alias/register'); import logger from '@otto/logger'; import { serveApp } from '@otto/server' +import feathers from '@feathersjs/feathers'; +import configuration from '@feathersjs/configuration'; +import express from '@feathersjs/express'; + 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);