vRealize Suite Lifecycle Manager can include multiple repositories with branches on a source control server. By adding a Source Control Management (SCM) endpoint, you can check in and check out SDDC content on the source control server.

As a DevOps administrator, you create a project with a branch on the source control server. Then you assign access rights for the branch to developers. After that, you use the API to add an source control server endpoint in vRealize Suite Lifecycle Manager.

As a content developer with access rights to the branch on the source control server, you can generate a user token. Then you attach the token to the source control server and create an SCM content endpoint.

Prerequisites

  • Verify that the appliance name and fully qualified domain name of the vRealize Suite Lifecycle Manager instance are available.
  • Verify that the URL variable is assigned.
    url='https://LCM-Hostname'
  • Verify that you have correct permissions.
    • As DevOps administrator, verify that you are an organization owner in vRealize Suite Lifecycle Manager with an administrator role.
    • As a developer, verify that you are an organization owner in vRealize Suite Lifecycle Manager with a user role.

Procedure

  1. As a DevOps administrator, add a source control server endpoint in vRealize Suite Lifecycle Manager. In this example, the source control server type is Gitlab. vRealize Suite Lifecycle Manager also supports bitbucket-cloud and bitbucket-server types.
    curl -X POST \
      '$url/lcm/cms/api/v1/endpoints' \
      -H 'Authorization: Basic YWRtaW5AbG9jYWw6Vk13YXJlMSE=' \
      -H 'Content-Type: application/json' \
      -d '{
        "sourceControlType": "gitlab",
        "endpointType": "SERVER_ENDPOINT",
        "category": "SourceControl",
        "name": "gitlab.eng.vmware.com",
        "server": "gitlab.eng.vmware.com"
    }' | jq "."
  2. Examine the response and note the reference ID.
    A snippet of the response shows the endpoint ID listed as the referenceID.
    {
       "requestId":"2688b287-d50c-4f89-be42-2d707af26758",
       "status":"IN_PROGRESS",
       "message":"Endpoint Successfully Created",
       "referenceId":"567a280d-3419-4eb7-81c0-219902b8447c"
    }
  3. Set up access control in Gitlab for the branch.
    1. Assign access rights for the branch to your developer.
    2. Provide your developer with the ID of the source control server endpoint.
  4. As a developer with access rights to the branch on the source control server, generate a userToken with full access for source control and assign the token to a variable name.
    SourceControlAccessToken = '<userToken>'
  5. Assign the reference ID of the source control server endpoint that you received from the DevOps administrator to a variable name.
    SourceControlServerEndpointID = '<referenceID>'
  6. Attach the token to the server endpoint.
    curl -X POST \
      '$url/lcm/cms/api/v1/sourcecontrol/token/' \
      -H 'Authorization: Basic YWRtaW5AbG9jYWw6Vk13YXJlMSE=' \
      -H 'Content-Type: application/json' \
      -d '{
        "endpointId": "{$SourceControlServerEndpointID}",
        "token": "{$SourceControlAccessToken}",
    }' | jq "."
  7. Create an SCM content endpoint to perform source control operations. In this example, you can perform operations such as checkin, checkout, and raise code reviews through the new endpoint.
    curl -X POST \
      '$url/lcm/cms/api/v1/endpoints' \
      -H 'Authorization: Basic YWRtaW5AbG9jYWw6Vk13YXJlMSE=' \
      -H 'Content-Type: application/json' \
      -d '{
        "tagNames": ["test123"],
        "supportCapture": true,
        "supportTest": true,
        "supportRelease": true,
        "name": "git-lab-content-endpoint",
        "category": "SourceControl",
        "sourceControlServerId": "{$SourceControlServerEndpointID}",
        "branch": "master",
        "repository": "example-test/feature",
        "server": "gitlab.eng.vmware.com",
        "sourceControlType": "gitlab",
        "endpointType": "CONTENT_ENDPOINT"
    }' | jq "."

What to do next

Use your SCM endpoint to manage the following types of content:
  • Automation-Component Profile
  • Automation-Composite Blueprint
  • Automation-Custom Form
  • Automation-Property Definition
  • Automation-Property Group
  • Automation-Resource Map
  • Automation-Resource Type
  • Automation-Resource Action
  • Automation-Software
  • Automation-Subscription
  • Automation-XaaS Blueprint
  • Orchestrator-Package
  • vSphere-Custom Spec
  • Operations-Alert
  • Operations-Dashboard
  • Operations-Report
  • Operations-ResourceKindMetricConfig
  • Operations-SuperMetric
  • Operations-Symptom
  • Operations-TextWidgetContent
  • Operations-TopoWidgetContent
  • Operations-View