Deploy a package

Deploys a package. The package can belong to either a partial or complete design.

Command Alias Syntax
package deploy pkg deploy package deploy -pid <packageID> –name <name> [–envid <environmentID>] [-did <infrastructureDesign>] [-in <input-file>]

Options

Option Description
-pid, --<packageID>

Application package ID. Use the List application packages command to obtain the package ID.

-name, --<name> Name of the deployment.
–envid <environmentID>

Environment ID. Use the List eligible designs command to obtain the environment ID.

-did <infrastructureDesign> Application design ID obtained from List eligible designs command for partial designs. If not provided, the package deploy command takes the design ID associated with the package. The design ID can be obtain from the List application designs command.
-in, --<input-file> Input file containing the modifiable properties in JSON format.
-s, --server The URL of the HCM ARA instance. For example, https://localhost:8444/csa.
-u, --user The HCM ARA username.
-p, --password The password for the HCM ARA user.
-c, --config A file that contains default general option values in the format “<name>=<value>“, where <name> is “server”, “user”, or “password”. If not specified, the cliforcodar.properties file in the home directory of the current user is used if it exists.

Usage guidelines

You do not need to specify the -did <infrastructureDesign> parameter for a complete design.

For partial designs,use the -did <infrastructureDesign> parameter to specify an service design that has the required infrastructure capabilities.

If more than one microservices meets the requirements of the partial design requirements then you must also include the designToRequirementsMap parameter in the JSON input file.

This command must be pre-defined in a configuration file or defined in the command line. The --server(-s) option defaults to localhost value(s) if it is not pre-defined in a configuration file.

Example

C:\CODAR\clis> codarexec.bat pkg deploy -pid e65e26cd-f14c-4029-937b-d6e56507be11 –name deploy_name –did  954d5bb5-ebd2-457b-a538-58f3a7d0a37f –in deploy.txt –envid 8a8187834c6ff639014c79cb097d03a3
Deployment deploy_name  for the package "e65e26cd-f14c-4029-937b-d6e56507be11" is initiated with service instance id 8a8187834c6ff639014cd61c228311c4

The following is a sample input file in JSON format for deploying a partial application design with open requirements. Note that this JSON file contains the details of modifiable properties that should be applied during deployment. The JSON also contains the microservice service designs that satisfy the specific requirements of the partial application design.

{ "modifiableProperties":[{"id":"1d894fc5-f9fc-f27d-5051-ba6df53c6fec", "itemType":"NODE", "propertyName":"vmTemplateReference", "propertyType":"string", "propertyValue":"csata-rhelsa915"}, {"id":"1d894fc5-f9fc-f27d-5051-ba6df53c6fec", "itemType":"NODE", "propertyName":"customizationSpec", "propertyType":"string", "propertyValue":"Linux"}] "designToRequirementsMap": [{ "designId": "0949335a-e46e-4f2b-beb6-d9d7a2db396d", "requirementIds": ["Server__VERSION__1__GROUPID__com.hp.csa.type0001"] }, { "designId": "8bcb57e7-190c-42ac-964b-20b34ff43c7f", "requirementIds": ["Server__VERSION__1__GROUPID__com.hp.csa.type0002"] } ] }