Skip to content

Commit

Permalink
Updated readme for the updater
Browse files Browse the repository at this point in the history
  • Loading branch information
sHuewe committed Apr 29, 2019
1 parent ce23d27 commit 6301d43
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.opencms.setup.CmsUpdateBean;
import org.opencms.setup.CmsUpdateUI;
import org.opencms.setup.db.CmsUpdateDBManager;
import org.opencms.setup.ui.CmsSetupErrorDialog;
import org.opencms.ui.CmsVaadinUtils;
import org.opencms.ui.FontOpenCms;

Expand Down Expand Up @@ -77,13 +78,20 @@ public boolean init(CmsUpdateUI ui) {

bean.setDetectedVersion(m_dbBean.getDetectedVersion());

if (m_dbBean.needUpdate()) {
m_icon.setContentMode(ContentMode.HTML);
m_icon.setValue(FontOpenCms.WARNING.getHtml());
m_contentLayout.addComponent(getDisplayContent(m_dbBean));
return true;
} else {
ui.displayDialog(new CmsUpdateStep04SettingsDialog());
try {
if (m_dbBean.needUpdate()) {
m_icon.setContentMode(ContentMode.HTML);
m_icon.setValue(FontOpenCms.WARNING.getHtml());
m_contentLayout.addComponent(getDisplayContent(m_dbBean));
return true;
} else {
ui.displayDialog(new CmsUpdateStep04SettingsDialog());
return false;
}
} catch (NullPointerException en) {
CmsSetupErrorDialog.showErrorDialog(
"Database error",
"Your database version is not compatible with OpenCms 11.");
return false;
}
}
Expand Down
67 changes: 33 additions & 34 deletions webapp/WEB-INF/updatedata/readme.txt
Original file line number Diff line number Diff line change
@@ -1,67 +1,66 @@

Instructions for updating OpenCms 8.x, 9.x and 10.0.x to @OPENCMS_VERSION@


WARNING:

UPDATE AT YOUR OWN RISK

The OpenCms update wizard and these instructions are distributed in the hope
The OpenCms update wizard and these instructions are distributed in the hope
that they will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Alkacon Software does not guarantee that there will be no damage to your
Alkacon Software does not guarantee that there will be no damage to your
existing OpenCms installation when using this upgrade wizard.

IMPORTANT: Before using this upgrade wizard, make sure you have a full backup
IMPORTANT: Before using this upgrade wizard, make sure you have a full backup
of your OpenCms installation and database.

IMPORTANT: Alkacon OCEE versions less than 5 will not work with OpenCms 10.
IMPORTANT: Alkacon OCEE versions less than 5 will not work with OpenCms 10.

IMPORTANT: The updater is only compatible with the database engines MySQL,
IMPORTANT: The updater is only compatible with the database engines MySQL,
Oracle and PostgreSQL.

IMPORTANT: This version of OpenCms requires at least Java 8.

IMPORTANT: The upgrade wizard will replace all VFS resources of the updated modules.
If you made modifications to these modules, their changes will be lost.
In this case export the changed module resources before starting the update.
Hint: You can use the "Resource changed since" feature in the Database
Administration to export all the changes you have done after installing
Hint: You can use the "Resource changed since" feature in the Database
Administration to export all the changes you have done after installing
OpenCms.

Follow the following steps to update from OpenCms 10.x to @OPENCMS_VERSION@:


1. Shutdown your OpenCms servlet container

The OpenCms upgrade requires that you shut down OpenCms first. You can use the
Broadcast message tool in the 'Administration' view to inform users before the
The OpenCms upgrade requires that you shut down OpenCms first. You can use the
Broadcast message tool in the 'Administration' view to inform users before the
server is shut down.


2. Extract the OpenCms upgrade file 'opencms-upgrade-to-@[email protected]' to
2. Extract the OpenCms upgrade file 'opencms-upgrade-to-@[email protected]' to
your web application directory

If you extracted the file to an external directory, copy the folders 'update'
and 'WEB-INF' to the OpenCms webapp directory. Be sure that the files 'opencms.tld'
and 'lib/opencms.jar' are replaced with the new version from the archive before you
continue. Be also sure that after unpacking the tomcat user has write permissions on
If you extracted the file to an external directory, copy the folder 'WEB-INF' to the OpenCms webapp directory. Be sure that the files 'opencms.tld'
and 'lib/opencms.jar' are replaced with the new version from the archive before you
continue. Be also sure that after unpacking the tomcat user has write permissions on
the whole web application directory.
Be also aware that the 'web.xml' might be overwritten.
The OpenCmsUrlServletFilter available since version 10.5.0 will be disabled by default.
The OpenCmsUrlServletFilter available since version 10.5.0 will be disabled by default.
Edit the 'web.xml' to enable it.


3. Enable the upgrade wizard

To do so, set the property
To do so, set the property
wizard.enabled=true
in the config file WEB-INF/config/opencms.properties.

4. Restart your OpenCms servlet container

OpenCms will not start because the wizard in enabled.
OpenCms will not start because the wizard in enabled.


5. Execute the OpenCms update wizard
Expand All @@ -71,24 +70,24 @@ Open the URL $SERVER_NAME/$CONTEXT_NAME/update/ in your Browser, e.g.
http://yourserver:8080/opencms/update/

The update wizard should appear, which looks very similar to the OpenCms setup
wizard. Make sure to read the instructions and the disclaimer on the start
wizard. Make sure to read the instructions and the disclaimer on the start
page. Then execute the wizard which guides you through the update process.

You will need the Admin password to continue with the upgrade.

When asked to select the modules to update you should definitely select all
org.opencms.ade.*, org.opencms.editors.*, org.opencms.gwt and org.opencms.workplace.*
org.opencms.ade.*, org.opencms.editors.*, org.opencms.gwt and org.opencms.workplace.*
modules.



After you confirmed the module selection, you should see the status report of the
module import. This report is also written to WEB-INF/logs/update.log. Check this

After you confirmed the module selection, you should see the status report of the
module import. This report is also written to WEB-INF/logs/update.log. Check this
file for errors and exceptions after installation. There should be no exceptions
caused by the upgrade if everything went as expected. Some exceptions may occur
caused by the upgrade if everything went as expected. Some exceptions may occur
in case you have an advanced OpenCms installation with many customized classes.

The update wizard will also do a full rebuild of all your search indices, and
The update wizard will also do a full rebuild of all your search indices, and
purge the JSP repository.

The wizard will finish similar to the setup wizard. After the final confirmation,
Expand All @@ -100,16 +99,16 @@ the wizard will be locked again (in the opencms.properties file).

During the update Solr will be disabled in the WEB-INF/config/opencms-search.xml.
To update Solr you must update the 'schema.xml and' the 'solrconfig.xml' manually.
The new default configuration files are located in the solr-update/ directory in
The new default configuration files are located in the solr-update/ directory in
the WEB-INF folder of your application. If you are using the default configuration
from the distribution, it is sufficient to replace the folder WEB-INF/solr/ with
the solr-update/ folder. Else if you have customized the Solr configuration you might
want to merge the 'schema.xml' and the 'solrconfig.xml' first. Note that these two files
are now located under solr/configsets/default/conf/ - up to OpenCms 10 it was solr/conf/.
Even if you only keep your old config files, move them to solr/configsets/default/conf/.

If you are updating from an earlier version than 8.5.0, always copy the whole solr-update/
folder to the solr/ folder instead.
If you are updating from an earlier version than 8.5.0, always copy the whole solr-update/
folder to the solr/ folder instead.

When you are done, enable Solr in the opencms-search.xml again (and restart the servlet
container).
Expand All @@ -119,7 +118,7 @@ container).
7. Shutdown and restart your OpenCms servlet container

