Skip to content

Commit bb226cb

Browse files
melizecheBeryJu
andauthored
Upgrade DO appliance to 2025.2 (#81)
* Minimal changes to upgrade to 2024.12.3 * Fix container name * Use new 99-img-check.sh from DO * Use docker compose v2 instead of docker-compose * Remove droplet-agent from the image * Update to 2025.2.0-rc1 * Update .github/workflows/build-do.yml * run on PR * update deps * fix --------- Co-authored-by: Jens L. <jens@beryju.org> Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
1 parent 6bb295e commit bb226cb

File tree

10 files changed

+754
-522
lines changed

10 files changed

+754
-522
lines changed

.github/workflows/build-do.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
name: Build (DigitalOcean)
33

44
on:
5+
pull_request:
6+
branches:
7+
- main
58
push:
69
branches:
710
- main
@@ -15,7 +18,7 @@ jobs:
1518
- uses: actions/checkout@v4
1619
- uses: actions/setup-python@v5
1720
with:
18-
python-version: '3.x'
21+
python-version-file: "pyproject.toml"
1922
- name: Install ansible
2023
env:
2124
DO_API_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
@@ -34,5 +37,5 @@ jobs:
3437
- run: packer validate -syntax-only .
3538
- run: packer build -color=false -force .
3639
env:
37-
AUTHENTIK_VERSION: 2022.12.1
40+
AUTHENTIK_VERSION: 2025.2.0
3841
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}

digitalocean.pkr.hcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ packer {
44
version = ">= 1.0.0"
55
source = "github.com/hashicorp/digitalocean"
66
}
7+
ansible = {
8+
version = "~> 1"
9+
source = "github.com/hashicorp/ansible"
10+
}
711
}
812
}
913

poetry.lock

Lines changed: 650 additions & 464 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
name = "authentik-appliances"
33
version = "0.1.0"
44
description = ""
5-
authors = ["Jens Langhammer <jens.langhammer@beryju.org>"]
5+
package-mode = false
66

77
[tool.poetry.dependencies]
8-
python = "^3.10"
8+
python = "^3.12"
99
ansible = "^9.2.0"
1010

11-
[tool.poetry.dev-dependencies]
11+
[tool.poetry.group.dev.dependencies]
1212
ansible-lint = "^6.8.7"
1313

1414
[build-system]

requirements.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
roles:
33
- name: geerlingguy.pip
4-
version: 2.1.0
4+
version: 3.1.0
55
- name: geerlingguy.docker
6-
version: 4.1.1
6+
version: 7.4.5

roles/goauthentik.appliance/files/scripts/ak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function prefixwith {
1010
}
1111

1212
function in_continer() {
13-
docker exec -it authentik_server_1 ak $@
13+
docker exec -it authentik-server-1 ak $@
1414
}
1515

1616
function appliance() {

roles/goauthentik.appliance/tasks/app.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
content: |
2929
PG_PASS=foo
3030
- name: authentik | Compose pre-pull
31-
docker_compose:
31+
community.docker.docker_compose_v2:
3232
project_src: /srv/authentik
33-
pull: yes
33+
pull: always
3434
- name: authentik | Compose stop
35-
docker_compose:
35+
community.docker.docker_compose_v2:
3636
project_src: /srv/authentik
3737
state: absent
3838
remove_volumes: yes

site.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@
33
vars:
44
pip_install_packages:
55
- name: docker
6-
- name: docker-compose
6+
docker_edition: 'ce'
7+
docker_packages:
8+
- "docker-{{ docker_edition }}"
9+
- "docker-{{ docker_edition }}-cli"
10+
#- "docker-{{ docker_edition }}-rootless-extras"
11+
docker_packages_state: present
12+
docker_install_compose_plugin: true
13+
docker_compose_package: docker-compose-plugin
14+
docker_compose_package_state: present
715
docker_install_compose: true
16+
docker_compose_path: /usr/local/bin/docker-compose
817
docker_daemon_options:
918
live-restore: true
1019
log-opts:

vendor/digitalocean/90-cleanup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ elif [ -n "$(command -v apt-get)" ]; then
2121
export DEBIAN_FRONTEND=noninteractive
2222
apt-get -y update
2323
apt-get -o Dpkg::Options::="--force-confold" upgrade -q -y --force-yes
24+
apt-get purge droplet-agent* -y
2425
apt-get -y autoremove
2526
apt-get -y autoclean
2627
fi

0 commit comments

Comments
 (0)