Jump to content
Squid

[Plugin] CA Application Auto Update

183 posts in this topic Last Reply

Recommended Posts

A plugin designed to keep all (or selected) plugins / dockers up to date, with options for delayed upgrades.

 

Formerly part of Community Applications, this module is now packaged separately.

 

To install this plugin, go to the Apps Tab and search for Auto Update.

 

Note that if you are utilizing CA's Appdata Backup / Restore module, then with this module installed you can also tell the Backup procedure to update the docker apps at the same time as the backup occurs

Edited by Squid

Share this post


Link to post

I have to say that the delayed auto-update mechanisms and notifications are working very well!  (I know, rather belated feedback!)

Share this post


Link to post

I have to say that the delayed auto-update mechanisms and notifications are working very well!  (I know, rather belated feedback!)

Not belated, but rather delayed

Share this post


Link to post

I have to say that the delayed auto-update mechanisms and notifications are working very well!  (I know, rather belated feedback!)

Not belated, but rather delayed

Apparently the delay was set for 1 week.  ;D ;D ;D

Share this post


Link to post

I have to say that the delayed auto-update mechanisms and notifications are working very well!  (I know, rather belated feedback!)

Not belated, but rather delayed

Apparently the delay was set for 1 week.  ;D ;D ;D

Couple of months actually  8)

Share this post


Link to post

You had some plans for extending this to support Auto Update of Dockers as well? I still think that would be a nice addition. Perhaps merge / integrate with Docker Buttons plugin https://github.com/gfjardim/unRAID-plugins/blob/master/plugins/docker.buttons.plg ?

 

Would like this as well. Preferably if it could be set to a schedule or triggered via the CA backup app to run after the backup is complete. This is what I was looking for here without response:

https://lime-technology.com/forum/index.php?topic=53783.msg515483#msg515483

Share this post


Link to post

You had some plans for extending this to support Auto Update of Dockers as well? I still think that would be a nice addition. Perhaps merge / integrate with Docker Buttons plugin https://github.com/gfjardim/unRAID-plugins/blob/master/plugins/docker.buttons.plg ?

 

Would like this as well. Preferably if it could be set to a schedule or triggered via the CA backup app to run after the backup is complete. This is what I was looking for here without response:

https://lime-technology.com/forum/index.php?topic=53783.msg515483#msg515483

lol Did you happen to chat with CHBMB about this today?  By coincidence I happened to have looked at this earlier today for probable inclusion in the plugin, and then get a couple direct questions about it...

 

Here's a very basic script that will update all docker containers that dockerMan is showing an update available for:

#!/usr/bin/php
<?
require_once("/usr/local/emhttp/plugins/dynamix.docker.manager/include/DockerClient.php");

$DockerTemplates = new DockerTemplates();
$info = $DockerTemplates->getAllInfo();
$allContainers = array_keys($info);
foreach($allContainers as $container) {
  if ( ! $info[$container]['updated'] || $info[$container]['updated'] == "false" ) {
    $updateList[] = $container;
  }
}
$_GET['updateContainer'] = true;
$_GET['ct'] = $updateList;
include("/usr/local/emhttp//plugins/dynamix.docker.manager/include/CreateDocker.php");
?>

You can run this via cron (or the user.scripts plugin)  (And its not unRaid that's not updating the containers with the stops and starts.  Its lsio that has decided to not update the apps at startup, but rather pump out weekly updates to the containers themselves

 

You'll want to execute it with the output redirected to /dev/null because the CreateDocker.php routine is expecting to output the status to a webpage, so it'll look kinda strange at a command prompt (but you'll still see what's going on)

 

Like I said, I started the basic planning on this earlier in the day, but some updates to the user.scripts plugin were first on my todo list for the weekend, so the eta for auto Docker updates is next weekend.  (or knowing how I do things tomorrow  couple hours  10 minutes  8)  ) - The main real holdup is having to wait for next week's lsio's updates so I can actually test against a bunch of stuff

 

 

Share this post


Link to post

lol Did you happen to chat with CHBMB about this today?  By coincidence I happened to have looked at this earlier today for probable inclusion in the plugin, and then get a couple direct questions about it...

 

