Skip to content

Commit

Permalink
[Docker] Add datadog agent image (#121)
Browse files Browse the repository at this point in the history
* Add datadog docker image

* Fix
  • Loading branch information
ArmaanT authored Mar 20, 2022
1 parent 34fb542 commit 7479c2d
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/cdk/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ new CDKPublishStack(app, 'kraken');
new CDKPublishStack(app, 'kittyhawk');

// Docker stacks
const dockerImages = ['django-base', 'pg-s3-backup', 'team-sync'];
const dockerImages = ['datadog-agent', 'django-base', 'pg-s3-backup', 'team-sync'];
dockerImages.map(name => new DockerPublishStack(app, name));
new ShibbolethDockerStack(app);

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/cdkactions_docker-datadog-agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by cdkactions. Do not modify
# Generated as part of the 'datadog-agent' stack.
name: Publish datadog-agent
on:
push:
paths:
- docker/datadog-agent/**
jobs:
publish-datadog-agent:
name: Publish datadog-agent
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: buildx-publish-datadog-agent
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build/Publish
uses: docker/build-push-action@v2
with:
context: docker/datadog-agent
file: docker/datadog-agent/Dockerfile
push: ${{ github.ref == 'refs/heads/master' }}
cache-from: type=local,src=/tmp/.buildx-cache,type=registry,ref=pennlabs/datadog-agent:latest
cache-to: type=local,dest=/tmp/.buildx-cache
tags: pennlabs/datadog-agent:latest,pennlabs/datadog-agent:${{ github.sha }}
11 changes: 11 additions & 0 deletions docker/datadog-agent/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Docker
Dockerfile
.dockerignore

# git
.github
.git
.gitignore
.gitmodules
**/*.md
LICENSE
6 changes: 6 additions & 0 deletions docker/datadog-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM gcr.io/datadoghq/agent:7.34.0

LABEL maintainer="Penn Labs"

RUN agent integration install -r -t datadog-cert_manager==2.2.0
RUN agent integration install -r -t datadog-traefik==1.0.0
21 changes: 21 additions & 0 deletions docker/datadog-agent/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Penn Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions docker/datadog-agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# datadog-agent

[![Docker Pulls](https://img.shields.io/docker/pulls/pennlabs/datadog-agent)](https://hub.docker.com/r/pennlabs/django-base)

This repository contains a datadog agent image that addionally installs extra integrations.

## Features

This docker image contains the cert-manager and traefik datadog integrations.

0 comments on commit 7479c2d

Please sign in to comment.