Skip to content

Commit

Permalink
Add docs regarding developing and releasing the images
Browse files Browse the repository at this point in the history
  • Loading branch information
addshore committed Jun 8, 2020
1 parent 121bd10 commit d843f5c
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ For more information about this example enviroment, please see the [README-compo
We use [Phabricator to track
issues](https://phabricator.wikimedia.org/maniphest/task/edit/form/1/?projects=wikibase-containers). See the [list of current issues](https://phabricator.wikimedia.org/maniphest/?project=wikibase-containers&statuses=open&group=none&order=newest#R).

### Development

New images will be build and automatically pushed to docker hub when merged on master.
Builds on branches and in PRs will not be pushed.

Each image directory contains a README with a separate Development section for how updates of that image generally work.

The following steps relate to all images:

- Update the various .travis/build-deploy.sh scripts to correctly tag the images that are being built, including updating the latest tag.
- Update .travis.yml to reflect new or removed images

### Further reading

For beginner-friendly light reading on the subject of using these images / this repo, check out the posts under [this tag](https://addshore.com/tag/wikibase-docker/), specifically:
Expand Down
15 changes: 15 additions & 0 deletions elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,18 @@ Image name | Parent image
--------------------------------------- | ------------------------
`wikibase/elasticsearch` : `6.5.4-extra`, `latest` | [elasticsearch:6.5.4](https://hub.docker.com/_/elasticsearch/)
`wikibase/elasticsearch` : `5.6.14-extra` | [elasticsearch:5.6.14](https://hub.docker.com/_/elasticsearch/)

### Development

New versions of this image should be created alongside new versions of elasticsearch that are used in production for Wikidata.

The versions required for this image can generally be seen under the dependencies of the [CirrusSearch extension](https://www.mediawiki.org/wiki/Extension:CirrusSearch).

You can find the plugin versions that can be used at https://mvnrepository.com/artifact/org.wikimedia.search/extra-common

The elasticsearch version and versions of plugins should match for new images.

The process is generally:
- Create a new directory using a previous one as an example
- Update the Dockerfile to use the newer version of elasticsearch and extensions
- Update the CI build by checking the steps in the main README Development section in this repo.
8 changes: 8 additions & 0 deletions quickstatements/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,11 @@ and secret token to quickstatements.

If you have changed the value of $wgSecretKey $wgOAuthSecretKey since you made the consumer you'll need to make another new consumer or
reissue the secret token for the old one.

### Development

These images are build from the master branch of the quickstatements and magnustools repos.

For this reason the images may sometimes break due to upstream changes and need fixing.

Additional images for new releases do not need to be created.
6 changes: 6 additions & 0 deletions wdqs-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ Variable | Default | Description
`WIKIBASE_HOST` | "wikibase.svc" | Hostname of the Wikibase host
`WDQS_HOST` | "wdqs-proxy.svc" | Hostname of the WDQS host (probably READONLY, hence use of the wdqs-proxy service)
`COPYRIGHT_URL` | "undefined" | URL for the copyright notice

### Development

Both images are built directly from master, so new images for releases are not needed (as there are no releases).

This does mean that sometimes things will break and the images will need fixing.
6 changes: 6 additions & 0 deletions wdqs-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ File | Description
--------------------------------- | ------------------------------------------------------------------------------
`/etc/nginx/conf.d/wdqs.template` | Template for the nginx config (substituted to `/etc/nginx/conf.d/default.conf` at runtime)
`/etc/nginx/conf.d/default.conf` | nginx config. To override this you must also use a custom entrypoint to avoid the file being overwritten.

### Development

This image is based directoy on the nginx latest image, thus new images are not needed for new releases.

However if the latest image goes through a major version bump that renders our configuration broken we may need to create a new image.
17 changes: 17 additions & 0 deletions wdqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,20 @@ File | Description

* The query service is not running or seems to get killed by the OS?
* The image requires more than 2GB of available RAM to start. While being developed the dev machine had 4GB of RAM.

### Development

New versions of this image should be created alongside new versions of wdqs that are used in production for Wikidata.

New snapshots that are available for images to be created can be found on archiva: https://archiva.wikimedia.org/repository/snapshots/org/wikidata/query/rdf/service/

When creating a new image RWStore.properties will need to be updated to match the properties used in production at the time the snapshot was being used.

For this reason it is easier to only create new releases for wdqs versions currently being used in Wikidata production.

When creating a new release the WMF Search platform team should be contacted for help syncing the wdqs version and RWStore.properties file.

The process is generally:
- Create a new directory using a previous one as an example
- Update the service snapshot that is being fetched
- Update the CI build by checking the steps in the main README Development section in this repo.
13 changes: 13 additions & 0 deletions wikibase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,16 @@ Maintenance scripts from extensions and mediawiki core can be run with `docker e
For example to run a maintenance script from WikibaseImport:

```docker exec <container name / hash> php //var/www/html/extensions/WikibaseImport/maintenance/importEntities.php --entity Q147```

### Development

A new image should be created for every major release of MediaWiki and Wikibase.
These images currently use the [MediaWiki docker hub base image](https://hub.docker.com/_/mediawiki), so that needs to have a new version prior to updates here.

- Create a new release folder, copying the content from a previous release
- Update the base Dockerfile to fetch the latest mediawiki image
- Update the bundle Dockerfile to use the new version of the base image
- Update download-extension.sh to fetch new versions of the extensions
- Update the CI build by checking the steps in the main README Development section in this repo.

Releases that are no longer supported per the [Version lifecycle](https://www.mediawiki.org/wiki/Version_lifecycle) can be deleted.

0 comments on commit d843f5c

Please sign in to comment.