Like I said, I started the basic planning on this earlier in the day, but some updates to the user.scripts plugin were first on my todo list for the weekend, so the eta for auto Docker updates is next weekend.  (or knowing how I do things tomorrow  couple hours  10 minutes  8)  ) - The main real holdup is having to wait for next week's lsio's updates so I can actually test against a bunch of stuff

 

Yeah that was me, I was talking with CHBMB. Thanks for the script. Amazing as always Squid. But if you'll be implementing auto Docker updates then I'll just hang tight till then as your apps/scripts etc. are incredibly well done. 

Share this post


Link to post

animals-deer-hits-fear-feared-fright-jmp

 

Added: Ability to auto update docker application

Added: User selectable time of execution for plugin updates and docker updates

Enhanced: Dynamix webUI no longer *required* to itself check for updates for either plugins or docker apps

Fixed: Under very specific circumstances, it was possible for a plugin to get upgraded even if it violated the age requirement.

Going forward, this module is now unRaid 6.2+ compatible only

 

Plugins and docker updates both have separated installation times.  The frequency is selectable by Daily, Weekly, Monthly (time and date all configurable), or custom.  Custom setting takes a standard Cron setting to allow you to fine-tune further the update checks and installs.

 

If you are utilizing CA's Appdata Backup, then you should ensure that the time of day when CA's Backup runs does not overlap with docker updates.

 

Because of the now integrated selection of time of execution, plugin updates by default are going to take place Daily at midnight.

Edited by Squid

Share this post


Link to post

Thank you Squid!! :D

 

I'll see how it goes on Monday when its scheduled to run.

 

This is completely unnecessary as I can just leave enough time between CA backup and CA auto update, but would it be possible for CA backup to call/start CA auto update after it completes?

Share this post


Link to post

Thank you Squid!! :D

 

I'll see how it goes on Monday when its scheduled to run.

 

This is completely unnecessary as I can just leave enough time between CA backup and CA auto update, but would it be possible for CA backup to call/start CA auto update after it completes?

Anythings possible.  But can't do it until next Friday when lsio's next round of updates is released...

Share this post


Link to post

Thank you Squid!! :D

 

I'll see how it goes on Monday when its scheduled to run.

 

This is completely unnecessary as I can just leave enough time between CA backup and CA auto update, but would it be possible for CA backup to call/start CA auto update after it completes?

Done.  Pretty sure it works, but I'll wait until Friday's lsio updates before I release

 

This plugin is great but I was wondering if there was a way to exclude certain dockers from being stopped?  I backup my mysql database separately and I'd prefer not to stop it if possible.

Decided to add it into the GUI under a hidden advanced section.  Will be released next update (ie: Friday / Saturday)

Share this post


Link to post

Trying to install but I am getting the follow error:

 

plugin: installing: https://raw.githubusercontent.com/Squidly271/ca.update.applications/master/plugins/ca.update.applications.plg
plugin: downloading https://raw.githubusercontent.com/Squidly271/ca.update.applications/master/plugins/ca.update.applications.plg
plugin: downloading: https://raw.githubusercontent.com/Squidly271/ca.update.applications/master/plugins/ca.update.applications.plg ... done

Warning: simplexml_load_file(): /tmp/plugins/ca.update.applications.plg:95: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): rm /etc/cron.daily/updateApplications.sh >/dev/null 2>&1 in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): /tmp/plugins/ca.update.applications.plg:95: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): rm /etc/cron.daily/updateApplications.sh >/dev/null 2>&1 in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): /tmp/plugins/ca.update.applications.plg:95: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): rm /etc/cron.daily/updateApplications.sh >/dev/null 2>&1 in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214
plugin: xml parse error

Share this post


Link to post

Trying to install but I am getting the follow error:

 

plugin: installing: https://raw.githubusercontent.com/Squidly271/ca.update.applications/master/plugins/ca.update.applications.plg
plugin: downloading https://raw.githubusercontent.com/Squidly271/ca.update.applications/master/plugins/ca.update.applications.plg
plugin: downloading: https://raw.githubusercontent.com/Squidly271/ca.update.applications/master/plugins/ca.update.applications.plg ... done

