Difference between revisions of "SMWConTalk2022-10"
Jump to navigation
Jump to search
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{PageSequence|prev=Mediawiki 1.35 Migration|next= | + | {{PageSequence|prev=Mediawiki 1.35 Migration|next=EMWConTalk2023-04|category=talk|categoryIcon=picture-o}} |
+ | {{ShowSlides}} | ||
+ | |||
<slideshow style="bitplan" headingmark="⌘⌘" incmark="…" scaled="true" font="Arial" > | <slideshow style="bitplan" headingmark="⌘⌘" incmark="…" scaled="true" font="Arial" > | ||
;title: [[File:BITPlanLogoFontLessTransparent.png|240px|link=http://www.bitplan.com|BITPlan]]<br>[[File:WolfgangFahl.png|200px|left|link=https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl]]<br><span style='font-size:150%'>pymediawikidocker</span> | ;title: [[File:BITPlanLogoFontLessTransparent.png|240px|link=http://www.bitplan.com|BITPlan]]<br>[[File:WolfgangFahl.png|200px|left|link=https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl]]<br><span style='font-size:150%'>pymediawikidocker</span> | ||
Line 7: | Line 9: | ||
</slideshow> | </slideshow> | ||
===⌘⌘ Agenda === | ===⌘⌘ Agenda === | ||
+ | This page: https://wiki.bitplan.com/index.php/SMWConTalk2022-10 | ||
+ | |||
* Docker | * Docker | ||
* Mediawiki Docker images | * Mediawiki Docker images | ||
Line 30: | Line 34: | ||
==⌘⌘ Automating Mediawiki Installation == | ==⌘⌘ Automating Mediawiki Installation == | ||
In 2015 we started with 1000 line bash script | In 2015 we started with 1000 line bash script | ||
+ | <source lang='bash' highlight='1'> | ||
+ | profiwiki-install --help | ||
+ | ./profiwiki-install.sh | ||
+ | |||
+ | options: | ||
+ | -c|--clean : clean - clean up docker containers and volumes (juse with caution) | ||
+ | -h|--help : show this usage | ||
+ | -i : use install.php to create LocalSettings.php | ||
+ | -ismw SMW_VERSION : install semanticmediawiki with the given version using composer | ||
+ | -composer|--composer : install composer | ||
+ | -l|--local : local install (default is docker) | ||
+ | -n|--needed : check and install needed prequisites | ||
+ | -m|--mysql : initialize and start mysql | ||
+ | -r|--random : create random passwords | ||
+ | -smw|--smw : install Semantic MediaWiki | ||
+ | </source> | ||
Here is an excerpt: | Here is an excerpt: | ||
+ | |||
<source lang='bash'> | <source lang='bash'> | ||
# | # | ||
Line 64: | Line 85: | ||
} | } | ||
</source> | </source> | ||
+ | |||
==⌘⌘ openresearch migration usecase == | ==⌘⌘ openresearch migration usecase == | ||
* https://github.com/SmartDataAnalytics/OpenResearch/blob/master/getYourOwnCopy/getYourOwnCopyOfOpenResearch.sh | * https://github.com/SmartDataAnalytics/OpenResearch/blob/master/getYourOwnCopy/getYourOwnCopyOfOpenResearch.sh | ||
==⌘⌘ pymediawikdocker == | ==⌘⌘ pymediawikdocker == | ||
{{Link|target=pymediawikidocker}} | {{Link|target=pymediawikidocker}} | ||
+ | ==⌘⌘ How it works == | ||
+ | {{Link|target=Pymediawikidocker#How_it_works}} | ||
+ | |||
==⌘⌘ prerequisites == | ==⌘⌘ prerequisites == | ||
{{Link|target=Pymediawikidocker#Prerequisites}} | {{Link|target=Pymediawikidocker#Prerequisites}} | ||
Line 75: | Line 100: | ||
==⌘⌘ usage == | ==⌘⌘ usage == | ||
+ | {{Link|target=Pymediawikidocker#Usage}} | ||
+ | |||
==⌘⌘ debugging == | ==⌘⌘ debugging == | ||
+ | {{Link|target=Pymediawikidocker#Usage}} | ||
+ | |||
==⌘⌘ extensions == | ==⌘⌘ extensions == | ||
+ | {{Link|target=Pymediawikidocker/Extensions}} |
Latest revision as of 06:45, 19 April 2023
view SMWConTalk2022-10 as slides
<slideshow style="bitplan" headingmark="⌘⌘" incmark="…" scaled="true" font="Arial" >
- title
pymediawikidocker- author
Wolfgang Fahl info@bitplan.com- footer
- Tutorial
- subfooter
- SMW Con Fall 2020
</slideshow>
⌘⌘ Agenda
This page: https://wiki.bitplan.com/index.php/SMWConTalk2022-10
- Docker
- Mediawiki Docker images
- Limitations of Docker files
- Automating Mediawiki Installation
- openresearch migration usecase
- pymediawikidocker
- how it works
- prerequisites
- installation
- usage
- debugging
- extensions
⌘⌘ Docker
⌘⌘ Mediawiki Docker images
Mediawiki official docker images
⌘⌘ Limitations of Dockerfiles
The Dockerfile syntax and semantic does not allow for proper programming logic - see e.g. iterate in run command stackoverflow question
⌘⌘ Automating Mediawiki Installation
In 2015 we started with 1000 line bash script
profiwiki-install --help
./profiwiki-install.sh
options:
-c|--clean : clean - clean up docker containers and volumes (juse with caution)
-h|--help : show this usage
-i : use install.php to create LocalSettings.php
-ismw SMW_VERSION : install semanticmediawiki with the given version using composer
-composer|--composer : install composer
-l|--local : local install (default is docker)
-n|--needed : check and install needed prequisites
-m|--mysql : initialize and start mysql
-r|--random : create random passwords
-smw|--smw : install Semantic MediaWiki
Here is an excerpt:
#
# get the passwords
# and save them in the given shell file
# paramams
# 1: l_pwconfig - the file for the password configuration
#
get_passwords() {
local l_pwconfig="$1"
if [ -f $l_pwconfig ]
then
# get the sysop password
export SYSOP_PASSWD=$(cat $l_pwconfig | grep SYSOP_PASSWD | cut -f2 -d'"')
export MYSQL_PASSWORD=$(cat $l_pwconfig | grep MYSQL_PASSWORD | cut -f2 -d'"')
else
if [ "$random_passwords" = "true" ]
then
# create a random SYSOP passsword
export SYSOP_PASSWD=$(random_password)
export MYSQL_PASSWORD=$(random_password)
else
password_dialog "ProfiWiki Setup" "Please specify passwords"
fi
local l_now=$(timestamp)
cat << EOF > $l_pwconfig
#!/bin/bash
# generated by $0 at $l_now
export SYSOP_PASSWD="$SYSOP_PASSWD"
export MYSQL_PASSWORD="$MYSQL_PASSWORD"
EOF
fi
}
⌘⌘ openresearch migration usecase
⌘⌘ pymediawikdocker
⌘⌘ How it works
Pymediawikidocker#How_it_works
⌘⌘ prerequisites
Pymediawikidocker#Prerequisites
⌘⌘ installation
Pymediawikidocker#pymediawikidocker_installation_via_pip