Skip to content

Commit

Permalink
[DOCS] Update ES quick start for security ON by default (#80735) (#80810
Browse files Browse the repository at this point in the history
)

* [DOCS] Update ES quick start for security ON by default

* Remove code.asciidoc, which is part of the overall doc build now

* Update node names for cleanup

* Add note with links to tools

* Add --net elastic network

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
Adam Locke and elasticmachine authored Nov 17, 2021
1 parent 17a5b6a commit 415fbf4
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 179 deletions.
1 change: 0 additions & 1 deletion docs/reference/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ The simplest way to set up {es} is to create a managed deployment with {ess} on
{ecloud}. If you prefer to manage your own test environment, you can install and
run {es} using Docker.

include::{es-repo-dir}/tab-widgets/code.asciidoc[]
include::{es-repo-dir}/tab-widgets/quick-start-install-widget.asciidoc[]

[discrete]
Expand Down
1 change: 0 additions & 1 deletion docs/reference/how-to/fix-common-cluster-issues.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ exceeds 85%.

**Check JVM memory pressure**

include::{es-repo-dir}/tab-widgets/code.asciidoc[]
include::{es-repo-dir}/tab-widgets/jvm-memory-pressure-widget.asciidoc[]

**Check garbage collection logs**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ stream.

The steps for setting up data tiers vary based on your deployment type:

include::{es-repo-dir}/tab-widgets/code.asciidoc[]
include::{es-repo-dir}/tab-widgets/data-tiers-widget.asciidoc[]

[discrete]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ default.

Supported `path.data` and `path.logs` values vary by platform:

include::{es-repo-dir}/tab-widgets/code.asciidoc[]

include::{es-repo-dir}/tab-widgets/customize-data-log-path-widget.asciidoc[]

include::{es-repo-dir}/modules/node.asciidoc[tag=modules-node-data-path-warning-tag]
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/setup/logging-config.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[[logging]]
=== Logging

include::{es-repo-dir}/tab-widgets/code.asciidoc[]

You can use {es}'s application logs to monitor your cluster and diagnose issues.
If you run {es} as a service, the default location of the logs varies based on
your platform and installation method:
Expand Down
2 changes: 0 additions & 2 deletions docs/reference/snapshot-restore/register-repository.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ configuration to account for this.

Supported `path.repo` values vary by platform:

include::{es-repo-dir}/tab-widgets/code.asciidoc[]

include::{es-repo-dir}/tab-widgets/register-fs-repo-widget.asciidoc[]

[discrete]
Expand Down
163 changes: 0 additions & 163 deletions docs/reference/tab-widgets/code.asciidoc

This file was deleted.

8 changes: 4 additions & 4 deletions docs/reference/tab-widgets/quick-start-cleanup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ To stop your {es} and {kib} Docker containers, run:

[source,sh]
----
docker stop es01-test
docker stop kib01-test
docker stop es-node01
docker stop kib-01
----

To remove the containers and their network, run:

[source,sh]
----
docker network rm elastic
docker rm es01-test
docker rm kib01-test
docker rm es-node01
docker rm kib-01
----
// end::self-managed[]
40 changes: 37 additions & 3 deletions docs/reference/tab-widgets/quick-start-install.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,37 @@ Desktop].
----
docker network create elastic
docker pull {docker-repo}:{version}
docker run --name es01-test --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" {docker-image}
docker run --name es-node01 --net elastic -p 9200:9200 -p 9300:9300 -it {docker-image}
----
endif::[]
+
When you start {es} for the first time, the following security configuration
occurs automatically:
+
--
* <<elasticsearch-security-certificates,Certificates and keys>> are generated
for the transport and HTTP layers.
* The Transport Layer Security (TLS) configuration settings are written to
`elasticsearch.yml`.
* A password is generated for the `elastic` user.
* An enrollment token is generated for {kib}.

NOTE: You might need to scroll back a bit in the terminal to view the password
and enrollment token.
--

. Copy the generated password and enrollment token and save them in a secure
location. These values are shown only when you start {es} for the first time.
You'll use these to enroll {kib} with your {es} cluster and log in.
+
[NOTE]
====
If you need to reset the password for the `elastic` user or other
built-in users, run the <<reset-password,`elasticsearch-reset-password`>> tool.
To generate new enrollment tokens for {kib} or {es} nodes, run the
<<create-enrollment-token,`elasticsearch-create-enrollment-token`>> tool.
These tools are available in the {es} `bin` directory.
====

**Install and run {kib}**

Expand All @@ -40,10 +68,16 @@ ifeval::["{release-state}"!="unreleased"]
["source","txt",subs="attributes"]
----
docker pull docker.elastic.co/kibana/kibana:{version}
docker run --name kib01-test --net elastic -p 5601:5601 -e "ELASTICSEARCH_HOSTS=http://es01-test:9200" docker.elastic.co/kibana/kibana:{version}
docker run --name kib-01 --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:{version}
----
+
When you start {kib}, a unique link is output to your terminal.

. To access {kib}, click the generated link in your terminal.

.. In your browser, paste the enrollment token that you copied and click the button to connect your {kib} instance with {es}.

. To access {kib}, go to http://localhost:5601[http://localhost:5601]
.. Log in to {kib} as the `elastic` user with the password that was generated when you started {es}.

endif::[]
// end::self-managed[]

0 comments on commit 415fbf4

Please sign in to comment.