From 0412bf42261d8b120d8b593a0c91bc0e7997c8d3 Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Wed, 3 Mar 2021 09:53:02 -0800 Subject: [PATCH] Sketching out some system and service specific configuration The `demo/config` directory is eventually what I would expect to live in `/etc/otto` on Otto hosts. See #39 and #52 --- demo/config/object-store.yml | 5 ++++ demo/config/orchestrator.yml | 2 ++ demo/config/otto.yml | 16 ++++++++++++ demo/config/projects.d/hello-world.yml | 34 ++++++++++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 demo/config/object-store.yml create mode 100644 demo/config/orchestrator.yml create mode 100644 demo/config/otto.yml create mode 100644 demo/config/projects.d/hello-world.yml diff --git a/demo/config/object-store.yml b/demo/config/object-store.yml new file mode 100644 index 0000000..9fb7f44 --- /dev/null +++ b/demo/config/object-store.yml @@ -0,0 +1,5 @@ +# Local demo configuration for the object store +# +--- +object_dir: 'tmp/objects' + diff --git a/demo/config/orchestrator.yml b/demo/config/orchestrator.yml new file mode 100644 index 0000000..a1587d2 --- /dev/null +++ b/demo/config/orchestrator.yml @@ -0,0 +1,2 @@ +--- +steps_dir: 'tmp' diff --git a/demo/config/otto.yml b/demo/config/otto.yml new file mode 100644 index 0000000..aa82198 --- /dev/null +++ b/demo/config/otto.yml @@ -0,0 +1,16 @@ +# This is the root and shared configuration across all otto services. +# +--- +services: + dashboard: + host: 'localhost' + port: 7670 + objects: + host: 'localhost' + port: 7671 + parser: + host: 'localhost' + port: 7672 + orchestrator: + host: 'localhost' + port: 7673 diff --git a/demo/config/projects.d/hello-world.yml b/demo/config/projects.d/hello-world.yml new file mode 100644 index 0000000..937cd17 --- /dev/null +++ b/demo/config/projects.d/hello-world.yml @@ -0,0 +1,34 @@ +# This is an example project configuration for Otto +# +# This is not a replacement for the Ottofile, but rather the binding to make +# sure that Otto knows where to find the Ottofile for the repository +--- +title: 'Hello World' +description: | + The Hello World project exists as a simple demonstrate loading a project into Otto +source: + # This repository does not have an Ottofile! + url: 'https://github.com/rtyler/hello-gem.git' + # The refspec defaults to wildcard, if the refspec is specified, only changes + # on that refspec will be executed + refspec: '*' + +# Optional override of what the default source of the pipeline should be. +# +# This can be helpful for describing a specific file, e.g. `./deploy/Ottofile` +# or even overwriting what is defined in the repository with a server-side +# override. +# +# If the `pipeline` key is present, either path or inline *must* be defined +pipeline: + + #path: './deploy/Ottofile' + + # Since the project doesn't have an Ottofile, injecting one for it + inline: | + pipeline { + steps { + sh 'pwd' + sh 'ls -lah' + } + }