Removed docker compose

Removed docker compose and updated README

fixes #230
This commit is contained in:
Marcin Grzejszczak
2016-04-04 14:40:22 +02:00
parent 9f869b8b0b
commit 60cb5eb49c
6 changed files with 23 additions and 93 deletions

View File

@@ -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].
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`.
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:

View File

@@ -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"]

View File

@@ -1,15 +1,26 @@
# 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
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
$ docker-compose up
...
./mvnw spring-boot:run --projects spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin-stream
```
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
@@ -19,12 +30,10 @@ $ curl localhost:9411/api/v1/services
["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
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.
@@ -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:
```
$ docker-compose up rabbitmq mysql
$ docker-compose up rabbitmq
```

View File

@@ -1,31 +1,7 @@
mysql:
image: mysql
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=test
rabbitmq:
image: rabbitmq:management
expose:
- 5672
ports:
- 5672:5672
- 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
- 15672:15672

View File

@@ -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

View File

@@ -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