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

Dbp 951 implement automated moodle chart deployment via ansible #99

3 changes: 3 additions & 0 deletions .github/workflows/bapontag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 'dbcmetrics-[0-9]+.[0-9]+.[0-9]+'
- 'awx-ee-[0-9]+.[0-9]+.[0-9]+'
- 'cron-tools-[0-9]+.[0-9]+.[0-9]+'
- 'moodle-tools-[0-9]+.[0-9]+.[0-9]+'

jobs:
pre_build:
Expand All @@ -34,6 +35,8 @@ jobs:
echo "registries=dockerhub" >> $GITHUB_OUTPUT
elif [[ "${{ steps.nameTag.outputs.tag }}" == 'cron-tools' ]]; then
echo "registries=dockerhub,quay.io" >> $GITHUB_OUTPUT
elif [[ "${{ steps.nameTag.outputs.tag }}" == 'moodle-tools' ]]; then
echo "registries=ghcr.io" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doesn't moodle-tools also get published to Dockerhub and Quay?

fi

build_and_push:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dummytoghcr-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'dbcmetrics/**'
- 'infra-tools/**'
- 'cron-tools/**'
- 'moodle-tools/**'

jobs:
build_image_on_push:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/moodletoolstoghcr-on-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: moodle-tools Docker Image on Push to GHCR

on:
push:
branches-ignore:
- master
paths:
- 'moodle-tools/**'

jobs:
build_image_on_push:
permissions:
packages: write
security-events: write
actions: read
contents: read
uses: ./.github/workflows/imagetoghcr-on-push.yaml
with:
image_name: "moodle-tools"
context: "./moodle-tools/"
23 changes: 23 additions & 0 deletions moodle-tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Berlin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this is not only in this Dockerfile, i think we once talked in a Reffinement about which system time we want to use, and did not we say that we want to use UTC?


RUN set -x \
&& apt-get -y update \
&& apt-get -y install wget python3-pip \
&& wget https://dl.k8s.io/release/v1.28.7/bin/linux/amd64/kubectl \
&& chmod +x kubectl \
&& mv ./kubectl /usr/local/bin/kubectl \
&& wget -qO /usr/share/keyrings/postgres.asc https://www.postgresql.org/media/keys/ACCC4CF8.asc \
&& echo "deb [signed-by=/usr/share/keyrings/postgres.asc] https://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& pip install boto \
&& apt-get -y update \
&& apt-get -y install \
duply \
ca-certificates \
gnupg \
apt-transport-https \
postgresql-client-14 \
mariadb-client \
&& apt-get clean -y
12 changes: 12 additions & 0 deletions moodle-tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# cron-tools
Minimal image with the tools that are necessary for our Moodle Kubernetes CronJobs.

## Provided Tools
* [kubectl](https://kubernetes.io/docs/reference/kubectl/)
* [mariadb](https://www.mongodb.com/docs/mongodb-shell/)
* [psql](https://www.postgresql.org/docs/current/app-psql.html)
* [wget](https://www.gnu.org/software/wget/)
* [duply]
* [gnupg]
* [ca-certificates]
* [apt-transport-https]