Updated documentation for 0.3.2

This commit is contained in:
Joe Bellus 2020-08-27 14:22:27 -04:00
parent 8c2ae654ca
commit 7ccfb421a5
4 changed files with 81 additions and 5 deletions

View File

@ -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.

View File

@ -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

View File

@ -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"
---

View File

@ -6,6 +6,6 @@
DOCUMENATION
</a>
<div class="ui right secondary menu">
<a class="icon item" href="http://github.com/5Sigma/celerity"><i class="ui github icon"></i></a>
<a class="icon item" href="http://github.com/5Sigma/conductor"><i class="ui github icon"></i></a>
</div>
</div>