[SAC] [OSGeo] #2533: Set up debian10 for grasswiki

#2533: Set up debian10 for grasswiki
---------------------------+-----------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Unplanned
Component: Systems Admin | Keywords:
---------------------------+-----------------------
grasswiki is still on osgeo6 and eventually we will rebuild osgeo6. So
makes sense to containerize this.

It looks like grasswiki uses drupal and MySQL.

So I assume we can throw in debian10, latest MariaDB, PHP 7.4, and drupal
and restore grasswiki files and backup on that.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian10 for grasswiki
---------------------------+-----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2020-III
Component: Systems Admin | Resolution:
Keywords: |
---------------------------+-----------------------------------------
Changes (by robe):

* milestone: Unplanned => Sysadmin Contract 2020-III

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:1&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian10 for grasswiki
----------------------------+-----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2020-III
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+-----------------------------------------
Changes (by neteler):

* cc: martinl (added)
* keywords: => Mediawiki, lxd

Comment:

Indeed grasswiki uses Mediawiki :slight_smile:

https://grasswiki.osgeo.org/wiki/Special:Version

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:2&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian10 for grasswiki
----------------------------+-----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2020-III
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+-----------------------------------------

Comment (by robe):

ah sorry not sure why I thought it was drupal. So we can configure it
much the same as we did with the new wiki.osgeo.org -
https://wiki.osgeo.org/wiki/SAC_Service_Status#wiki

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:3&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

I did start setting this up and upgraded to debian 11. Still need to pull
over the data from osgeo6.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:6&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by neteler):

Thanks!

A question: grasswiki uses some Mediawiki extensions are not part of
wiki.osgeo.org, is that an issue?

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:7&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

It's on osgeo3 but in a separate container from wiki.osgeo.org, so not an
issue at all.
I did start off with an image of wiki.osgeo.org and dropped all the data
and started copying over grasswiki stuff - detailed here -
https://git.osgeo.org/gitea/sac/osgeo3/wiki/grass-wiki-IN-PROGRESS

But then got side tracked with other things. I'm hoping to upgrade it to
debian 11 (bullseye) this week and finish restoring the wiki database and
files, and try to upgrade to latest media-wiki.

If you want to try logging in, the server is on osgeo3 and called grass-
wiki. I gave you sudo access

https://wiki.osgeo.org/wiki/SAC_Service_Status#osgeo3

{{{
ssh neteler@osgeo3-grass-wiki
}}}

should get you in.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:8&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------
Description changed by robe:

Old description:

grasswiki is still on osgeo6 and eventually we will rebuild osgeo6. So
makes sense to containerize this.

It looks like grasswiki uses drupal and MySQL.

So I assume we can throw in debian10, latest MariaDB, PHP 7.4, and drupal
and restore grasswiki files and backup on that.

New description:

grasswiki is still on osgeo6 and eventually we will rebuild osgeo6. So
makes sense to containerize this.

It looks like grasswiki uses wiki (wikimedia) and MySQL.

So I assume we can throw in debian10, latest MariaDB, PHP 7.4, and drupal
and restore grasswiki files and backup on that.

--

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:9&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by neteler):

Thanks for your efforts, @robe!

I tried to login but it still asks for a pw:

{{{
ssh neteler@osgeo3-grass-wiki
(neteler@osgeo3-grass-wiki) Password:
}}}

Extra wish: could you please also enable Martin Landa? (he installed it
the grasswiki on osgeo6)

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:10&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

Just type in your ldap password. I don't have ssh public keys check on
the containers by default and have password access allowed (since they are
protected from direct ssh anyway) I figured owners might want to lock
them down. You can install your key after you log in first time.

You should be able to add Martin as sudo or let me know his username.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:11&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

FYI running into a little issue with restoring the mysql db.

Getting this error:

{{{
ERROR 1062 (23000) at line 393: Duplicate entry '4140' for key 'PRIMARY'
}}}

Looking at the number of tables restored:

with this query:

-- I have 11 tables restored
{{{
SELECT table_name, table_rows
    FROM INFORMATION_SCHEMA.TABLES
   WHERE TABLE_SCHEMA = 'grass_wiki'
ORDER BY table_name;
}}}

-- but osgeo6 has 58 rows

I suspect it crapped out at the hit_counter table since osgeo6 has 2943
rows and the restore has 0 for that table. I'm checking that table on
osgeo6 to see if it has dupes.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:12&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

I see the record in the hit_counter table with page_id = 4140, but does
not appear duplicated in osgeo6

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:13&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

Okay resolved the issue. Must have been some sort of fragmentationin the
hit_counter table.

Doing:

 use grass_wiki;
 optimize table hit_counter;

and then redoing the backup and restore fixed the issue. So now counts
look about the same in each database.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:14&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by neteler):

Replying to [comment:11 robe]:
> Just type in your ldap password.

Works, thanks.

> You should be able to add Martin as sudo or let me know his username.

This is his account:
https://id.osgeo.org/ldap/search?query=martinl

Glad you got the DB mess fixed!

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:15&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

Okay martinl should be set to. I'm going to next create a
staging.grasswiki.osgeo.org to point to this so we can do a final pass
thru after I reset up and try to upgrade it to latest wiki. Then once we
feel comfortable we can reload and do the repoint.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:16&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

I have https://staging.grasswiki.osgeo.org up but trying to troubleshoot
why none of the pages are showing content. I haven't upgraded wikimedia
yet.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:17&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

One of the causes of blank pages is the pcre changes
https://www.mediawiki.org/wiki/Manual:Common_errors_and_symptoms#All_pages_have_no_content,_but_when_editing_a_page_the_wiki_text_is_there.

On osgeo6 we have php 7.0 and on new grass-wiki is running php 7.3, so I
guess this means I have to upgrade before I can confirm things are
working. As the version of mediawiki is 1.27.1 and latest stable is 1.37.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:18&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+----------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2021-II
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+----------------------------------------

Comment (by robe):

Okay upgrading it to latest wikimedia (1.37.1) version made the pages
reappear again. I had to put in the latest versions of the extensions and
change most extensions except for the Polyglot one to the new standard
wfLoadExtension( 'Pluinname' ); syntax. I still want to upgrade it to
bullseye to make sure that works okay.

https://staging.grasswiki.osgeo.org

Please take a look when you have the chance.

If all looks good I'll do a final cutover the of the user files and
another snapshot of the db and upgrade of the database and repoint the
domain. (I also needed to change the LocalSettings to have $wgServer =
"https://staging.grasswiki.osgeo.org"; so will need to change that when we
go live.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:19&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+---------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2022-I
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+---------------------------------------

Comment (by neteler):

There is still an error:

Error creating thumbnail: Unable to save thumbnail to destination

in several places. Would you mind to check the permissions?

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:21&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2533: Set up debian11 for grasswiki
----------------------------+---------------------------------------
Reporter: robe | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Sysadmin Contract 2022-I
Component: Systems Admin | Resolution:
Keywords: Mediawiki, lxd |
----------------------------+---------------------------------------

Comment (by robe):

Okay will do. I still need to upgrade it too to debian11. Will do in a
bit.

--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2533#comment:22&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.