_images/login_button.png _images/signup_button.png



VCS Providers

Reading time: 4-6 minutes

VCS providers enable Scalr to access Terraform configurations and OPA policies held in a Version Control System (VCS) such as Github, Gitlab, Bitbucket, and Azure DevOps.

  • A VCS provider is the Application ID/Key that is generated for an OAuth Application in the VCS system.

  • VCS Providers can be created in the account and in environments. Account level VCS providers are available to all environments in the account.

Currently supported VCS’s:

  • github Github SaaS

  • github Github Enterprise

  • gitlab Gitlab SaaS

  • gitlab Gitlab CE/EE

  • azure_dos Azure Devops Services

  • bitbucket Bitbucket cloud

VCS Provider Configuration

The process is the same for all VCS types.

  • Click “New VCS Provider” in the VCS screen

  • Select the type and click on “register a new OAuth application” to be taken to the VCS system

  • Create the OAuth application and copy the ID/key and secret

  • Paste the key and secret into Scalr and save.

Specific instructions for each the VCS types are available via the links below.

Github

A Github VCS Provider is authenticated against an OAuth application.

  1. Create new VCS Provider and select Github or Github Enterprise from the “Type” drop down

    _images/new_github_1.png

Note

For Github Enterprise enter the URL of the Github system.
GHE

  1. Copy the callback URL, click the “register a new OAuth application” link and register a new OAuth app in Github

    _images/gh_oauth.png
  2. Copy the client ID and client secret and go back to Scalr

    _images/new_github_2.png
  3. On clicking “create” a redirection back to Github occurs to complete the authorization.


Gitlab

A Gitlab VCS provider is authenticated against an OAuth application.

  1. Create new VCS Provider and select Gitlab or Gitlab CE/EE from the “Type” drop down

    _images/new_gitlab_1.png

Note

For Gitlab CE/EE enter the URL of the Gitlab system.
GLE

  1. Copy the callback URL, click the “register a new OAuth application” link and register a new OAuth app in Gitlab

    • Check the following options

      • Confidential

      • api

      • read_repository

      • profile

        _images/gl_app_1.png
      • Allow requests to the local network from web hooks and services

      • Allow requests to the local network from system hooks

        _images/gl_app_4.png
  2. Save and then copy Application ID and Secret

    _images/gl_app_2.png
  3. Go back to IaCP, enter the Id and secret

    _images/gl_app_3.png
  4. On clicking “create” a redirection back to Gitlab occurs to complete the authorization.


Azure Devops Services

An Azure Devops Services VCS provider is authenticated against an OAuth application.

  1. Create new VCS Provider and select Azure Devops Services from the “Type” drop down

    _images/new_azdos_1.png
  2. Copy the callback URL, click the “register a new OAuth application” link and register a new OAuth app in Azure Devops

    • Below is an example app configuration

    • Only two scopes are required for Scalr, Code (read) and Code (status)

      _images/azure_dos_scopes.png
  3. Click Create and then copy the Application ID and Client Secret

    _images/azure_dos_secrets.png
  4. Go back to IaCP, enter the Id and secret

    _images/new_azdos_2.png
  5. On clicking “create” a redirection back to Azure Devops occurs to complete the authorization.


Bitbucket

A Bitbucket VCS provider is authenticated against an OAuth application.

  1. Create new VCS Provider and select Bitbucket from the “Type” drop down

    _images/bitbucket_1.png
  2. Copy the callback URL

  3. Login to Bitbucket in a new window and register a new OAuth consumer (Settings –> OAuth)

    • Copy in the call back URL

    • Set the permissions as shown below

      _images/bitbucket_2.png
  4. Click Save and then copy the Application ID and Client Secret

    _images/bitbucket_3.png
  1. Go back to IaCP, enter the Id and secret

    _images/bitbucket_4.png
  2. On clicking “create” a redirection back to Bitbucket occurs to complete the authorization.