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)
|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|
- Mentioned In
- T100202: Cloning Node.JS service repos into /vagrant/srv/ fail on Windows host
rMWVA9cd41839faa4: Install non-vendor services to /vagrant/srv
- Mentioned Here
- T91661: Have a RESTbase vagrant role
T56321: Parsoid directory don't share with host machine
T78739: Vagrant Fundraising role needs to be able to run a specific MediaWiki branch
/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?
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?
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.
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: