Deprecated: Function split() is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/Parser.php on line 2719 Deprecated: Function split() is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/Parser.php on line 2773 Deprecated: Function split() is deprecated in /storage/content/94/122194/onecmdb.org/public_html/wiki/includes/Parser.php on line 2773 V2.X Upgrade Instructions - OneCMDB

V2.X Upgrade Instructions

From OneCMDB

Contents

Upgrade from version 2.0.1 to 2.1.0

Follow the upgrade instruction below, from version 2.0.0 to 2.0.1.

Upgrade from Version 2.0.0 to 2.0.1 of OneCMDB

The following steps need to be done:

  1. Stop OneCMDB 2.0.0.
  2. Install OneCMDB 2.0.1 in a separate directory, but don't start it.
  3. Make changes according to the sections below.
    1. onecmdb.xml
    2. Backend database
    3. Repository
  4. Start OneCMDB 2.0.1

Onecmdb.xml

If you have made changes to the <installdir>/tomcat*/webapps/ROOT/WEB-INF/classes/onecmdb.xml file do as follows:

  • Copy the 2.0.1 onecmdb.xml file.
  • Replace the 2.0.1 onecmdb.xml file with the modfied onecmdb.xml in your 2.0.0 installation.

Backend database

Default HSQL Database Engine

If the default HSQLDB is used then copy all files under <installdir_2.0.0>/hsqldb*/data/* to <installdir_2.0.1>/hsqldb*/data/*. These files contains the database.

External Database engine

If another backend database is used, like MySQL, copy the <installdir_2.0.0>/tomcat*/webapps/ROOT/WEB-INF/classes/datasource.xml to <installdir_2.0.1>/tomcat*/webapps/ROOT/WEB-INF/classes/datasource.xml

Repository

If you have made changes to the repository:

  • Copy the repository directory in 2.0.1.
  • Replace the repository directory in 2.0.1 with the one in your 2.0.0 installation.

Edit the following following files:
repository/Configuration/content.cfg
Add the following lines to the file.

# If complex selection (instance) should use plain combo box or table (default). 
UseTableComboBox=true

# If complex selection (template) should use plain combo box or tree (default). 
UseTreeComboBox=true

# Desktop lock timeout in minutes
DesktopLockTimeout=-1

# Single or double click to show readonly tooltip in grid.
GridToolTipClick=single

To be able to add/edit User accounts modify repository/OneCMDB_Desktop/defaultView.xml Replace

<menuitem text="User Accounts"
			iconStyle="menuitem-icon-accounts" asList="true">
			<widget>
				<id>cmdb-model-table-view</id>
				<heading>User Accounts</heading>
				<params>
					<rootCI asSimpleList="true">CMDBAccount</rootCI>
					<rootCI asSimpleList="true">CMDBRole</rootCI>
				</params>
			</widget>
		</menuitem>

with

<menuitem text="User Accounts"
			iconStyle="menuitem-icon-accounts" asList="true">
			<widget>
				<id>cmdb-model-instance-overview</id>
				<heading>User Accounts</heading>
				<params>
					<rootCI asSimpleList="true">CMDBAccount</rootCI>
					<rootCI asSimpleList="true">CMDBRole</rootCI>
					<table>
						<visible>true</visible>
					</table>
					<tree>
						<visible>false</visible>
					</tree>
					<graph>
						<visible>false</visible>
					</graph>
				</params>
				
			</widget>
		</menuitem>

MDR

Copy any changes you have done in any MDR to 2.0.1.


Upgrade from Version 2.0.0Beta to 2.0.0 of OneCMDB

The following steps need to be done to upgrade to Version 2.0.0 from 2.0.0Beta.

  1. Stop OneCMDB 2.0.0Beta.
  2. Install OneCMDB 2.0.0 in a separate directory, but don't start it.
  3. Make changes according to the sections below.
    1. onecmdb.xml
    2. Backend database
    3. Repository
  4. Start OneCMDB 2.0.0

Onecmdb.xml

This section is only valid if changes has been made to the "installdir"/tomcat*/webapps/ROOT/WEB-INF/classes/onecmdb.xml else one can skip this.

The only change to this file is the addition of a update service that will check if new versions of OneCMDB is available.

  • Copy the 2.0.0 onecmdb.xml file.
  • Replace the 2.0.0 onecmdb.xml file with the modfied onecmdb.xml in the 2.0.0Beta installation.

