Skip to main content

Set Up Git Integration

This guide describes the steps a Harness account admin can take to set up the IDP module. Presently, the module needs to be enabled on request. Read more.

Prerequisite: IDP should be provisioned for the given account. The required resources, services, configurations etc. should be in place before starting the harness catalog onboarding flow

  • Only users who are Harness Account Admin or assigned with IDP Admin role having the permission as displayed below can perform the onboarding. Here's the detailed documentation on how to assign roles

Getting Started

  1. User lands on IDP module by navigating from sidebar after logging into their Harness account.

  1. We strongly recommend users to follow the onboarding guide selecting the Get Started, for a seamless onboarding resulting in a catalog with software components.

Connector Setup

  1. Connector setup
warning

Limitations

  • Only the following set of connectors are supported

    • Harness Code Repository
    • GitHub
      • GitHub Enterprise
      • GitHub App
    • GitLab
    • Bitbucket
      • Bitbucket Cloud
      • Bitbucket Server
    • Azure Repository
  • Only HTTP mode is supported. SSH connection type is not supported.

  • API access is needed in the connector for the IDP catalog setup.

info
  • Multiple Connectors with different hostname can be used for a single Git Provider at once.
  • While setting up connector, both Account & Repo type for URL is supported.
  • Connection through harness platform and delegate is supported.
  • You can provide the repository URL to verify repository read permission with the given host and credentials before saving the Git integration.
  1. In case you are already using Harness Code Repository, a default connector with only Read Permission would be available for the code repo set-up under the same account as that of IDP. Note this connector is uneditable and managed by Harness.

  1. You can as well create a new connector for other git-providers under the +New Integration. If you already have a connector available which you want to use in IDP to save your catalog-info.yaml, then select the connector under Select Git Connector, use a URL to validate and save the connector. If you don't have your connector configured already follow the steps mentioned below.

warning

Limitations

At present you can't view and edit source for software components added from Harness Code Repository, this will be available on the next upgrade.

  1. We don't allow to create a new connector for Harness Code Repository.
info

The scope is tied to URL format https://gitprovider.com/org-name, so all the Git Providers must provide the URL until at least the org name. Further, it can be scoped down to the repository or project level as well.

  1. Once the connectors are created, you can see all the git providers configured for IDP.

Onboard Services

  1. Users will now have option to onboard existing harness services into IDP, or start with a sample service.

  1. User will be shown the list of services in their account. It will be defined in terms of IDP entity i.e harness organization is a domain, harness project is a system and harness service is a component in the IDP world. This list includes services at all scopes.

  2. User can choose all the services / individual services / no services

  • ALL - All the harness services will be imported into IDP
  • INDIVIDUAL - Selected harness services will be imported into IDP
  • NO - One sample entity will be imported into IDP for the user to get started.

  1. User gets a view on how the entity definition looks like

  1. Now add the details on where the entities will be created in git:
  • Connector - The connector is selected by default.

  • Directory Path - Give a path for the directory in which you want to write the catalog-info.yaml files.

  • Repo Path - Go to the Code Repository and under files select Clone and copy the repository path.
info

Once you copy the repository path replace the git.eu.harness.io with accounts.eu.harness.io.

Validate the permission and the catalog-info.yaml files would be created in your directory in Code repository.

Create and Register Entities

  1. Once the required details are entered and submitted for importing, we will push the generated entity yaml files to the repo and path provided. You will be seeing two commits - One is done during the sync flow and other commit which will consist of remaining entities will be pushed in an async manner. Time frame for async operation will depend on how big the repo size is and how many revisions the provided repo has.

  2. In the background, the catalog are also imported into IDP along with their associated configs.

Catalog

  1. User can navigate to the IDP homepage to get started. Catalog will be start showing up once the async operation is completed.

  2. Since during the onboarding flow harness will not be able to discover the complete metadata of the entity, the owner field will be set to Unknown. As part of the IDP provisioning, harness users and groups are imported to IDP. With this in place, customers can start editing the catalog info yaml definition to update the owner for each of the entity.

  1. Post onboarding, users can import any number of entities into harness-idp using the register component flow. This flow expects you to provide the complete url where the entity definition is hosted.

Recommendations

If using GitHub connector, customers can go with App based authentication which provides higher number of API requests in an hour window. Read more about GitHub Apps - GitHub Docs.

Next steps

Check out the IDP tutorials for walkthroughs and deep dives into specific IDP use cases.