<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://replica.wiki.extremist.software/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Benedict</id>
	<title>Noisebridge - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://replica.wiki.extremist.software/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Benedict"/>
	<link rel="alternate" type="text/html" href="https://replica.wiki.extremist.software/wiki/Special:Contributions/Benedict"/>
	<updated>2026-04-04T04:28:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.13</generator>
	<entry>
		<id>https://replica.wiki.extremist.software/index.php?title=Wiki_Upgrade&amp;diff=63164</id>
		<title>Wiki Upgrade</title>
		<link rel="alternate" type="text/html" href="https://replica.wiki.extremist.software/index.php?title=Wiki_Upgrade&amp;diff=63164"/>
		<updated>2017-12-28T04:01:29Z</updated>

		<summary type="html">&lt;p&gt;Benedict: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Eternal Wiki Upgrade Quest ==&lt;br /&gt;
&lt;br /&gt;
This is the beginning of the wiki upgrade page....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
# https by letsencrypt&lt;br /&gt;
# debian 9&lt;br /&gt;
# no snowflakes, all our (known) devops culture at nb is ansible&lt;br /&gt;
# salt the passwords correctly&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Chosen Technologies ==&lt;br /&gt;
&lt;br /&gt;
# Ansible&lt;br /&gt;
# Debian 9&lt;br /&gt;
# Caddy&lt;br /&gt;
# Letsencrypt / Certbot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Ansible Roles ==&lt;br /&gt;
&lt;br /&gt;
Noisebridge already has an ansible infrastructure repo, please join the Noisebridge github group and hack this: https://github.com/noisebridge/ansible/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Certbot - https://github.com/geerlingguy/ansible-role-certbot&lt;br /&gt;
# Semantic Mediawiki - Mediawiki maintains some: https://phabricator.wikimedia.org/diffusion/1881/&lt;br /&gt;
## It may be useful to look at this one: https://github.com/yongxinL/ansible-mediawiki&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Database Hacking ==&lt;br /&gt;
&lt;br /&gt;
We need to upgrade a really old version of mediawiki and will likely need to futz with the database. &lt;br /&gt;
# Migrate to postgresql?&lt;br /&gt;
## make a git repo to store migration sql and other sql used for massaging the database contents&lt;br /&gt;
# Delete old passwords (md5 with no salt) and expire all user passwords?&lt;br /&gt;
## Write/publish public sql script to clean up the production database for public publishing&lt;br /&gt;
# Clean the database of spam/cruft?&lt;br /&gt;
## publish these scripts to the same sql script repo&lt;br /&gt;
&lt;br /&gt;
=== MediaWiki-Vagrant ===&lt;br /&gt;
&lt;br /&gt;
This potentially is a good environment for testing and migrating the database: https://www.mediawiki.org/wiki/MediaWiki-Vagrant&lt;br /&gt;
&lt;br /&gt;
(more OpenStack Semantic MediaWiki images: https://wikitech.wikimedia.org/wiki/Portal:Cloud_VPS)&lt;br /&gt;
&lt;br /&gt;
You&#039;ll need to follow this guide to get a dump of our database up and running: https://www.mediawiki.org/wiki/Manual:Moving_a_wiki&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Password Rollover ===&lt;br /&gt;
&lt;br /&gt;
Here is the mediawiki default user table data dictionary: https://www.mediawiki.org/wiki/Manual:User_table&lt;br /&gt;
&lt;br /&gt;
We need to delete the password column and expire everyone&#039;s password. The old mediawiki only stores md5 hashed passwords with no salts, so we&#039;ll have to delete the whole thing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
user_password_expires&lt;br /&gt;
&lt;br /&gt;
MediaWiki version:	≥ 1.23     &lt;br /&gt;
&lt;br /&gt;
Date when user&#039;s password expires; null for no expiration date. Can also be set manually by calling User-&amp;gt;expirePassword().&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Noisebridge Wiki Database Fixing w/ Kevin &amp;amp; Trent 2017.12.23 ==&lt;br /&gt;
&lt;br /&gt;
This is a log of what we did to a local copy of Noisebridge wiki database. These changes were not propogated to the live/production Noisebridge MediaWiki instance.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Things We Deleted ===&lt;br /&gt;
&lt;br /&gt;
# purged password hashes - noisebridge_mediawikiuser.user_password all set to &#039;&#039; (empty string)&lt;br /&gt;
## update &amp;amp;lt;table&amp;amp;gt; set &amp;amp;lt;column&amp;amp;gt; = &#039; &#039;;&lt;br /&gt;
# purged user emails - noisebridge_mediawikiuser.user_email all set to &#039;&#039; (empty string)&lt;br /&gt;
## update &amp;amp;lt;table&amp;amp;gt; set &amp;amp;lt;column&amp;amp;gt; = &#039; &#039;;&lt;br /&gt;
# purged noisebridge_mediawikiipblocks.ipb_address - replaced the composite primary key column with a sequence as follows: https://stackoverflow.com/questions/2643371/how-to-renumber-primary-index&lt;br /&gt;
## truncated user watchlists (these are private)&lt;br /&gt;
### truncate table noisebridge_mediawikiwatchlist;&lt;br /&gt;
# truncated all protected tables (these might give private info on who protected the page?)&lt;br /&gt;
## truncate table noisebridge_mediawikiprotected_titles;&lt;br /&gt;
&lt;br /&gt;
=== Overview and Instructions for Installing MediaWiki &amp;amp; Noisebridge Wiki via Vagrant ===&lt;br /&gt;
* MediaWiki upgrade for NB&lt;br /&gt;
** Follow directions for setting up local Vagrant instance on your development machine:&lt;br /&gt;
*** https://www.mediawiki.org/wiki/MediaWiki-Vagrant&lt;br /&gt;
*** Install vagrant and virtualbox (OS X: http://sourabhbajaj.com/mac-setup/Vagrant/README.html)&lt;br /&gt;
*** # Open a terminal (we&#039;ll call this LOCAL_TERMINAL)&lt;br /&gt;
*** $ cd vagrant&lt;br /&gt;
*** # We&#039;re going with the most recent stable LTS release (Long-Term Support)&lt;br /&gt;
*** $ vagrant hiera mediawiki::branch REL1_27&lt;br /&gt;
*** $ ./setup.sh&lt;br /&gt;
*** $ vagrant up&lt;br /&gt;
** Now, copy the SQL dump file into your running MediaWiki virtualbox instance&lt;br /&gt;
*** # in LOCAL_TERMINAL... (the Vagrant host bridge interface always gets an IP address of 10.11.12.14)&lt;br /&gt;
*** $ scp -i .vagrant/machines/default/virtualbox/private_key upgraded_noisebridge_wiki.sql.bz2 vagrant@10.11.12.14:&lt;br /&gt;
** Noisebridge&#039;s MediaWiki database was configured with aall tablenames prefixed with &amp;quot;noisebridge_mediawiki&amp;quot;&lt;br /&gt;
** We want to ensure this naming convention continues to work with the new &lt;br /&gt;
*** Open a new terminal window or tab, and SSH into the running Vagrant instance (and let&#039;s refer to this shell as VAGRANT_TERMINAL)&lt;br /&gt;
**** $ cd vagrant&lt;br /&gt;
**** $ vagrant ssh&lt;br /&gt;
*** # In VAGRANT_TERMINAL, add (or change) the config var $wgDBprefix in /vagrant/LocalSettings.php&lt;br /&gt;
**** $ vi /vagrant/LocalSettings.php&lt;br /&gt;
****: $wgDBprefix = &amp;quot;noisebridge_mediawiki&amp;quot;;&lt;br /&gt;
**** (NOTE: do not be clever and configure a different database name, because it turns out that `wiki` is a baked-in default somewhere in vagrant&#039;s puppet scripts. Or, maybe in mediawiki&#039;s CLI scripts, but either way IT CANNOT BE OVERRIDDEN IN LocalSettings.php or DefaultSettings.php, or --conf, or the &#039;dbname-prefixname&#039; CLI parameter. If you choose to change it, just know that it is a rabbit hole that will consume an hour of your life unproductively).&lt;br /&gt;
** To install the Noisebridge.net wiki database on your MediaWiki-Vagrant instance, you will need to drop and recreate the MySQL database &#039;wiki&#039; in order to eliminate the default MediaWiki 1.31 structure, to avoid problems overwriting it with our old MW 1.19 schema mysqldump&lt;br /&gt;
** # Do this in VAGRANT_TERMINAL&lt;br /&gt;
:: $ mysql&lt;br /&gt;
:: &amp;gt; drop database wiki;&lt;br /&gt;
:: &amp;gt; create database wiki;&lt;br /&gt;
:: &amp;gt; ^D  (that&#039;s a Control-D, as in hold down the Control key on your keyboard and strike the D key)&lt;br /&gt;
:: $ bunzip2 -dc ~/upgraded_noisebridge_wiki.sql.bz2 | mysql wiki &amp;lt; ~&lt;br /&gt;
:: (NOTE: You may safely ignore messages like &amp;quot;Warning (Code 1300): Invalid utf8 character string: &#039;BD5A6D&#039;&amp;quot;)&lt;br /&gt;
** Now run the upgrade script: (in VAGRANT_TERMINAL)&lt;br /&gt;
:: $ cd /vagrant/mediawiki/maintenance/&lt;br /&gt;
:: $ mwscript update.php&lt;br /&gt;
:: If all goes as planned you&#039;ll see a bunch of advisory progress messages such as:&lt;br /&gt;
::: Your composer.lock file is up to date with current dependencies!&lt;br /&gt;
::: Going to run database updates for wiki-noisebridge_mediawiki&lt;br /&gt;
::: Depending on the size of your database this may take a while!&lt;br /&gt;
::: Abort with control-c in the next five seconds (skip this countdown with --quick) ... 0&lt;br /&gt;
::: Turning off Content Handler DB fields for this part of upgrade.&lt;br /&gt;
::: ...have ipb_id field in ipblocks table.&lt;br /&gt;
::: ...have ipb_expiry field in ipblocks table.&lt;br /&gt;
::: ...already have interwiki table&lt;br /&gt;
::: ...indexes seem up to 20031107 standards.&lt;br /&gt;
::: ...have rc_type field in recentchanges table.&lt;br /&gt;
::: ...index new_name_timestamp already set on recentchanges table.&lt;br /&gt;
::: ...have user_real_name field in user table.&lt;br /&gt;
::: ...&lt;br /&gt;
::: ...doing rev_id from 2001 to 2200&lt;br /&gt;
::: ...doing rev_id from 2201 to 2400&lt;br /&gt;
::: ...doing rev_id from 2401 to 2600&lt;br /&gt;
::: ...doing rev_id from 2601 to 2800&lt;br /&gt;
::: ...doing rev_id from 2801 to 3000&lt;br /&gt;
::: ...checking 40 revisions for IP edits that need copying, between rev_ids 20100 and 20300&lt;br /&gt;
::: ...checking 49 revisions for IP edits that need copying, between rev_ids 20301 and 20501&lt;br /&gt;
::: ...checking 74 revisions for IP edits that need copying, between rev_ids 20502 and 20702&lt;br /&gt;
::: ...checking 48 revisions for IP edits that need copying, between rev_ids 20703 and 20903&lt;br /&gt;
::: ...checking 41 revisions for IP edits that need copying, between rev_ids 20904 and 21104&lt;br /&gt;
::: ...et cetera.&lt;br /&gt;
** At this point you may be able to visit the Noisebridge site on your dev machine by going to:&lt;br /&gt;
:: http://127.0.0.1/wiki/Noisebridge&lt;br /&gt;
** If this doesn&#039;t work it&#039;s likely some step was omitted from this doc, in which case ask Kevin or Trent for support.&lt;br /&gt;
&lt;br /&gt;
=== FUTURE Database Hacking Plans  ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== FUTURE ACTION: After Upgrading we can expire everyone&#039;s password ====&lt;br /&gt;
&lt;br /&gt;
details here: https://noisebridge.net/wiki/Wiki_Upgrade&lt;br /&gt;
and here: https://www.mediawiki.org/wiki/Manual:User_table#user_password_expires&lt;br /&gt;
&lt;br /&gt;
==== FUTURE ACTIONS ====&lt;br /&gt;
&lt;br /&gt;
# reduce permissions for inactive moderators, admins, etc, to &amp;quot;user&amp;quot;.&lt;br /&gt;
## really drop everyone and add current people back, to make it an intentional process&lt;br /&gt;
## be very restrictive about CURRENT active users&lt;/div&gt;</summary>
		<author><name>Benedict</name></author>
	</entry>
</feed>