Skip to content

Docker support - #14

Open
LongusBongus wants to merge 69 commits into
mainfrom
docker-support
Open

Docker support#14
LongusBongus wants to merge 69 commits into
mainfrom
docker-support

Conversation

@LongusBongus

Copy link
Copy Markdown

AKTIN update agent supports upgrading docker DWHs. Mainly added 2 new sockets for update requests from the new DWH backend aktin/dwh-admin@master...docker-update-extension. These sockets are called over an internal Gateway added to the compose.yml file in this PR: aktin/docker-aktin-dwh@main...docker-update-extension

@LongusBongus
LongusBongus requested a review from akomii June 25, 2026 12:57
@LongusBongus LongusBongus self-assigned this Jun 25, 2026
@LongusBongus LongusBongus added the enhancement New feature or request label Jun 25, 2026
Comment thread test/dwh-j2ee-1.6.ear Outdated
Comment thread deploy_to_vm.sh Outdated
Comment thread .github/workflows/docker-integration-test.yml Outdated
Comment thread src/debian/build.sh
Comment thread src/debian/control
curl -LO https://github.com/aktin/docker-aktin-dwh/releases/latest/download/compose.yml
sudo docker compose pull
sudo docker compose up -d
#sudo docker image prune -f

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this line commented out but still in the file?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

This line is declared optional inside our manual. I was not sure if we should automate the pruning of the old images, especially if the update fails and we are forced to fall back on the older images. What is your opinion about this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Commented-out code should be removed. No execptions

Comment on lines -15 to -16
SocketUser=wildfly
SocketGroup=wildfly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Whats the reason to remove the user wildfly here??

@LongusBongus LongusBongus Jul 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

With the wildfly user set, the update agent depends on the wildfly user existing, when creating the sockets, which happens in the postinstall step. Say we install update agent on a host only containing docker DWHs, there exists no user called wildfly on the host. Therefore update agent install terminates early with an error.

I opened another issue on that #7

Comment thread src/resources/service-docker/helpers.sh
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in AKTIN Project Jun 30, 2026
Comment thread src/debian/postinst
log_success "Wildfly permissions set successfully"
#save_array() {
# local arr="$1"
# local var_name="$2"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

never leave commented out code in the pr

Comment thread src/debian/build.sh
CLEANUP=false
SKIP_BUILD=false
FULL_CLEAN=false
update_dir="/var/lib/aktin/update"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

globals uppercase and readonly if immutable

Comment thread src/debian/preinst
exit 1
fi

cat <<EOF > "summary_aktin-updateagent_preinstall.txt"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This summary file is broken in three ways:

  1. The heredoc lines are indented and quoted, so the file contains "debian_installed=0" literally. Sourcing it later produces command not found instead of a variable assignment.
  2. It is written to a relative path, so it lands in dpkg's working directory (usually /) and is never cleaned up.
  3. An exit status of 0 means installed, so the file records debian_installed=0 for an installed DWH, which reads as false.

Comment thread src/debian/preinst
log_info "debian dwh status: $debian_status"
log_info "docker dwh status: $docker_status"

if ! is_installed_debian && ! is_installed_docker; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Two issues here:

  1. Aborting installation contradicts the README, which states the base package installs without a DWH instance. It also breaks apt install ordering, installing the agent before the DWH becomes impossible. Failing preinst on a missing runtime environment is against Debian packaging practice. I would keep the package installable and no-op instead.
  2. is_installed_debian and is_installed_docker are called a second time here even though their results were already captured in debian_status and docker_status above

Comment thread src/debian/preinst

# Requirement: Any kind of dwh has to be installed
is_installed_debian() {
if systemctl list-unit-files | grep -q "wildfly"; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

grep -q "wildfly" matches any unit whose name contains the substring. DEBIAN_SERVICE is declared on line 17 but never used...

Comment thread README.md
sudo apt-get install -f # Install missing dependencies if any
```

The base package installs without requiring an AKTIN DWH instance. Instance-specific runtime setup is handled separately:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This section contradicts the implementation in three places:

  1. It says the base package installs without a DWH instance, but preinst aborts in exactly that case.
  2. It says socket-setup configure is a separate manual step, but postinst calls it automatically.
  3. It says the helper applies wildfly ownership, but that code is commented out.

Comment thread README.md
- `info`: Contains current and candidate version information
- `log`: Update execution logs
- `result`: Update execution results with success status
- `docker-info`: Placeholder output for Docker version information

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

docker-info and docker-result do not match the implementation, the docker services write info and result into the docker volume's update directory.

curl -LO https://github.com/aktin/docker-aktin-dwh/releases/latest/download/compose.yml
sudo docker compose pull
sudo docker compose up -d
#sudo docker image prune -f

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Commented-out code should be removed. No execptions

docker_wait_for_deployment "$wildfly_container"
successful="$(docker_post_update_validation $wildfly_container $update_dir)"

$(journalctl -u 'aktin-notaufnahme-updateagent-docker*' -f) > $update_dir/log

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Additionally, the unit name is hardcoded instead of using __PACKAGE_NAME__

Comment on lines +85 to +86
# require_wildfly_user
# require_systemd

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are these commented out?

@akomii akomii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some changes necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants