-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added experimental helm/minikube/kubernetes setup #39
Conversation
@Pchelolo this is perfect timing as I have just got minikube setup locally :) |
It would be worth stating that if you have had minikube running before you'll need to do
So, on windows at least setting this env var just seems like a bit of a hassle, setting it in the shell that I run the init script from doesn't seem to work I have to go and set it globally (using the UI) for windows :( Is there any way to make the script pick this up from a .env file similar to what was done before? Anyway, this is the step that I am stuck at for now as I can't seem to make the mount command work :/ |
Haha awesome. I thought I'd better make it before Christmas to have something to play with over the holidays too.
The init script is just a single mount command, nothing fancy :) You can run the command and substitute the env var with your actual path in order to test this. I've only tested on OSX and didn't even have Windows in mind, so with Windows-specific minikube issues I can't help you unfortunately. |
So I never managed to make the init script work. In Fact I struggled to get anything to mount at all with minikube either complaining that it couldn't find or didn't have access to files. I'll probably take another stab at getting this to work for my setup over the coming days. |
Nice work @Pchelolo ! I wonder, though, since we are trying to converge the two efforts (this one and mediawiki-containers), whether work should be done on the mediawiki-containers side to do so rather than here. Ultimately, the idea is to have a full development environment for mediawiki and the accompanying services. |
Oh... I've spent quite a while trying to make a windows setup only to discover that Hyper-V on windows is not supported inside a VirtualBox VM.. Seems like I won't be able to test this on windows. |
It would probably make sense to try to move the mediawiki-containers images to the production repo for images the wmf has? And get them into a productionish ready state? Once there they could easily be used by this setup. Right now on the mediawiki-containers side of things, I'm not a fan of the bundling of services in wikimedia/mediawiki-node-services |
There is no such thing as the wmf mediawiki [docker] production image, so I'm not sure I understand the suggestion. I do think that our (wider) collaboration should bring us into a place where the wmf production image becomes a thing :) I merely wanted to emphasise that we should work together in one place, I wasn't implying there is already a solution to this out there ;)
Only two services are there - RESTBase and Parsoid. But, I agree that for the development use case, they should be separated. I created a task for it and it should be tackled soon. For context, these were bundled together to support the low-resource use cases, such as third-party installs on small VPS. |
But I have no doubt that there will be. I more meant for the node services. There is a wmf repo for production ready images @ https://github.com/wikimedia/operations-docker-images-production-images (actually on gerrit). Also wmf base images that we probably want to base things on https://github.com/wikimedia/operations-docker-images-production-images/blob/5cc5c52b654d02fd434dc3cdad92c74210598983/config.yaml#L2 |
You don't need to worry about this, images in mediawiki-containers will be based on these, but we are not discussing node images in this PR, are we? |
I think we went off topic a while ago in regard to this PR. I'd like to see the node images as part of the setup, and I don't see much point in duplicating effort, for example, making the image in mediawiki-containers, when we already know we will need a production ready image to land in the ops repo at some point. :) I'll have another go at kicking minikube to mount things correctly over the next days for this PR. |
The mediawiki-containers effort was started long before the images themselves. I should also note that these images are not used anywhere yet, so we are still in an early stage. Rome wan't built in a day ;)
Hence my proposal to have a unified place where we are working on stuff, instead of two which might potentially diverge, which is not desirable for anybody.
Production images for Mediawiki will not be available, tested nor used for quite a while still, so having an intermediate step is a requirement here. Besides, if we do it right, the effort won't be really duplicated since ideally we would swap out one image for another and tweak things accordingly. Again. this conversation is not about what to put, but where to put it. |
Well, I'm going to have to continue working with this system & setup for now as minikube doesn't work correctly for me. Also both this and mediawiki-containers are starting as totally separate / diverged projects, it would be hard to diverge further really. It probably make sense to keep working on images @ https://github.com/wikimedia/mediawiki-docker The images for services that can surround mediawiki extensions, such as parsoid, restbase, ores etc could probably also live there? Although it might make more sense for them to be published under the wikimedia org on docker hub instead of the library, but they could all live in the same repo We could restructure the mediawiki-docker repo to contain a library dir and a wikimedia dir. Right now I still believe https://github.com/wikimedia/mediawiki-containers and this repo are aiming for different things. This repo is strictly aiming at development, as far as I can tell from the readme and other documentation in tickets mediawiki-containers isn't really trying to do that. I feel like all of this discussion would better placed in a phabricator ticket. |
Well, I have managed to get kubernetes all set up on a small group of VMs with kubeadm, but minikube still doesn't work for me... |
Just signed up for the "docker-for-windows" kubernetes beta. |
For those who haven't seen it yet: https://gerrit.wikimedia.org/r/plugins/gitiles/releng/local-charts/ |
This is just a proof of concept and it's very limited - a lot of copy-pasta, only mediawiki and mysql are deployed, no Nginx no nothing, tested only on OSX, doesn't properly create all log folders, doesn't set proper permissions, the
default
DB is hard-coded, doesn't play with host machine hosts files etc.Creating a PR mostly to get some comments on the general approach, cause some of the decisions are controversial, for example:
postStart
hook for installing composer dependencies, waiting for DB (that part should be done via Kubernetes), creating the databaseInstructions:
--memory=4096
, initialize helm. I won't write up instructions for that cause it's OS-specific and is much better described in the tools docDOCKER_MW_PATH
env variable, set the path in LocalSettings in the mediawiki repo to/etc/mediawiki/LocalSettings.php
./kubernetes/init.sh
- this will create a mount from your local machine to minikube VM.helm install ./kubernetes
- this will render all the configs and upload them to minikubekubectl get pods
- when both pods get to theRunning
state - all is done.minikube service mediawiki-svc
- this will open a browser window and hopefully will show a main page of MediaWiki.I'm not intending for this PR to be merged as is, creating it more for discussion purposes.
cc @d00rman @lavagetto