Command-line management of Nuxeo marketplace packages while Nuxeo is running

Some of the command-line Nuxeo marketplace package management operations are only available when Nuxeo is not running. When Nuxeo is running, these operations return:

Cannot execute command. A server is running with process ID

However, these same operations are available via the Admin Update Center when Nuxeo is running. Does Nuxeo plan to enhance the runtime command-line Nuxeo marketplace package management features to be comparable with those available from the Admin Update Center? We would like to script our package management operations to minimize downtime and reduce the possibility of human error. So, if an operation that does not require a restart can be performed while Nuxeo is running, we would like to use the command-line to initiate the operation.

0 votes

1 answers




In fact, the Admin Update Center does almost nothing else than downloading Marketplace packages while Nuxeo is running. It stores actions to be done at restart time. Then, during the restart, the actions are finally managed by the Launcher; exactly as if the request has been ran from command-line.
There are some exceptions though when the Marketplace package is marked as “hot-reloadable”.

Instead of simply rejecting the request when the server is running, the Launcher (aka NuxeoCtl or what you called the “command-line”) could effectively work the same way as the Admin Center: do as much as possible online, then plan a restart and offline actions when required. I agree that would be a nice improvement: NXP-10029.

Note in order to avoid human error, you can still automate the process from command line by chaining commands, for instance:

nuxeoctl stop && nuxeoctl –accept true –relax false mp-request “-some_package +another_package” && nuxeoctl –accept true -q mp-upgrade && nuxeoctl start

NuxeoCtl strictly follows Linux return codes rules so the commands can easily be used in a script and if something goes wrong, it will send back an error code stopping the process. The only drawbacks compared to your suggestion are it requires to explicitly call stop and start, and the server downtime maybe slightly longer because of the download time. So, a quicker improvement would be to add a "mp-download" command available while the server is running: NXP-10030

Thanks for your feedback.

0 votes

Thanks for creating these JIRA issues. They capture the requirements nicely.

For NXP-10029, say I am most interested in hot-deploying Nuxeo Studio updates via nuxeoctl mp-* commands. Would this be a simpler task than the full NXP-10029 implementation? Also, do the new 5.6 package management features now support the ability to configure "automatic" hot-deployment for non-SNAPSHOT Studio releases?


Since your server is registered, NuxeoCtl is managing your Studio updates almost like any Marketplace package. So NXP-10030 should be enough.

What do you mean with "automatic" hot-deployment for non-SNAPSHOT Studio releases? Would it be a "push" from the developer releasing Studio and the server automatically updating it without any administrator action? If so, I think that could be scripted on the server side using JSON/XML output, mp-upgrade and mp-install commands.


Yes, I was thinking of a developer push triggering an auto-update without administrator action and without a server restart. In 5.6, I believe most Studio changes no longer require a restart, correct?