Silently deploy snapshots on Linux

The third task of the embeddability tutorial is to silently deploy the HCL OneDB™ snapshot.

Before you begin

Deploying the HCL OneDB instance and its dbspaces is a two-step process:

  1. Deploy dbspaces from the snapshot that was created using the deployment assistant.
  2. Deploy the server instance, optionally relocate the dbspaces, and start the instance by using the deployment utility.

You can automate this process by using a simple shell script. The ifx_silent_deploy.sh script is an example shell script which serves this purpose.

Prerequisites:

  • You must be logged in to the target computer as root user.
  • You must have a snapshot of the HCL OneDB instance and any associated dbspaces that was created with the deployment assistant.
  • The INFORMIXDIR environment variable must be set.
  • A folder named informixtemp must exist on the target computer.
  • All the dbspaces' chunks must be cooked files, and they must be located in a single directory.
  • The following files and utilities must be in the informixtemp folder on the target computer:
    • HCL OneDB instance snapshot (for example: demo_on.tgz)
    • dbspaces snapshot (for example: demo_on_db.tgz)
    • deployment utility (ifxdeploy)
    • deployment utility configuration file (ifxdeploy.conf)
    • the ifx_silent_deploy.sh shell script to complete silent deployment

Procedure

  1. Run the chmod +x ifx_silent_deploy.sh command to give execute permission to the root user to run the ifx_silent_deploy.sh script.
  2. Configure the following ifxdeploy.conf file parameters.
    1. Set the INFORMIXSERVER, ONCONFIG, and INFORMIXSQLHOSTS parameters. Alternatively, these parameters can be set as environment variables.
    2. Set the user informix password on the target computer in the INFORMIXPASSWORD parameter of the ifxdeploy.conf file.
    3. Optional: Set other parameters in the ifxdeploy.conf file as needed for your environment.
  3. Use the following information about the ifx_silent_deploy.sh script to silently deploy the HCL OneDB instance. After the syntax information, there are two examples given that indicate specific values if you are completing the embeddability tutorial.
    Syntax:
    ifx_silent_deploy.sh <relocate_option> <srvpkg> <dbspkg> <currloc> [<newloc>]
    • relocate_option: use relocate to relocate dbspaces and norelocate to not relocate dbspaces
    • srvpkg: name of the server package
    • dbspkg: name of the dbspaces package
    • currloc: current location of the dbspaces
    • newloc: new deployment location of the dbspaces when relocating. This argument is not required if you are not relocating dbspaces.
    Important: The following commands are only examples, such as if you are using this documentation with sample values to complete the embeddability tutorial. The names of the snapshot files and location of dbspaces might be different in your instance.
    • To silently deploy the HCL OneDB instance and relocate the dbspaces:
      ifx_silent_deploy.sh relocate demo_on.tgz demo_on_db.tgz
       /data/IBM/informix/demo/server  /opt/IBM/data/demo_on

      This command deploys the base server of the snapshot, relocates the dbspaces from /data/IBM/informix/demo/server to /opt/IBM/data/demo_on, and starts the deployed instance.

    • To silently deploy the HCL OneDB instance without relocating the dbspaces:
      ifx_silent_deploy.sh norelocate demo_on.tgz demo_on_db.tgz
       /data/IBM/informix/demo/server

      This command deploys the HCL OneDB base server instance, deploys associated dbspaces to /data/IBM/informix/demo/server, and starts the instance.

Results

See the informixtemp/ifxdeploy.log file for messages that are logged by the deployment utility. If the HCL OneDB instance does not start automatically, the probable cause is that during creation of the snapshot you removed a feature or package that is required by the base server instance to run.

The deployed instance does not require the ifxdeploy.conf file to function. You can delete the ifxdeploy.conf file from the informixtemp directory after deploying the HCL OneDB instance.