Docker based Mediawiki installation in a QEMU/KVM machine using Vagrant for setup
This repository contains an experiment to evaluate different techniques. Maybe it is useful for someone.
If you see issues, bad code :) or have some feedback, just open an issue and let me know.
You can clone this repository and start a new virtual machine with the command: vagrant up It will use libvirt as provider and creates a new QEMU/KVM with a Debian 9 (stretch) in it.
After that a docker environment will be installed to setup a running Mediawiki and a database instance.
Ensure your CPU supports virtualization techniques and your kernel supports KVM already.
You can check with following commands:
grep -E '^flags.*\b(vmx|svm)\b' /proc/cpuinfo
If result is empty, your CPU seems not supporting vmx.
With following command you can check if kvm modules are loaded:
lsmod | grep kvm
To build the wiki you need following software packages (available in Debian 9 stretch):
Package | Version |
---|---|
virt-manager | 1.4.0 |
libvirt0 | 3.0.0-4 |
vagrant | 1.9.1 |
vagrant-libvirt | 0.0.37-1 |
vagrant-sshfs | 1.3.0-2 |
qemu-kvm | 2.8 |
Ensure your user is in sudo group (/etc/group).
You may notice that your virtual machine is not reachable over public_network IP from your own host. Here following links may help:
- https://wiki.math.cmu.edu/iki/wiki/tips/20140303-kvm-macvtap.html
- https://wiki.mef.net/display/CESG/Hairpin+Switching
On Windows the script works with VirtualBox and Vagrant (latest version). You will find this here:
git clone https://github.com/SomeStrangeName/instantwiki.git
- adapt files according to your needs (for example the database password)
vagrant up
(this may take some time :))- open url in your browser: http://192.168.33.88:8080/
You will see the initial MediaWiki setup screen.
- Docker version: Docker version 17.09.0-ce, build afdb6d4 (or later)
- Docker-compose version: docker-compose version 1.17.1, build 6d101fb
- a mysql client
- vim
Two docker images:
- MariaDB: https://hub.docker.com/_/mariadb/
- MediaWiki: https://hub.docker.com/_/mediawiki/