When enabling mathoid role, it gets cloned into the root vagrant dir. I tihnk we should set up a proper "service" role that all services should inherit, and it should be cloned to some other location (e.g. <vagrant-root>/mediawiki/services)
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Install non-vendor services to /vagrant/srv | mediawiki/vagrant | master | +29 -24 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T91787 Have a MediaWiki vagrant role "production" which mirrors WMF production | |||
Resolved | • mobrovac | T91661 Have a RESTbase vagrant role | |||
Resolved | dduvall | T89919 Services in Vagrant should not be cloned into root | |||
Resolved | dduvall | T92311 Hiera-ize all service installation directories |
Event Timeline
I aprechiate this proposal. But I think @bd808 needs to deccide that.
What's about other services?
/vagrant/mediawiki/services isn't the right location. I've been thinking for a while however that having some container directory for the various additional software components that are possible to add to mw-vagrant would be a good idea. What color should this bikeshed be?
- /vagrant/apps/
- /vagrant/modules/
- /vagrant/src/
- /vagrant/opt/
- /vagrant/srv/
- /vagrant/???
/vagrant/services/ is the cleanest i think, and it maps to all mediawiki/services/* repos.
What about all the things that we can install that aren't mediawiki/services/* things? /vagrant/srv/ would match the FHS location we use on cluster servers for installing things. It might not have great discoverability for arbitrary users though. Would /vagarnt/opt/ might be easier to understand without being a total linux geek?
@dduvall and @ori do you have intuition or opinions on this?
Tell you the truth I have no clue what Linux's /opt is for (i have seen it before, but had to read the FHS article, and even that is too vague for this case).
IMO, the /vagrant/services dir would be for anything that provides its own connection point - basically a service that will most likely exist on our backend with or without direct exposure. Examples - graphoid, parsoid, mathoid.... Come to think of it, we could make it /vagrant/servicoids/ :)
As I've pointed out above, the nodejs services aren't the only thing that can be installed by a role as code that is not MediaWiki proper. Our current .gitignore has:
/mediawiki/ /scholarships/ /wikimetrics/ /mathoid /iegreview /profiles /phab /node_modules
Parsoid is currently hidden away inside the VM (T56321) as is the jobrunner daemon. The eventual solution for T78739 will likely need to be able to add a second copy of MediaWiki as well to run the fundraising branch.
I'm not sure there is a graceful answer to organizing this growing mass of code. Personally I'd vote to move all of the code (including MediaWiki) under either /vagrant/srv or /vagrant/src and clean up the top level directory for deploys running a lot of roles tremendously. /vagrant/srv has strong parallels to layout used on the WMF production cluster but that is a trivial detail.
Another service coming with T91661: Have a RESTbase vagrant role and I realized today that in addition to being hid inside the VM, Parsoid is not updated by git-update or any other means.
Oh naming things... I don't want to keep bike shedding this so if anyone has objections to /vagrant/srv (it seems we're 50/50) speak now or forever hold your peace.
+1 for /vagrant/srv . Seems the most-obvious choice, and just remaps the /srv structure into /vagrant consistently.
Change 200624 had a related patch set uploaded (by Dduvall):
Install non-vendor services to /vagrant/srv
Has anyone tested this with SMW?
After the update I get the following message while running update.php
wiki: #!/usr/bin/env php PHP Warning: include(/srv/vagrant/mediawiki/extensions/SemanticMediaWiki/includes/src/MediaWiki/Jobs/UpdateJob.php): failed to open stream: No such file or directory in /srv/vagrant/mediawiki/vendor/composer/ClassLoader.php on line 412 PHP Stack trace:
We don't have a SemanticMediaWiki role as far as I can tell. This doesn't look like anything that should have been broken by this particual set of Puppet changes however.