Difference between revisions of "Mediawiki 1.35 Migration"

From BITPlan Wiki
Jump to navigation Jump to search
 
(41 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{PageSequence|prev=SMWConTalk2020-04|next=Mediawiki 1.35 Migration|category=talk|categoryIcon=picture-o}}
+
{{PageSequence|prev=SMWConTalk2020-04|next=SMWConTalk2022-10|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:WolfgangFahl.png|200px|left|link=https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl]]<br><span style='font-size:150%'>Mediawiki 1.35 LTS migration</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%'>Mediawiki 1.35 LTS migration</span>
 
;author: <span style='font-size:50%'><br> [https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl Wolfgang Fahl] [mailto:info@bitplan.com info@bitplan.com]</span>
 
;author: <span style='font-size:50%'><br> [https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl Wolfgang Fahl] [mailto:info@bitplan.com info@bitplan.com]</span>
 
;footer: Tutorial
 
;footer: Tutorial
 
;subfooter: SMW Con Fall 2020
 
;subfooter: SMW Con Fall 2020
 
</slideshow>
 
</slideshow>
 +
===⌘⌘ Agenda ===
 +
* Why should i migrate / what is the effort / is it reversible?
 +
* Prerequisites/Backup/Trial environment/Installation
 +
* Extensions / Composer Based / List of Extensions
 +
* Try and Error / Debug
 +
* Wiki Family / Site Transfer automation
 +
* Questions / Discussion
 +
 
== ⌘⌘ MediaWiki 1.35 LTS ==
 
== ⌘⌘ MediaWiki 1.35 LTS ==
 
[[File:MediaWikiLogo.png|132px|right]]
 
[[File:MediaWikiLogo.png|132px|right]]
Line 12: Line 21:
 
* End of Life: September 2023.
 
* End of Life: September 2023.
 
== ⌘⌘ Why should i migrate? ==
 
== ⌘⌘ Why should i migrate? ==
 +
<div style='float:right'>{{Bigstock|id=1018025}}</div>
 
* 1.31 LTS went end-of-life in June 2021.
 
* 1.31 LTS went end-of-life in June 2021.
 
* 1.27 LTS went end-of-life in June 2019.
 
* 1.27 LTS went end-of-life in June 2019.
 +
* its an opportunity to clean and fix things
 +
* Avoid the "Just upgrade!" shame
 +
 +
== ⌘⌘ What is the effort? ==
 +
<div style='float:left'>{{Bigstock|id=6212739}}</div>
 +
* It Depends ...
 +
* BITPlan and <br>Hello World <br>report multi-week efforts ...
 +
 
== ⌘⌘ Is the migration reversible? ==
 
== ⌘⌘ Is the migration reversible? ==
 
<div style='float:right'><youtube>aRoiM-buNHE</youtube></div>
 
<div style='float:right'><youtube>aRoiM-buNHE</youtube></div>
 
+
* No its all or nothing!
* No!
 
 
* really?
 
* really?
 +
* Really there is no proper incremental way
 
* You'll not like to try so better assume "No!"
 
* You'll not like to try so better assume "No!"
  
 
== ⌘⌘ Prerequisites ==
 
