docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  InterSystems Cloud Manager Guide  /  Using ICM  /  Provision the Infrastructure

InterSystems: The power behind what matters   
Search:  


The icm provision Command
The icm provision command allocates and configures compute nodes, using the field values provided in the definitions.json and defaults.json files, as well as default values for unspecified parameters where applicable. By default, the input files in the current working directory are used; you can specify another location using the -definitions and -defaults options. In the case of the separate definitions files for the two target configurations (see Define the Deployment), the appropriate file can be swapped in as definitions.json in the current working directory before the icm provision command is executed.
Note:
If you use the -definitions or -defaults options to specify a nondefault location for one or both of these configuration files, you must also do so for all subsequent ICM commands you run for this deployment. For example, if you execute icm provision -defaults ./config_files, you must add -defaults ./config_files to all subsequent commands you issue for that deployment.
While the provisioning operation is ongoing, ICM provides status messages regarding the plan phase (the Terraform phase that validates the desired infrastructure and generates state files) and the apply phase (the Terraform phase that accesses the cloud provider, carries out allocation of the machines, and updates state files). Because ICM runs Terraform in multiple threads, the order in which machines are provisioned and in which additional actions applied to them is not deterministic. This is illustrated in the sample output that follows.
At completion, ICM also provides a summary of the compute nodes and associated components that have been provisioned, and outputs a command line which can be used to delete the infrastructure at a later date.
Important:
Unprovisioning public cloud compute nodes in a timely manner avoids unnecessary expense. Because the -stateDir option to the icm unprovision command is mandatory, you may find it convenient to copy the icm unprovision command provided in the output, so you can easily replicate it when unprovisioning. This output also appears in the icm.log file.
The following example if excerpted from the output of provisioning of the distributed cache cluster described in Define the Deployment.
$ icm provision -definitions definitions_DCC.json
Starting init of ACME-TEST...
...completed init of ACME-TEST
Starting plan of ACME-DM-TEST...
...
Starting refresh of ACME-TEST...

...
Starting apply of ACME-DM-TEST...
...
Copying files to ACME-DM-TEST-0002...
...
Configuring ACME-AM-TEST-0003...
...
Mounting volumes on ACME-AM-TEST-0004...
...
Installing Docker on ACME-AM-TEST-0003...
...
Installing Weave Net on ACME-DM-TEST-0001...
...
Collecting Weave info for ACME-AR-TEST-0006...
...
...collected Weave info for ACME-AM-TEST-0005
...installed Weave Net on ACME-AM-TEST-0004

Machine            IP Address       DNS Name                      
-------             ---------        -------                      
ACME-DM-TEST-0001   00.53.183.209    ec2-00-53-183-209.us-west-1.compute.amazonaws.com
ACME-DM-TEST-0002   00.53.183.185    ec2-00-53-183-185.us-west-1.compute.amazonaws.com
ACME-AM-TEST-0003   00.56.59.42      ec2-00-56-59-42.us-west-1.compute.amazonaws.com
ACME-AM-TEST-0005   00.67.1.11       ec2-00-67-1-11.us-west-1.compute.amazonaws.com
ACME-AM-TEST-0003   00.193.117.217   ec2-00-193-117-217.us-west-1.compute.amazonaws.com
ACME-LB-TEST-0002   (virtual AM)     ACME-AM-TEST-1546467861.amazonaws.com
ACME-AR-TEST-0006   00.53.201.194    ec2-00-53-201-194.us-west-1.compute.amazonaws.com
To destroy: icm unprovision -stateDir /Samples/AWS/ICM-8620265620732464265 [-cleanUp] [-force]

During the provisioning operation, ICM creates or updates state and log files in the state directory (created by ICM, with a name beginning with ICM-) and when finished creates the instances.json file, which serves as input to subsequent reprovisioning, deployment and management commands. (See The Instances File in the chapter “Essential ICM Elements” for more information about this file.) By default, the instances file is created in the current working directory; you can change this using the -instances option, but note that if you do you must supply the alternate location by using the -instances option with all subsequent commands.
Interactions with cloud providers sometimes involve high latency leading to timeouts and internal errors on the provider side, and errors in the configuration files can also cause provisioning to fail. Because the icm provision command is fully reentrant, it can be issued multiple times until ICM completes all the required tasks for all the specified nodes without error. For more information, see the next section, Reprovisioning the Infrastructure.


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