Add the following sections to the onecmdb.xml file.

	<bean id="onecmdb" class="org.onecmdb.core.internal.OneCmdb" init-method="init" destroy-method="close">
		...
		<ref bean="ciService" />
		<ref bean="jobService" />
		<!-- ##### Add the foloowing line ####-->
		<ref bean="updateService" />
	</bean>
	
	<!-- ##### Add the following section #####-->
	<!-- Update service -->
	<bean id="updateService" class="org.onecmdb.core.internal.update.UpdateService">
		<property name="session">
			<ref bean="initSession"/>
		</property>
	</bean>
				



Backend database

Default HSQL Database Engine

If the default HSQLDB is used copy all files under <installdir_2.0.0Beta>/hsqldb*/data/* to <installdir_2.0.0>/hsqldb*/data/*. These files contains the database.

External Database engine

If another backend database is used like MySQL copy the "installdir_2.0.0Beta"/tomcat*/webapps/ROOT/WEB-INF/classes/datasource.xml to "installdir_2.0.0"/tomcat*/webapps/ROOT/WEB-INF/classes/datasource.xml


Repository

  • Rename the repository directory in 2.0.0
  • Copy the repository directory from 2.0.0Beta to 2.0.0

Edit the following following files:
repository/Configuration/content.cfg
Add the following lines to the file.

# Set to true if login is required to access reports for url's
RequireLoginForReport=false

# Set to true if users must belong to a role to be able to login
RequireRoleToLogin=false

repository/OneCMDB_Desktop/defaultView.xml
The System view widget have an extra param

 
	...
	<menuitem text="System View" iconStyle="menuitem-icon-instanceoverview" asList="true">
			<widget id="cmdb-model-instance-overview">
				<heading>System Editor</heading>
				<params>
					<rootCI asSimpleList="true">Root</rootCI>
					<!-- ###### Add the following line ##### -->
					<searchRefRootCi>Root</searchRefRootCi>

Migration of data from OneCMDB Version 1.4

OneCMDB Version 2 contains more functionality and more advanced features than previous versions. To make this possible some changes had to be done in default models and how things are organized in the system. This has affected backwards compatibility although we have tried to minimize the impact.

If you like to reuse CMDB data from Version 1.4 we recommend that you export it and import it in Version 2.0 according to the following instructions.

Export data from Version 1.4

Start Version 1.4 and export all your Instances starting from Template CI as follows:

  • Select Actions/ExportModel[defaultExport]
  • Select Edit
    • Change rootAlias to CI.
    • Edit the file name to suit you.
    • De-select the Templates checkbox (do not export templates).
    • Click on Apply.
  • Run Export.

You have now exported all your Instances (CIs). Now you must edit the file to conform to the new default Basic Model in Version 2.0.

Edit the data

Remove all prefixes from the Attribute names. For example A_Name shall be changed to Name, etc.

Hint: If your editor supports regular expressions (like in notepad++), use the following find expression:
  • \<._
  • \<.._
  • And replace by nothing.

Import the data to Version 2.0

Move or copy the file you exported from Version 1.4 to the following directory:

<installdir for version 2>/repository/MDR/Model/models/Basic_Model

Start OneCMDB Version 2.0.

If you had manually added any Attributes to any Template in your old CMDB, you must add them to the Basic Model in OneCMDB Version 2.0 using the Model Editor in the OneCMDB Desktop.

Now import your model file (with instances) from Version 1.4 using the Model Import function in OneCMDB Desktop:

  • Select the following Model Files:
Basic_Model/Basic_Model_Templates.xml
Basic_Model/Basic_Model_References.xml
your exported file
  • Click on Open and check that the comparison is OK. If not, click on Cancel and then Close. Go back to your exported file and correct it, then try to import it again
  • If the comparison was OK, press Commit and your instances are committed to the new CMDB

Open the Model Overview or CMDB View function and check that it looks alright.

Upgrading from an older version of OneCMDB

The easiest way is to un-install any old version of OneCMDB prior to installing this version. Do not try to install this version on top of an existing version as it will result in a mix between files from different versions causing the OneCMDB system to malfunction.

If you like to keep your old OneCMDB installation you can do so if you specify a new installation directory path when you install this new version.

This new OneCMDB version comes with a new Graphical User Interface, the OneCMDB Desktop, that can be used by users, administrators and designers. The Admin GUI and the ITIL Applications from previous versions of OneCMDB are still part of the software distribution but we intend to phase them out and we recommend that you do not use them. You can however still access them through:

http://localhost:8080/index.mvc

Please note that these GUI:s will not work properly with the default models in OneCMDB Version 2. We strongly encourage you to work with the new OneCMDB Desktop instead!

Community and support