Help talk:Using Docker

From semantic-mediawiki.org

Discuss Docker on Semantic Mediawiki issues here

Contents

Thread titleRepliesLast modified
Testing016:24, 11 January 2019
password handling117:40, 5 January 2019
Issue 1218012:58, 31 December 2018

Tonis solutions uses travis to test see

Since this only test that the setup script does not fail I wanted something more. I ended up creating a "testinstall" script which is referenced in https://github.com/BITPlan/ProfiWiki/blob/master/.travis.yml

https://github.com/BITPlan/ProfiWiki/blob/master/testinstall The tricky part was the waiting for docker to "do it's thing". Currently i am using timeouts which is unfortunately much dependend on the hardware. Here are some lines as an example:

  timestamp
  color_msg $blue "started install with pid $install_pid log is shown with pid $tail_pid"
  waitif "Pulling from library/mediawiki" "Waiting until docker pull is finished" "Step 2/" "Docker download cached" nohup.out 0.2 25 1000
  timestamp
  # if docker has not cached the results yet wait
  waitif "Reading package lists..." "Waiting until docker build is finished" "Step 6/" "Docker build cached" nohup.out 0.2 25 1000
  timestamp
  # wait for e.g. chown to finish
  waitfor "Step 7/" nohup.out 0.2 1000
  # check that the Apache 2 Webserver is up
  # 30 times 0.2 secs = 6 secs timeout
  waitfor "apache2 -D FOREGROUND" nohup.out 0.2 30
  timestamp
  # check that the MariaDB is up
  # 50 times 0.2 secs = 10 secs timeout
waitfor "port: 3306" nohup.out 0.2 50

What would be a better way to test?

16:24, 11 January 2019

password handling

It seems there are three passwords necessary to initialize a Mediawiki/Semanticmediawiki

  1. The MySQL root password
  2. The MySQL wiki user password
  3. The MediaWiki Sysop password

Fully automatic installations may need to create random passwords for all three of these. Some users might be more happy interactively editing the passwords.

The Digital Ocean environment used to have a MediaWiki "One-Click" app in the past. It would show the Passwords in the motd message when you logged in to the container.

The ProfiWiki Installation has used files like /root/.sysop.password in the past to store passwords. From a safety point of view these two choices are not optimal. Docker swarm supports https://docs.docker.com/engine/swarm/secrets/ which I did not try out yet and that seems to ask for another layer of infrastructure. What solution would you think is best?

18:06, 2 January 2019

How about using pass?

It is also available via macports on a Mac

17:40, 5 January 2019
 

Issue 1218

at https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1218 there is an issue for Docker support for Semantic MediaWiki in the meantime there are several different solutions available. I suggest to discuss topics that are common to these solutions here.

12:58, 31 December 2018