Page MenuHomePhabricator

Standardise Mathoid's deployment
Closed, ResolvedPublic

Description

Mathoid's deployment is pretty much a one-off, but we have now some standardised components for Node.JS deploys, most notably the service-template-node and the service::node Puppet type With its adoption of the service template, Mathoid becomes a candidate for standardisation.

TODO

  • create a /deploy repo, i.e. separate Mathoid source from its run-time dependencies
  • create the proper mathoid module in Puppet which uses service::node

Event Timeline

mobrovac raised the priority of this task from to Medium.
mobrovac updated the task description. (Show Details)

PR for bringing mathoid-server up to date with the service-template-node is available here.

Can you add me to the repo? I.e. pushing the tags is not possible with gerrit alone

@mobrovac I recently tried to build with ppa with a makefile that calls npm install. However this still fails with a out of memory extension... Therefore all the node modules (incl. binary modules) need to be included in the reposory, which is does not really seem to be the right way to use git.
Do you have a soultion for that or is the additional deploy module the solution?

Can you add me to the repo? I.e. pushing the tags is not possible with gerrit alone

Which one? :) services/mathoid or services/mathoid/deploy? The latter has not been created yet

@mobrovac I recently tried to build with ppa with a makefile that calls npm install. However this still fails with a out of memory extension... Therefore all the node modules (incl. binary modules) need to be included in the reposory, which is does not really seem to be the right way to use git.
Do you have a soultion for that or is the additional deploy module the solution?

Yes, we are aware of that problem. That's why the second deploy repo is for. Basically the workflow is:

  • commit commit commit into services/mathoid
  • when deployment comes, the deploy repo is updated, and node modules are added there

Cf. https://wikitech.wikimedia.org/wiki/User:Mobrovac/Service_Deployment for an extensive list of deployment steps

Thank you very much for the excellent documentation. This simplifies the process significantly (since I don't have to care about ppa debian repos).
Originally I was asking to be added to the request on here
https://www.mediawiki.org/wiki/Git/New_repositories/Requests
but now I thinking that I don't need access there.

Change 167413 had a related patch set uploaded (by Alexandros Kosiaris):
mathoid to service::node

https://gerrit.wikimedia.org/r/167413

akosiaris set Security to None.

The mathoid module has been update to use service::node in in https://gerrit.wikimedia.org/r/167413. Unfortunately this can not be merged before the mathoid code is modified to work with the assumptions of service::node. Those seem to be:

  • being able to accept a -c parameter for the configfile.
  • presence of src/server.js instead of mathoid.js
  • a mathoid/deploy repo

@akosiaris, yup, I am aware of that. The deploy repo has been created (yet need to structure it and import the src and modules). As for

The mathoid module has been update to use service::node in in https://gerrit.wikimedia.org/r/167413. Unfortunately this can not be merged before the mathoid code is modified to work with the assumptions of service::node.

@akosiaris, yup, I am aware of that (should have probably mentioned in the task desc that there has to be an order to things here).

Those seem to be:

  • being able to accept a -c parameter for the configfile.
  • presence of src/server.js instead of mathoid.js

These are covered in https://github.com/physikerwelt/mathoid-server/pull/5

  • a mathoid/deploy repo

The repo has been created. As soon as the above PR is merged, we can import that into mediawiki/services/mathoid and then structure the deploy repo properly.

@akosiaris, yup, I am aware of that. The deploy repo has been created (yet need to structure it and import the src and modules). As for

The mathoid module has been update to use service::node in in https://gerrit.wikimedia.org/r/167413. Unfortunately this can not be merged before the mathoid code is modified to work with the assumptions of service::node.

@akosiaris, yup, I am aware of that (should have probably mentioned in the task desc that there has to be an order to things here).

Those seem to be:

  • being able to accept a -c parameter for the configfile.
  • presence of src/server.js instead of mathoid.js

These are covered in https://github.com/physikerwelt/mathoid-server/pull/5

  • a mathoid/deploy repo

The repo has been created. As soon as the above PR is merged, we can import that into mediawiki/services/mathoid and then structure the deploy repo properly.

done!

If there is interest in a math sprint please let me know.

@akosiaris , mediawiki/services/mathoid and mediawiki/services/mathoid/deploy and now set up as needed. I also took the liberty to improve the mathoid to service::node patch, which should now work as advertised. Could you please test it and confirm?

Change 211518 had a related patch set uploaded (by Mobrovac):
Small improvements

https://gerrit.wikimedia.org/r/211518

Change 211518 merged by Physikerwelt:
Small improvements

https://gerrit.wikimedia.org/r/211518

Change 211667 had a related patch set uploaded (by Mobrovac):
Update mathoid to 7e184cf

https://gerrit.wikimedia.org/r/211667

Change 215016 had a related patch set uploaded (by Mobrovac):
Mathoid: update Vagrant puppet module using service::node

https://gerrit.wikimedia.org/r/215016

Change 167413 merged by Alexandros Kosiaris:
mathoid to service::node

https://gerrit.wikimedia.org/r/167413

The deployment has been completed, and we now have a standardised Mathoid deployment workflow. Thanks to everyone that contributed to this!

I'm keeping this open until https://gerrit.wikimedia.org/r/#/c/215016/ is merged to keep track.

Change 215016 merged by jenkins-bot:
Mathoid: update Vagrant puppet module using service::node

https://gerrit.wikimedia.org/r/215016

mobrovac moved this task from Awaiting review to Done on the MediaWiki-Vagrant board.
mobrovac removed a project: Patch-For-Review.
mobrovac moved this task from In-progress to Done on the Services board.
mobrovac removed a subscriber: gerritbot.
  NODES
admin 1
Note 1
Project 6
todo 1