From 7ccfb421a5fe834fa90f3cf843cf6954663f77cd Mon Sep 17 00:00:00 2001 From: Joe Bellus Date: Thu, 27 Aug 2020 14:22:27 -0400 Subject: [PATCH] Updated documentation for 0.3.2 --- content/articles/command.md | 16 +++++- content/articles/config.md | 66 +++++++++++++++++++++- content/articles/getting-started.md | 2 +- themes/5Sigma/layouts/partials/header.html | 2 +- 4 files changed, 81 insertions(+), 5 deletions(-) diff --git a/content/articles/command.md b/content/articles/command.md index ea2dd4d..f19710a 100644 --- a/content/articles/command.md +++ b/content/articles/command.md @@ -4,7 +4,7 @@ date: 2020-07-29T22:45:07-04:00 description: "Full command usage" draft: false weight: 1 -version: "0.2.1" +version: "0.3.2" --- @@ -40,6 +40,20 @@ The name of a component can be used as a subcommand to launch that component by conductor my-component ``` +Multiple components can be ran by specifying multiple component subcommands: + +```sh +conductor server frontend metrics +``` + +## Launching groups + +Groups of components can be defined in the conductor.yml and launched by name + +```sh +conductor my_group +``` + ## Setup a stack Given a configuration file you can clone and initialize an entire stack. This can be useful for bootstrapping a new computer/developer. diff --git a/content/articles/config.md b/content/articles/config.md index e0c3de4..80b7626 100644 --- a/content/articles/config.md +++ b/content/articles/config.md @@ -2,7 +2,7 @@ title: "Configuration File Reference" date: 2020-07-29T20:42:50-04:00 description: "Conductor config file reference" -version: "0.2.1" +version: "0.3.2" weight: 1 --- @@ -20,6 +20,37 @@ If the configuration file is located outside the current directory structure you conductor -c /path/to/config/conductor.yaml ``` +## Project configuration + +The top level of the configuration has various configurational options for the entire stack. + +```yml +name: MyProject +services: +- name: mysql +- name: rabbit +groups: +- name: group1 + components: + - component1 + - component2 +- name: group2 + components: + - component1 + - component3 +components: + # ... +``` + +- **name** - An arbitrary name for the project +- **services** - An array of external services that can be launched by components. Currently only docker containers are supported. + - **name** - The name of the docker container to launch +- **groups** - An array of groups can be defined to execute multiple components together + - **name** - An arbitrary name for the group + - **components** - An array of component names that should be launched as a group + + + ## Component configuration Components are indvidual applications that are run as part of the stack. All, some, or one of the compoennts can be launched. @@ -52,12 +83,13 @@ component itself. * **path** - The working path relative to the configuration file. If not specified the path is assuemd to be a subfolder with the component name. * **env** - A set of environment variables that are set before any commands are run. * **color** - The component will use this color in the log output. Valid color values are: Yellow, Blue, Green, Red, and Purple. -* **tags** - A comma seperated list of tags to identify the component. These can be used to execute groups of components using the --tags flag. +* **tags** - A list of tags to identify the component. These can be used to execute groups of components using the --tags flag. * **start** - A command block that is executed when the component is ran * **init** - A list of command blocks that are ran when the component is initialized * **repo** - The repository url for the component. When running init all components are cloned into subfolders if they have repositories specified and their init commands are ran. * **retry** - Specifies whether the command should be rerun if it exits. This is true by default. Setting this to false will cause the command to be executed. This does not apply to init commands. * **delay** - A delay in seconds to wait before executing this command. This is useful if it needs to wait for another component to spin up. +* **default** - If set to false the component will not be ran when the bare `conductor` or `conductor run` is executed. ### Command block reference * **command** - the name of the command to run @@ -70,8 +102,18 @@ component itself. ```yaml name: My Web Application +services: +- name: mysql +groups: +- name: full + components: + - frontend + - backend + components: - name: frontend + env: + FORCE_COLOR: 1 color: Blue tags: - core @@ -84,6 +126,26 @@ components: args: - install - name: backend + services: + - mysql + color: Purple + tags: + - core + start: + - command: mix + args: + - phx.server + init: + - command: mix + args: + - deps.get + - command: mix + args: + - compile +- name: production-backend + default: false + env: + MIX_ENV: production color: Purple tags: - core diff --git a/content/articles/getting-started.md b/content/articles/getting-started.md index 2ebea64..1d7635f 100644 --- a/content/articles/getting-started.md +++ b/content/articles/getting-started.md @@ -3,7 +3,7 @@ title: "Getting Started" date: 2020-06-28T11:29:09-04:00 description: "A quick setup guide to get a server running" draft: false -version: "0.2.1" +version: "0.3.2" --- diff --git a/themes/5Sigma/layouts/partials/header.html b/themes/5Sigma/layouts/partials/header.html index 06343e0..2132678 100644 --- a/themes/5Sigma/layouts/partials/header.html +++ b/themes/5Sigma/layouts/partials/header.html @@ -6,6 +6,6 @@ DOCUMENATION \ No newline at end of file