How to provision kadabra? #395

Open
opened 2023-02-01 16:40:28 +00:00 by moritz · 6 comments
Member

Related to #236 I have some design questions about the autoupdater.

  1. How to get the auto updater binary on to the server?
    • let the user do it manually?
    • abra autoupdater provision?
  2. How to run the autoupdater?
    • via cronjob?
    • as background daemon?
  3. How to implement email notifications?
    • use server utilities?
    • build it into the autoupdater?

I would prefer to use cronjobs for the follwing reasons:

  • less maintenance, easy setup
  • daemons can crash, which requires extra monitoring
  • the user can decide to use cron or systemd timer
  • no need for extra configuration files
  • build in email notification

I think it would be a nice to provide an installation script that copies the binary, configures the cronjob and email settings.

A simple setup would look like this:

apt install ssmtp

cat > /etc/ssmtp/ssmtp.conf << EOF
mailhub=$MAIL_SERVER:587
hostname=$MAIL_DOMAIN
AuthUser=$USER
AuthPass=$PASSWORD
FromLineOverride=yes
UseSTARTTLS=yes
EOF

cat > /etc/cron.d/abra_updater << EOF
MAILTO=admin@example.com
MAILFROM=noreply@example.com

0  * * * *       root    ~/kadabra notify --major
30 4 * * *       root    ~/kadabra upgrade
EOF

A disadvantage of this approach is that it's not completely independent of the underlying system.

Related to https://git.coopcloud.tech/coop-cloud/organising/issues/236 I have some design questions about the autoupdater. 1. How to get the auto updater binary on to the server? - let the user do it manually? - `abra autoupdater provision`? 2. How to run the autoupdater? - via cronjob? - as background daemon? 3. How to implement email notifications? - use server utilities? - build it into the autoupdater? I would prefer to use cronjobs for the follwing reasons: - less maintenance, easy setup - daemons can crash, which requires extra monitoring - the user can decide to use cron or systemd timer - no need for extra configuration files - build in email notification I think it would be a nice to provide an installation script that copies the binary, configures the cronjob and email settings. A simple setup would look like this: ``` apt install ssmtp cat > /etc/ssmtp/ssmtp.conf << EOF mailhub=$MAIL_SERVER:587 hostname=$MAIL_DOMAIN AuthUser=$USER AuthPass=$PASSWORD FromLineOverride=yes UseSTARTTLS=yes EOF cat > /etc/cron.d/abra_updater << EOF MAILTO=admin@example.com MAILFROM=noreply@example.com 0 * * * * root ~/kadabra notify --major 30 4 * * * root ~/kadabra upgrade EOF ``` A disadvantage of this approach is that it's not completely independent of the underlying system.
Owner

Incredible!

I'd be up for a curl https://install.kadabra.coopcloud.tech | bash and it seems to be inline with the abra installer. Following coop-cloud/abra#255 there is a proposal to remove provisioning logic, so documenting how to do this with classic *nix tooling seems ideal to me. I think the bash installer script could help people set up the basics?

That could be worked into coop-cloud/abra#268 or in another place, as you like.

Some documentation for the decisions that we make here would be ideal.

Incredible! I'd be up for a `curl https://install.kadabra.coopcloud.tech | bash` and it seems to be inline with the `abra` installer. Following https://git.coopcloud.tech/coop-cloud/abra/pulls/255 there is a proposal to remove provisioning logic, so documenting how to do this with classic `*nix` tooling seems ideal to me. I think the bash installer script could help people set up the basics? That could be worked into https://git.coopcloud.tech/coop-cloud/abra/pulls/268 or in another place, as you like. Some documentation for the decisions that we make here would be ideal.
decentral1se added the
question
label 2023-02-01 16:58:15 +00:00
Owner

coop-cloud/abra#268 is merged! We can get to the installer script shortly after. I think the releaser logic will publish binaries for the next release.

https://git.coopcloud.tech/coop-cloud/abra/pulls/268 is merged! We can get to the installer script shortly after. I think the releaser logic will publish binaries for the next release.
Author
Member

I pushed some brief docs about setting up the auto-updater:
https://docs.coopcloud.tech/operators/tutorial/#automatic-upgrades
An installer script will follow.

I pushed some brief docs about setting up the auto-updater: https://docs.coopcloud.tech/operators/tutorial/#automatic-upgrades An installer script will follow.
decentral1se changed title from How to provision the autoupdater? to How to provision kadabra? 2023-02-08 23:45:45 +00:00
decentral1se added the
kadabra
label 2023-02-08 23:46:21 +00:00
Owner

So, #402 is an issue but we're nearly there for being ready to wire up the installer script. Unless you can hack the script to download the correct "abra" binary and renamed it to kadabra as is 🙃

So, https://git.coopcloud.tech/coop-cloud/organising/issues/402 is an issue but we're nearly there for being ready to wire up the installer script. Unless you can hack the script to download the correct "abra" binary and renamed it to `kadabra` as is 🙃
Owner
Binaries are there > https://git.coopcloud.tech/coop-cloud/abra/releases/tag/0.7.0-rc2-beta
Author
Member

Another idea would be to create a recipe for kadabra. With access to the docker socket it shouldn't be a problem to run kadabra inside a container I guess.
This would facilitate the deployment and the cron/alert configuration per env file.

Another idea would be to create a recipe for kadabra. With access to the docker socket it shouldn't be a problem to run kadabra inside a container I guess. This would facilitate the deployment and the cron/alert configuration per env file.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#395
No description provided.