Script package environment variables

When defining a script package, you can refer to system environment variables and custom environment variables defined in your script package.

Purpose of environment variables

You can use the environment variables provided by IBM® Cloud Pak System Software for Power®, in addition to customized environment variables that you define, in your script packages. The set of environment variables that are provided is determined by what environment variables exist on the virtual machine.

Environment variables that are available with the system are provided through the virtual image and after deployment are located in the script_parms.json file, which is stored in Storehouse.

Script package environment variables that you define might or might not also be located in the script_parms.json file, depending on your configuration settings. As a best practice, if you must run your scripts manually, you should avoid depending on script package variables being available in the script_parms.json file, and design your script package to save properties in your own file as needed. See the related links for configuring script packages using the extendedattributes.json object for more information about controlling whether or not script package parameters are stored in this file.

You can include these environment variables in your script packages by using any of the following methods:
  • In the cbscript.json file of your compressed script file, you can define customized environment variables that are populated in the Environment field of the Script Packages window when the compressed file is uploaded into Cloud Pak System Software for Power.
  • In the console, specify the environment variables in the Environment field of the Script Packages window.
  • In the command-line interface, specify environment variables in the environment attribute of the Script object.

Life cycle variables

A set of life cycle variables is included with most virtual images. These environment variables specify many of the scripts and locations required to manage the life cycle of the classic virtual system instances:

Install service
SERVICE_COMMAND_LOCATION="/var/adm/virtualimages/bin"
Install service
SERVICE_COMMAND="installService.sh"
Install service
SERVICE_PACKAGE_LOCATION="/tmp/update"
Install service
OS_SERVICE_PACKAGE_LOCATION="/tmp/update/os"
Install service
APP_SERVICE_PACKAGE_LOCATION="/tmp/update/app"
Reset virtual image
RESET_VIRTUAL_IMAGE_COMMAND_LOCATION="/var/adm/ibmvmcoc-postinstall"
Reset virtual image
RESET_VIRTUAL_IMAGE_COMMAND="resetvm.sh"
Start virtual image services
START_SERVICES_COMMAND_LOCATION="/var/adm/virtualimages/bin"
Start virtual image services
START_SERVICES_COMMAND="startVirtualImageService.sh"
Stop virtual image services
STOP_SERVICES_COMMAND_LOCATION="/var/adm/virtualimages/bin"
Stop virtual image services
STOP_SERVICES_COMMAND="stopVirtualImageService.sh"

WebSphere Application Server variables

The following variables can be used for IBM WebSphere® Application Server Hypervisor Edition virtual images:

Number of Profiles to create (AdminAgent)
PROFILE_NUMBER=
Autostart WebSphere Servers
AUTOSTART=true
Federate Node (true | false)
DMGR_FEDERATE=false
Register with Job Manager (true | false)
JMGR_REGISTER=false
WebSphere Application Server operation commands to use for start and stop services commands
OPERATION_COMMAND_LOCATION="/opt/IBM/AE/AS"
WebSphere Application Server operation commands to use for start and stop services commands
OPERATION_COMMAND="${WAS_PROFILE_ROOT}/bin/ws_ant.sh -f /opt/IBM/AE/AS/wasHVControl.ant"
WebSphere Administrative Console URL
ADMIN_CONSOLE_URL=
WebSphere Cell Name
CELL_NAME=RainmakerCell0
WebSphere Default Profile location
WAS_PROFILE_ROOT=/opt/IBM/WebSphere/Profiles/DefaultAppSrv01
WebSphere Default Install Location
WAS_INSTALL_ROOT=/opt/IBM/WebSphere/AppServer
WebSphere Profile Root
PROFILE_ROOT=/opt/IBM/WebSphere/Profiles
WebSphere Hostname
HOSTNAME=vm-009-097.rainmaker.raleigh.ibm.com
WebSphere Node Name
NODE_NAME=RainmakerNode0
WebSphere Profile Name
PROFILE_NAME=DefaultAppSrv01
WebSphere Profile Type
PROFILE_TYPE=default
The following additional variables are dynamic. Cloud Pak System Software for Power adds them each time a script requiring them is run. After the script has completed, these environment variables are removed.
WebSphere Administrative Password
WAS_PASSWORD=password
WebSphere Administrative Username
WAS_USERNAME=virtuser

Back to the top of the page.