Loomio
Fri 28 Jul 2023 12:19PM

Docker vs Git backed systemd vs Current

FB Fletcher Boyd Public Seen by 3

Does it make sense to start moving a bunch of our scripted quality of life stuff to docker containers?

This could make it easier to move stuff around, provide a more centralised management interface etc

TW

Tom White Fri 28 Jul 2023 12:21PM

where are they run now?

FB

Fletcher Boyd Fri 28 Jul 2023 12:44PM

For things that we've written it's typically:

Script stored locally OR script stored in a github repo

Script managed via systemd OR script managed via cron+screen

FB

Fletcher Boyd Fri 28 Jul 2023 12:45PM

ie, not ideal.

FB

Fletcher Boyd Fri 28 Jul 2023 12:49PM

Pricing wise if we were to use private github packages we'd have 2G package storage and 10G transfer free. Though it appears that we can bill overages through Azure anyway. There's also a number of seemingly viable container registry options.

(This is all a moot point for public container images which are free on github)

FB

Fletcher Boyd Fri 28 Jul 2023 12:51PM

Portainer can apparently manage a docker registry itself :o

BS

Blake Samuels Sat 29 Jul 2023 1:53PM

Yeah good idea to dockerise. Prevents issues with incompatible packages between scripts and like you say can move apps to different servers more easily.

At work I've run some of the python scripts in docker containers. I've given it ago with tidyauth and put the Dockerfile and compose in a pull request as example. Siemens ran their own container registry although it was pretty useless for deploying onto our system. We got pretty good at saving images to file and loading them back in so I've included some commandlines for that in pull request. 2 GB of package storage should be fine. That tidyauth one using lite python images is 170MB. Depends how many apps we have. If you can get portainer going that would be good too.

For doorbot1.3 I'm using systemd service you might have noticed. I did think about whether to dockerise but since I've got hardware involved its probably not worth the hassle. Still, I am currently fighting systemd with problems around restarting the script so maybe docker time.

FB

Fletcher Boyd Sat 29 Jul 2023 6:19PM

You should have access to Portainer through Teleport. It's one of the main reasons I'm on board with moving everything to containers.

Storage wise I can't think of much that would need to be a private image, all the code is public anyway.