Steps to deploy a non-integrated VCF Automation through Fleet LCM APIs in VCF 9.1.2
search cancel

Steps to deploy a non-integrated VCF Automation through Fleet LCM APIs in VCF 9.1.2

book

Article ID: 462947

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

With the release of VCF 9.1.2, multiple VCF Automation (VCFA) deployments are possible:

  • New deployment at day-N of VCFA on a primary or secondary instance.
  • All Fleet LCM day-N operations are supported for all VCF Automation.
  • VCFA and Ops Integration: Only one VCFA can be fully integrated with Ops (retaining the VCF Automation adapter and notifications for SDDC LCMs/Managers exactly as in VCF 9.1), while all other VCFA instances will be non-integrated (partially integrated with limited functionalities).

This article provides the steps to deploy a non-integrated VCF-A through Fleet LCM APIs.

Environment

VCF Automation 9.1.2

Resolution

Sample deployment of a non-integrated VCFA. Required tools: bash, curl, and jq.

The logic below should be combined into a sample-deployment.sh file. A reference file is attached to this article. The instructions below detail the notes needed to update the .sh file.

  1. Define the FQDN and the credentials for the existing OPS.

    Note: Populate OPS_FQDN and OPS_PASS with your FQDN and admin@local password.
    export OPS_FQDN='opsFQDN'
    export OPS_USER='admin@local'
    export OPS_PASS='opsPassword'
  2. Fetch an OPS token and exchange it for a JWT.

    export OPS_TOKEN=$(curl -sS -H 'Content-Type: application/json' -d "{\"username\":\"$OPS_USER\",\"password\":\"$OPS_PASS\"}" "https://$OPS_FQDN/suite-api/api/auth/token/acquire" | jq -r '.token')
    
    export JWT=$(curl -sS -X POST "https://$OPS_FQDN/suite-api/api/auth/token/exchange" \
      -H "Authorization: OpsToken $OPS_TOKEN" \
      -H "Content-Type: application/json" -H "Accept: application/json" \
      -d '{"serviceKeys":["fleet-lcm"]}' | jq -r '.jwtToken')
  3. Discover the Fleet FQDN.

    export FLEET_FQDN=$(curl -sS -u admin:$OPS_PASS "https://$OPS_FQDN/casa/services" | jq -r '.services[] | select(.type=="VCF_FLEET_LCM") | .nodes[0].addresses[0] | select(.type == "Fqdn") | .value')
  4. Specify deployment parameters. Update the sample variables accordingly and the ipv4Pool below. Name the target VCF Instance where the component installs. Leave empty to pick up the first SDDC in the fleet.

    Note: Choose small, medium, or large for VCFA_SIZE.
    Note: Populate VCFA_FQDN with your VCF Automation FQDN and VCFA_SERVICES_RUNTIME with your VCF Automation Services Runtime FQDN.
    export VCFA_FQDN="vcfaFQDN"
    export VCFA_SERVICES_RUNTIME="vcfaServiceRuntimeFQDN"
    export VCFA_SIZE="small"
    export VCFA_PASS="VCFA_PASSWORD"
    export VCFA_VERSION="9.1.2.0"
    export TARGET_VCF_INSTANCE=''
  5. Map the VCF instance to the SDDC ID.

    export SDDC_ID=$(curl -sS "https://$FLEET_FQDN/fleet-lcm/v1/sddc-lcms" -H "Authorization: Bearer $JWT" \
      | jq -r --arg t "$TARGET_VCF_INSTANCE" '
          .sddcLcms
          | if $t == "" then .[0] else (map(select(.sddcGroupName == $t)) | .[0]) end
          | .id')
  6. Save the deployment spec to a file.

    cat << EOF > deploy.json
    {
      "componentSpecs": [
        {
          "componentType": "VCFA",
          "deploymentType": "VspComponentSpec",
          "sddcLcmId": "$SDDC_ID",
          "fqdn": "$VCFA_FQDN",
          "version": "$VCFA_VERSION",
          "configSpec": {
            "size": "$VCFA_SIZE",
            "adminSystemPassword": "$VCFA_PASS"
          },
          "vspClusterSpec": {
            "deploymentType": "VspClusterSpec",
            "sddcLcmId": "$SDDC_ID",
            "platformFqdn": "$VCFA_SERVICES_RUNTIME",
            "systemUserPassword": "$VCFA_PASS",
            "size": "$VCFA_SIZE",
            "ipv4Pool": {
              "addresses": [
                "##.#.#.##",
                "##.#.#.##",
                "##.#.#.##",
                "##.#.#.##",
                "##.#.#.##",
                "##.#.#.##"
              ],
              "excludedAddresses": []
            }
          },
          "capabilities": {
            "VCFA_OPS_REGISTRATION_TYPE": "VCFA_OPS_REGISTRATION_TYPE_INFRASTRUCTURE_INTEGRATED"
          }
        }
      ]
    }
    EOF
  7. Initiate the deployment using the crafted spec. This starts a task you can monitor through the OPS UI: Build > Lifecycle > Tasks.

    curl -sS "https://$FLEET_FQDN/fleet-lcm/v1/sddc-lcms" -H "Authorization: Bearer $JWT" -H 'Accept: application/json' -H 'Content-Type: application/json' -d @deploy.json

Attachments

sample-deployment.sh get_app