cancel
Showing results for 
Search instead for 
Did you mean: 

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

ron_1
Star Contributor
Star Contributor

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.

1 ACCEPTED ANSWER

Julien_Carsique
Elite Collaborator
Elite Collaborator

Hi,

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.

View answer in original post

4 REPLIES 4

Julien_Carsique
Elite Collaborator
Elite Collaborator

Hi,

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.

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

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

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?