Automatically update docker containers?

Mark WatIng

Explorer
Joined
Mar 6, 2017
Messages
53
Hi All,

I have searched and been looking for a way to automatically update the docker containers on TrueNAS Scale - does anyone know how? Couldn't see Watchtower in the official/TrueCharts repos.

Thanks
M
 

188pilas

Dabbler
Joined
Feb 12, 2021
Messages
11
I was doing auto update using docker-compose but then some containers were breaking due to update.

I just update 1:1 after reading change logs.

docker-compose pull && docker-compose up -d
 

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
TrueNAS is generally geared more towards businesses and in business auto update is a bad thing so I wouldn't expect such functionality any time soon if ever to be built into TrueNAS.

Thanks,
Harry
 

Mark WatIng

Explorer
Joined
Mar 6, 2017
Messages
53
Thanks for the replies - Harry I take your point, although I’m a CIO and we are moving much more towards continuous deployment/integration.

188pilas - thanks for the code will try!
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
Thanks for the replies - Harry I take your point, although I’m a CIO and we are moving much more towards continuous deployment/integration.

188pilas - thanks for the code will try!
CD/CI, does not necisarily equal automatic updates ofc.
However: For next release or the one after (either 2022 or 2023) it would be prefered to at least add some gitops and auto-update functionality, for people that need to manage their settings/apps/config outside of the SCALE system (for example: using a CD/CI system). As SCALE currently is kinda problematic for CD/CI based infrastructure.
 

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
I would like it to be hands off. The reason Docker containers are so good is because reverting means you have an available container to go back to.

And it'd be better to batch-update containers. Sitting here waiting for a slow UI doesn't equal enterprise. I work on apps for a living, and I've done dev-ops before.

With the kinds of apps that run on TrueNAS, I'd have a test system that auto-deploys changes so we could verify nothing breaks. Then I'd accumulate those changes, approve them for the real NAS, and then click "publish" which would release all of them at once. I wouldn't sit in a UI and do them by hand one-by-one. Most likely, it would be a CLI script at that point.

In the case of TrueNAS, the UI is cumbersome. Even if it's manual, at least let me check a bunch of boxes on which I want to upgrade.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
In the case of TrueNAS, the UI is cumbersome. Even if it's manual, at least let me check a bunch of boxes on which I want to upgrade.
Maybe you're not looking hard enough... there are such "boxes" on the app card in the top left and the Bulk Actions button allows updates (action name is Upgrade) once you've selected some apps.
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
I would like it to be hands off. The reason Docker containers are so good is because reverting means you have an available container to go back to.

And it'd be better to batch-update containers. Sitting here waiting for a slow UI doesn't equal enterprise. I work on apps for a living, and I've done dev-ops before.

With the kinds of apps that run on TrueNAS, I'd have a test system that auto-deploys changes so we could verify nothing breaks. Then I'd accumulate those changes, approve them for the real NAS, and then click "publish" which would release all of them at once. I wouldn't sit in a UI and do them by hand one-by-one. Most likely, it would be a CLI script at that point.

In the case of TrueNAS, the UI is cumbersome. Even if it's manual, at least let me check a bunch of boxes on which I want to upgrade.

Or look into the script that I made.

Automatically updates apps
Ability to rollback failed applications
Ability to mount PVC's
Able to handle updating multiple applications at once.
And so much more. I cannot list everything here..

I just run mine on a cron job daily, so my applications are always up to date.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Or look into the script that I made.
The script looks nice, but I can't see anywhere in the documentation that mentions how it handles the different apps catalogs (TrueCharts vs Official).

Can it handle both?

Seems that TrueTool (from TrueCharts) only handles their apps, so I wonder if you somehow solved the issue of the big differences between the catalogs in one tool or if your tool only covers the Official charts, meaning both tools would be needed if somebody runs apps from both catalogs.
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
The script looks nice, but I can't see anywhere in the documentation that mentions how it handles the different apps catalogs (TrueCharts vs Official).

Can it handle both?

Seems that TrueTool (from TrueCharts) only handles their apps, so I wonder if you somehow solved the issue of the big differences between the catalogs in one tool or if your tool only covers the Official charts, meaning both tools would be needed if somebody runs apps from both catalogs.

Truetool is essentially a rebranded version of Heavyscript. Therefore, if Truetool doesn't support a particular feature, it's likely that Heavyscript won't support it either.

(Edit: unless it's a newly added feature to heavyscript, which in that case Truetool users will have to wait for Truecharts to implement that into their rebrand.)

That being said, Heavyscript should be compatible with updates from all catalogs, including official catalogs, apps from the "launch docker image" button, Truecharts apps, and Truecharts "Custom-app" application.

I've recently implemented support for updates to container images. Previously, applying these updates did not automatically restart the container to apply the new image. With this new feature, the container will now restart automatically after the update is applied.

Tldr:
It should update any and all catalogs just fine. If it doesn't please let me know, so I can look into it and fix it. :)
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Well that's excellent.

I'll have a look at how it runs and will let you know if there are any issues.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
To give some clearity here:

We only officially support users using TrueTool when it comes to users running into issues with our apps and TrueTool does have different featureset(s) and design choices compared to HeavyScript.

Both are great tools in their own right, it's just that we cannot have our staff put TrueCharts time in tools we've no control of.
Both should work fine on official apps as well, though their versioning is not well suited as they don't always use(d?) semver.
 

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
Maybe you're not looking hard enough... there are such "boxes" on the app card in the top left and the Bulk Actions button allows updates (action name is Upgrade) once you've selected some apps.
Yeah, that's a LOT faster. I somehow didn't see it this whole time.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
Yeah, that's a LOT faster. I somehow didn't see it this whole time.
Warning though, in contrast to heavyscript and TrueTool, this does NOT protect you against by accident installing major updates (first digit) which are classified in semver as "potentially breaking"
 

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
Good to know! So there are some benefits to using TrueTool.

I only have TrueCharts apps installed because they all have the same API, so that works for me.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
Warning though, in contrast to heavyscript and TrueTool, this does NOT protect you against by accident installing major updates (first digit) which are classified in semver as "potentially breaking"
The UI is pretty good with that... it shows you the versions (current and new) before you agree to go ahead, so only the careless are at risk here.
 
Top