== ⌘⌘ Prerequisites ==
* [https://www.php.net PHP] > 7.3.19
+
LAMP Stack ..
* e.g. [https://releases.ubuntu.com/20.04/ Ubuntu 20.04]
+
{| class="wikitable"
 +
|-
 +
| [https://en.wikipedia.org/wiki/Linux Linux] || [[File:Ubuntu_logo.svg|120px]] || e.g. Ubuntu 20.04 || <source lang='bash'>lsb_release -a</source>  
 +
|-
 +
| [https://en.wikipedia.org/wiki/Apache_HTTP_Server Apache Apache Server] || [[File:Apache_HTTP_server_logo_(2016).svg|120px|link=https://en.wikipedia.org/wiki/Apache_HTTP_Server]] || e.g. 2.4 || <source lang='bash'> /usr/sbin/apache2 -v</source>
 +
|-
 +
| [https://mariadb.org/ mariaDB] || [[File:Mariadb-seal-browntext.svg|120px|link=https://mariadb.org/]] || e.g. 15.1 / 10.3.25 || <source lang='bash'>mysql --version</source>
 +
|-
 +
| [https://www.php.net PHP] || [[File:PHP-logo.svg|120px|link=https://www.php.net]] || > 7.3.19 || <source lang='bash'>php --version</source>
 +
|}
 +
 
  
 
== ⌘⌘ Backup ==
 
== ⌘⌘ Backup ==
Line 29: Line 57:
 
# rsync of images directory<source lang='bash'>rsync -avz  --no-perms --omit-dir-times $srcServer:$l_path/* $l_path</source>
 
# rsync of images directory<source lang='bash'>rsync -avz  --no-perms --omit-dir-times $srcServer:$l_path/* $l_path</source>
  
 +
== ⌘⌘ Trial environment ==
 +
[[File:Computer-kitten.jpg|200px|right]]
 +
Kids <br>
 +
don't do <br>
 +
this in your <br>
 +
production environment!
  
  
Line 35: Line 69:
 
wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0.tar.gz
 
wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0.tar.gz
 
wf@q:/var/www/mediawiki$ sudo tar xvfz /usr/local/src/mediawiki-1.35.0.tar.gz
 
wf@q:/var/www/mediawiki$ sudo tar xvfz /usr/local/src/mediawiki-1.35.0.tar.gz
 +
</source>
 +
 +
== ⌘⌘ Composer based ==
 +
<source lang='json'>
 +
{
 +
  "require": {
 +
    "mediawiki/semantic-media-wiki": "~3.2.0",
 +
    "mediawiki/semantic-cite": "~2.1.1",
 +
    "mediawiki/semantic-result-formats": "~3.2.0",
 +
    "mediawiki/page-forms": "^4.9.5",
 +
    "mediawiki/maps": "~7.0"
 +
  }
 +
}
 +
</source>
 +
<source lang='bash'>
 +
sudo chmod -R  g+w vendor extensions
 +
composer update -vvv --no-dev
 +
wfLoadExtension( 'Maps' );
 
</source>
 
</source>
 
== ⌘⌘ List of Extensions ==
 
== ⌘⌘ List of Extensions ==
Line 45: Line 97:
 
| ?Extension since = since
 
| ?Extension since = since
 
}}
 
}}
 +
== ⌘⌘ Try and error ==
 +
* start with an "empty" list of extensions
 +
* activate extension by extension
 +
* on error - fix or disable
 +
 +
== ⌘⌘ Debug ==
 +
[[File:Icon Debug 256x256.png|256px|left]]
 +
* [https://www.mediawiki.org/wiki/Manual:How_to_debug Mediawiki Manual:How to debug]
 +
* {{Link|target=PHP_Mediawiki_Eclipse_debugging}}
 +
 +
== ⌘⌘ Wiki Family ==
 +
[[File:Icon people.svg|200px|right]]
 +
{{Link|target=Wiki_Family}}
 +
{{:WikiFarm_Overview}}
 +
== ⌘⌘ Site Transfer automation ==
 +
<source lang='bash'>
 +
#  Apache configuration
 +
tsite partner -s s.bitplan.com  -b -a
 +
# Images, Localsettings and git
 +
tsite partner -s s.bitplan.com  -b -g -cs
 +
# Pages via Database
 +
tsite partner -s s.bitplan.com  -b -g -db
 +
# Update to new version
 +
tsite partner -s s.bitplan.com  -w
 +
# Enable apache
 +
tsite partner -e
 +
</source>
 +
== ⌘⌘ Apache configuration ==
 +
[[File:Clipboard20201125092135.png]]
 +
 +
== ⌘⌘  DNS entry ==
 +
[[File:Clipboard20201125092527.png]]
 +
<source lang='bash'>
 +
ping partner.q.bitplan.com
 +
PING q.bitplan.com (91.250.86.204) 56(84) bytes of data.
 +
64 bytes from q.bitplan.com (91.250.86.204): icmp_seq=1 ttl=64 time=0.019 ms
 +
</source>
 +
== ⌘⌘  rsync images and settings  ==
 +
[[File:Clipboard20201125092143.png]]
 +
 +
== ⌘⌘  automatic git control ==
 +
[[File:Clipboard20201125093912.png]]
 +
== ⌘⌘ SQL database transfer ==
 +
[[File:Clipboard20201125094532.png]]
 +
== ⌘⌘ maintainance/update.php ==
 +
[[File:Clipboard20201125094538.png]]
 +
== ⌘⌘ Apache enable site / restart ==
 +
[[File:Clipboard20201125095140.png]]
 +
== ⌘⌘ Family index.php ==
 +
http://q.bitplan.com
 +
[[File:Clipboard20201125095324.png]]
 +
 +
== ⌘⌘ Test Site ==
 +
* [https://partner.bitplan.com/index.php/Special:Version check version]
 +
* [https://partner.bitplan.com/index.php/Build_Your_Own_Self_Driving_Vehicle_with_Java check content]
 +
[[File:Clipboard20201125100337.png|800px]]
 +
 +
== ⌘⌘ Questions/Discussion ==
 +
[[File:Bitplanpartner.png]]

Latest revision as of 06:48, 19 April 2023

view Mediawiki 1.35 Migration as slides

<slideshow style="bitplan" headingmark="⌘⌘" incmark="…" scaled="true" font="Arial" >

title
BITPlan
WolfgangFahl.png

Mediawiki 1.35 LTS migration
author

Wolfgang Fahl info@bitplan.com
footer
Tutorial
subfooter
SMW Con Fall 2020

</slideshow>

⌘⌘ Agenda

  • Why should i migrate / what is the effort / is it reversible?
  • Prerequisites/Backup/Trial environment/Installation
  • Extensions / Composer Based / List of Extensions
  • Try and Error / Debug
  • Wiki Family / Site Transfer automation
  • Questions / Discussion

⌘⌘ MediaWiki 1.35 LTS

MediaWikiLogo.png

⌘⌘ Why should i migrate?

Bigstockphoto Pray 1018025.jpg
  • 1.31 LTS went end-of-life in June 2021.
  • 1.27 LTS went end-of-life in June 2019.
  • its an opportunity to clean and fix things
  • Avoid the "Just upgrade!" shame

⌘⌘ What is the effort?

Bigstock-Ruler-6212739.jpg
  • It Depends ...
  • BITPlan and
    Hello World
    report multi-week efforts ...

⌘⌘ Is the migration reversible?

  • No its all or nothing!
  • really?
  • Really there is no proper incremental way
  • You'll not like to try so better assume "No!"

⌘⌘ Prerequisites

LAMP Stack ..

Linux Ubuntu logo.svg e.g. Ubuntu 20.04
lsb_release -a
Apache Apache Server Apache HTTP server logo (2019-present).svg e.g. 2.4
 /usr/sbin/apache2 -v
mariaDB Mariadb-seal-browntext.svg e.g. 15.1 / 10.3.25
mysql --version
PHP PHP-logo.svg > 7.3.19
php --version


⌘⌘ Backup

  1. mysqldump (full)
    /usr/bin/mysqldump $l_login_path --quick --routines $createopt --skip-add-locks --complete-insert --opt "$db" > $today/$dbfile
    
  2. rsync of images directory
    rsync -avz  --no-perms --omit-dir-times $srcServer:$l_path/* $l_path
    

⌘⌘ Trial environment

Computer-kitten.jpg

Kids
don't do
this in your
production environment!


⌘⌘ Installation

wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0.tar.gz
wf@q:/var/www/mediawiki$ sudo tar xvfz /usr/local/src/mediawiki-1.35.0.tar.gz

⌘⌘ Composer based

{
  "require": {
    "mediawiki/semantic-media-wiki": "~3.2.0",
    "mediawiki/semantic-cite": "~2.1.1",
    "mediawiki/semantic-result-formats": "~3.2.0",
    "mediawiki/page-forms": "^4.9.5",
    "mediawiki/maps": "~7.0"
  }
}
sudo chmod -R  g+w vendor extensions
composer update -vvv --no-dev
wfLoadExtension( 'Maps' );

⌘⌘ List of Extensions

Extensionnameurlpurposesince
Admin LinksAdmin Linkshttps://www.mediawiki.org/wiki/Extension:Admin LinksAdmin Links is an extension to MediaWiki that defines a special page, "Special:AdminLinks",
that holds links meant to be helpful for wiki administrators;
it is meant to serve as a "control panel" for the functions an administrator would typically perform in a wiki.
All users can view this page; however, for those with the 'adminlinks' permission (sysops/administrators, by default),
a link to the page also shows up in their "Personal URLs", between "Talk" and "Preferences".
13 May 2009
DiagramsDiagramshttps://www.mediawiki.org/wiki/Extension:DiagramsReplaces deprecated

https://www.mediawiki.org/wiki/Extension:GraphViz and https://www.mediawiki.org/wiki/Extension:PlantUML

extensions
12 December 2019
Header TabsHeader Tabshttps://www.mediawiki.org/wiki/Extension:Header TabsThe Header Tabs extension transforms top-level MediaWiki headers into tabs using the jQuery UI JavaScript library.20 March 2008
HitCountersHitCountershttps://www.mediawiki.org/wiki/Extension:HitCountersHitCounters displays the view count in the page footer
and the most viewed pages on a special page called Special:PopularPages.
24 October 2014
ImageLinkImageLinkhttps://github.com/BITPlan/ImageLinkDisplay Image and Link20 March 2008
MagicNoCacheMagicNoCachehttps://www.mediawiki.org/wiki/Extension:MagicNoCacheThe MagicNoCache extension creates a new magic word '"`UNIQ--nowiki-00000C16-QINU`"' and disables the cache for any page in which it finds it. Thus it makes sure that specific pages never get cached as they get updated extremely frequently1 January 2012
MapsMapshttps://www.mediawiki.org/wiki/Extension:Mapsdisplays maps2009
MermaidMermaidhttps://github.com/SemanticMediaWiki/MermaidThis extension provides the #mermaid parser function to support the generation of diagrams and flowcharts with the help of the mermaid script language.30 December 2017
MsUploadMsUploadhttps://www.mediawiki.org/wiki/Extension:MsUploadThe MsUpload extension allows users to upload multiple files by drag & drop in the standard MediaWiki edit page.17 April 2013
NetworkNetworkhttps://www.mediawiki.org/wiki/Extension:NetworkGraphical display of page connections5 June 2020
PDFEmbedPDFEmbedhttps://github.com/WolfgangFahl/PDFEmbedDisplay PDF content inline
Page FormsPage Formshttps://www.mediawiki.org/wiki/Extension:Page Formsallows users to add, edit and query data using forms.7 September 2016
ParserFunctionsParserFunctionshttps://www.mediawiki.org/wiki/Extension:ParserFunctionsThe ParserFunctions extension enhances the wikitext parser with helpful functions, mostly related to logic and string-handling.
PiwoPiwohttps://www.mediawiki.org/wiki/Extension:PiwoCompiles and executes Python code stored in wiki pages.4 January 2018
Quiz-ExtensionQuizhttps://www.mediawiki.org/wiki/Extension:QuizQuiz-Sets for Training Wikis24 March 2007
Reveal-SlidesReveal-Slideshttps://github.com/PascalNoisette/mediawiki-extensions-SlidesSlideshow presentation from Wikimarkup using reveal.js2021
S5SlideShowS5SlideShowhttps://www.mediawiki.org/wiki/Extension:S5SlideShowSlideshow presentation from Wikimarkup2009
Semantic CiteSemantic Citehttps://www.mediawiki.org/wiki/Extension:Semantic CiteBibliographic References2015
Semantic MediaWikiSemantic Mediawikihttps://www.semantic-mediawiki.org/wiki/Semantic MediaWikiMediawiki with Semantic Annotation in Subject Predicate Object(Triple) style2005
Semantic WikibaseSemantic Wikibasehttps://www.mediawiki.org/wiki/Extension:Semantic Wikibase
SimpleMathJaxSimpleMathJaxhttps://www.mediawiki.org/wiki/Extension:SimpleMathJaxThe SimpleMathJax extension enables MathJax, a JavaScript library,
for typesetting TeX formula in MediaWiki inside math environments.
- Workaround if extension Math does not work
10 September 2014
SparqlResultFormatSparqlResultFormathttps://www.mediawiki.org/wiki/Extension:SparqlResultFormatAllows to render SPARQL query results7 August 2019
SyntaxHighlightingSyntaxHighlighthttps://www.mediawiki.org/wiki/Extension:SyntaxHighlightsyntax highlighting of diverse languages3 April 2007
UserFunctionsUserFunctionshttps://www.mediawiki.org/wiki/Extension:UserFunctionsThe UserFunctions extension provides a set of dynamic parser functions that trigger on the current user18 December 2011
VariablesVariableshttps://www.mediawiki.org/wiki/Extension:VariablesThe Variables extension allows you to define a variable on a page, use it later in that same page or included templates ...13 November 2011
Wikibase clientWikibase Clienthttps://www.mediawiki.org/wiki/Extension:Wikibase Client
YouTubeYouTubehttps://www.mediawiki.org/wiki/Extension:YouTubeEmbed youtube videos26 October 2010

⌘⌘ Try and error

  • start with an "empty" list of extensions
  • activate extension by extension
  • on error - fix or disable

⌘⌘ Debug

Icon Debug 256x256.png

⌘⌘ Wiki Family

Icon people.svg

Wiki_Family

⌘⌘ Site Transfer automation

#  Apache configuration
tsite partner -s s.bitplan.com   -b -a
# Images, Localsettings and git
tsite partner -s s.bitplan.com   -b -g -cs
# Pages via Database
tsite partner -s s.bitplan.com   -b -g -db
# Update to new version
tsite partner -s s.bitplan.com   -w
# Enable apache
tsite partner -e

⌘⌘ Apache configuration

Clipboard20201125092135.png

⌘⌘ DNS entry

Clipboard20201125092527.png

ping partner.q.bitplan.com
PING q.bitplan.com (91.250.86.204) 56(84) bytes of data.
64 bytes from q.bitplan.com (91.250.86.204): icmp_seq=1 ttl=64 time=0.019 ms

⌘⌘ rsync images and settings

Clipboard20201125092143.png

⌘⌘ automatic git control

Clipboard20201125093912.png

⌘⌘ SQL database transfer

Clipboard20201125094532.png

⌘⌘ maintainance/update.php

Clipboard20201125094538.png

⌘⌘ Apache enable site / restart

Clipboard20201125095140.png

⌘⌘ Family index.php

http://q.bitplan.com Clipboard20201125095324.png

⌘⌘ Test Site

Clipboard20201125100337.png

⌘⌘ Questions/Discussion

Bitplanpartner.png