Skip to content

Commit d994fa4

Browse files
authored
Improve user documentation (#22)
1 parent 7d10b3e commit d994fa4

File tree

2 files changed

+26
-28
lines changed

2 files changed

+26
-28
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Elastic Cloud Control
22

3-
`ecctl` is the CLI on steroids for the Elastic Cloud API. It wraps common operations commonly needed by Elastic Cloud operators within a single command line tool.
3+
NOTE: **You are looking at the documentation for a beta release. Please keep in mind that backwards-incompatible changes might be introduced in future releases.**
44

5-
The goal of this project is to provide an easier way to interact with the Elastic Cloud API, ensuring each one of the provided commands is thoroughly tested.
5+
`ecctl` is the CLI on steroids for the Elastic Cloud Enterprise API. It wraps typical operations commonly needed by ECE operators within a single command line tool.
6+
7+
The goal of this project is to provide an easier way to interact with the ECE API, ensuring each one of the provided commands is thoroughly tested.
8+
9+
Note that, right now, `ecctl` targets ECE installations only. There are, however, plans to support public Elasticsearch Service API in the future.
610

711
To get started with Elastic Cloud Control, see the [official documentation](https://www.elastic.co/guide/en/ecctl/current/index.html).
812

docs/ecctl-getting-started.asciidoc

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
[id="{p}-overview"]
22
== Overview
33

4-
{p} is the CLI on steroids for the Elastic Cloud API. It wraps
5-
common operations commonly needed by Elastic Cloud operators within a
4+
NOTE: **You are looking at the documentation for a beta release. Please keep in mind that backwards-incompatible changes might be introduced in future releases.**
5+
6+
{p} is the CLI on steroids for the Elastic Cloud Enterprise API. It wraps
7+
typical operations commonly needed by ECE operators within a
68
single command line tool.
79

8-
Benfits of {p}:
10+
Benefits of {p}:
911

10-
* Easier to use for ops than using the Cloud UI or using the RESTful API directly
11-
* Help you automate the deployment lifecycle
12+
* Easier to use for ops than using the user console using the RESTful API directly
13+
* Helps you automate the deployment lifecycle
1214
* Provides a foundation for integration with other tools, such as Terraform and Ansible
1315

16+
Note that, right now, {p} targets ECE installations only. There are, however, plans
17+
to support public Elasticsearch Service API in the future.
18+
1419
[id="{p}-installing"]
1520
== Installing
1621

@@ -29,15 +34,14 @@ the steps from our link:https://github.com/elastic/ecctl/blob/master/CONTRIBUTIN
2934
The simplest installation for macOS users is to install {p} with
3035
link:https://brew.sh/[Homebrew]:
3136

32-
[source,console]
37+
[source]
3338
----
3439
$ brew tap elastic/ecctl
3540
$ brew tap-pin elastic/ecctl
3641
$ brew install elastic/ecctl/ecctl
3742
Updating Homebrew...
3843
=> Installing ecctl from elastic/ecctl
3944
...
40-
[id="{p}-"]
4145
=> Summary
4246
🍺 /usr/local/Cellar/ecctl/1.0.0: 6 files, 13MB, built in 7 seconds
4347
----
@@ -92,7 +96,7 @@ variables, or at runtime using the CLI’s global flags.
9296
=== Before you begin
9397
The hierarchy for configuration parameters is as follows, from higher precedence to lower:
9498

95-
. Command line flags `--region`, `--host`, `--user`, `--pass`
99+
. Command line flags `--host`, `--user`, `--pass`
96100
. Environment variables
97101
. Shared configuration file
98102
`$HOME/.ecctl/config.<json|toml|yaml|hcl>`
@@ -102,7 +106,7 @@ The hierarchy for configuration parameters is as follows, from higher precedence
102106

103107
If it’s your first time using {p}, use the `init` command to assist you in generating a configuration file. The resulting configuration file will be saved under `~/.ecctl/config.json`:
104108

105-
[source,console]
109+
[source]
106110
----
107111
$ ecctl init
108112
Welcome to the Elastic Cloud CLI! This command will guide you through authenticating and setting some default values.
@@ -164,14 +168,13 @@ the binary for Elastic Cloud:
164168

165169
[source,yaml]
166170
----
167-
host: https://api.elastic-cloud.com # URL of Elastic Cloud or your ECE installation.
168-
region: us-east-1 # For ECE installations you can just omit this setting.
171+
host: https://api.elastic-cloud.com # URL of your ECE API endpoint
169172
170173
# Credentials
171174
## apikey is the preferred authentication mechanism.
172175
apikey: bWFyYzo4ZTJmNmZkNjY5ZmQ0MDBkOTQ3ZjI3MTg3ZWI5MWZhYjpOQktHY05jclE0cTBzcUlnTXg3QTd3
173176
174-
## username and password can be used, specially when no API key is available.
177+
## username and password can be used when no API key is available.
175178
user: username
176179
pass: password
177180
----
@@ -199,15 +202,6 @@ export EC_APIKEY=bWFyYzo4ZTJmNmZkNjY5ZmQ0MDBkOTQ3ZjI3MTg3ZWI5MWZhYjpOQktHY05jclE
199202
export EC_CONFIG=$HOME/.ecctl/cloud.yaml
200203
----
201204

202-
`EC_REGIONS` will define autocomplete entries for the `--region`
203-
flag, though there is no validation and it is not environment aware
204-
(e.g. no different list is provided for staging vs production).
205-
206-
[source,sh]
207-
----
208-
export EC_REGIONS=="ap-northeast-1 ap-southeast-1 ap-southeast-2 aws-eu-central-1 eu-west-1 gcp-europe-west1 gcp-europe-west3 gcp-us-central1 gcp-us-west1 sa-east-1 us-east-1 us-west-1 us-west-2"
209-
----
210-
211205
[id="{p}-multiple-configuration-files"]
212206
=== Multiple configuration files
213207

@@ -217,11 +211,11 @@ targets. By default it will use
217211
`$HOME/.ecctl/config.<json|toml|yaml|hcl>`, but when the `--config`
218212
flag is specified, it will append the `--config` name to the file:
219213

220-
[source,console]
214+
[source]
221215
----
222216
# Default behaviour
223217
$ ecctl version
224-
# will use ~/.ecctl/staging.yaml
218+
# will use ~/.ecctl/config.yaml
225219
226220
# When an environment is specified, the configuration file used will change
227221
$ ecctl version --config ece
@@ -245,14 +239,14 @@ to obtain a specific part of a command response that might not have been
245239
shown before with the default `--output=text`. The `--format`
246240
internally uses Go templates which means that you can use the power of
247241
the Go built-in
248-
https://golang.org/pkg/text/template/[`text/templates`] on demmand.
242+
https://golang.org/pkg/text/template/[`text/templates`] on demand.
249243

250244
[id="{p}-examples"]
251245
== Usage examples
252246

253247
Obtaining the ID, Version and health status
254248

255-
[source,console]
249+
[source]
256250
----
257251
$ ecctl elasticsearch list --format '{{.ClusterID}} {{.PlanInfo.Current.Plan.Elasticsearch.Version}} {{.Healthy}}'
258252
a2c4f423c1014941b75a48292264dd25 6.7.0 true
@@ -264,7 +258,7 @@ a4f29ff3ba554e69a1e1b40c3ee1b6e3 6.7.0 true
264258
Since the template is executed we can also embed logic inside of the
265259
template to filter the results.
266260

267-
[source,console]
261+
[source]
268262
----
269263
$ export EC_FORMAT='{{range .Elasticsearch.DefaultPlugins}}{{if eq . "discovery-file" }}{{$.Version}}{{end}}{{end}}'
270264
# Since the template is executed on every item of the list, filter the empty lines to have a cleaner output.

0 commit comments

Comments
 (0)