Skip to content
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

Update mediawiki to 1.32.2 #53

Merged
merged 4 commits into from
Jun 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions RUNBOOK.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Deploying to prod

0. Take a backup! Run `docker-compose exec backup run_backup.sh` and make sure it succeeded. Also run `git log` and note down the current deployed sha, in case you need to roll back.
0. Take a backup! Run `docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.prod.yml exec backup ./run_backup.sh` and make sure it succeeded. Also run `git log` and note down the current deployed sha, in case you need to roll back.
0. `git pull` and `docker-compose build`. This builds and caches the new images locally without interrupting the old server, which reduces downtime.
0. `docker-compose down` shuts down the server and removes containers. Now downtime has started ticking.
0. `docker volume rm <mediawiki-volume>`, so that the mediawiki container can create a new volume with updates in the next step.
Expand All @@ -28,15 +28,16 @@ $ docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-
### I want to retrieve the latest backup

```sh
# ensure that the backup container is running
# ensure that the backup container is running and drop into the container's bash
$ docker-compose -f docker-compose.yml -f docker-compose.override.yml -f docker-compose.prod.yml exec backup /bin/bash
# this will drop you into the container's bash
# below command will create a new backup of the server
container $ ./run_backup.sh
container $ ls /root/backups # to ensure that the backup tar was created
# to ensure that the backup tar was created
container $ ls /root/backups
container $ exit
# now copy the created tar file into the host filesystem
# docker cp doesn't take wildcard paths (??)
$ docker cp metakgpwiki_backup_1:/root/backups/metakgpwiki_2017_10_23_10_11_44.tar.gz .
$ docker cp metakgp-wiki_backup_1:/root/backups/metakgpwiki_2017_10_23_10_11_44.tar.gz .
$ pwd
```

Expand Down
6 changes: 3 additions & 3 deletions mediawiki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ RUN apt-get -qq update && apt-get -qq install -y \
git wget unzip

WORKDIR /tmp
RUN wget -q https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz \
&& tar -xzf mediawiki-1.30.0.tar.gz \
RUN wget -q https://releases.wikimedia.org/mediawiki/1.32/mediawiki-1.32.2.tar.gz \
&& tar -xzf mediawiki-1.32.2.tar.gz \
&& mkdir -p /srv \
&& mv /tmp/mediawiki-1.30.0 /srv/mediawiki
&& mv /tmp/mediawiki-1.32.2 /srv/mediawiki

COPY install_extensions.sh post_install.sh /tmp/
RUN /tmp/install_extensions.sh
Expand Down
5 changes: 2 additions & 3 deletions mediawiki/install_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ declare -a extension_names=( \
ContributionScores \
Echo \
MobileFrontend \
MultimediaViewer \
SandboxLink \
Scribunto \
VisualEditor \
Expand All @@ -22,7 +21,7 @@ declare -a skin_names=( \
MinervaNeue \
)

MEDIAWIKI_RELEASE=REL1_30
MEDIAWIKI_RELEASE=REL1_32

function fetch_extension_url() {
curl -s "https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdistname=$1&extdistversion=$MEDIAWIKI_RELEASE" \
Expand Down Expand Up @@ -59,4 +58,4 @@ wget -q https://github.com/leucosticte/RecentPages/archive/master.zip \
&& mv RecentPages/RecentPages-master /srv/mediawiki/extensions/RecentPages

# Make Lua executable
chmod a+x /srv/mediawiki/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua
chmod a+x /srv/mediawiki/extensions/Scribunto/includes/engines/LuaStandalone/binaries/lua5_1_5_linux_64_generic/lua