-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Apache Instrumentation - Agent Image Build * Rename deafult image name * Github bld action for Apache HTTPD autoinstr img * Added Apache HTTPD image to publish images act * Heading change
- Loading branch information
Showing
5 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
.github/workflows/publish-autoinstrumentation-apache-httpd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: "Publish Apache HTTPD Auto-Instrumentation" | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'autoinstrumentation/apache-httpd/**' | ||
- '.github/workflows/publish-autoinstrumentation-apache-httpd.yaml' | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- 'autoinstrumentation/apache-httpd/**' | ||
- '.github/workflows/publish-autoinstrumentation-apache-httpd.yaml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Read version | ||
run: echo "VERSION=$(cat autoinstrumentation/apache-httpd/version.txt)" >> $GITHUB_ENV | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd | ||
tags: | | ||
type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Login to GitHub Package Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: autoinstrumentation/apache-httpd | ||
platforms: linux/amd64,linux/arm64 | ||
push: ${{ github.event_name == 'push' }} | ||
build-args: version=${{ env.VERSION }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,dest=/tmp/.buildx-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
############################ | ||
# STEP 1 download the webserver agent | ||
############################ | ||
FROM alpine:latest as agent | ||
|
||
ARG version | ||
|
||
RUN mkdir /opt/opentelemetry | ||
WORKDIR /opt/opentelemetry | ||
|
||
RUN wget https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/download/webserver%2Fv$version/opentelemetry-webserver-sdk-x64-linux.tgz.zip | ||
RUN unzip opentelemetry-webserver-sdk-x64-linux.tgz.zip | ||
RUN mkdir agent | ||
RUN tar -xvf opentelemetry-webserver-sdk-x64-linux.tgz -C agent | ||
|
||
############################ | ||
# STEP 2 download the webserver agent | ||
############################ | ||
FROM alpine:latest | ||
|
||
COPY --from=agent /opt/opentelemetry/agent/opentelemetry-webserver-sdk /opt/opentelemetry | ||
|
||
RUN chmod a+w /opt/opentelemetry/logs | ||
|
||
CMD ["cat", "Just delivering the Opentelemetry Apache/Nginx agent"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# How to build Apache HTTPD auto-instrumentation docker image | ||
|
||
To build image for Apache HTTPD auto instrumentation, use the following commands | ||
|
||
``` | ||
export REPO_NAME="<your-docker-image-repo-name>" | ||
export IMAGE_NAME_PREFIX="autoinstrumentation-apache-httpd" | ||
export IMAGE_VERSION=`cat version.txt` | ||
export IMAGE_NAME=${REPO_NAME}/${IMAGE_NAME_PREFIX}:${IMAGE_VERSION} | ||
docker build --build-arg version=${IMAGE_VERSION} . -t ${IMAGE_NAME} -t ${REPO_NAME}/${IMAGE_NAME_PREFIX}:latest | ||
docker push ${IMAGE_NAME} | ||
docker push ${REPO_NAME}/${IMAGE_NAME_PREFIX}:latest | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.2 |