Skip to content

Commit

Permalink
[7.x] docs: Add quick start docker (#3106) (#3151)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorelli25 authored Jan 13, 2020
1 parent 43ca5ce commit 5774a73
Show file tree
Hide file tree
Showing 2 changed files with 140 additions and 4 deletions.
75 changes: 75 additions & 0 deletions docs/guide/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
version: '2.2'
services:
apm-server:
image: docker.elastic.co/apm/apm-server:{VERSION}
depends_on:
elasticsearch:
condition: service_healthy
kibana:
condition: service_healthy
cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"]
cap_drop: ["ALL"]
ports:
- 8200:8200
networks:
- elastic
command: >
apm-server -e
-E apm-server.rum.enabled=true
-E setup.kibana.host=kibana:5601
-E setup.template.settings.index.number_of_replicas=0
-E apm-server.kibana.enabled=true
-E apm-server.kibana.host=kibana:5601
-E output.elasticsearch.hosts=["elasticsearch:9200"]
healthcheck:
interval: 10s
retries: 12
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8200/

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:{VERSION}
environment:
- bootstrap.memory_lock=true
- cluster.name=docker-cluster
- cluster.routing.allocation.disk.threshold_enabled=false
- discovery.type=single-node
- ES_JAVA_OPTS=-XX:UseAVX=2 -Xms1g -Xmx1g
ulimits:
memlock:
hard: -1
soft: -1
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- elastic
healthcheck:
interval: 20s
retries: 10
test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'

kibana:
image: docker.elastic.co/kibana/kibana:{VERSION}
depends_on:
elasticsearch:
condition: service_healthy
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
ports:
- 5601:5601
networks:
- elastic
healthcheck:
interval: 10s
retries: 20
test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:5601/api/status

volumes:
esdata:
driver: local

networks:
elastic:
driver: bridge
69 changes: 65 additions & 4 deletions docs/guide/install-and-run.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ We recommend you use the same version of Elasticsearch, Kibana, and APM Server.
* <<apm-server>>
* <<agents>>

[float]
[[quick-start]]
=== Quick start with Docker

If you're interested in Elastic APM and want a quick and easy development environment to try things out,
see <<quick-start-overview>>.

[[install-elasticsearch]]
=== Step 1: Install Elasticsearch

Expand Down Expand Up @@ -101,15 +108,15 @@ and configuring it with the address of your APM Server, a secret token (if neces
.2+|Go
2+|The Go agent automatically instruments Gorilla and Gin, and has support for Go’s built-in net/http and database/sql drivers.
|{apm-go-ref-v}/supported-tech.html[Supported technologies]
|{apm-go-ref-v}/getting-started.html[Getting started with the Go Agent]
|{apm-go-ref-v}/getting-started.html[Set up the Go Agent]

.2+|Java
2+|The Java agent automatically instruments Servlet API, Spring MVC, and Spring Boot out of the box.
|{apm-java-ref-v}/supported-technologies-details.html[Supported technologies]
|{apm-java-ref-v}/setup.html[Set up the Java Agent]

.2+|.NET
2+|The .NET agent automatically instruments ASP.NET Core applications, while .NET Framework applications can be instrumented with the public API.
2+|The .NET agent automatically instruments ASP.NET Core applications, and .NET Framework applications.
|{apm-dotnet-ref-v}/supported-technologies.html[Supported technologies]
|{apm-dotnet-ref-v}/setup.html[Set up the .NET Agent]

Expand All @@ -121,7 +128,7 @@ and configuring it with the address of your APM Server, a secret token (if neces
.2+|Python
2+|The Python agent automatically instruments Django and Flask out of the box.
|{apm-py-ref-v}/supported-technologies.html[Supported technologies]
|{apm-py-ref-v}/getting-started.html[Getting Started with the Python Agent]
|{apm-py-ref-v}/set-up.html[Set up the Python Agent]

.2+|Ruby
2+|The Ruby agent automatically instruments Rails out of the box.
Expand All @@ -131,7 +138,7 @@ and configuring it with the address of your APM Server, a secret token (if neces
.2+|RUM
2+|Real User Monitoring (RUM) captures user interactions with clients such as web browsers.
|{apm-rum-ref-v}/supported-technologies.html[Supported technologies]
|{apm-rum-ref-v}/getting-started.html[Getting started with the RUM Agent]
|{apm-rum-ref-v}/getting-started.html[Set up the RUM Agent]

|=======================================================================

Expand Down Expand Up @@ -197,3 +204,57 @@ More information is available in {apm-server-ref-v}/configuring-howto-apm-server
Don't forget to also read about
{apm-server-ref-v}/securing-apm-server.html[securing APM Server], and
{apm-server-ref-v}/monitoring.html[monitoring APM Server].

[[quick-start-overview]]
=== Quick start development environment

ifeval::["{release-state}"=="unreleased"]

Version {version} of APM Server has not yet been released.

endif::[]

ifeval::["{release-state}"!="unreleased"]

If you're just looking for a quick way to try out Elastic APM, you can easily get started with Docker.
Just follow the steps below.

**Create a docker-compose.yml file**

The https://www.docker.elastic.co/[Elastic Docker registry] contains Docker images for all of the products
in the {stack}.
You can use Docker compose to easily get the default distributions of {es}, {kib},
and APM Server up and running in Docker.

Create a `docker-compose.yml` file and copy and paste in the following:

["source","yaml",subs="attributes"]
--------------------------------------------
include::./docker-compose.yml[]
--------------------------------------------

**Compose**

Run `docker-compose up`.
Compose will download the official docker containers and start {es}, {kib}, and APM Server.

**Install Agents**

When Compose finishes, navigate to http://localhost:5601/app/kibana#/home/tutorial/apm.
Complete steps 4-6 to configure your application to collect and report APM data.

**Visualize**

Use the APM app at http://localhost:5601/app/apm to visualize your application performance data!

When you're done, `ctrl+c` will stop all of the containers.

**Advanced Docker usage**

If you're interested in learning more about all of the APM features available,
or running the Elastic stack on Docker in a production environment, see the following documentation:

* {apm-server-ref-v}/running-on-docker.html[Running APM Server on Docker]
* {stack-gs}/get-started-docker.html[Running the Elastic Stack on Docker]

endif::[]

0 comments on commit 5774a73

Please sign in to comment.