MDeploy - Moodle 3.5.1+

MDeploy - Moodle 3.5.1+

by Ken Task -
Number of replies: 8
Picture of Particularly helpful Moodlers

Not really reporting a problem but a change ... with a question below *.

mdeploy has changed ...

In updating a site to current version 3.5.1+ and getting plugin updates as well.
it appears that mdeploy usage of moodledata/mdeploy is no longer.

Rather, mdeploy now using:

moodledata/temp/core_plugin/code_manager/

archive directory at above location copies of the plugin directories updated
in zips examples ...

archive/auth_saml2:
total 4908
-rw-rw-rw- 1 apache apache 5010290 Aug 12 06:54 2018062900.zip

archive/mod_simplecertificate:
total 2084
-rw-rw-rw- 1 apache apache 2129147 Aug 12 06:47 2017120400.zip

archive/report_customsql:
total 56
-rw-rw-rw- 1 apache apache 52803 Aug 12 06:48 2018050900.zip

and in distfiles (the newest downloaded):

[root@site code_manager]# ls -l distfiles
total 7024
-rw-rw-rw- 1 apache apache 2096098 Aug 12 06:47 1acd94081cdf200b6cc4ae2551bbdeba.zip
-rw-rw-rw- 1 apache apache 5014071 Aug 12 06:49 51d94dc3d1015bc9cf5e19f09f156bc4.zip
-rw-rw-rw- 1 apache apache   54580 Aug 12 06:48 5ffb7eb9ea308ea55c68a7feca277ddc.zip

All this to say, that in the past, it might have been advised to delete the contents of
temp directory for space issues or for other issues - such as theme.

Old advice might not apply any more as I would think one would need to keep
moodledata/temp/core_plugin ... whose name suggest future direction?

Also, minimlal backups of moodledata had been considered filedir ... might now
also include moodledata/temp/core_plugins/

*Question:

Am assuming the old /moodledata/mdeploy directory is no longer needed and can
be safely removed.

Comments:
Sure would be nice to have that mdeploy.log back again, however.

One might need to increase php limits for time for a script to run ... observation ... especially large addons/plugins will take time to zip and store in the archive.  Was getting concerned that an update to the SAML2 as an example would time out it was taking so long with no progress info available on screen or in logs of any kind that one could watch.   The other addon on this site that's 'large' ... Essentials theme.

'spirit of sharing', Ken


Average of ratings: -
In reply to Ken Task

Re: MDeploy - Moodle 3.5.1+

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I might be being really stupid here.... but.... what on earth is 'mdeploy'?

In reply to Howard Miller

Re: MDeploy - Moodle 3.5.1+

by Ken Task -
Picture of Particularly helpful Moodlers

No you are not being dense at all ... smile

https://docs.moodle.org/35/en/Automatic_updates_deployment

It originally used the moodle code directory.

Then moved to moodledata/mdeploy/ - right where one could easily see/find it ... included
a mdeploy.log - which I would tail -f when using.

And now moved again ... deeper into moodledata/temp/core_plugin/code_manager/

Prefer git for installations and updates to the core code myself ... would love to do the same for all addons,  but have had trouble finding the 'right' code git repo for addons at one time.

Plugin downloads from https://moodle.org/plugins/ one has to follow the source control URL for a plugin and acquire the git URL.

Would be nice to see that git URL somewhere but understand that might be a future improvement way on down the road.

'spirit of sharing', Ken

In reply to Ken Task

Re: MDeploy - Moodle 3.5.1+

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Oh right... as I've probably mentioned, not a fan. 

In reply to Howard Miller

Re: MDeploy - Moodle 3.5.1+

by Ken Task -
Picture of Particularly helpful Moodlers

Yeah, I know.   But am thinking that, if perfected, it could save the moodle admin noobie from some headaches ... maybe those that remotely host with no desire to use ssh/cli.

How many times have we seen, in these forums, either a botched install of a plugin where it was done 'manually' (not CLI, but cPanel FileManager) OR even, a botched update or upgrade due to an incompatible plugin either copied to the wrong location or caused the update/upgrade to fail ... 'whale fail'.

Yes, Rick ... he ought to be along any minute now with his methods ... know one 'pre-package' something local and do it that way.   I, however, want not to use local machine at all.   "Nuttin'" but server. smile

To each their own, I guess! smile

But thanks for asking and responding!

'spirit of sharing', Ken


In reply to Ken Task

Re: MDeploy - Moodle 3.5.1+

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

My problem is that it positively encourages admins to run insecure sites. 

As you say, this tends to be exactly the same group of users who won't have much knowledge about server security. 

I know that other well known applications do this (Wordpress I'm looking at you). But I know experienced server admins who will not touch the likes of Wordpress. 

It also relies on plugin administrators keeping their info up to date in the plugins database

In reply to Howard Miller

Re: MDeploy - Moodle 3.5.1+

by Ken Task -
Picture of Particularly helpful Moodlers

Good points!

Yep, WordPresses and Joomla's too boot!

But that's why some 'consultants' can actually make a living ... uhhhh, which isn't me, BTW.

'spirit of sharing', Ken


In reply to Ken Task

Re: MDeploy - Moodle 3.5.1+

by Mathieu Pelletier -
So, Ken...

Did you ever get your answer about mdeploy?  I have a moodledata directory that has seen many upgrades.  I am now setting up a new server for 3.5 and I would like to trim the fat smile.

All the best,

Mathieu

In reply to Mathieu Pelletier

Re: MDeploy - Moodle 3.5.1+

by Ken Task -
Picture of Particularly helpful Moodlers

No, never did.   Believe the proper place for mdeploy files, etc. is in moodledata directory.  Have a server that uses some 'big' plugins ... at least the zips are larger than most ... and have noticed/experienced they didn't update well via GUI mdeploy.    Seem to get stuck after the current code plugin directory is removed ... which means half way.  Can see the new code zip present but no 'activity' towards using it - at least I've not found a way to see that activity.

Anyhoo, Have resorted back to manual updates for those via hide, wget, php script in admin/cli.

Would assume that once the DB is updated with version information etc. that all those directories not really needed.   There is currently no method via the GUI to use those previous versions in a 'rollback' as far as I know/can see.

However, my experience may not be yours!   So on the side of caution, one could archive, save out to another handy location, in case I was wrong! smile

My 2 cents ...

'spirit of sharing', Ken