Note: to be sure all jsp files work correctly please delete the servlet containers
work directory (ie. ${TOMCAT_HOME}/work/Catalina/localhost/opencms/) and the
work directory (ie. ${TOMCAT_HOME}/work/Catalina/localhost/opencms/) and the
OpenCms' jsp repository (ie. ${OPENCMS_HOME}/WEB-INF/jsp/)

You should now be able to log into the OpenCms workplace as before.
Expand All @@ -130,18 +129,18 @@ You should now be able to log into the OpenCms workplace as before.

As the search libraries and configuration may have changed, it is necessary to rebuild all search indexes.
Log into OpenCms and navigate to Launchpad > Search Management and rebuild all indexes.



9. Convert model groups [only relevant when updating from 10.0.x]

The way model groups are stored has changed between OpenCms 10.0.x and 10.5.x. So if you are using model
The way model groups are stored has changed between OpenCms 10.0.x and 10.5.x. So if you are using model
groups and are updating your system from version 10.0.x, you will need to convert them to the new format.

This requires the following steps:

- Open the explorer, switch to the root site / "system folder" and navigate to the folder /system/modules/org.opencms.base/pages.
- Execute the JSP "updateModelGroups.jsp" in this folder
- In the form displayed by the JSP, fill out the "base path" and "base container name" fields (they are
described in the form itself) and hit the submit button.
- In the form displayed by the JSP, fill out the "base path" and "base container name" fields (they are
described in the form itself) and hit the submit button.

0 comments on commit 6301d43

Please sign in to comment.