Skip to content

Commit

Permalink
Merge pull request #90 from plunder-app/provisioning_doc
Browse files Browse the repository at this point in the history
Updates to documentation
  • Loading branch information
thebsdbox authored May 1, 2019
2 parents 1d28d6f + af4bf4e commit 14eb3dc
Showing 1 changed file with 51 additions and 5 deletions.
56 changes: 51 additions & 5 deletions docs/provisioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,62 @@ The above example only covers simple usage of `uploading` and `command` usages.

## Usage

When automating a deployment ssh credentials are required to map a host with the correct credentials. To simplify this `plunder` can make use of the deployment file to determine access credentials. When the deployment begins `plunder` will evaluate the hosts in the provisioning map and identify the correct credentials from the deployment file.
When automating a deployment ssh credentials are required to map a host with the correct credentials.

`plunder automate ssh --config ./deployment.json --map ./etcd.json --logfile output`
To simplify this `plunder` can make use of:

![](../image/parlay.jpg)
*The above example uses screen, where the output from `plunder` is on the top and `tail -f output` is below*
- A `deployment` file as detailed [here](./deployment.md), which parlay will extract the `ssh` information from to allow authentication
- A **deployment endpoint**, which is effectively the url of a running plunder instance. Parlay will evaluate the endpoint for the configuration details to allow authentication.

**Example**

Using a map to deploy wordpress (`wordpress.yaml`) and a local deployment file.

`plunder automate ssh --map ./wordpress.yaml --deployconfig ./deployment.json`

Using a map to deploy wordpress (`wordpress.yaml`) and a deployment endpoint.

`plunder automate ssh --map ./wordpress.yaml --deployendpoint http://localhost`

Additional flags:
It is possible to override or completely omit deployment configuration and specify the configuration at runtime through the flags `--override{Address/Keypath/Username}`. By **default** plunder will attempt to populate the Keypath and username from the current user and their `$HOME/.ssh/` directory.

`/plunder automate --map ./stackedmanager.yaml --overrideAddress 192.168.1.105`

Under most circumstances plunder will execute all actions in every deployment (on every host in the deployment), however it is possible to tell plunder to execute a single deployment/action from a map and on which particular host.

Additional Flags:

- The `--deployment` flag now will point to a specific deployment in a map
- The `--action` flag can be used to point to a specific action in a deployment
- The `--host` flag will point to a specific host in the deployment
- The `--resume` will determine if to continue executing all remaining actions

### User Interface

Plunder can also make automation easier by providing a user interface for a map and allowing the user to select which Deployments, actions and the hosts that will be acted upon. To use the user interface the subcommand `ui` should be used, all other flags are the same as above.

**Example**

```
plunder automate ui --map ./stackedmanager.yaml --deployendpoint http://localhost
INFO[0000] Reading deployment configuration from [./stackedmanager.yaml]
? Select deployment(s) [Use arrows to move, type to filter]
> [ ] Reset any Kubernetes configuration (and remove packages)
[ ] Configure host OS for kubernetes nodes
[ ] Deploy Kubernetes Images for 1.14.0
[ ] Initialise Kubernetes Master (1.14)
[ ] Deploy Calico (3.6)
```
The UI also provides additional capability to create new maps based upon selected deployments and actions, and also to convert between formats.
- `--json` Print the JSON to stdout, no execution of commands
- `--yaml` Print the YAML to stdout, no execution of commands
**Execution of a map is shown in the screen shot below**
![](../image/parlay.jpg)
*The above example uses screen, where the output from `plunder` is on the top and `tail -f output` is below*

0 comments on commit 14eb3dc

Please sign in to comment.