Skip to content

Commit

Permalink
Merge pull request #85 from DataDog/willgittoes-dd/update-opentracing…
Browse files Browse the repository at this point in the history
…-version

Remove all mentions of dd-opentracing-cpp version numbers
  • Loading branch information
willgittoes-dd authored Feb 18, 2019
2 parents 07e9365 + 24618ab commit 67d8ca9
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
CMAKE_ARGS: -DBUILD_PLUGIN=ON -DBUILD_STATIC=ON -DBUILD_SHARED=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
# If BUILD_ALL_NGINX_VERSIONS is set, builds all NGINX versions. Otherwise, builds just the first
# version to use it for integration testing.
NGINX_VERSIONS: 1.14.1 1.12.2 1.13.12 1.15.0
NGINX_VERSIONS: 1.14.2 1.12.2 1.15.8
CFLAGS: -march=x86-64 -fPIC
CXXFLAGS: -march=x86-64 -fPIC
LDFLAGS: -fPIC
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
docker:
- image: datadog/docker-library:dd_opentracing_cpp_test_0_3_0
environment:
NGINX_VERSION: 1.14.1
NGINX_VERSION: 1.14.2
steps:
- checkout
- attach_workspace:
Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
path = nginx-plugin/nginx-opentracing
url = https://github.com/opentracing-contrib/nginx-opentracing
ignore = dirty
tag = v0.8.0

14 changes: 9 additions & 5 deletions examples/cpp-tracing/compiled-in/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ RUN apt-get update && \
apt-get -y install build-essential cmake wget

