Removed docker compose
Removed docker compose and updated README fixes #230
This commit is contained in:
@@ -35,9 +35,10 @@ image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-sleuth/master
|
|||||||
|
|
||||||
Instead of POSTing trace data directly to a Zipkin server, you can export them over https://raw.githubusercontent.com/spring-cloud/spring-cloud-stream[Spring Cloud Stream].
|
Instead of POSTing trace data directly to a Zipkin server, you can export them over https://raw.githubusercontent.com/spring-cloud/spring-cloud-stream[Spring Cloud Stream].
|
||||||
|
|
||||||
1. Build the Zipkin Stream sample with Maven and run it via its `docker-compose.yml` (which also starts the required middleware and the Zipkin UI).
|
1. Run the RabbitMQ middleware for Zipkin (you can use `docker-compose.yml`).
|
||||||
|
2. Build the Zipkin Stream sample with Maven and run it.
|
||||||
7. Run the `spring-cloud-sleuth-sample-stream` app and interact with it in a browser, just like the vanilla sample. If you are using a VM to run docker you might need to tunnel port 5672 to localhost, or change the `spring.rabbbitmq.host`.
|
7. Run the `spring-cloud-sleuth-sample-stream` app and interact with it in a browser, just like the vanilla sample. If you are using a VM to run docker you might need to tunnel port 5672 to localhost, or change the `spring.rabbbitmq.host`.
|
||||||
9. Go to `http://localhost:9411` for Zipkin's UI (if you are using boot2docker the host will be different)
|
9. Go to `http://localhost:9411` for Zipkin's UI
|
||||||
|
|
||||||
The UI should look more or less like this:
|
The UI should look more or less like this:
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
FROM springio/java8
|
|
||||||
RUN chmod 777 -R /tmp
|
|
||||||
VOLUME /tmp
|
|
||||||
VOLUME /app
|
|
||||||
EXPOSE 9411 8000
|
|
||||||
RUN groupadd -g 1000 spring
|
|
||||||
RUN useradd -u 1000 -g 1000 -ms /bin/bash spring
|
|
||||||
VOLUME /home/spring
|
|
||||||
ENV HOME /home/spring
|
|
||||||
USER spring
|
|
||||||
WORKDIR /app/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream
|
|
||||||
CMD ["../../mvnw", "spring-boot:run"]
|
|
||||||
@@ -1,15 +1,26 @@
|
|||||||
# Running a Zipkin Server
|
# Running a Zipkin Server
|
||||||
|
|
||||||
There are 3 parts to Zipkin: the instrumented client apps, the backend database and the Zipkin server. The database for this implementation is MySQL.
|
There are 3 parts to Zipkin:
|
||||||
|
|
||||||
|
- the instrumented client apps
|
||||||
|
- the backend database (defaults to in-memory db)
|
||||||
|
- the Zipkin server
|
||||||
|
|
||||||
## Zipkin Services
|
## Zipkin Services
|
||||||
|
|
||||||
Run this app using the docker-compose provided.
|
Run the Zipkin (remember to have RabbitMQ running) by
|
||||||
|
|
||||||
|
either running Spring Boot Maven plugin:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker-compose build zipkin
|
./mvnw spring-boot:run --projects spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream
|
||||||
$ docker-compose up
|
```
|
||||||
...
|
|
||||||
|
or running the packaged app from the root:
|
||||||
|
|
||||||
|
```
|
||||||
|
./mvnw package --projects spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream
|
||||||
|
java -jar spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream/target/spring-cloud-sleuth-sample-zipkin-stream-1.0.0.BUILD-SNAPSHOT-exec.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
and test it
|
and test it
|
||||||
@@ -19,12 +30,10 @@ $ curl localhost:9411/api/v1/services
|
|||||||
["zipkin-query"]
|
["zipkin-query"]
|
||||||
```
|
```
|
||||||
|
|
||||||
The app might fail to start if mysql is not available when it needs it. If that happens you can just start it separately: just keep running `docker-compose up` until it works.
|
|
||||||
|
|
||||||
|
|
||||||
## Instrumenting Apps
|
## Instrumenting Apps
|
||||||
|
|
||||||
Depend on [Spring Cloud Sleuth Stream](https://github.com/spring-cloud-spring-cloud-sleuth) and the rabbit binder (`spring-cloud-starter-stream-rabbit`).
|
Depend on [Spring Cloud Sleuth Stream](https://github.com/spring-cloud-spring-cloud-sleuth) and the
|
||||||
|
rabbit binder (`spring-cloud-starter-stream-rabbit`).
|
||||||
|
|
||||||
Once the apps start publishing spans they will appear in the span store as well.
|
Once the apps start publishing spans they will appear in the span store as well.
|
||||||
|
|
||||||
@@ -33,5 +42,5 @@ Once the apps start publishing spans they will appear in the span store as well.
|
|||||||
You can run this app in an IDE and still use docker-compose to create the middleware:
|
You can run this app in an IDE and still use docker-compose to create the middleware:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker-compose up rabbitmq mysql
|
$ docker-compose up rabbitmq
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,31 +1,7 @@
|
|||||||
mysql:
|
|
||||||
image: mysql
|
|
||||||
ports:
|
|
||||||
- 3306:3306
|
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD=root
|
|
||||||
- MYSQL_DATABASE=test
|
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
image: rabbitmq:management
|
image: rabbitmq:management
|
||||||
expose:
|
expose:
|
||||||
- 5672
|
- 5672
|
||||||
ports:
|
ports:
|
||||||
- 5672:5672
|
- 5672:5672
|
||||||
- 15672:15672
|
- 15672:15672
|
||||||
zipkin:
|
|
||||||
build: .
|
|
||||||
volumes:
|
|
||||||
- ../..:/app
|
|
||||||
- ~:/home/spring
|
|
||||||
environment:
|
|
||||||
- MYSQL_HOST=mysql
|
|
||||||
- RABBIT_HOST=rabbitmq
|
|
||||||
# - JAVA_OPTS=your jvm params here
|
|
||||||
ports:
|
|
||||||
# Historical port used for the Zipkin HTTP Api
|
|
||||||
- 9411:9411
|
|
||||||
# Zipkin UI used to be on a separate process listening on port 8080
|
|
||||||
- 8080:9411
|
|
||||||
links:
|
|
||||||
- mysql
|
|
||||||
- rabbitmq
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
storage:
|
|
||||||
image: openzipkin/zipkin-mysql:1.39.3
|
|
||||||
container_name: mysql
|
|
||||||
ports:
|
|
||||||
- 3306:3306
|
|
||||||
query:
|
|
||||||
image: openzipkin/zipkin-java:0.11.0
|
|
||||||
environment:
|
|
||||||
- STORAGE_TYPE=mysql
|
|
||||||
- MYSQL_HOST=mysql
|
|
||||||
ports:
|
|
||||||
# Listen port for the Scribe transport
|
|
||||||
- 9410:9410
|
|
||||||
# Historical port used for the Zipkin HTTP Api
|
|
||||||
- 9411:9411
|
|
||||||
# Zipkin UI used to be on a separate process listening on port 8080
|
|
||||||
- 8080:9411
|
|
||||||
depends_on:
|
|
||||||
- storage
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
version: '2'
|
|
||||||
|
|
||||||
services:
|
|
||||||
storage:
|
|
||||||
image: openzipkin/zipkin-mysql:1.39.3
|
|
||||||
container_name: mysql
|
|
||||||
ports:
|
|
||||||
- 3306:3306
|
|
||||||
query:
|
|
||||||
image: openzipkin/zipkin-java:0.11.0
|
|
||||||
environment:
|
|
||||||
- STORAGE_TYPE=mysql
|
|
||||||
- MYSQL_HOST=mysql
|
|
||||||
ports:
|
|
||||||
# Listen port for the Scribe transport
|
|
||||||
- 9410:9410
|
|
||||||
# Historical port used for the Zipkin HTTP Api
|
|
||||||
- 9411:9411
|
|
||||||
# Zipkin UI used to be on a separate process listening on port 8080
|
|
||||||
- 8080:9411
|
|
||||||
depends_on:
|
|
||||||
- storage
|
|
||||||
Reference in New Issue
Block a user