Skip to content

Commit 60cb5eb

Browse files
Removed docker compose
Removed docker compose and updated README fixes #230
1 parent 9f869b8 commit 60cb5eb

File tree

6 files changed

+23
-93
lines changed

6 files changed

+23
-93
lines changed

spring-cloud-sleuth-samples/README.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-sleuth/master
3535

3636
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].
3737

38-
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).
38+
1. Run the RabbitMQ middleware for Zipkin (you can use `docker-compose.yml`).
39+
2. Build the Zipkin Stream sample with Maven and run it.
3940
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`.
40-
9. Go to `http://localhost:9411` for Zipkin's UI (if you are using boot2docker the host will be different)
41+
9. Go to `http://localhost:9411` for Zipkin's UI
4142

4243
The UI should look more or less like this:
4344

spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream/Dockerfile

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
# Running a Zipkin Server
22

3-
There are 3 parts to Zipkin: the instrumented client apps, the backend database and the Zipkin server. The database for this implementation is MySQL.
3+
There are 3 parts to Zipkin:
4+
5+
- the instrumented client apps
6+
- the backend database (defaults to in-memory db)
7+
- the Zipkin server
48

59
## Zipkin Services
610

7-
Run this app using the docker-compose provided.
11+
Run the Zipkin (remember to have RabbitMQ running) by
12+
13+
either running Spring Boot Maven plugin:
14+
15+
```
16+
./mvnw spring-boot:run --projects spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream
17+
```
18+
19+
or running the packaged app from the root:
820

921
```
10-
$ docker-compose build zipkin
11-
$ docker-compose up
12-
...
22+
./mvnw package --projects spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream
23+
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
1324
```
1425

1526
and test it
@@ -19,12 +30,10 @@ $ curl localhost:9411/api/v1/services
1930
["zipkin-query"]
2031
```
2132

22-
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.
23-
24-
2533
## Instrumenting Apps
2634

27-
Depend on [Spring Cloud Sleuth Stream](https://github.com/spring-cloud-spring-cloud-sleuth) and the rabbit binder (`spring-cloud-starter-stream-rabbit`).
35+
Depend on [Spring Cloud Sleuth Stream](https://github.com/spring-cloud-spring-cloud-sleuth) and the
36+
rabbit binder (`spring-cloud-starter-stream-rabbit`).
2837

2938
Once the apps start publishing spans they will appear in the span store as well.
3039

@@ -33,5 +42,5 @@ Once the apps start publishing spans they will appear in the span store as well.
3342
You can run this app in an IDE and still use docker-compose to create the middleware:
3443

3544
```
36-
$ docker-compose up rabbitmq mysql
45+
$ docker-compose up rabbitmq
3746
```
Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,7 @@
1-
mysql:
2-
image: mysql
3-
ports:
4-
- 3306:3306
5-
environment:
6-
- MYSQL_ROOT_PASSWORD=root
7-
- MYSQL_DATABASE=test
81
rabbitmq:
92
image: rabbitmq:management
103
expose:
114
- 5672
125
ports:
136
- 5672:5672
14-
- 15672:15672
15-
zipkin:
16-
build: .
17-
volumes:
18-
- ../..:/app
19-
- ~:/home/spring
20-
environment:
21-
- MYSQL_HOST=mysql
22-
- RABBIT_HOST=rabbitmq
23-
# - JAVA_OPTS=your jvm params here
24-
ports:
25-
# Historical port used for the Zipkin HTTP Api
26-
- 9411:9411
27-
# Zipkin UI used to be on a separate process listening on port 8080
28-
- 8080:9411
29-
links:
30-
- mysql
31-
- rabbitmq
7+
- 15672:15672

spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/docker-compose.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

spring-cloud-sleuth-zipkin/docker-compose.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)