Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins configuration docs - format parameters as a table #340

Merged
46 changes: 8 additions & 38 deletions docs/cloud-configuration/configuration-aws.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,15 @@
> ⚠️ Note from the developers: We are currently in the process of moving our documentation and so the below documentation is only partially correct. For more information on this tool please checkout our [plugin documentation](https://github.com/bitops-plugins/aws).
> ⚠️ Note from the developers: We are currently in the process of moving our documentation and so the below documentation is only partially correct. For more information on this tool please check out our [plugin documentation](https://github.com/bitops-plugins/aws).

# AWS

> ⚠️ `bitops.config.yaml` is not yet supported for AWS ([TODO](https://github.com/bitovi/bitops/issues/15)). All configuration must be done with environment variables.
> ⚠️ `bitops.config.yaml` is not yet supported for AWS ([TODO](https://github.com/bitovi/bitops/issues/15)). All configurations must be done with environment variables.

## Configuration

-------------------
### aws_access_key_id
* **BitOps Property:** [TODO](https://github.com/bitovi/bitops/issues/15)
* **Environment Variable:** `AWS_ACCESS_KEY_ID`
* **default:** `""`
* **required:** yes
| Item | BitOps Property | Environmental Variable | Description | Default | Required |
| --------------------- | -------------------------------------------------- | ---------------------- | ------------------------------------------------------------ | ------- | -------- |
| aws_access_key_id | [TODO](https://github.com/bitovi/bitops/issues/15) | AWS_ACCESS_KEY_ID | Specifies an AWS access key associated with an IAM user or role. See [AWS official documentation](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) | `null` | Yes |
ccapell marked this conversation as resolved.
Show resolved Hide resolved
| aws_secret_access_key | [TODO](https://github.com/bitovi/bitops/issues/15) | AWS_SECRET_ACCESS_KEY | Specifies the secret key associated with the access key. This is essentially the "password" for the access key. See [AWS official documentation](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) | `null` | Yes |
| aws_default_region | [TODO](https://github.com/bitovi/bitops/issues/15) | AWS_DEFAULT_REGION | Specifies the AWS Region to send the request to. See [AWS official documentation](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) | `null` | Yes |
| aws_session_token | [TODO](https://github.com/bitovi/bitops/issues/15) | AWS_SESSION_TOKEN | Specifies the session token value that is required if you are using temporary security credentials that you retrieved directly from AWS STS operations. See [AWS official documentation](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) | `null` | No |

Specifies an AWS access key associated with an IAM user or role. See [AWS official documentation](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)

-------------------
### aws_secret_access_key
* **BitOps Property:** [TODO](https://github.com/bitovi/bitops/issues/15)
* **Environment Variable:** `AWS_SECRET_ACCESS_KEY`
* **default:** `""`
* **required:** yes

Specifies the secret key associated with the access key. This is essentially the "password" for the access key. See [AWS official documentation](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)

-------------------
### aws_default_region
* **BitOps Property:** [TODO](https://github.com/bitovi/bitops/issues/15)
* **Environment Variable:** `AWS_DEFAULT_REGION`
* **default:** `""`
* **required:** yes

Specifies the AWS Region to send the request to. See [AWS official documentation](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)

-------------------
### aws_session_token
* **BitOps Property:** [TODO](https://github.com/bitovi/bitops/issues/15)
* **Environment Variable:** `AWS_SESSION_TOKEN`
* **default:** `""`
* **required:** no

Specifies the session token value that is required if you are using temporary security credentials that you retrieved directly from AWS STS operations. See [AWS official documentation](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)

-------------------
32 changes: 7 additions & 25 deletions docs/cloud-configuration/configuration-azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,14 @@

The following environment variables for Microsoft Azure are required. See [Microsoft Azure official documentation](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli) for how to create them.

All configuration must be done with environment variables
All configurations must be done with environmental variables

## Configuration

-------------------
### AZ_CLIENT_ID
* **BitOps Property:**
* **Environment Variable:** `AZ_CLIENT_ID`
* **default:** `""`
* **required:** yes

### AZ_CLIENT_SECRET
* **BitOps Property:**
* **Environment Variable:** `AZ_CLIENT_SECRET`
* **default:** `""`
* **required:** yes

### AZ_SUBSCRIPTION_ID
* **BitOps Property:**
* **Environment Variable:** `AZ_SUBSCRIPTION_ID`
* **default:** `""`
* **required:** yes

### AZ_TENANT_ID
* **BitOps Property:**
* **Environment Variable:** `AZ_TENANT_ID`
* **default:** `""`
* **required:** yes
| Item | BitOps Property | Environmental Variable | Description | Default | Req |
| ------------------ | --------------- | ---------------------- | ----------- | ------- | ---- |
| AZ_CLIENT_ID | | AZ_CLIENT_ID | | `null` | Yes |
| AZ_CLIENT_SECRET | | AZ_CLIENT_SECRET | | `null` | Yes |
| AZ_SUBSCRIPTION_ID | | AZ_SUBSCRIPTION_ID | | `null` | Yes |
| AZ_TENANT_ID | | AZ_TENANT_ID | | `null` | Yes |

14 changes: 7 additions & 7 deletions docs/cloud-configuration/configuration-gcp.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# GCP

Follow the steps in Google's documentation to create and download your GCP Authentication Key.
See [Googles official documentation](https://cloud.google.com/docs/authentication/getting-started)
See [Google's official documentation](https://cloud.google.com/docs/authentication/getting-started)

## Configuration

-------------------
### GOOGLE_AUTHENTICATION_KEY
* **BitOps Property:**
* **Environment Variable:** `GOOGLE_AUTHENTICATION_KEY`
* **default:** `""`
* **required:** yes
| Item | BitOps Property | Environmental Variable | Description | Default | Req |
| ------------------------- | --------------- | ------------------------- | ----------- | ------- | ---- |
| GOOGLE_AUTHENTICATION_KEY | | GOOGLE_AUTHENTICATION_KEY | | `null` | Yes |



18 changes: 4 additions & 14 deletions docs/configuration-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,10 @@ During the docker run command, you can specify an ENV var and it will be accessi
## Common Configuration
There are some global configuration options that are shared among all tools and cloud providers during a BitOps run. These are set via environment variables

-------------------
### environment
* **Environment Variable:** `BITOPS_ENVIRONMENT`
* **required:** yes

Each BitOps run is done against a single environment. This property tells BitOps which environment to run. For more information on environments, see [Operations Repo Structure](operations-repo-structure.md#environment-directories).

-------------------
### kubeconfig_base64
* **Environment Variable:** `KUBECONFIG_BASE64`
* **default:** `""`
* **required:** no

Base64 encoded `kubeconfig` file. Allows deployment tools to interact with a Kubernetes cluster.
| Property | Environment Variable | Description | Default | Required |
| ----------------- | -------------------- | ------------------------------------------------------------ | ------- | -------- |
| environment | BITOPS_ENVIRONMENT | Each BitOps run is done against a single environment. This property tells BitOps which environment to run. For more information on environments, see [Operations Repo Structure](operations-repo-structure.md#environment-directories). | | Yes |
| kubeconfig_base64 | KUBECONFIG_BASE64 | Base64 encoded `kubeconfig` file. Allows deployment tools to interact with a Kubernetes cluster. | `null` | No |

-------------------
## Cloud Providers
Expand Down
119 changes: 9 additions & 110 deletions docs/tool-configuration/bitops.schema.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Summary
## Schema
```
```yaml
bitops:
ops_repo:
source: <value>
Expand All @@ -26,115 +26,14 @@ bitops:

# <ins>Configuration explanation</ins>
---
## <ins>ops_repo</ins>
## ops_repo.source
#### *Expected Values*
- "local"
- A https url to project code (Github)
- example: https://github.com/PhillypHenning/test-opsrepo.git
#### *Usage*
````
```
bitops:
source: local
```
````
---

## <ins>fail_fast</ins>
Sets a internal flag which if true will exit the application if an exception occurs.

#### *Expected Values*
- [`True or False`]
#### *Usage*
````
```
bitops:
fail_fast: True
```
````
---

## <ins>logging</ins>
Describes the logging configuration BitOps will use during execution.
## logging.level
What logging level BitOps will run with.

#### *Expected Values*
- DEBUG
- INFO
- WARN
- ERROR
- CRITICAL

#### *Usage*
````
```
bitops:
logging:
level: DEBUG
```
````
---

## **<ins>plugins</ins>**
## plugins.plugin_seq
Describes the sequence of execution that will be performed during the deployment tools execution.

#### *Expected Values*
- Should use the same values as the alias names given to the deployment tools.
| Property | Values allowed | Description | Default | Required |
| ----------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------- | -------- |
| bitops.ops_repo.source | `local` or URL to Project code example: https://github.com/PhillypHenning/test-opsrepo.git | Location of the Operations Repository | | |
| bitops.failfast | `True` or `False` | Sets an internal flag which if true will exit the application if an exception occurs. | | |
| bitops.logging.level | `DEBUG`, `INFO`, `WARN`, `ERROR`, `CRITICAL` | The logging level | | |
| bitops.plugins.plugin_seq | List of values using the same alias names given to the deployment tools. | The sequence of execution for the plugins | | |
| bitops.plugins.tools.cloudproviders | | Describes the cloud provider that will be installed and used to deploy | | |
| bitops.plugins.tools.deployment | | Describes the deployment tools that will be installed and used to deploy | | |

#### *Usage*
````
```
bitops:
plugins:
plugin_seq:
- deployment_tool1
- deployment_tool2
tools:
deployment:
deployment_tool1:
source: foobar
deployment_tool2:
source: foobar
```
````
---

## **plugins.tools**
## plugins.tools.cloudproviders
Describes the cloudprovider that will be installed and used to deploy

#### *Usage*
````
```
bitops:
plugins:
tools:
cloudproviders:
aws:
source: foobar
```
````
---

## plugins.tools.deployment
Describes the deployment tools that will be installed and used to deploy

#### *Usage*
````
```
bitops:
plugins:
plugin_seq:
- deployment_tool1
- deployment_tool2
tools:
deployment:
deployment_tool1:
source: foobar
deployment_tool2:
source: foobar
```
````
96 changes: 16 additions & 80 deletions docs/tool-configuration/configuration-ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Ansible

## Example bitops.config.yaml
```
```yaml
ansible:
cli:
extra-vars: "@extra-vars.json"
Expand All @@ -22,88 +22,24 @@ ansible:

## CLI Configuration

-------------------
### extra-vars
* **BitOps Property:** `extra-vars`
* **Environment Variable:** `BITOPS_ANSIBLE_EXTRA_VARS`

Add additional ansible playbook parameters directly or load via JSON/YAML file.

-------------------
### flush-cache
* **BitOps Property:** `flush-cache`
* **Environment Variable:** `BITOS_ANSIBLE_FLUSH_CACHE`

Clear the fact cache for every host in inventory.

-------------------
### force-handlers
* **BitOps Property:** `force-handlers`
* **Environment Variable:** `BITOPS_ANSIBLE_FORCE_HANDLERS`

Clear the fact cache for every host in inventory.

-------------------
### forks
* **BitOps Property:** `forks`
* **Environment Variable:** `BITOPS_ANSIBLE_FORKS`

Specify number of parallel processes to use (default=5).

-------------------
### inventory
* **BitOps Property:** `inventory`
* **Environment Variable:** `BITOPS_ANSIBLE_INVENTORY`

Specify inventory host path or comma separated host list.

-------------------
### skip-tags
* **BitOps Property:** `skip-tags`
* **Environment Variable:** `BITOPS_ANSIBLE_SKIP_TAGS`

Only run plays and tasks whose tags do not match these values.

-------------------
### tags
* **BitOps Property:** `tags`
* **Environment Variable:** `BITOPS_ANSIBLE_TAGS`

Only run plays and tasks tagged with these values.


-------------------
### vault-id
* **BitOps Property:** `vault-id`
* **Environment Variable:** `BITOPS_ANSIBLE_VAULT_ID`
* **type:** `list`

Specify Ansible vault-id `[dev@dev-passwordfile]` or multiple `[dev@dev-passwordfile, prod@prod-passwordfile]` or password client script `[dev@my-vault-password-client.py]`. Cannot be used with `@prompt` for equivalent `--ask-vault-pass` functionality

-------------------
### vault-password-file
* **BitOps Property:** `vault-password-file`
* **Environment Variable:** `BITOPS_ANSIBLE_VAULT_PASSWORD_FILE`

Specify Ansible vault password file for decryption.
| Property | Environmental Variable | Description | Default | Required |
| ------------------- | ---------------------------------- | ------------------------------------------------------------ | ------- | -------- |
| extra-vars | BITOPS_ANSIBLE_EXTRA_VARS | Add additional ansible playbook parameters directly or load via JSON/YAML file. | | |
| flush-cache | BITOS_ANSIBLE_FLUSH_CACHE | Clear the fact cache for every host in the inventory. | | |
| force-handlers | BITOPS_ANSIBLE_FORCE_HANDLERS | Clear the fact cache for every host in the inventory. | | |
| forks | BITOPS_ANSIBLE_FORKS | Specify the number of parallel processes to use | 5 | |
| inventory | BITOPS_ANSIBLE_INVENTORY | Specify inventory host path or comma-separated host list. | | |
| skip-tags | BITOPS_ANSIBLE_SKIP_TAGS | Only run plays and tasks whose tags do not match these values. | | |
| tags | BITOPS_ANSIBLE_TAGS | Only run plays and tasks tagged with these values. | | |
| vault-id | BITOPS_ANSIBLE_VAULT_ID | This is a list. Specify Ansible vault-id `[dev@dev-passwordfile]` or multiple `[dev@dev-passwordfile, prod@prod-passwordfile]` or password client script `[dev@my-vault-password-client.py]`. Cannot be used with `@prompt` for equivalent `--ask-vault-pass` functionality | | |
| vault-password-file | BITOPS_ANSIBLE_VAULT_PASSWORD_FILE | Specify Ansible vault password file for decryption. | | |

## Options Configuration

-------------------
### dryrun
* **BitOps Property:** `dryrun`
* **Environment Variable:** `BITOPS_ANSIBLE_DRYRUN`
* **default:** `false`

Will run `--list-tasks` but won't actually execute playbook(s)

-------------------
### verbose
* **BitOps Property:** `verbosity`
* **Environment Variable:** `ANSIBLE_VERBOSITY`
* **default:** `not set`

Acceptable values `0|1|2|3|4`. Equivalent to adding `-verbose` or repeating `-v` flags. Will override a pre-existing `ANSIBLE_VERBOSITY` environmental variable or `[default]` `verbosity=` setting in ansible.cfg.
| Property | Environmental Variable | Description | Default | Required |
| --------- | ---------------------- | ------------------------------------------------------------ | ------- | -------- |
| dryrun | BITOPS_ANSIBLE_DRYRUN | Will run `--list-tasks` but won't actually execute playbook(s) | | |
| verbosity | ANSIBLE_VERBOSITY | Acceptable values `0|1|2|3|4`. Equivalent to adding `-verbose` or repeating `-v` flags. Will override a pre-existing `ANSIBLE_VERBOSITY` environmental variable or `[default]` `verbosity=` setting in ansible.cfg. | N/A | |

## Additional Environment Variable Configuration
Although not captured in `bitops.config.yaml`, the following environment variables can be set to further customize behaviour.
Expand Down
Loading