InterSystems IRIS Data Platform 2019.2  /  InterSystems Cloud Manager Guide  /  Using ICM  /  Deploy and Manage Services

InterSystems: The power behind what matters   

Container Management Commands
The commands in this section are used to manage the containers you have deployed on your provisioned infrastructure.
icm ps
When deployment is complete, the icm ps command shows you the run state of containers running on the nodes, for example:
$ icm ps -container iris
Machine              IP Address      Container    Status   Health    Image
-------              ----------      ---------    ------   ------    -----
ACME-DS-TEST-0004    iris         Up       healthy   intersystems/iris:stable
ACME-DS-TEST-0003    iris         Up       healthy   intersystems/iris:stable
ACME-DS-TEST-0002   iris         Up       healthy   intersystems/iris:stable
ACME-DM-TEST-0001   iris         Up       healthy   intersystems/iris:stable
If the -container restriction is omitted, all containers running on the nodes are listed. This includes both other containers deployed by ICM (for example, Weave network containers, or any custom or third party containers you deployed using the icm run command) and any deployed by other means after completion of the ICM deployment..
Beyond node name, IP address, container name, and the image the container was created from, the icm ps command includes the following columns:
Additional deployment and management phase commands are listed in the following. For complete information about these commands, see ICM Reference.
icm stop
The icm stop command stops the specified containers (or iris by default) on the specified nodes, or on all nodes if no machine or role constraints provided). For example, to stop the InterSystems IRIS containers on the application servers in the distributed cache cluster configuration:
$ icm stop -container iris -role DS

Stopping container iris on ACME-DS-TEST-0002...
Stopping container iris on ACME-DS-TEST-0004...
Stopping container iris on ACME-DS-TEST-0003...
...completed stop of container iris on ACME-DS-TEST-0004
...completed stop of container iris on ACME-DS-TEST-0002
...completed stop of container iris on ACME-DS-TEST-0003
icm start
The icm start command starts the specified containers (or iris by default) on the specified nodes, or on all nodes if no machine or role constraints provided). For example, to restart one of the stopped application server InterSystems IRIS containers:
$ icm start -container iris -machine ACME-DS-TEST-0002...
Starting container iris on ACME-DS-TEST-0002...
...completed start of container iris on ACME-DS-TEST-0002
icm pull
The icm pull command downloads the specified image to the specified machines. For example, to add an image to the shard master data server in the sharded cluster:
$ icm pull -image intersystems/webgateway:stable -role DM
Pulling ACME-DM-TEST-0001 image intersystems/webgateway:stable...
...pulled ACME-DM-TEST-0001 image intersystems/webgateway:stable

Note that the -image option is not required if the image you want to pull is the one specified by the DockerImage field in the definitions file, for example:
"DockerImage": "intersystems/iris:stable",
Although the icm run automatically command pulls any images not already present on the host, an explicit icm pull might be desirable for testing, staging, or other purposes.
icm rm
The icm rm command deletes the specified container (or iris by default), but not the image from which it was started, from the specified nodes, or from all nodes if no machine or role is specified. Only a stopped container can be deleted.
icm upgrade
The icm upgrade command replaces the specified container on the specified machines. ICM orchestrates the following sequence of events to carry out an upgrade:
  1. Pull the new image
  2. Create the new container
  3. Stop the existing container
  4. Remove the existing container
  5. Start the new container
By staging the new image in steps 1 and 2, the downtime required between steps 3-5 is kept relatively short.
For example, to upgrade the InterSystems IRIS container on the shard master data server:
$ icm upgrade -image intersystems/iris:latest -machine ACME-AM-TEST-0003
Pulling ACME-AM-TEST-0003 image intersystems/iris:latest...
...pulled ACME-AM-TEST-0003 image intersystems/iris:latest
Stopping container ACME-AM-TEST-0003...
...completed stop of container ACME-AM-TEST-0003
Removing container ACME-AM-TEST-0003...
...removed container ACME-AM-TEST-0003
Running image intersystems/iris:latest in container ACME-AM-TEST-0003...
...running image intersystems/iris:latest in container ACME-AM-TEST-0003
The -image option is required for the icm upgrade command. When the upgrade is complete, the value of the DockerImage field in the instances.json file (see The Instances File in the chapter “Essential ICM Elements”) is updated with the image you specified.
If you are upgrading a container other than iris, you must use the -container option to specify the container name.

Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-09-19 06:44:29