CliQr is now part of Cisco Learn More About Cisco

API Use Case: Application Deployment

Overview

Retrieve the application details and the job details before submitting the job request.

User Configuration Process

The following table identifies the process for this use case using CloudCenter APIs:

StepAPI OptionsDescription
1List Applications

Get a list of all applications belonging to the user.

The resource URL for this use case reflect the PetClinic application.

Icon

Use the appId and the appVersion of the application for which you are submitting this job to retrieve the resource URL.

2Get Application Details

Retrieve the application-specific parameters for the 2-tier PetClinic application when the job is deployed.

Icon

Retrieve the serviceTierId (mandatory) for each application tier as well as the whole application and use that information in the job submission API request along with the appId as well as the appVersion.

3Submit Job

Submit a sample job request for the 2-tier for the PetClinic application.

Icon

Use the serviceTierId from the previous step and configure the cloudParams (cloud properties that changes based on the cloud to which this job is submitted) and the appParams (application properties which remain the same regardless of the cloud to which this job is submitted)  – configure them for each tier.

This section provides examples for three different clouds – AWS, VMware, and Azure.

4Get Job Details

Retrieve the job details for the PetClinic application when the job is in progress.

The status in the response is JobInProgress.

5

Retrieve the job details for the PetClinic application when the job is deployed.

The status in the response is JobRunning.

Sample Requests and Responses

This section provides details on the various methods you can use to deploy applications using CloudCenter APIs.

Retrieve a List of All Apps Belonging to the User (1)

Request

 

Response

 User Application List Response

Retrieve the Resource URL for the Application to be Deployed

Icon

Review the response for this call and retrieve the resource URL for the application that you are deploying!

Retrieve PetClinic Application Details (2)

Request

Response

 PetClinic Application Details Response

Use the Retrieved URL to Obtain the serviceTierId for the Parent and Child Tiers

Icon

Review the response for this call and retrieve the serviceTierId for the enitre application that you are deploying!


Submit a Sample PetClinic Job Request (3)

This section provides a complete request and response for VMware and additional Request Body examples for AWS and Azure.

Request

Request Body for VMware Cloud

Use the Retrieved serviceTierID to Configure Custom Cloud Parameters

Icon

Use the serviceTierId for each of the parent and child tiers to configure the following details:

  1. The application build version, appVersion, with which a new job is started. If the appVersion is not specified, the latest application build version is used.
  2. The name of the deployment environment in which this application is launched.
  3. The appParams at the parent level to provide global information about the application property.
  4. The cloudParams details (the name of the cloud region and instance type).
  5. The tenantId used by a tenant admin to invoke any API. The tenant admin must belong to this CloudCenter tenant. Typically, you only need to provide this value for the parent cloud (if using VMware or OpenStack).
  6. The cloudProperties details (differs for each cloud). This section provides the name configuration details for VMware. Refer to your VMware Documentation for additional details. For all names described here, the value type = string.

    nameDescription
    UserClusterNameThe name of the cluster (group of hosts) in the VMware cloud console.
    UserResourcePoolNameThe name of the resource pools used to hierarchically partition available CPU and memory resources of a standalone host or a cluster in the VMware cloud console.
    UserTargetDeploymentFolderThe name of the default folder used to group objects of the same type in the VMware cloud console.
    UserDataCenterNameThe name of the standard network that provides VM communication on a standalone host in the VMware cloud console.
    UserDatastoreClusterThe name of the logical container that holds VM and other files necessary for VM operations in the VMware cloud console. This field accepts comma-separated values of datastore cluster names.
    attachPublicIPThe public IP address that is reachable via the Internet for communication between your CloudCenter VMware region and the Internet.
    subnetIdThe IP address of the sub-network within the specified VMware region.
  7. The VMware NICs details (the id of the NIC, the allocationMode, the allocatePublicIp, and the NIC order).
 Request Body for AWS Cloud

Request Body for AWS Cloud

Use the Retrieved serviceTierID to Configure Custom Cloud Parameters

Icon

Use the serviceTierId for each of the parent and child tiers to configure the following details:

  1. The application build version, appVersion, with which a new job is started. If the appVersion is not specified, the latest application build version is used.
  2. The name of the deployment environment in which this application is launched.
  3. The appParams at the parent level to provide global information about the application property.
  4. The cloudParams details (the name of the cloud region and instance)
  5. The cloudProperties details (differs for each cloud). This section provides the name configuration details for AWS. Refer to your AWS Documentation for additional details. For all names described here, the value type = string.

    nameDescription
    vpcIdThe name of the VPC into which the stack is to be launched in the specified AWS region.
    attachPublicIPThe public IP address that is reachable via the Internet for communication between your CloudCenter AWS region and the Internet.
    subnetIdThe IP address of the sub-network within the specified AWS region.
  6. The VMware NICs details (the id of the NIC, the allocationMode, the allocatePublicIp details, and the NIC order).
  7. The AWS NICs details (the id of the NIC, the privateIPAllocationMode, the nicNetworkType, and the NIC order).
 Request Body for Azure Cloud

Request Body for Azure Cloud

Use the Retrieved serviceTierID to Configure Custom Cloud Parameters

Icon

Use the serviceTierId for each of the parent and child tiers to configure the following details:

  1. The application build version, appVersion, with which a new job is started. If the appVersion is not specified, the latest application build version is used.
  2. The name of the deployment environment in which this application is launched.
  3. The appParams at the parent level to provide global information about the application property.
  4. The cloudParams details (the name of the cloud region and instance)
  5. The cloudProperties details (differs for each cloud). This section provides the name configuration details for Azure. Refer to your Azure Documentation for additional details. For all names described here, the value type = string.

    nameDescription
    vnIdThe name of the  in the Azure cloud console.
  6. The Azure NICs details (the networkId of the NIC, the NIC order, the nicNetworkType, and the  publicIpAllocate details ).

Response for VMware Cloud

 PetClicnic Job Response

Retrieve Details of a PetClinic Job in Progress (4)

Request

Response

 PetClinic Job in Progress Response

 

Retrieve Deployed PetClinic Job Details (5)

Request

Response

 PetClinic Deployed Job Response