_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:

To configure new VCS providers go to the “VCS provider” or “VCS” menu option and click “New VCS Provider”

Github

A Github VCS Provider is authenticated against an OAuth application.

  1. Click Github or Github Enterprise and enter the provider name and, for Enterprise, the URL.

GHC 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
  1. Click on “Generate a new client secret and copy the client ID and client secret.

_images/new_github_sec.png
  1. Go back to Scalr and paste the values into the form

_images/new_github_2.png
  1. 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. Click Gitlab or Gitlab Enterprise and enter the provider name and, for Enterprise, the URL

GLC GLE

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

    • Enable the following permissions in the application configuration:

      • Confidential

      • api

      • read_repository

      • profile

_images/gl_app_1.png
  • For Gitlab Enterprise check these options in the network settings (Admin Area):

    • 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
  1. Save and then copy Application ID and Secret

_images/gl_app_2.png
  1. Go back to Scalr, enter the Id and secret

_images/gl_app_3.png
  1. 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. Click Azure Devops Services and enter the provider name.

_images/new_azdos_1.png
  1. 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
  1. Click Create and then copy the Application ID and Client Secret

_images/azure_dos_secrets.png
  1. Go back to Scalr, enter the Id and secret

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


Bitbucket Cloud

A Bitbucket Cloud VCS provider is authenticated against an OAuth application.

  1. Click Bitbucket and enter the provider name.

_images/bitbucket_1.png
  1. Copy the callback URL

  2. 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
  1. Click Save and then copy the Application ID and Client Secret

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

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


Bitbucket Data Center

A Bitbucket Data Center VCS provider is authenticated using a personal access token.

  1. Click Bitbucket Data Center and enter the provider name and URL of Bitbucket.

_images/bitbucket_e_1.png
  1. Login to Bitbucket Data Center by clicking on the link provided and create a new personal access token.

    • Set the permissions as shown below

_images/bitbucket_e_2.png
  1. Click Create and then copy the token

_images/bitbucket_e_3.png
  1. Go back to Scalr, enter the token and click “Create”.

_images/bitbucket_e_4.png