You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "Setup:Installation Guide/Docker/Update"
[quality revision] | [quality revision] |
(Tag: Visual edit) |
(Tag: 2017 source edit) |
Introduction[edit | edit source]
- Edition: BlueSpice free, distributed on Docker Hub as a Docker image.
- The current 3.1.2 release has no automatic upgrade feature. The automatic upgrade feature will be included at BlueSpice 3.1.3.
- This document covers the manual upgrade process and how to fix some known issues.
Spinning up a new container with old data[edit | edit source]
We assume you have a BlueSpice installation from Docker Hub. Also, this installation should have been done with using an external data volume.
Example: docker run -d -p 80:80 -v {/my/data/folder}:/data bluespice/bluespice-free
sudo cp -Rf /my/data/folder /my/data/current
docker container stop $your_container_id_or_name
docker container rm $your_container_id_or_name
docker pull bluespice/bluespice-free:latest
mkdir /my/data/new
docker run -d -p 80:80 -v {/my/data/new}:/data bluespice/bluespice-free
docker container stop $new_container_name_or_id
sudo rm -Rf /my/data/new/*
sudo cp -Rf /my/data/current/* /my/data/new/
docker container start $new_container_name_or_id
Now, your new container with your old data is up.
But you still have to run some maintenance scripts as well as some fixes: sudo docker exec $new_container_name_or_id chown -Rf mysql:mysql /data/mysql
sudo docker exec $new_container_name_or_id /etc/init.d/mysql restart
sudo docker exec $new_container_name_or_id /opt/docker/setwikiperm.sh /data/www/bluespice/w
sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/update.php --quick
sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/rebuildall.php --quick
sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/initBackends.php --quick
sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/rebuildIndex.php
sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/runJobs.php
Fixing the broken search[edit | edit source]
The following commands fix the BlueSpiceExtendedSearch indexes:
sudo docker exec $container_name_or_id /opt/docker/setwikiperm.sh /data/www/bluespice/w
sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/update.php --quick
sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/rebuildall.php --quick
sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/initBackends.php --quick
sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/rebuildIndex.php
sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/runJobs.php
{{DISPLAYTITLE:Updating docker images}} ==Introduction== ** Edition: BlueSpice free, distributed on Docker Hub as a Docker image. * The current 3.1.2 release has no automatic upgrade feature. The automatic upgrade feature will be included at BlueSpice 3.1.3. * This document covers the manual upgrade process and how to fix some known issues. ==Spinning up a new container with old data== We assume you have a BlueSpice installation from Docker Hub. Also, this installation should have been done withusing an external data volume. Example: <syntaxhighlight lang="bash"> docker run -d -p <span class="m">80</span>:80 -v <span class="o">{</span>{/my/data/folder<span class="o">}</span>}:/data bluespice/bluespice-free </syntaxhighlight> 1.Back-up your current data folder: <syntaxhighlight lang="bash"> sudo cp -Rf /my/data/folder /my/data/current </syntaxhighlight> 2. Stop your current BlueSpice-free container: <syntaxhighlight lang="bash"> docker container stop <span class="nv">$your_container_id_or_name</span> </syntaxhighlight> 3. Remove the container (optional): <syntaxhighlight lang="bash"> docker container rm <span class="nv">$your_container_id_or_name</span> </syntaxhighlight> 4. Fetch the new container image: <syntaxhighlight lang="bash"> docker pull bluespice/bluespice-free:latest </syntaxhighlight> 5. Create a new data folder for the new installation: <syntaxhighlight lang="bash"> mkdir /my/data/new </syntaxhighlight> 6. Create a fresh container with the new image: <syntaxhighlight lang="bash"> docker run -d -p <span class="m">80</span>:80 -v <span class="o">{</span>{/my/data/new<span class="o">}</span>}:/data bluespice/bluespice-free </syntaxhighlight> 7. When the container boots up, you have an empty wiki. Stop the newly created docker and move back your old backup to the new instance: <syntaxhighlight lang="bash"> docker container stop <span class="nv">$new_container_name_or_id</span> </syntaxhighlight> 8. Remove the content of the new container: <syntaxhighlight lang="bash"> sudo rm -Rf /my/data/new/* </syntaxhighlight> 9. Move the backup into /my/data/new: <syntaxhighlight lang="bash"> sudo cp -Rf /my/data/current/* /my/data/new/ </syntaxhighlight> 10. Start the newly created container: <syntaxhighlight lang="bash"> docker container start <span class="nv">$new_container_name_or_id</span> </syntaxhighlight> Now, your new container with your old data is up. But you still have to run some maintenance scripts as well as some fixes: <syntaxhighlight lang="bash"> sudo docker <span class="nb">exec</span> <span class="nv"> $new_container_name_or_id</span> chown -Rf mysql:mysql /data/mysql sudo docker <span class="nb">exec</span> <span class="nv"> $new_container_name_or_id</span> /etc/init.d/mysql restart sudo docker <span class="nb">exec</span> <span class="nv"> $new_container_name_or_id</span> /opt/docker/setwikiperm.sh /data/www/bluespice/w sudo docker <span class="nb">exec</span> <span class="nv"> $new_container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/maintenance/update.php --quick sudo docker <span class="nb">exec</span> <span class="nv"> $new_container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/maintenance/rebuildall.php --quick sudo docker <span class="nb">exec</span> <span class="nv"> $new_container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/initBackends.php --quick sudo docker <span class="nb">exec</span> <span class="nv"> $new_container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/rebuildIndex.php sudo docker <span class="nb">exec</span> <span class="nv"> $new_container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/maintenance/runJobs.php </syntaxhighlight> ==Fixing the broken search== The following commands fix the BlueSpiceExtendedSearch indexes: <syntaxhighlight lang="bash"> sudo docker <span class="nb">exec</span> <span class="nv"> $container_name_or_id</span> /opt/docker/setwikiperm.sh /data/www/bluespice/w sudo docker <span class="nb">exec</span> <span class="nv"> $container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/maintenance/update.php --quick sudo docker <span class="nb">exec</span> <span class="nv"> $container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/maintenance/rebuildall.php --quick sudo docker <span class="nb">exec</span> <span class="nv"> $container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/initBackends.php --quick sudo docker <span class="nb">exec</span> <span class="nv"> $container_name_or_id</span> /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/rebuildIndex.php susudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/runJobs.php </syntaxhighlight>
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Updating docker images}} | {{DISPLAYTITLE:Updating docker images}} | ||
==Introduction== | ==Introduction== | ||
+ | * Edition: BlueSpice free, distributed on Docker Hub as a Docker image. | ||
+ | * The current 3.1.2 release has no automatic upgrade feature. The automatic upgrade feature will be included at BlueSpice 3.1.3. | ||
+ | * This document covers the manual upgrade process and how to fix some known issues. | ||
− | + | ==Spinning up new container with old data== | |
− | + | We assume you have a BlueSpice installation from Docker Hub. Also, this installation should have been done using an external data volume. | |
− | |||
− | = | + | Example:<syntaxhighlight lang="bash"> |
− | + | docker run -d -p 80:80 -v {/my/data/folder}:/data bluespice/bluespice-free | |
+ | </syntaxhighlight> | ||
− | + | 1.Back-up your current data folder:<syntaxhighlight lang="bash"> | |
− | + | sudo cp -Rf /my/data/folder /my/data/current | |
− | 1.Back-up your current data folder: | + | </syntaxhighlight> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | 2. Stop your current BlueSpice-free container:<syntaxhighlight lang="bash"> | |
− | + | docker container stop $your_container_id_or_name | |
− | + | </syntaxhighlight> | |
− | + | ||
− | + | 3. Remove the container (optional):<syntaxhighlight lang="bash"> | |
− | + | docker container rm $your_container_id_or_name | |
− | + | </syntaxhighlight> | |
− | + | ||
− | + | 4. Fetch the new container image:<syntaxhighlight lang="bash"> | |
+ | docker pull bluespice/bluespice-free:latest | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 5. Create a new data folder for the new installation:<syntaxhighlight lang="bash"> | ||
+ | mkdir /my/data/new | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 6. Create a fresh container with the new image:<syntaxhighlight lang="bash"> | ||
+ | docker run -d -p 80:80 -v {/my/data/new}:/data bluespice/bluespice-free | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 7. When the container boots up, you have an empty wiki. Stop the newly created docker and move back your old backup to the new instance:<syntaxhighlight lang="bash"> | ||
+ | docker container stop $new_container_name_or_id | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 8. Remove the content of the new container:<syntaxhighlight lang="bash"> | ||
+ | sudo rm -Rf /my/data/new/* | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 9. Move the backup into /my/data/new:<syntaxhighlight lang="bash"> | ||
+ | sudo cp -Rf /my/data/current/* /my/data/new/ | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | 10. Start the newly created container:<syntaxhighlight lang="bash"> | ||
+ | docker container start $new_container_name_or_id | ||
+ | </syntaxhighlight> | ||
+ | Now, your new container with your old data is up. | ||
+ | |||
+ | But you still have to run some maintenance scripts as well as some fixes:<syntaxhighlight lang="bash"> | ||
+ | sudo docker exec $new_container_name_or_id chown -Rf mysql:mysql /data/mysql | ||
+ | sudo docker exec $new_container_name_or_id /etc/init.d/mysql restart | ||
+ | sudo docker exec $new_container_name_or_id /opt/docker/setwikiperm.sh /data/www/bluespice/w | ||
+ | sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/update.php --quick | ||
+ | sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/rebuildall.php --quick | ||
+ | sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/initBackends.php --quick | ||
+ | sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/rebuildIndex.php | ||
+ | sudo docker exec $new_container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/runJobs.php | ||
+ | </syntaxhighlight> | ||
==Fixing the broken search== | ==Fixing the broken search== | ||
The following commands fix the BlueSpiceExtendedSearch indexes: | The following commands fix the BlueSpiceExtendedSearch indexes: | ||
− | + | ||
− | + | <syntaxhighlight lang="bash"> | |
− | + | sudo docker exec $container_name_or_id /opt/docker/setwikiperm.sh /data/www/bluespice/w | |
− | + | sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/update.php --quick | |
− | + | sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/rebuildall.php --quick | |
− | + | sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/initBackends.php --quick | |
+ | sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/extensions/BlueSpiceExtendedSearch/maintenance/rebuildIndex.php | ||
+ | sudo docker exec $container_name_or_id /usr/bin/php /data/www/bluespice/w/maintenance/runJobs.php | ||
+ | </syntaxhighlight> |