Warning: simplexml_load_file(): /tmp/plugins/ca.update.applications.plg:95: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): rm /etc/cron.daily/updateApplications.sh >/dev/null 2>&1 in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): /tmp/plugins/ca.update.applications.plg:95: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): rm /etc/cron.daily/updateApplications.sh >/dev/null 2>&1 in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): /tmp/plugins/ca.update.applications.plg:95: parser error : xmlParseEntityRef: no name in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): rm /etc/cron.daily/updateApplications.sh >/dev/null 2>&1 in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 214
plugin: xml parse error

My fault.  Fixed a *very* minor error in the .plg about an hour ago, and I continually forget that you can't have a "&" in an xml.  Check for updates and do it again.

Share this post


Link to post

My fault.  Fixed a *very* minor error in the .plg about an hour ago, and I continually forget that you can't have a "&" in an xml.  Check for updates and do it again.

 

Working now, thank you as always!

Share this post


Link to post

This is completely unnecessary as I can just leave enough time between CA backup and CA auto update, but would it be possible for CA backup to call/start CA auto update after it completes?

Done.  Pretty sure it works, but I'll wait until Friday's lsio updates before I release

 

Amazing as always Squid. I'll see how it runs over the next few weeks. Thanks!  :D

Share this post


Link to post

Installed this yesterday and this morning I had a notification that around half of my dockers had been "Auto-Updated". Upon checking it appears that the Dockers in question have actually been deleted  :-[

 

I've re-installed the dockers in question from templates and all is good with the world again. Any ideas what happened?

Share this post


Link to post

Installed this yesterday and this morning I had a notification that around half of my dockers had been "Auto-Updated". Upon checking it appears that the Dockers in question have actually been deleted  :-[

 

I've re-installed the dockers in question from templates and all is good with the world again. Any ideas what happened?

Show me your syslog.

Share this post


Link to post

Think this is the important bit...

 

Nov 28 04:00:01 Gandalf Docker Auto Update: Community Applications Docker Autoupdate running
Nov 28 04:00:01 Gandalf Docker Auto Update: Checking for available updates
Nov 28 04:00:01 Gandalf Plugin Auto Update: Checking for available plugin updates
Nov 28 04:00:08 Gandalf Plugin Auto Update: ca.update.applications.plg version 2016.11.27 does not meet age requirements to update
Nov 28 04:00:08 Gandalf Plugin Auto Update: ca.backup.plg version 2016.11.27 does not meet age requirements to update
Nov 28 04:00:09 Gandalf Plugin Auto Update: Community Applications Plugin Auto Update finished
Nov 28 04:00:18 Gandalf Docker Auto Update: Installing Updates for CouchPotato Headphones musicbrainz Netdata plex Sonarr teamspeak3 unifi
Nov 28 04:00:33 Gandalf kernel: veth1697e43: renamed from eth0
Nov 28 04:00:33 Gandalf kernel: docker0: port 2(vethb279a51) entered disabled state
Nov 28 04:00:33 Gandalf kernel: docker0: port 2(vethb279a51) entered disabled state
Nov 28 04:00:33 Gandalf kernel: device vethb279a51 left promiscuous mode
Nov 28 04:00:33 Gandalf kernel: docker0: port 2(vethb279a51) entered disabled state
Nov 28 04:00:44 Gandalf kernel: veth4ba317b: renamed from eth0
Nov 28 04:00:44 Gandalf kernel: docker0: port 3(vethe2358fa) entered disabled state
Nov 28 04:00:45 Gandalf kernel: docker0: port 3(vethe2358fa) entered disabled state
Nov 28 04:00:45 Gandalf kernel: device vethe2358fa left promiscuous mode
Nov 28 04:00:45 Gandalf kernel: docker0: port 3(vethe2358fa) entered disabled state
Nov 28 04:01:32 Gandalf kernel: docker0: port 5(vethc3132e8) entered disabled state
Nov 28 04:01:32 Gandalf kernel: veth7ffedad: renamed from eth0
Nov 28 04:01:32 Gandalf kernel: docker0: port 5(vethc3132e8) entered disabled state
Nov 28 04:01:32 Gandalf kernel: device vethc3132e8 left promiscuous mode
Nov 28 04:01:32 Gandalf kernel: docker0: port 5(vethc3132e8) entered disabled state
Nov 28 04:02:47 Gandalf kernel: vetha65313c: renamed from eth0
Nov 28 04:02:47 Gandalf kernel: docker0: port 8(veth9e7763d) entered disabled state
Nov 28 04:02:47 Gandalf kernel: docker0: port 8(veth9e7763d) entered disabled state
Nov 28 04:02:47 Gandalf kernel: device veth9e7763d left promiscuous mode
Nov 28 04:02:47 Gandalf kernel: docker0: port 8(veth9e7763d) entered disabled state
Nov 28 04:04:03 Gandalf kernel: veth982b8a6: renamed from eth0
Nov 28 04:04:03 Gandalf kernel: docker0: port 9(vethb57f527) entered disabled state
Nov 28 04:04:03 Gandalf kernel: docker0: port 9(vethb57f527) entered disabled state
Nov 28 04:04:03 Gandalf kernel: device vethb57f527 left promiscuous mode
Nov 28 04:04:03 Gandalf kernel: docker0: port 9(vethb57f527) entered disabled state
Nov 28 04:04:05 Gandalf sSMTP[32040]: Creating SSL connection to host
Nov 28 04:04:05 Gandalf sSMTP[32040]: SSL connection using ECDHE-RSA-AES128-GCM-SHA256
Nov 28 04:04:07 Gandalf sSMTP[32040]: Sent mail for notifications@clanlawrence.co.uk (221 2.0.0 closing connection r7sm60241906wjp.43 - gsmtp) uid=0 username=root outbytes=751
Nov 28 04:04:07 Gandalf Docker Auto Update: Community Applications Docker Autoupdate finished
Nov 28 04:40:01 Gandalf sSMTP[25148]: Creating SSL connection to host
Nov 28 04:40:01 Gandalf sSMTP[25148]: SSL connection using ECDHE-RSA-AES128-GCM-SHA256
Nov 28 04:40:04 Gandalf sSMTP[25148]: Sent mail for root@clanlawrence.co.uk (221 2.0.0 closing connection e5sm26738156wma.12 - gsmtp) uid=0 username=root outbytes=631

Share this post


Link to post

Think this is the important bit...

 

Nov 28 04:00:01 Gandalf Docker Auto Update: Community Applications Docker Autoupdate running
Nov 28 04:00:01 Gandalf Docker Auto Update: Checking for available updates
Nov 28 04:00:01 Gandalf Plugin Auto Update: Checking for available plugin updates
Nov 28 04:00:08 Gandalf Plugin Auto Update: ca.update.applications.plg version 2016.11.27 does not meet age requirements to update
Nov 28 04:00:08 Gandalf Plugin Auto Update: ca.backup.plg version 2016.11.27 does not meet age requirements to update
Nov 28 04:00:09 Gandalf Plugin Auto Update: Community Applications Plugin Auto Update finished
Nov 28 04:00:18 Gandalf Docker Auto Update: Installing Updates for CouchPotato Headphones musicbrainz Netdata plex Sonarr teamspeak3 unifi
Nov 28 04:00:33 Gandalf kernel: veth1697e43: renamed from eth0
Nov 28 04:00:33 Gandalf kernel: docker0: port 2(vethb279a51) entered disabled state
Nov 28 04:00:33 Gandalf kernel: docker0: port 2(vethb279a51) entered disabled state
Nov 28 04:00:33 Gandalf kernel: device vethb279a51 left promiscuous mode
Nov 28 04:00:33 Gandalf kernel: docker0: port 2(vethb279a51) entered disabled state
Nov 28 04:00:44 Gandalf kernel: veth4ba317b: renamed from eth0
Nov 28 04:00:44 Gandalf kernel: docker0: port 3(vethe2358fa) entered disabled state
Nov 28 04:00:45 Gandalf kernel: docker0: port 3(vethe2358fa) entered disabled state
Nov 28 04:00:45 Gandalf kernel: device vethe2358fa left promiscuous mode
Nov 28 04:00:45 Gandalf kernel: docker0: port 3(vethe2358fa) entered disabled state
Nov 28 04:01:32 Gandalf kernel: docker0: port 5(vethc3132e8) entered disabled state
Nov 28 04:01:32 Gandalf kernel: veth7ffedad: renamed from eth0
Nov 28 04:01:32 Gandalf kernel: docker0: port 5(vethc3132e8) entered disabled state
Nov 28 04:01:32 Gandalf kernel: device vethc3132e8 left promiscuous mode
Nov 28 04:01:32 Gandalf kernel: docker0: port 5(vethc3132e8) entered disabled state
Nov 28 04:02:47 Gandalf kernel: vetha65313c: renamed from eth0
Nov 28 04:02:47 Gandalf kernel: docker0: port 8(veth9e7763d) entered disabled state
Nov 28 04:02:47 Gandalf kernel: docker0: port 8(veth9e7763d) entered disabled state
Nov 28 04:02:47 Gandalf kernel: device veth9e7763d left promiscuous mode
Nov 28 04:02:47 Gandalf kernel: docker0: port 8(veth9e7763d) entered disabled state
Nov 28 04:04:03 Gandalf kernel: veth982b8a6: renamed from eth0
Nov 28 04:04:03 Gandalf kernel: docker0: port 9(vethb57f527) entered disabled state
Nov 28 04:04:03 Gandalf kernel: docker0: port 9(vethb57f527) entered disabled state
Nov 28 04:04:03 Gandalf kernel: device vethb57f527 left promiscuous mode
Nov 28 04:04:03 Gandalf kernel: docker0: port 9(vethb57f527) entered disabled state
Nov 28 04:04:05 Gandalf sSMTP[32040]: Creating SSL connection to host
Nov 28 04:04:05 Gandalf sSMTP[32040]: SSL connection using ECDHE-RSA-AES128-GCM-SHA256
Nov 28 04:04:07 Gandalf sSMTP[32040]: Sent mail for notifications@clanlawrence.co.uk (221 2.0.0 closing connection r7sm60241906wjp.43 - gsmtp) uid=0 username=root outbytes=751
Nov 28 04:04:07 Gandalf Docker Auto Update: Community Applications Docker Autoupdate finished
Nov 28 04:40:01 Gandalf sSMTP[25148]: Creating SSL connection to host
Nov 28 04:40:01 Gandalf sSMTP[25148]: SSL connection using ECDHE-RSA-AES128-GCM-SHA256
Nov 28 04:40:04 Gandalf sSMTP[25148]: Sent mail for root@clanlawrence.co.uk (221 2.0.0 closing connection e5sm26738156wma.12 - gsmtp) uid=0 username=root outbytes=631

unRaid version?  6.2 or 6.3

 

Over my morning coffee I tore through the code for dockerMan and looks like there's a single line of code that's changed between the two.  Just released an updated that should take into account the differences.

Share this post


Link to post

I don't know if you've already addressed this, but I got this email last night:

From: Console and webGui login account
Date: November 28, 2016 at 12:00:01 AM EST
To: root
Subject: cron for user root /usr/local/emhttp/plugins/ca.update.applications/scripts/updateApplications.php >dev/null 2>&1

/bin/sh: dev/null: No such file or directory

Share this post


Link to post

I don't know if you've already addressed this, but I got this email last night:

From: Console and webGui login account
Date: November 28, 2016 at 12:00:01 AM EST
To: root
Subject: cron for user root /usr/local/emhttp/plugins/ca.update.applications/scripts/updateApplications.php >dev/null 2>&1

/bin/sh: dev/null: No such file or directory

Already done

 

Sent from my LG-D852 using Tapatalk

 

 

Share this post


Link to post

I don't know if you've already addressed this, but I got this email last night:

From: Console and webGui login account
Date: November 28, 2016 at 12:00:01 AM EST
To: root
Subject: cron for user root /usr/local/emhttp/plugins/ca.update.applications/scripts/updateApplications.php >dev/null 2>&1

/bin/sh: dev/null: No such file or directory

 

Already done

 

Sent from my LG-D852 using Tapatalk

 

Thank you.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.