Child pages
  • Confluence wiki upgrade notes
Skip to end of metadata
Go to start of metadata

This page details the steps required to upgrade our puppet backed Confluence Wiki.

 

  • Edit Puppet Configuration as needed and commit to an upgrade branch ONLY for review- see commit hash below:

           'https://github.com/apache/infrastructure-puppet/commit/38b8e2aee9c89f92ddfd2aadd76b1fcd43005759'

  • Have someone check the Puppet Config changes but DO NOT merge yet!

IMPORTANT!!! - The merge must be done AFTER the old Confluence Wiki has been closed down as required Puppet code changes include changing the user permissions able to connect to the database

  • Upgrade Confluence License (if needed) on the 'current' Confluence
  • Upgrade Plugins on the 'current' Confluence (a few days before but check again at upgrade time)
  • Shut down Confluence
shut down confluence
sudo service confluence stop 
  • Turn off Puppet agent and service on old and new Confluence VM
turn off puppet service and agent
service puppet stop
puppet agent --disable
  • Final rsync of confluence-data directory to new Confluence VM (use private IP)
rsync confluence-data
cd /x1/cwiki
rsync -av confluence-data 10.41.0.7:
  • On the new Confluence VM move the newly rsynced confluence-data directory into place
Move confluence-data dir
 # mv confluence-data /x1/cwiki/
  • database dump of main 'cwiki' db (on mysql3-us-west) - kept as a backup in case of rollback
mysql dump
# mysqldump [--single-transaction] -uroot -p cwiki > /path/to/cwiki-$YYYYMMDDnn.sql 
  • edit database tables as needed (this time round test upgrade showed some needed converting to utf8_bin)
alter mysql tables
mysql> SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'cwiki';
+----------------------------+------------------------+
| DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME |
+----------------------------+------------------------+
| utf8                       | utf8_bin               |
+----------------------------+------------------------+
1 row in set (0.01 sec)

mysql> SELECT t.table_name, c.character_set_name, c.collation_name FROM information_schema.TABLES t, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY c WHERE c.collation_name = t.table_collation AND t.table_schema = 'cwiki' AND (c.character_set_name != 'utf8' OR c.collation_name != 'utf8_bin');
+---------------------------+--------------------+-----------------+
| table_name                | character_set_name | collation_name  |
+---------------------------+--------------------+-----------------+
| AO_6D345F_CUSTOM_LIBRARY  | utf8               | utf8_general_ci |
| AO_6D345F_CUSTOM_SHAPE    | utf8               | utf8_general_ci |
| AO_6D345F_USER_ENTITY     | utf8               | utf8_general_ci |
| AO_6D345F_USER_TO_LIBRARY | utf8               | utf8_general_ci |
+---------------------------+--------------------+-----------------+
4 rows in set (0.00 sec)

mysql> alter table AO_6D345F_CUSTOM_LIBRARY convert to character set utf8 collate utf8_bin;
Query OK, 0 rows affected (0.01 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table AO_6D345F_USER_ENTITY convert to character set utf8 collate utf8_bin;
Query OK, 0 rows affected (0.00 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table AO_6D345F_CUSTOM_SHAPE convert to character set utf8 collate utf8_bin;
Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> alter table AO_6D345F_USER_TO_LIBRARY convert to character set utf8 collate utf8_bin;
Query OK, 0 rows affected (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> SELECT t.table_name, c.character_set_name, c.collation_name FROM information_schema.TABLES t, information_schema.COLLATION_CHARACTER_SET_APPLICABILITY c WHERE c.collation_name = t.table_collation AND t.table_schema = 'cwiki' AND (c.character_set_name != 'utf8' OR c.collation_name != 'utf8_bin');
Empty set (0.00 sec)

mysql> 
  • turn on puppet agent and service on new Confluence VM and run 'puppet apply -tdv' , ensure good output.
  • Now it is OK to MERGE the changes from the upgrade branch into deployment and pull them in.

Now is the time to MERGE the upgrade branch. Try and have someone around to do tihs for you, if not its OK to merge yourself - a service is down remember (smile) - and of course the branch changes have already been checked.

  • double check configuration files are as they should be  (add a list of those here)(especially confluence.cfg.xml)
  • start Confluence on new Confluence VM
  • perform upgrade steps as needed by going to cwiki-vm.apache.org
  • check '/x1/cwiki/current/logs/catalina.out' for any errors
  • email infrastructure@ cc: ea@ with upgrade complete information
  • No labels