Introducing the OneDB deployment utility
You can use the deployment utility to deploy snapshots of pre-configured instances and related dbspaces onto target computers.
You must install HCL® OneDB® before creating a snapshot. You can choose to include a fully configured server instance in the snapshot or create the instance at the time of deployment. The advantage of using the deployment utility is that you do not need to install and configure OneDB on each target computer. You simply deploy a previously installed and fully configured instance. This gives you the ability to quickly recreate a fully configured instance on one or more target computers.
Using the deployment utility
The ifxdeploy utility is included with the OneDB server at $INFORMIXDIR/bin on Linux™ and UNIX™ and at %INFORMIXDIR%\bin on Windows™. To use the deployment utility, you must run the ifxdeploy utility either from a command line or as part of an application integration script. You can run the utility in silent mode without any user interaction.
The ifxdeploy utility
The ifxdeploy utility is located in $INFORMIXDIR/bin on Linux and UNIX and at %INFORMIXDIR%\bin on Windows.
To use the deployment utility, you must run the ifxdeploy utility either from a command line or as part of an application integration script. You can run the utility in silent mode without any user interaction.
The deployment utility configuration file
You can pass parameters to the deployment utility using command-line options, or by using a
configuration file that you pass as a parameter with the -config
command-line
option. You can also use both command-line options and a configuration file. Some examples on
using ifxdeploy with command-line options and a configuration file on Linux and Windows
are given below:
- Example 1: Invoking the deployment utility with command-line options and a configuration file on Linux and UNIX
-
ifxdeploy -y -verbose -config ifxdeploy.conf -file /opt/IBM/Informix/demo_on.tgz start 180
- Example 2: Invoking the deployment utility with command-line options and a configuration file on Windows
-
ifxdeploy.exe -y -verbose -config ifxdeploy.conf -file C:\informixtemp\demo_on.zip start 180
The following points summarize key information about the deployment utility configuration file:
- A sample deployment utility configuration file named ifxdeploy.conf is included on the OneDB server at $INFORMIXDIR/etc on Linux and UNIX and at %INFORMIXDIR%\etc on Windows.
- You can also specify instance-specific information for the instance that is getting deployed
in the configuration file:
- INFORMIXSERVER sets the primary server name.
- SERVERNUM sets the primary server port number.
- INFORMIXSQLHOSTS sets the value for the INFORMIXSQLHOSTS environment variable.
- ONCONFIG sets the onconfig file. If not specified and the ONCONFIG environment variable is not set, a new onconfig file is created based on the onconfig.std file template.
- Use BEGIN ALIAS and END ALIAS statements to define additional server names and listeners. Each alias results in a new SQLHOSTS entry and a new value for the DBSERVERALIASES configuration parameter in the onconfig file.
- Use the BEGIN ONCONFIG and END ONCONFIG statements to add to or override configuration parameters values specified in the onconfig file.
- Example 3: Sample deployment utility configuration file entries for Windows
-
INFORMIXSERVER demo_on PROTOCOL1 onsoctcp PORT1 9088 SERVERNUM 1 BEGIN ALIAS SERVERNAME alias1 PROTOCOL drsoctcp PORT 9091 END ALIAS INFORMIXDIR "C:\Program Files\IBM\Informix" RELOCATE C:\IFMXDATA\demo_on=C:\IFMXDATANEW\demo_on ROOTPATH C:\IFMXDATANEW\demo_on\rootdbs_dat.000 BEGIN ONCONFIG BUFFERPOOL default,buffers=1000,lrus=8, lru_min_dirty=50.000000,lru_max_dirty=60.500000 MAX_PDQPRIORITY 80 END ONCONFIG
Dynamic chunk relocation
The deployment utility provides the option to relocate the dbspaces to a new location of your choice. This option is particularly useful when the drives or the directory structures of the source template computer and the target computer are different. An example of this would be if the data spaces are on/data1 on the template computer and you want to relocate them to /data2 on the target computer.
You can set the new location of the dbspaces either by using the -relocate
command-line parameter with ifxdeploy, or by using the configuration
parameter RELOCATE in the ifxdeploy.conf file. You can specify a single new
parent directory or map multiple separate chunk paths to different locations.
- Example 4: Command-line argument to relocate all chunk paths to a single directory
-
/data2/demo_on
-relocate /data2/demo_on
You can set the new location of the dbspaces either by using the -rootpath
command-line parameter with ifxdeploy, or by using the configuration
parameter ROOTPATH in the ifxdeploy.conf file. If you relocate dbspaces,
you must also relocate the root dbspace.
- Example 5: Command-line argument to specify a new root path
-
-rootpath /data2/demo_on/online_root