Page MenuHomePhabricator

Skillshare: Setup MediaWiki development environment
Closed, ResolvedPublic

Description

This workshop will be for newcomers.

@01tonythomas and I would love to help you set up the MediaWiki development environment. Bring your laptops, and hang out w/ us.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 13 2017, 11:01 PM

Are you using MediaWiki-Vagrant? If so, I'm also available to help with this.

@Mattflaschen-WMF Great! Yes, we'll be using Vagrant, and it would be great to have your help :)

Perfect. We can reuse my materials at https://www.mediawiki.org/wiki/User:01tonythomas/Hackathons/ExtensionHack as well! Would help us in finding out what is wrong with our docs - which is priceless!

Yeah, I definitely +1 this idea. Its great and how about doing it the manual way too (thats not using Vagrant as suggested above). I am willing to run simultaneously (with Vagrant session) a session of setting up the env the manual way (if acceptable) or maybe a session after the Vagrant session or before. If this session is acceptable, I am willing to do it and if anyone is willing to help, I will be happy to work with the person too :)

@D3r1ck01 Sounds great, Alangi! :) I am also wondering if you would be interested in doing a skillshare that touches some of your work? For example, @01tonythomas might do one around extensions development. If you are interested, feel free to create a task about it and move it to the Skillshare column on the Wikimedia-Hackathon-2017 workboard. More skills shared the better for newcomers! :)

Yes @srishakatux, I would definitely come up with something and I will create a ticket soon. I would focus on something around Wikidata and doing the env setup (the manual) way. This can be 2 tickets and thats it. What do you think?

Qgil triaged this task as Low priority.Apr 28 2017, 12:40 PM
Qgil moved this task from Backlog to May on the Developer-Advocacy (Apr-Jun 2017) board.
Osnard added a subscriber: Osnard.May 4 2017, 6:06 AM

@srishakatux I would recommend downloading http://mediawiki-vagrant-image.wmflabs.org/mediawiki-vagrant/mediawiki-vagrant-installer.iso and copying it to some usb thumb drives before this session. Installing from the image saves a lot of time on typically slow/overloaded hackathon wifi. We used to have a box of USB drives just for this purpose. The last time I saw them was in Jerusalem. I think I gave them to @Catrope or @Mooeypoo to take back to SF. @greg or @dduvall might have some idea where they ended up too. I will bring a couple of usb sticks I keep in my backpack too.

Alright - so just to be sure - this will run as part of the mentoring program (since we are in for Room Wiaschtl, where the mentoring program is scheduled to).

I also added the manual installation into https://www.mediawiki.org/w/index.php?title=Hackathon/Laptop_setup#Goal_.239:_Fetch_Mediawiki_codebase_and_setup_the_development_environment as well - in case someone finds vagrant a bit bulky for their machines.

By the way - we can expect a major percentage of the participants to have MW setup in their machine as well as per the instructions here https://www.mediawiki.org/w/index.php?title=Hackathon/Laptop_setup - which was sent out to all participants. If that is the case, my backup plan is to work on the ~30 easy bugs for the MediaWiki-extensions-Newsletter at https://phabricator.wikimedia.org/T159081

Srishti - I just returned some thumb drives to IT. If you ask them first thing tomorrow, give them the correct file and are heading into the office you might be able to get a few before you leave.

@Rfarrand @bd808 Thanks Bryan for the reminder! I am in PDX for WTD and so will not be able to collect the drives from office. I've one drive with me and I'm asking around here at the conf.

@01tonythomas @D3r1ck01 If you've have some spare drives, bring along with iso on it?

Would people also be interested in "Setup a MediaWiki development environment... Docker style"?

Yes, me :) I've also set up my own docker-based dev environment and would love to learn what other people are doing.

Yes, me :) I've also set up my own docker-based dev environment and would love to learn what other people are doing.

Awesome, there will be at least 3 of us then!
I would be keen to get some sort of docker-compose.json file merged into core at this hackathon for super easy dev environments!

@Addshore, cool & who knows who else you might find. It would probably be worth making an announcement about this during the opening. :)

bd808 added a comment.May 17 2017, 4:21 PM

Yes, me :) I've also set up my own docker-based dev environment and would love to learn what other people are doing.

Awesome, there will be at least 3 of us then!
I would be keen to get some sort of docker-compose.json file merged into core at this hackathon for super easy dev environments!

You should talk to the Release-Engineering-Team folks about that general topic. They are talking/thinking about Docker related things for Foundation use generally.

Yes, me :) I've also set up my own docker-based dev environment and would love to learn what other people are doing.

Awesome, there will be at least 3 of us then!
I would be keen to get some sort of docker-compose.json file merged into core at this hackathon for super easy dev environments!

I know that wikitolearn https://en.wikitolearn.org/Main_Page has their infra on docker - and we might be able to grab something from https://github.com/WikiToLearn/WikiToLearn as well.

Personally, a +1 for docker.

