Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create jaeger_ubi_9.3.sh #84

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions j/jaeger/Dockerfiles/1.56.0_ubi9/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM registry.access.redhat.com/ubi9/ubi as build

ARG GO_VERSION=1.21.6
ARG JAEGER_VERSION=v1.56.0

ENV GOBUILD "go build -ldflags '-linkmode=external' -trimpath"

RUN yum -y install wget sudo jq libcurl-devel git make gcc time gnupg2 gcc-c++ python3 && \
cd /tmp && \
wget https://go.dev/dl/go${GO_VERSION}.linux-ppc64le.tar.gz && \
tar -C /usr/local -xzf go${GO_VERSION}.linux-ppc64le.tar.gz

RUN set -eux \
&& git clone --depth=1 --single-branch -b ${JAEGER_VERSION} \
https://github.com/jaegertracing/jaeger.git \
/go/src/github.com/jaegertracing/jaeger \
&& cd /go/src/github.com/jaegertracing/jaeger \
&& git submodule update --init --recursive \
&& curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
&& bash n v16.17.1 \
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
&& export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" \
&& export PATH=$PATH:/usr/local/go/bin \
&& export GOPATH=$HOME/go \
&& export GOOS="$(go env GOOS)" \
&& yarn install --ignore-engines \
&& make install-tools \
&& make build-binaries-ppc64le \
&& strip \
cmd/all-in-one/all-in-one-linux-ppc64le \
cmd/agent/agent-linux-ppc64le \
cmd/anonymizer/anonymizer-linux-ppc64le \
cmd/collector/collector-linux-ppc64le \
cmd/ingester/ingester-linux-ppc64le \
cmd/query/query-linux-ppc64le \
cmd/tracegen/tracegen-linux-ppc64le

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/agent/agent-linux-ppc64le /opt/bin/jaeger-agent
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/all-in-one/all-in-one-linux-ppc64le /opt/bin/jaeger
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/anonymizer/anonymizer-linux-ppc64le /opt/bin/anonymizer
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/collector/collector-linux-ppc64le /opt/bin/jaeger-collector
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/ingester/ingester-linux-ppc64le /opt/bin/jaeger-ingester
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/query/query-linux-ppc64le /opt/bin/jaeger-query
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/tracegen/tracegen-linux-ppc64le /opt/bin/tracegen
COPY --from=build /go/src/github.com/jaegertracing/jaeger/jaeger-ui/packages/jaeger-ui/build /opt/jaeger/ui

ENV SPAN_STORAGE_TYPE grpc-plugin
WORKDIR /opt/jaeger

EXPOSE 6831/udp
EXPOSE 6832/udp
EXPOSE 5778
EXPOSE 14268
EXPOSE 14250
EXPOSE 16686

VOLUME ["/tmp"]

CMD ["/opt/bin/jaeger", "--query.static-files", "ui", "--query.ui-config", "jaeger-ui.json", "--collector.http-server.host-port", "--collector.grpc-server.host-port", "--http-server.host-port", "--query.grpc-server.host-port"]
3 changes: 3 additions & 0 deletions j/jaeger/Dockerfiles/1.56.0_ubi9/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Build a Dockerfile : docker build -t jaeger:v1.56.0

Run the dockerfile : docker run -it --name jaeger -d jaeger:v1.56.0
10 changes: 7 additions & 3 deletions j/jaeger/build_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
"maintainer": "[email protected]",
"package_name": "jaeger",
"github_url": "https://github.com/jaegertracing/jaeger.git",
"version": "v1.39.0",
"version": "v1.56.0",
"default_branch": "main",
"package_dir": "j/jaeger/",
"docker_cmd": "docker build -t ${package_name}:$PACKAGE_VERSION ${dir}",
"build_script": "jaeger_ubi8.sh",
"build_script": "jaeger_ubi_9.3.sh",
"docker_build": true,
"validate_build_script": true,
"use_non_root_user": false,
"v1.39.*": {
"dir": "1.39.0-ubi8"
},
"v*.*.*": {
"dir": "1.56.0_ubi9",
"build_script": "jaeger_ubi_9.3.sh"
}
}
}
65 changes: 65 additions & 0 deletions j/jaeger/jaeger_ubi_9.3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package : jaeger
# Version : v1.56.0
# Source repo : https://github.com/jaegertracing/jaeger
# Tested on : UBI:9.3
# Language : Go
# Travis-Check : True
# Script License : Apache License, Version 2 or later
# Maintainer : Vinod K <[email protected]>
#
# Disclaimer : This script has been tested in root mode on given
# ========== platform using the mentioned version of the package.
# It may not work as expected with newer versions of the
# package and/or distribution. In such case, please
# contact "Maintainer" of this script.
#
# ----------------------------------------------------------------------------
PACKAGE_VERSION=${1:-v1.56.0}
PACKAGE_NAME=jaeger
PACKAGE_URL=https://github.com/jaegertracing/jaeger


yum install -y wget sudo jq libcurl-devel git make gcc time gnupg2 gcc-c++ python3
export NODE_VERSION=${NODE_VERSION:-16}
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source "$HOME"/.bashrc
echo "installing nodejs $NODE_VERSION"
nvm install "$NODE_VERSION" >/dev/null
nvm use $NODE_VERSION
npm install -g yarn

wget https://go.dev/dl/go1.21.6.linux-ppc64le.tar.gz
tar -C /usr/local -xf go1.21.6.linux-ppc64le.tar.gz
export GOROOT=/usr/local/go
export GOPATH=$HOME
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

# Clone git repository
git clone $PACKAGE_URL
cd $PACKAGE_NAME/
git checkout $PACKAGE_VERSION
git submodule update --init --recursive
yarn install --ignore-engines


if ! go build ./...; then
echo "------------------$PACKAGE_NAME:install_fails-------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails"
exit 1
fi

if ! go test -race ./...; then
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails"
exit 2
else
echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success"
exit 0
fi