Template:PT Status report and Setup:Installation Guide/Upgrade: Difference between pages

(Difference between pages)
(Autogenerated)
 
No edit summary
Tag: 2017 source edit
 
Line 1: Line 1:
<div class="databox">
{{DISPLAYTITLE:Upgrade from BlueSpice 3 to 4}}
<div class="tbl">
 
{|
==System requirements==
|-
{{Setup:System_requirements}}
!Author:
{{Messagebox|boxtype=note|icon=|Note text=You might need to add external repos to get the correct php on your server! Please check your package manager for the available php versions on your system.|bgcolor=}}
|responsible for report content
==Back up the old wiki==
|-
In BlueSpice 3, create a temporary migration folder and copy all necessary data:<syntaxhighlight lang="bash">
! Reports to:
mkdir /tmp/migration
| recipient of the report
cd /tmp/migration
|-
wikifolder=/path/to/wikifolder
!Report date:
cp -r $wikifolder/images .
|mm/dd/yyyy
cp -r $wikifolder/extensions/BlueSpiceFoundation/config .
|}
cp -r $wikifolder/LocalSettings.* .
</div>
#check for for locals in settings.d
<div class="tbl">
find $wikifolder/settings.d/ -iname '*.local.php' -exec cp --parent {} /tmp/migration \;
{|
 
|-
 
!Team / Department / Project:
</syntaxhighlight>Also search for specialized php files in <code>settings.d</code>  (normally <code>090-</code> or <code>099-</code> ).
|scope of the report
==Upgrade step 1==
|-
This step has to be completed before the ''Upgrade step 2'' further below.{{Messagebox|boxtype=warning|icon=|Note text=BlueSpice 4.x cannot process wiki pages and files that were uploaded and edited by '''deleted users'''. To prevent data loss, don't skip any upgrade steps!|bgcolor=}}
!Reporting period / milestone:
===Create a "substitute user" for deleted users===
|what time period/project milestone is covered?
In BlueSpice 3.x, create a user with a random password:
|-
php maintenance/createAndPromote.php --force DeletedUser someR4ndomPass
!Report status:
{{Messagebox|boxtype=note|icon=|Note text=You may need to temporarily disable authentication plugins like LDAP-Stack, SAML  or OpenIDConnect extensions.|bgcolor=}}
|'''draft''' / finished
Get the <code>user_id</code> of the substitute user by running the following command in the database:
|}
SELECT user_id FROM user WHERE user_name = "DeletedUser";
</div>
==Sql dump==
</div>
Create the backup of your data:<syntaxhighlight lang="bash">
==Executive summary==
mysql -u root -p bluespice > migrationdump.sql
Give a brief executive summary about takeaways from this report.
</syntaxhighlight>
==Optional files for migration==
If any of the following features apply to your installation, check if migration steps are necessary. In that case, add everything to your ''tar'' file and send it to the new server.
 
Examples of files that you might have to consider:


==Details==
* ssl-certs
List major tasks that have been completed and evaluate their outcomes.
* apache.conf
* ldapprovider.json
* kerberos files (krb5.conf/keyfile)


{| class="wikitable" style="width:100%;"
==Migrate to the new wiki==
!Business area
''Grep'' <code>LocalSettings.php</code> for <code>wgDB</code><syntaxhighlight lang="bash">
!Topic
grep wgDB LocalSettings.*
!Highlights
LocalSettings.local.php:$wgDBserver = "Your-IP";
!Major obstacles
LocalSettings.local.php:$wgDBname = "Your-datbase-name";
unexpected (project) risks
LocalSettings.local.php:$wgDBuser = "Your-database-user";
!Lessons learned
LocalSettings.local.php:$wgDBpassword = "Your-password";
|-
|Marketing
|All
|
*Leads
*Campaigns Q1
|
*Unexpected cost
*New competitor
|
*review of cost estimation plan is necessary
|-
|..
|
|
|
|
|-
|..
|
|
|
|
|}
==Business review==
Evaluate the impact of key results for the reporting period.
{| class="wikitable" style="width:100%;"
!Metric
!Target
!Previous <br />period
!This <br />period
!Change
!New target
|-
|Number of customers
|700
|631
|
| +24
|680
|-
|Billable time (hrs)
|650
|620
|
|<nowiki>-70</nowiki>
|
|-
|..
|
|
|
|
|
|}


==Measures==
</syntaxhighlight>and create the '''database'''  and '''DBuser''' with the '''DBpassword'''. Grant <code>all</code> on database to the '''DBuser''' in mysql.  
Based on the performance of the reporting period, the following measures for the above metrics will be implemented.


===Metric 1===
Migrate the data:<syntaxhighlight lang="bash">
{| class="wikitable" style="width:100%;"
mysql -u root -p bluespice < migration.sql
!'''Responsibe'''
cp -r images $wikifolder
!'''Measures'''
cp -r extensions $wikifolder
|-
cp -r LocalSettings.php $wikifolder
|Who will make sure this gets done in a timely manner?
setWikiPerm $wikifolder
|To improve this metric, it is necessary to complete the following tasks:


# First measure
</syntaxhighlight>
#Second measure
====Modify LocalSettings.php====
|-
Replace:<syntaxhighlight lang="php">
|..
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
|
</syntaxhighlight>with:<syntaxhighlight lang="php">
|-
$wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/wiki.png" ];
| ..
|
|}


===Metric 2===
</syntaxhighlight>
{| class="wikitable" style="width:100%;"
*Check other <code>LocalSettings.*</code> for individual configurations from the old BlueSpice installation.
!'''Responsibe'''
*Compare the <code>migrated settings.d/*.local.php</code> with the new <code>settings.d/*.php</code> and check for individual (probably deprecated) configurations.  Do the same with <code>09*-xx.php</code>.
!'''Measures'''
*Copy to <code>$wikifolder/settings.d/</code> what is needed.
|-
==Upgrade step 2==
|Who will make sure this gets done in a timely manner?
Assign all pages and files without a valid editor user to your newly created substitute user:<syntaxhighlight lang="bash">
|To improve this metric, it is necessary to complete the following tasks:
cd $wikifolder
php extensions/BlueSpiceFoundation/maintenance/PrepareActorMigration.php --unknownUserId=<user-id-from-step I. > --unknownUserName=DeletedUser
</syntaxhighlight>
==Optional==
*Copy the following files (if applicable in your case):<code>apache.conf</code>, <code>krb5.conf,</code> <code>Kerberos-key</code>, <code>ldapprovider.json</code>
*Add to VirtualHost in <code>Apache.conf</code> after rewrite rules:
AllowEncodedSlashes NoDecode
==Last steps==
Run the following maintenance scripts:<syntaxhighlight lang="bash">
cd $wikifolder
php maintenance/update.php --quick
php extensions/BlueSpiceExtendedSearch/maintenance/initBackends.php --quick
php extensions/BlueSpiceExtendedSearch/maintenance/rebuildIndex.php --quick


#First measure
screen
#Second measure
    while  [ "$(php maintenance/showJobs.php)" != "0" ]; do php maintenance/runJobs.php --maxjobs 100; done
|-
|..
|
|-
|..
|
|}


==Supporting documents==
</syntaxhighlight>The last step will take a while.
Link to any documents related to this report:
==Known possible issues after the update==
===Problems with VisualEditor===
<div>
Add in  <span style="color: rgb(4, 30, 73)"><code>includes/libs/http/MultiHttpClient.php</code> after line 327:</span>
<span class="nb" style="color: rgb(0, 128, 0)">curl_setopt</span><span class="p">(</span> <span class="nv" style="color: rgb(25, 23, 124)">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_SSL_VERIFYHOST</span><span class="p">,</span> <span class="mi" style="color: rgb(102, 102, 102)">0</span> <span class="p">);</span>
<span class="nb" style="color: rgb(0, 128, 0)">curl_setopt</span><span class="p">(</span> <span class="nv" style="color: rgb(25, 23, 124)">$ch</span><span class="p">,</span> <span class="nx">CURLOPT_SSL_VERIFYPEER</span><span class="p">,</span> <span class="mi" style="color: rgb(102, 102, 102)">0</span> <span class="p">);</span>
</div>


* Document 1
[[en:{{FULLPAGENAME}}]]
* Document 2
[[de:Setup:Installationsanleitung/Upgrade]]

Revision as of 14:39, 10 February 2023


System requirements

For a trouble-free installation of the current version of BlueSpice 4, we recommend the following system requirements.

Browser

  • Microsoft Edge
  • Google Chrome
  • Firefox

Server Environment

  • Operating system:
    • We strongly recommend Linux (preferably Debian 11, Ubuntu 22.04, CentOS 7)
    • You might use Windows Server starting at 2016, but we have seen performance issues on Windows Server
  • Webserver:
    • Apache 2.4.x, IIS >= 10 or nginx 1.x (nginx not possible in WikiFarm)
  • PHP:
    • PHP 8.1 / PHP 8.2
  • Database:
    • MySQL: >= 5.6 or
    • MariaDB >= 10.3
  • (Virtual) hardware requirements:
    • CPU:
      • Linux: 8 Cores (min. 4 Cores)
      • Windows: 16 Cores (min. 8 Cores)
    • Main memory:
      • Linux: 16 GB (min. 8GB)
      • Windows: min. 16 GB
    • Available hard drive space:
      • > 20 GB (depends on the planned storage of data)
  • Other:
    • Apache Tomcat >= 9 oder Jetty >= 9 (for PDF export and LaTexRenderer)
    • ElasticSearch 6.8 with plugin “ingest-attachment”
    • OpenJDK >= 10
    • NodeJS 16
Note:You might need to add external repos to get the correct php on your server! Please check your package manager for the available php versions on your system.

Back up the old wiki

In BlueSpice 3, create a temporary migration folder and copy all necessary data:

mkdir /tmp/migration
cd /tmp/migration
wikifolder=/path/to/wikifolder
cp -r $wikifolder/images .
cp -r $wikifolder/extensions/BlueSpiceFoundation/config .
cp -r $wikifolder/LocalSettings.* .
#check for for locals in settings.d
find $wikifolder/settings.d/ -iname '*.local.php' -exec cp --parent {} /tmp/migration \;

Also search for specialized php files in settings.d (normally 090- or 099- ).

Upgrade step 1

This step has to be completed before the Upgrade step 2 further below.

Warning!BlueSpice 4.x cannot process wiki pages and files that were uploaded and edited by deleted users. To prevent data loss, don't skip any upgrade steps!

Create a "substitute user" for deleted users

In BlueSpice 3.x, create a user with a random password:

php maintenance/createAndPromote.php --force DeletedUser someR4ndomPass
Note:You may need to temporarily disable authentication plugins like LDAP-Stack, SAML or OpenIDConnect extensions.

Get the user_id of the substitute user by running the following command in the database:

SELECT user_id FROM user WHERE user_name = "DeletedUser";

Sql dump

Create the backup of your data:

mysql -u root -p bluespice > migrationdump.sql

Optional files for migration

If any of the following features apply to your installation, check if migration steps are necessary. In that case, add everything to your tar file and send it to the new server.

Examples of files that you might have to consider:

  • ssl-certs
  • apache.conf
  • ldapprovider.json
  • kerberos files (krb5.conf/keyfile)

Migrate to the new wiki

Grep LocalSettings.php for wgDB

grep wgDB LocalSettings.*
LocalSettings.local.php:$wgDBserver = "Your-IP";
LocalSettings.local.php:$wgDBname = "Your-datbase-name";
LocalSettings.local.php:$wgDBuser = "Your-database-user";
LocalSettings.local.php:$wgDBpassword = "Your-password";

and create the database and DBuser with the DBpassword. Grant all on database to the DBuser in mysql. Migrate the data:

mysql -u root -p bluespice < migration.sql 
cp -r images $wikifolder
cp -r extensions $wikifolder
cp -r LocalSettings.php $wikifolder
setWikiPerm $wikifolder

Modify LocalSettings.php

Replace:

$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";

with:

$wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/wiki.png" ];
  • Check other LocalSettings.* for individual configurations from the old BlueSpice installation.
  • Compare the migrated settings.d/*.local.php with the new settings.d/*.php and check for individual (probably deprecated) configurations. Do the same with 09*-xx.php.
  • Copy to $wikifolder/settings.d/ what is needed.

Upgrade step 2

Assign all pages and files without a valid editor user to your newly created substitute user:

cd $wikifolder
 php extensions/BlueSpiceFoundation/maintenance/PrepareActorMigration.php --unknownUserId=<user-id-from-step I. > --unknownUserName=DeletedUser

Optional

  • Copy the following files (if applicable in your case):apache.conf, krb5.conf, Kerberos-key, ldapprovider.json
  • Add to VirtualHost in Apache.conf after rewrite rules:
AllowEncodedSlashes NoDecode

Last steps

Run the following maintenance scripts:

cd $wikifolder
php maintenance/update.php --quick
php extensions/BlueSpiceExtendedSearch/maintenance/initBackends.php --quick
php extensions/BlueSpiceExtendedSearch/maintenance/rebuildIndex.php --quick

screen 
    while  [ "$(php maintenance/showJobs.php)" != "0" ]; do php maintenance/runJobs.php --maxjobs 100; done

The last step will take a while.

Known possible issues after the update

Problems with VisualEditor

Add in includes/libs/http/MultiHttpClient.php after line 327:

curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );

Discussions