I have just thrown up what I have been working on / with to https://github.com/addshore/mediawiki-docker-dev for now
I'll be at the session later.

Yes, me :) I've also set up my own docker-based dev environment and would love to learn what other people are doing.

Awesome, there will be at least 3 of us then!
I would be keen to get some sort of docker-compose.json file merged into core at this hackathon for super easy dev environments!

You should talk to the Release-Engineering-Team folks about that general topic. They are talking/thinking about Docker related things for Foundation use generally.

We're still in early days looking at Docker images for a staging cluster/CI/local development, so there's not much to present for local development environments at this point but I can talk about what we're doing.

Unrelated to our work, I've also seen a docker proof of concept that folks from Services worked on https://github.com/wikimedia/mediawiki-docker at some point that may be helpful.

To sum the docker topic up: There are currently three approaches:

  1. By @Addshore: Uses docker-compose, consists of services "mediawiki-mysql", "mediawiki-mariadb", "mediawiki-phpmyadmin", "mediawiki-nginx-php5", "mediawiki-nginx-php7", "mediawiki-nginx-hhvm", "mediawiki-apache-php5", "mediawiki-apache-php7", "mediawiki-apache-hhvm", "mediawiki-graphite-statsd" and "mediawiki-nginx-proxy". See https://github.com/addshore/mediawiki-docker-dev - Seems to be quite a lot of stuff with some redundancy, but probably covers a lot of cases
  2. By @GWicke: Uses docker-compose, consists of services "db" and "web". See https://github.com/wikimedia/mediawiki-docker - The "web" service has a pretty sophisticated DOCKERFILE and entrypoint.sh. It seems to me as almost all WMF infratructure is missing, even Parsoid.
  3. By WikiToLearn: Didn't find docker-compose here, but there are a lot of docker image builds available. See https://hub.docker.com/u/wikitolearn/ - Some of the highlights seem to be OCG, RestBase, Mathiod and Parsoid. It looks like those are crafted for production purposes and not for development (e.g. Parsoid is being configured to run with multiple language specific subdomains).

@Addshore, sorry, I missed the chance to talk to you in the session. Maybe we can meet tomorrow? I'm still interested in what you are planing :)

@Addshore, sorry, I missed the chance to talk to you in the session. Maybe we can meet tomorrow? I'm still interested in what you are planing :)

Sorry, I have only just spotted this! I am guessing you are not still in vienna?

As for the redundancy, yep, I plan on getting rid of this! :)

Never mind. I'll just keep watching what you are doing in your respository :) You plan to have parsiod/mathiod and stuff as a separate container? Will the images be published to hub.docker.com and how are chances that those images can be considered "official"?

srishakatux closed this task as Resolved.Jun 1 2017, 12:06 AM

@bd808 everything worked fine -- just one problem we had while doing the setup was understanding which bundle file does what. Names of the MediaWiki vagrant and core bundle files in the USB drive folder were confusing and different as they were in the README file. I think we guessed the name by the file size.

Thanks to Matthew and Tgr who helped with this session, Moriel for flying the drives safely from SFO and Bryan D. for a timely reminder :)

bd808 added a comment.Jun 1 2017, 12:23 AM

@bd808 everything worked fine -- just one problem we had while doing the setup was understanding which bundle file does what. Names of the MediaWiki vagrant and core bundle files in the USB drive folder were confusing and different as they were in the README file. I think we guessed the name by the file size.

I wonder if that was an artifact of how the files were transferred from the ISO to the USB sticks? Locally and in the image I see:

mpb01:/Volumes/MWV
bd808$ ls
BUILD_INFO*                Vagrant_MIT.txt*
GPL-2.0.txt*               Windows/
LICENSE*                   cache/
Linux/                     mediawiki_core.bundle*
Mac/                       mediawiki_vagrant.bundle*
README.txt*                virtualbox.box*
System Volume Information/

If the bundle names were squashed down to 8.3 filenames they would be something horrible like MEDIAW~1.BUN and MEDIAW~2.BUN. Maybe we should rename the files something like core.git and mwv.git to make things nicer if they are mangled.

If the bundle names were squashed down to 8.3 filenames they would be something horrible like MEDIAW~1.BUN and MEDIAW~2.BUN

Yup, that's how they were.

Qgil awarded a token.Jun 1 2017, 12:30 AM

If the bundle names were squashed down to 8.3 filenames they would be something horrible like MEDIAW~1.BUN and MEDIAW~2.BUN

Yup, that's how they were.

This will happen on a Windows machine when you double click on the name of the ISO file in Explorer.
It is possible to see the full names on a Windows machine: right-click on the name of the ISO file and select 7-Zip Open. If necessary, you can unpack the ISO using 7-Zip. Maybe an idea to include this in the Readme file?

Anyone who was involved in this session in Vienna want to carry on the lessons learned and help to run it in Montreal? We can change the timing, format, or anything else we like.