Skip to main content

HSF Hub

Last updated on

HSF 2.4 introduces the ability to replace IDP workflows with Harness pipelines. HSF Hub has all of the same workflows that you would see in an instance of HSF with Harness IDP but now as pipelines in the HSF Hub project.

How to enable HSF Hub:

In Harness Pilot Light there are variables should_use_hsf_hub and should_use_harness_idp if should_use_hsf_hub is set to false and should_use_harness_idp is set to true, which is the default value, it will deploy as prior versions did - to use Harness IDP.

If should_use_harness_idp is set to false, we remove this dependency on IDP and deploy without it. In the deployment, the IDP workflows are stripped out, the pipeline stage types are changed from IDP to IaCM and a HSF_Core_manager workspace is created as a placeholder for system stage executions.

If should_use_hsf_hub is set to true, we create a HSF Hub project and Deploy HSF Hub pipeline to create a location for users to deploy best practice pipelines.

What happens during the initial deployment?

When you go through the deployment of Solutions Factory there will be two options during the deployment where you are able to decide if you want Harness IDP enabled and if you want HSF Hub enabled. This will set the two variables should_use_hsf_hub and should_use_harness_idp.

How does it work?

When Harness IDP is enabled, all of the inputs were defined in the catalog_template.yaml file and shown when you executed the IDP flow. Now, without the IDP frontend, you will have to navigate to the HSF Hub project and pick the pipeline that has the functionality that you want. You will add in your inputs and then it will kick of a chained pipeline that will kick start the Create and Manage IACM Workspace pipeline, just like what would happen when you executed the IDP workflow.

With HSF Hub, we changed how permissions are implemented since we no longer could use the ones created through IDP. We’ve implemented ABAC.

  • We’ve created a role called HubOperator that only has access to view and execute pipelines
  • A role called Shared_Resource_Access which allows access to shared resources in the project such as secrets and templates
  • And a resource group for each of the HSF Hub pipelines. By combining a role and resource group you are able to control which pipelines a user can run.

Operating Modes

With the creation of HSF Hub, HSF 2.4 introduces the concept of operating modes. The different operating modes allows usage of HSF with and without Harness IDP.

HSF Core are the core 12 pipelines of Harness Solutions Factory

HSF Core + Harness IDP

This operating model is the traditional model and the only one that has been supported till now. It leverages Harness IDP features to execute workflows, run pipeline stages and control RBAC.

HSF Core + HSF Hub

This operating model is new with HSF 2.4. Removing the dependency on Harness IDP, HSF Hub is a new project that gets created to house all of the best practice templates from Custom Template Library. It runs a chained pipeline from this project and is controlled by ABAC.

HSF Core + Backstage (or BYO API Connector)

This operating model is new with HSF 2.4. It allows you to bring your own form of Backstage or API to trigger a HSF Core pipeline.

Changing Operating Modes to use HSF Hub

Since HSF Hub was created starting version 2.4 you will need to make sure that you are on 2.4 or later. If you need help updating please refer back to this document.

  1. Navigate to the Harness Solutions Factory workspace in the Solutions Factory project.
  2. Go into the Connectors and Variables tab and scroll down to find the should_use_harness_idp and should_use_hsf_hub variable.
  3. Change the variable value to use/not use IDP and use/not use HSF Hub
  4. Navigate to pipelines and run Deploy Solutions Factory

If you are upgrading from a version prior to 2.4 you will also need to update your templates because HSF Hub now points to Custom Template Library instead of Harness Template Library

  1. Pull in example files for the specific templates that you are using
  2. Add in customized inputs and additional variables
  3. Run Deploy HSF Hub

Deploy HSF Hub is a pipeline that will be created when the should_use_hsf_hub variable is set to true. This pipeline will clone the Custom Harness Template Library repository and use the hub registration file to parse through the resources to create the pipelines that live inside the HSF Hub project. These pipelines can be customized with pre and post steps, role bindings and resource groups.