Skip to content

Commit ac10169

Browse files
authored
Merge pull request #30 from nzlosh/master
Fixed locking signature and updated documentation
2 parents 8ba5150 + be4860f commit ac10169

File tree

3 files changed

+581
-49
lines changed

3 files changed

+581
-49
lines changed

README.jinja

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
[![Build Status](https://circleci.com/gh/StackStorm-Exchange/stackstorm-consul.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/StackStorm-Exchange/stackstorm-consul) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
2+
3+
# {{ pack["pack.yaml"].name }} integration pack v{{ pack["pack.yaml"].version }}
4+
5+
> {{ pack["pack.yaml"].description }}
6+
{{ pack["pack.yaml"].author }} <{{ pack["pack.yaml"].email }}>
7+
8+
[HashiCorp Consul](https://www.consul.io/)
9+
10+
# <a name="QuickStart"></a> Quick Start
11+
12+
Install the pack
13+
14+
``` shell
15+
st2 pack install consul
16+
```
17+
18+
# <a name="Configuration"></a> Configuration
19+
The configuration for this pack is used to specify connection information for all Consul servers you'll be communicating with. The location for the config file is `/opt/stackstorm/configs/consul.yaml`. An example configuration located in the repo named [consul.yaml.example](./consul.yaml.example) can be copied to `/opt/stackstorm/configs/consul.yaml` and edited as required.
20+
21+
It should contain:
22+
23+
* `default_profile` - URL for the Vault server
24+
* `consul_profiles` - Mapping of name to an object containing Consul profile settings
25+
* `name` - Name of the consul profile
26+
* `host` - Consul server IP/name. Default 127.0.0.1
27+
* `port` - Consul server port. Default 8500
28+
* `token` - Consul API token
29+
* `scheme` - Consul scheme to use. Default http
30+
* `verify` - Verify the SSL certificate for HTTPS requests. Default false (this option is ignored if ca_cert_path is supplied)
31+
* `ca_cert_path` - CA Certificate path. Defaults to empty string. When path is provided, SSL certificates are verified
32+
* `client_cert_path` - Client side certificates for HTTPS request
33+
* `client_key_path` - Client private key for HTTPS request
34+
* `preserve_varenv` - Enable preservation of environment variables. If disable, all CONSUL_* environment variables are deleted from the action execution
35+
* `consistency` - The consistency mode to use by default for all reads that support the consistency option
36+
37+
**Note** : When modifying the configuration in `/opt/stackstorm/configs/` please
38+
remember to tell StackStorm to load these new values by running
39+
`st2ctl reload --register-configs`
40+
41+
## <a name="SchemaExample"></a> Schema Examples
42+
43+
``` yaml
44+
---
45+
consul_profiles:
46+
-
47+
name: production
48+
ca_cert_path: /etc/ssl/certs/ca.pem
49+
client_cert_path: /etc/ssl/certs/client-cert.pem
50+
client_key_path: /etc/ssl/private/client-key.pem
51+
consistency: default
52+
host: 127.0.0.1
53+
port: 8500
54+
scheme: https
55+
token: 11111111-bbbb-aaaa-cccc-222222222222
56+
verify: true
57+
preserve_varenv: false
58+
-
59+
name: dev
60+
ca_cert_path: /etc/ssl/certs/dev-ca.pem
61+
client_cert_path: /etc/ssl/certs/dev-client-cert.pem
62+
client_key_path: /etc/ssl/private/dev-client-key.pem
63+
consistency: default
64+
host: 10.11.12.13
65+
port: 8500
66+
scheme: https
67+
token: 22222222-bbbb-aaaa-cccc-444444444444
68+
verify: false
69+
preserve_varenv: false
70+
default_profile: production
71+
```
72+
73+
74+
## Configuration
75+
76+
The following options are required to be configured for the pack to work correctly.
77+
78+
| Option | Type | Required | Secret | Description |
79+
|---|---|---|---|---|
80+
{% for key, value in pack["config.schema.yaml"].items() -%}
81+
| `{{ key }}` | {{ value.type }} | {{ value.required }} | {{ value.secret }} | {{ value.description }} |
82+
{% endfor %}
83+
84+
## Actions
85+
86+
{% if actions | length > 0 %}
87+
The pack provides the following actions:
88+
89+
{% for key, value in actions.items() -%}
90+
### {{ value.name }}
91+
_{{ value.description }}_
92+
93+
| Parameter | Type | Required | Secret | Description |
94+
|---|---|---|---|---|
95+
{% for p_key, p_value in value.parameters.items() -%}
96+
| `{{ p_key }}` | {{ p_value.type | default("n/a") }} | {{ p_value.required | default("default") }} | {{ p_value.secret | default("default") }} | _{{ p_value.description | default("Unavailable") }}_ |
97+
{% endfor -%}
98+
99+
100+
{% endfor %}
101+
{% else %}
102+
There are no actions available for this pack.
103+
{% endif %}
104+
105+
## Sensors
106+
{% if sensors | length > 0 %}
107+
The following sensors and triggers are provided:
108+
{% for key, value in sensors.items() %}
109+
### Class {{ value.class_name }}
110+
_{{ value.description }}_
111+
112+
{% for trigger in value.trigger_types -%}
113+
| Trigger Name | Description |
114+
|---|---|
115+
| `{{ trigger.name }}` | _{{ trigger.description | default("Unavailable") }}_ |
116+
{% endfor %}
117+
118+
119+
{% endfor %}
120+
{% else %}
121+
There are no sensors available for this pack.
122+
{% endif %}
123+
124+
<sub>Documentation generated using [pack2md](https://github.com/nzlosh/pack2md)</sub>

0 commit comments

Comments
 (0)