# Download and install dd-opentracing-cpp library.
RUN wget https://github.com/DataDog/dd-opentracing-cpp/archive/v0.3.7.tar.gz -O dd-opentracing-cpp.tar.gz && \
tar zxvf dd-opentracing-cpp.tar.gz && \
mkdir dd-opentracing-cpp-0.3.7/.build && \
cd dd-opentracing-cpp-0.3.7/.build && \
RUN get_latest_release() { \
wget -qO- "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'; \
} && \
VERSION="$(get_latest_release DataDog/dd-opentracing-cpp)" && \
wget https://github.com/DataDog/dd-opentracing-cpp/archive/${VERSION}.tar.gz -O dd-opentracing-cpp.tar.gz && \
mkdir -p dd-opentracing-cpp/.build && \
tar zxvf dd-opentracing-cpp.tar.gz -C ./dd-opentracing-cpp/ --strip-components=1 && \
cd dd-opentracing-cpp/.build && \
# Download and install the correct version of opentracing-cpp, & other deps.
../scripts/install_dependencies.sh && \
cmake .. && \
Expand All @@ -16,7 +20,7 @@ RUN wget https://github.com/DataDog/dd-opentracing-cpp/archive/v0.3.7.tar.gz -O

COPY tracer_example.cpp .

RUN g++ -o tracer_example tracer_example.cpp -ldd_opentracing -lopentracing
RUN g++ -std=c++14 -o tracer_example tracer_example.cpp -ldd_opentracing -lopentracing
# Add /usr/local/lib to LD_LIBRARY_PATH
RUN ldconfig

Expand Down
17 changes: 11 additions & 6 deletions examples/cpp-tracing/dynamic-loading/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@ RUN apt-get update && \
apt-get -y install build-essential cmake wget

# Download and install OpenTracing-cpp
RUN wget https://github.com/opentracing/opentracing-cpp/archive/v1.5.0.tar.gz -O opentracing-cpp.tar.gz && \
tar zxvf opentracing-cpp.tar.gz && \
mkdir opentracing-cpp-1.5.0/.build && \
cd opentracing-cpp-1.5.0/.build && \
RUN get_latest_release() { \
wget -qO- "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'; \
} && \
DD_OPENTRACING_CPP_VERSION="$(get_latest_release DataDog/dd-opentracing-cpp)" && \
OPENTRACING_VERSION="$(get_latest_release opentracing/opentracing-cpp)" && \
wget https://github.com/opentracing/opentracing-cpp/archive/${OPENTRACING_VERSION}.tar.gz -O opentracing-cpp.tar.gz && \
mkdir -p opentracing-cpp/.build && \
tar zxvf opentracing-cpp.tar.gz -C ./opentracing-cpp/ --strip-components=1 && \
cd opentracing-cpp/.build && \
cmake .. && \
make && \
make install && \
# Install dd-opentracing-cpp shared plugin.
wget https://github.com/DataDog/dd-opentracing-cpp/releases/download/v0.3.7/linux-amd64-libdd_opentracing_plugin.so.gz && \
wget https://github.com/DataDog/dd-opentracing-cpp/releases/download/${DD_OPENTRACING_CPP_VERSION}/linux-amd64-libdd_opentracing_plugin.so.gz && \
gunzip linux-amd64-libdd_opentracing_plugin.so.gz -c > /usr/local/lib/libdd_opentracing_plugin.so


COPY tracer_example.cpp .

RUN g++ -o tracer_example tracer_example.cpp -lopentracing
RUN g++ -std=c++11 -o tracer_example tracer_example.cpp -lopentracing
# Add /usr/local/lib to LD_LIBRARY_PATH
RUN ldconfig

Expand Down
4 changes: 2 additions & 2 deletions examples/cpp-tracing/dynamic-loading/tracer_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int main(int argc, char* argv[]) {
"/usr/local/lib/libdd_opentracing_plugin.so", error_message);
if (!handle_maybe) {
std::cerr << "Failed to load tracer library " << error_message << "\n";
return false;
return 1;
}

// Read in the tracer's configuration.
Expand All @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) {
auto tracer_maybe = tracer_factory.MakeTracer(tracer_config.c_str(), error_message);
if (!tracer_maybe) {
std::cerr << "Failed to create tracer " << error_message << "\n";
return false;
return 1;
}
auto& tracer = *tracer_maybe;

Expand Down
8 changes: 5 additions & 3 deletions examples/envoy-tracing/Dockerfile-ddopentracing-envoy
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# - add install step for dd-opentracing-cpp library
FROM envoyproxy/envoy:latest

ARG DATADOG_PLUGIN_VERSION=0.3.7

ADD https://github.com/DataDog/dd-opentracing-cpp/releases/download/v${DATADOG_PLUGIN_VERSION}/linux-amd64-libdd_opentracing_plugin.so.gz linux-amd64-libdd_opentracing_plugin.so.gz
RUN get_latest_release() { \
wget -qO- "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'; \
} && \
DATADOG_PLUGIN_VERSION="$(get_latest_release DataDog/dd-opentracing-cpp)" && \
wget https://github.com/DataDog/dd-opentracing-cpp/releases/download/${DATADOG_PLUGIN_VERSION}/linux-amd64-libdd_opentracing_plugin.so.gz
RUN gunzip linux-amd64-libdd_opentracing_plugin.so.gz -c > /usr/local/lib/libdd_opentracing.so

CMD /usr/local/bin/envoy -c /etc/front-envoy.yaml --service-cluster front-proxy
8 changes: 5 additions & 3 deletions examples/envoy-tracing/Dockerfile-ddopentracing-service
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# - add install step for dd-opentracing-cpp library
FROM envoyproxy/envoy-alpine:latest

ARG DATADOG_PLUGIN_VERSION=0.3.7

ADD https://github.com/DataDog/dd-opentracing-cpp/releases/download/v${DATADOG_PLUGIN_VERSION}/linux-amd64-libdd_opentracing_plugin.so.gz linux-amd64-libdd_opentracing_plugin.so.gz
RUN get_latest_release() { \
wget -qO- "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'; \
} && \
DATADOG_PLUGIN_VERSION="$(get_latest_release DataDog/dd-opentracing-cpp)" && \
wget https://github.com/DataDog/dd-opentracing-cpp/releases/download/${DATADOG_PLUGIN_VERSION}/linux-amd64-libdd_opentracing_plugin.so.gz
RUN gunzip linux-amd64-libdd_opentracing_plugin.so.gz -c > /usr/local/lib/libdd_opentracing.so

RUN apk update && apk add python3 bash
Expand Down
2 changes: 1 addition & 1 deletion examples/envoy-tracing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This will build and launch
To interact with these services, a docker container needs to be connected on the network created by docker-compose.

```sh-session
$ docker run --net=envoytracing_envoymesh --rm -i -t busybox
$ docker run --net=envoy-tracing_envoymesh --rm -i -t busybox
/ # wget -q -O- http://front-envoy/service/1
Hello from behind Envoy (service 1)! hostname: 6060fcea4f2a resolvedhostname: 192.168.16.4
/ # wget -q -O- http://front-envoy/service/2
Expand Down
9 changes: 6 additions & 3 deletions examples/nginx-tracing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Builds and runs a simple nginx server, traced by Datadog
FROM ubuntu:18.04

ARG NGINX_VERSION=1.14.1
ARG DATADOG_PLUGIN_VERSION=0.3.7
ARG NGINX_VERSION=1.14.2

RUN apt-get update && \
apt-get install -y git gnupg wget tar
Expand All @@ -21,7 +20,11 @@ RUN mkdir -p /var/www/
COPY ./examples/nginx-tracing/index.html /var/www/index.html

# Install Datadog module
ADD https://github.com/DataDog/dd-opentracing-cpp/releases/download/v${DATADOG_PLUGIN_VERSION}/linux-amd64-nginx-${NGINX_VERSION}-ngx_http_module.so.tgz linux-amd64-nginx-${NGINX_VERSION}-ngx_http_module.so.tgz
RUN get_latest_release() { \
wget -qO- "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'; \
} && \
DD_OPENTRACING_CPP_VERSION="$(get_latest_release DataDog/dd-opentracing-cpp)" && \
wget https://github.com/DataDog/dd-opentracing-cpp/releases/download/${DD_OPENTRACING_CPP_VERSION}/linux-amd64-nginx-${NGINX_VERSION}-ngx_http_module.so.tgz
RUN tar zxf linux-amd64-nginx-${NGINX_VERSION}-ngx_http_module.so.tgz -C /usr/lib/nginx/modules

# Test nginx config.
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_nginx_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -eo pipefail
# make && make install
# popd

NGINX_VERSION=${NGINX_VERSION:-1.14.1}
NGINX_VERSION=${NGINX_VERSION:-1.14.2}
BUILD_DIR=${BUILD_DIR:-/tmp/build/}

rm -rf .nginx-build
Expand Down
2 changes: 1 addition & 1 deletion scripts/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

OPENTRACING_VERSION=${OPENTRACING_VERSION:-1.5.0}
CURL_VERSION=${CURL_VERSION:-7.61.1}
CURL_VERSION=${CURL_VERSION:-7.64.0}
MSGPACK_VERSION=${MSGPACK_VERSION:-3.1.1}
ZLIB_VERSION=${ZLIB_VERSION:-1.2.11}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Creates an image with nginx and the Datadog OpenTracing nginx module installed.
# Runs a simple integration test.
ARG NGINX_VERSION=1.14.1
ARG NGINX_VERSION=1.14.2

# The nginx testbed. Build this image first since we don't want it rebuilt if just the code changes.
FROM ubuntu:18.04 as nginx-testbed
Expand Down

0 comments on commit 67d8ca9

Please sign in to comment.