Enable Proxy for Source Control Management Endpoints

If a proxy server is configured in VMware Aria Suite Lifecycle, you can enable proxy for your source control server and automatically enable the proxy for all endpoints using that source control server.

As a VMware Aria Suite Lifecycle administrator or DevOps administrator, you check to see if a proxy is configured in VMware Aria Suite Lifecycle. Then you list the proxy status of Source Control Management (SCM) servers and enable proxy on selected servers.

Prerequisites

  • Verify that the appliance name and fully qualified domain name of the VMware Aria Suite Lifecycle instance are available.
  • Verify that the URL variable is assigned.
    url='https://LCM-Hostname'

Procedure

  1. Check to see if a proxy server is configured in VMware Aria Suite Lifecycle.
    curl -X GET \
      '$url/lcm/cms/api/v1/proxy' \
      -H 'Accept: application/json'\
    | jq "."
  2. Examine the response for the proxy details.
    {
        "proxyEnabled": true,
        "hostName": "proxyserver.domain.com",
        "port": 3128,
        "userName": "admin",
        "proxyEnabledInContentMgmt": false
    }
     
    "proxyEnabled": true indicates that a VMware Aria Suite Lifecycle proxy is configured and "proxyEnabledInContentMgmt": false indicates that no SCM server is configured to use it.

    If "proxyEnabled": false, a VMware Aria Suite Lifecycle administrator must configure a proxy server in VMware Aria Suite Lifecycle before you can enable an SCM server to use it.

  3. List the proxy status of the SCM servers.
    curl -X GET \
      '$url/lcm/cms/api/v1/endpoint-servers?page=1&size=20&sortBy=lastUpdatedOn&sortByDirection=DESC' \
      -H 'Accept: application/json' \
    | jq "."

    The response shows the proxy status of each server.

    {
        "contents": [
            {
                "name": "github.com",
                "proxyEnabled": false,
                "requestId": "bd2cc2c7-cefc-43ef-8fa7-11e16de751e6",
                "requestedBy": "admin@local",
                "lastUpdatedBy": "admin@local"
            },
            {
                "name": "gitlab.com",
                "proxyEnabled": false,
                "requestId": "053b29bc-cac9-4bbb-a8e5-17d616b5ef57",
                "requestedBy": "admin@local",
                "lastUpdatedBy": "admin@local"
            },
            {
                "name": "bitbucket.org",
                "proxyEnabled": false,
                "requestId": "05fde491-1b1d-43f0-a413-f7db8af11b01",
                "requestedBy": "admin@local",
                "lastUpdatedBy": "admin@local"
            },
            {
                "name": "gitlab.vmware.com",
                "proxyEnabled": false,
                "requestId": "9088c23b-51d5-4dd8-8165-621d2aa21787",
                "requestedBy": "admin@local",
                "lastUpdatedBy": "admin@local"
            }
        ],
        "metaData": {
            "totatlPages": 1,
            "totalElements": 5,
            "pageElements": 5,
            "size": 20,
            "page": 1
        }
    }
     
  4. Enable proxy mapping for selected SCM servers such as the gitlab.vmware.com and bitbucket.org servers.
    curl -X PUT \
      '$url/lcm/cms/api/v1/endpoint-servers' \
      -H 'Accept: application/json' \
      -H 'Content-Type: applications/json' \
      -d '{
        "endpointServersList":[ 
          {"name":"gitlab.vmware.com","proxyEnabled":true }, 
          {"name":"bitbucket.org","proxyEnabled":true }, 
          {"name":"gitlab.com","proxyEnabled":false } 
       ]
    }'| jq "."

Results

Enabling proxy for a source control server routes REST API calls from VMware Aria Suite Lifecycle to all endpoints using that server through the proxy.
Note: Once the VMware Aria Suite Lifecycle proxy is used by Content Management, the proxy cannot be disabled on the VMware Aria Suite Lifecycle settings page until the SCM servers are configured to stop using the proxy.