Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

Commit

Permalink
Reverts back to OpenZipkin dependencies (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancole committed Jun 14, 2019
1 parent b1e002a commit fbbf39a
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 36 deletions.
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -12,7 +12,7 @@


This repository contains the Docker build definition and release process for
[Apache Incubating Zipkin](https://github.com/apache/incubator-zipkin). It also contains
[Zipkin Server](https://github.com/openzipkin/zipkin). It also contains
test images for transport and storage backends such as Kafka or Cassandra.

Automatically built images are available on Quay.io under the [OpenZipkin](https://quay.io/organization/openzipkin) organization,
Expand Down Expand Up @@ -48,7 +48,7 @@ See the ui at (docker ip):9411
In the ui - click zipkin-server, then click "Find Traces".

## Configuration
Configuration is via environment variables, defined by [zipkin-server](https://github.com/apache/incubator-zipkin/blob/master/zipkin-server/README.md). Notably, you'll want to look at the `STORAGE_TYPE` environment variables, which
Configuration is via environment variables, defined by [zipkin-server](https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md). Notably, you'll want to look at the `STORAGE_TYPE` environment variables, which
include "cassandra", "mysql" and "elasticsearch".

When in docker, the following environment variables also apply
Expand Down Expand Up @@ -131,7 +131,7 @@ $ docker-machine ssh default "sudo sysctl -w vm.max_map_count=262144"
### Kafka

The docker-compose configuration can be extended to host a test Kafka broker
and activate the [Kafka collector](https://github.com/apache/incubator-zipkin/tree/master/zipkin-collector/kafka)
and activate the [Kafka collector](https://github.com/openzipkin/zipkin/tree/master/zipkin-collector/kafka)
using the `docker-compose-kafka.yml` file. That file employs
[docker-compose overrides](https://docs.docker.com/compose/extends/#multiple-compose-files)
to add a Kafka+ZooKeeper container and relevant settings.
Expand All @@ -140,7 +140,7 @@ To start the MySQL+Kafka configuration, run:

$ docker-compose -f docker-compose.yml -f docker-compose-kafka.yml up

Then configure the [Kafka sender](https://github.com/apache/incubator-zipkin-reporter-java/blob/master/kafka11/src/main/java/zipkin2/reporter/kafka11/KafkaSender.java) using a `bootstrapServers` value of `host.docker.internal:9092` if your application is inside the same docker network or `localhost:19092` if not, but running on the same host.
Then configure the [Kafka sender](https://github.com/openzipkin/zipkin-reporter-java/blob/master/kafka11/src/main/java/zipkin2/reporter/kafka11/KafkaSender.java) using a `bootstrapServers` value of `host.docker.internal:9092` if your application is inside the same docker network or `localhost:19092` if not, but running on the same host.

In other words, if you are running a sample application on your laptop, you would use `localhost:19092` bootstrap server to send spans to the Kafka broker running in Docker.

Expand Down Expand Up @@ -192,4 +192,4 @@ and the `bootstrapServers` configuration of the kafka sender to match your Docke

## Notes

If using a provided MySQL server or image, ensure schema and other parameters match the [docs](https://github.com/apache/incubator-zipkin/tree/master/zipkin-storage/mysql-v1#applying-the-schema).
If using a provided MySQL server or image, ensure schema and other parameters match the [docs](https://github.com/openzipkin/zipkin/tree/master/zipkin-storage/mysql-v1#applying-the-schema).
4 changes: 2 additions & 2 deletions cassandra/Dockerfile
Expand Up @@ -2,7 +2,7 @@
FROM openjdk:8-jre-alpine

ENV CASSANDRA_VERSION 3.11.4
ENV ZIPKIN_VERSION 2.14.0
ENV ZIPKIN_VERSION 2.14.1

# Temporarily hard-code zipkin's configuration to a class that looks up the container's IP
ADD ZipkinConfigurationLoader.class /cassandra/build/classes/main/ZipkinConfigurationLoader.class
Expand All @@ -13,7 +13,7 @@ RUN /usr/local/bin/install

# Share the same base image to reduce layers used in testing
FROM gcr.io/distroless/java:11-debug
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

ENV JVM_OPTS="-Dcassandra -Dcassandra.config.loader=ZipkinConfigurationLoader -Djava.net.preferIPv4Stack=true"

Expand Down
8 changes: 4 additions & 4 deletions cassandra/install.sh
Expand Up @@ -38,16 +38,16 @@ while [[ "$timeout" -gt 0 ]] && ! /cassandra/bin/cqlsh -e 'SHOW VERSION' localho
done

echo "*** Importing Scheme"
curl https://raw.githubusercontent.com/apache/incubator-zipkin/v$ZIPKIN_VERSION/zipkin-storage/cassandra-v1/src/main/resources/cassandra-schema.cql \
curl -sSL https://raw.githubusercontent.com/openzipkin/zipkin/$ZIPKIN_VERSION/zipkin-storage/cassandra-v1/src/main/resources/cassandra-schema.cql \
| /cassandra/bin/cqlsh --debug localhost

curl https://raw.githubusercontent.com/apache/incubator-zipkin/v$ZIPKIN_VERSION/zipkin-storage/cassandra/src/main/resources/zipkin2-schema.cql \
curl -sSL https://raw.githubusercontent.com/openzipkin/zipkin/$ZIPKIN_VERSION/zipkin-storage/cassandra/src/main/resources/zipkin2-schema.cql \
| /cassandra/bin/cqlsh --debug localhost

curl https://raw.githubusercontent.com/apache/incubator-zipkin/v$ZIPKIN_VERSION/zipkin-storage/cassandra/src/main/resources/zipkin2-schema.cql \
curl -sSL https://raw.githubusercontent.com/openzipkin/zipkin/$ZIPKIN_VERSION/zipkin-storage/cassandra/src/main/resources/zipkin2-schema.cql \
| sed 's/ zipkin2/ zipkin2_udts/g' | /cassandra/bin/cqlsh --debug localhost

curl https://raw.githubusercontent.com/apache/incubator-zipkin/v$ZIPKIN_VERSION/zipkin-storage/cassandra/src/main/resources/zipkin2-schema-indexes.cql \
curl -sSL https://raw.githubusercontent.com/openzipkin/zipkin/$ZIPKIN_VERSION/zipkin-storage/cassandra/src/main/resources/zipkin2-schema-indexes.cql \
| /cassandra/bin/cqlsh --debug localhost

echo "*** Adding custom UDFs to zipkin2 keyspace"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-mem.yml
Expand Up @@ -14,7 +14,7 @@ services:
zipkin:
image: openzipkin/zipkin
container_name: zipkin
# Environment settings are defined here https://github.com/apache/incubator-zipkin/blob/master/zipkin-server/README.md#environment-variables
# Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
environment:
- STORAGE_TYPE=mem
# Uncomment to disable scribe
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Expand Up @@ -21,7 +21,7 @@ services:
zipkin:
image: openzipkin/zipkin
container_name: zipkin
# Environment settings are defined here https://github.com/apache/incubator-zipkin/blob/master/zipkin-server/README.md#environment-variables
# Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
environment:
- STORAGE_TYPE=mysql
# Point the zipkin at the storage backend
Expand Down
4 changes: 2 additions & 2 deletions elasticsearch/Dockerfile
Expand Up @@ -19,11 +19,11 @@ RUN apk add --update curl

WORKDIR /elasticsearch

RUN curl -SL https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/$ELASTICSEARCH_VERSION/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz| tar xz && \
RUN curl -sSL https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/$ELASTICSEARCH_VERSION/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz| tar xz && \
mv elasticsearch-$ELASTICSEARCH_VERSION/* /elasticsearch/

FROM gcr.io/distroless/java:11-debug
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

RUN ["/busybox/sh", "-c", "adduser -g '' -D elasticsearch"]

Expand Down
4 changes: 2 additions & 2 deletions elasticsearch5/Dockerfile
Expand Up @@ -21,11 +21,11 @@ RUN apk add --update curl
WORKDIR /elasticsearch

# single layer to install elasticsearch and the user
RUN curl -SL https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz| tar xz && \
RUN curl -sSL https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz| tar xz && \
mv elasticsearch-$ELASTICSEARCH_VERSION/* /elasticsearch/

FROM gcr.io/distroless/java:11-debug
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

RUN ["/busybox/sh", "-c", "adduser -g '' -D elasticsearch"]

Expand Down
6 changes: 3 additions & 3 deletions elasticsearch6/Dockerfile
Expand Up @@ -14,17 +14,17 @@

FROM alpine

ENV ELASTICSEARCH_VERSION 6.7.1
ENV ELASTICSEARCH_VERSION 6.8.0

RUN apk add --update curl

WORKDIR /elasticsearch

RUN curl -SL https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz| tar xz && \
RUN curl -sSL https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.tar.gz| tar xz && \
mv elasticsearch-$ELASTICSEARCH_VERSION/* /elasticsearch/

FROM gcr.io/distroless/java:11-debug
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

# https://github.com/elastic/elasticsearch/pull/31003 was closed won't fix
ENV ES_TMPDIR /tmp
Expand Down
6 changes: 3 additions & 3 deletions elasticsearch7/Dockerfile
Expand Up @@ -14,19 +14,19 @@

FROM alpine

ENV ELASTICSEARCH_VERSION 7.0.1
ENV ELASTICSEARCH_VERSION 7.1.1

RUN apk add --update curl

WORKDIR /elasticsearch

RUN curl -SL https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION-linux-x86_64.tar.gz| tar xz && \
RUN curl -sSL https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION-linux-x86_64.tar.gz| tar xz && \
mv elasticsearch-$ELASTICSEARCH_VERSION/* /elasticsearch/ && \
# disable ML as not supported on alpine per https://discuss.elastic.co/t/elasticsearch-failing-to-start-due-to-x-pack/85125/6
rm -rf /elasticsearch/modules/x-pack-ml/platform/linux-x86_64

FROM gcr.io/distroless/java:11-debug
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

# https://github.com/elastic/elasticsearch/pull/31003 was closed won't fix
ENV ES_TMPDIR /tmp
Expand Down
4 changes: 2 additions & 2 deletions kafka/Dockerfile
@@ -1,7 +1,7 @@
FROM alpine

ENV SCALA_VERSION 2.12
ENV KAFKA_VERSION 2.2.0
ENV KAFKA_VERSION 2.2.1
ENV ZOOKEEPER_VERSION 3.4.14

WORKDIR /kafka
Expand All @@ -13,7 +13,7 @@ ADD start.sh /kafka/bin

# Share the same base image to reduce layers used in testing
FROM gcr.io/distroless/java:11-debug
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

WORKDIR /kafka

Expand Down
4 changes: 2 additions & 2 deletions mysql/Dockerfile
@@ -1,11 +1,11 @@
FROM alpine
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

WORKDIR /mysql
ADD install.sh /mysql/install
RUN /mysql/install

ENV ZIPKIN_VERSION 2.14.0
ENV ZIPKIN_VERSION 2.14.1

ADD configure.sh /mysql/configure
RUN /mysql/configure
Expand Down
2 changes: 1 addition & 1 deletion mysql/configure.sh
Expand Up @@ -16,7 +16,7 @@ while [[ "$timeout" -gt 0 ]] && ! mysql --user=mysql --protocol=socket -uroot -e
done

echo "*** Importing Schema"
curl https://raw.githubusercontent.com/apache/incubator-zipkin/v$ZIPKIN_VERSION/zipkin-storage/mysql-v1/src/main/resources/mysql.sql > /mysql/zipkin.sql
curl -sSL https://raw.githubusercontent.com/openzipkin/zipkin/$ZIPKIN_VERSION/zipkin-storage/mysql-v1/src/main/resources/mysql.sql > /mysql/zipkin.sql
mysql --verbose --user=mysql --protocol=socket -uroot <<-EOSQL
USE mysql ;
Expand Down
6 changes: 3 additions & 3 deletions zipkin-ui/Dockerfile
@@ -1,14 +1,14 @@
FROM nginx:1.16-alpine
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

# This gets whatever the latest version of zipkin-lens is
ENV ZIPKIN_REPO https://repository.apache.org/content/repositories/snapshots
ENV ZIPKIN_REPO https://oss.jfrog.org/artifactory/oss-snapshot-local
ENV ZIPKIN_BASE_URL=http://zipkin:9411

RUN apk add --update --no-cache nginx curl && \
rm -rf /var/cache/apk/* /tmp/* /var/tmp/* && \
# the current version of zipkin-lens is in a path of the same name in a jar file. This extracts it.
LENS_BASE=$ZIPKIN_REPO/org/apache/zipkin/zipkin-lens && \
LENS_BASE=$ZIPKIN_REPO/io/zipkin/zipkin-lens && \
LENS_VERSION=$(curl -sSL $LENS_BASE/maven-metadata.xml | sed -n '/<version>/s/.*<version>\([^<]*\)<\/version>.*/\1/p'|tail -1) && \
LENS_BUILD=$(curl -sSL $LENS_BASE/$LENS_VERSION/maven-metadata.xml | sed -n '/<value>/s/.*<value>\([^<]*\)<\/value>.*/\1/p'| head -1) && \
curl -sSL $LENS_BASE/$LENS_VERSION/zipkin-lens-$LENS_BUILD.jar > zipkin-lens.jar && \
Expand Down
4 changes: 2 additions & 2 deletions zipkin-ui/README.md
Expand Up @@ -6,7 +6,7 @@ terminating SSL. It can also be adapted to test new UIs.

## How this works
Zipkin's UI is bundled into a jar (zip) file under a relative path of '/zipkin'.
This layers over an nginx image with [the latest jar](https://search.maven.org/search?q=g:io.zipkin.java%20AND%20a:zipkin-ui) extracted
This layers over an nginx image with [the latest jar](https://search.maven.org/search?q=g:io.zipkin%20AND%20a:zipkin-lens) extracted
into `/var/www/html/zipkin`.

The 'nginx.conf' in this image is a template, currently with one parameter
Expand All @@ -19,6 +19,6 @@ For example, if it calls for services names, it will end up invoking:
`GET ${ZIPKIN_BASE_URL}/zipkin/api/v2/services`

Beyond hosting of assets and forwarding, this also sets redirects,
cache-control headers, etc similar to what the normal [zipkin-server would](https://github.com/apache/incubator-zipkin/blob/master/zipkin-server/src/main/java/zipkin2/server/internal/ui/ZipkinUiConfiguration.java).
cache-control headers, etc similar to what the normal [zipkin-server would](https://github.com/openzipkin/zipkin/blob/master/zipkin-server/src/main/java/zipkin2/server/internal/ui/ZipkinUiConfiguration.java).
This lets you use a more familiar nginx syntax for things such as how long
a browser should cache the result of the service names query.
6 changes: 3 additions & 3 deletions zipkin/Dockerfile
Expand Up @@ -15,21 +15,21 @@
FROM alpine

ENV ZIPKIN_REPO https://repo1.maven.org/maven2
ENV ZIPKIN_VERSION 2.14.0
ENV ZIPKIN_VERSION 2.14.1

# Add environment settings for supported storage types
COPY zipkin/ /zipkin/
WORKDIR /zipkin

RUN apk add unzip curl --no-cache && \
curl -SL $ZIPKIN_REPO/org/apache/zipkin/zipkin-server/$ZIPKIN_VERSION/zipkin-server-$ZIPKIN_VERSION-exec.jar > zipkin-server.jar && \
curl -SL $ZIPKIN_REPO/io/zipkin/zipkin-server/$ZIPKIN_VERSION/zipkin-server-$ZIPKIN_VERSION-exec.jar > zipkin-server.jar && \
# don't break when unzip finds an extra header https://github.com/openzipkin/zipkin/issues/1932
unzip zipkin-server.jar ; \
rm zipkin-server.jar && \
apk del unzip

FROM gcr.io/distroless/java:11-debug
MAINTAINER Zipkin "https://zipkin.apache.org/"
MAINTAINER Zipkin "https://zipkin.io/"

# Use to set heap, trust store or other system properties.
ENV JAVA_OPTS -Djava.security.egd=file:/dev/./urandom
Expand Down

0 comments on commit fbbf39a

Please sign in to comment.