Get started with HSF
Last updated on
Welcome to the HSF onboarding guide. Discover how Harness accelerate onboarding and adoption by reducing setup time and maintaining best practices
Pre Deployment of HSF
Prerequisites
Before beginning, ensure you have:
- Access to a Harness Account
- Ability to create an admin level token
If you do not meet all these prerequisites but think your organization could benefit from HSF, please reach out to your account team.
Post Deployment of HSF
Now that HSF has been deployed, what’s next?
Create an Organization
- Go into IDP → Workflows → Execute
Harness Organization Setup→ Enter name and description → Next → Review → Create
- Why? Assuming that HSF was the first thing that was deployed into your account it is important for you to have a place to learn and start development.
- In this example we are creating a
LabOrganization - By default this workflow requires an approval from someone in the HSF Admins group.
- Approve to review even though there is nothing to be seen yet. Then you will wait for the second approval. Approve what is being added.
- Once completed click Access Harness Organization. You can also go into IDP → Catalog → Resources
Create Projects
- Go into IDP → Workflows → Execute
Harness Project Setup→ Select the organization we created, enter name and description → Next → Review → Create - Just like creating an organization, click Approve to review even though there is nothing to be seen yet. Then wait for the second approval. Approve what is being added.
- Below are the resoures that are now currently in the account - one organization named Lab and two projects named infrastructure and workshop both in the Lab organization.
Customize your Project configuration and apply it
- Clone
harness-template-libraryandcustom-harness-template-librarylocally - Copy the
harness-projectdirectory fromharness-template-libraryand intocustom-harness-template-library
- In the Harness Console go into Account Settings → Variables → Find and copy the Ids for
Custom Template Library RepoandCustom Template Library Connector
- In
custom-harness-template-library/harness-project/.harnessgo intocatalog_template.yamland find the propertiestemplate_library_connectorandtemplate_library_repoand paste in the Ids from above after “variable.account.” It should look like this:
- Change
properties: repo_source: default:tocustom
- Go into the
idp_registration_mgr.yamlfile- add in:
- org: Harness_Platform_Management
project: Solutions Factory
workflow:
- name: harness-project
- add in:
- Commit and push these changes
- Go to Pipelines → Run
Register Custom IDP Templates
- After this runs, you can verify by going into the workflow → View Raw YAML and you will see that the source change to
custom-template-library
- After this runs, you can verify by going into the workflow → View Raw YAML and you will see that the source change to
- Create a new project using the new custom workflow:
- Go into IDP → Workflows → Harness Project Setup
- Make a change in the custom workflow - let’s create a new security group called “Security Champions”
- Go back into
custom-harness-template-libraryand create a new file calledSecurity_Champions.yamlunderharness-project/templates/rolesthat includes what privileges this group should have. Sample permission sets are included under thepermission_setsdirectory. It should look something like this:
- Create a new file under
harness-project/templates/groupsthat tags the new group. For our example our group will have project viewer and all the privileges that we included in the role. It will look like this:
- Commit and push these changes.
- Some sample permission sets are included in permission_sets
- Go back into
- Apply the new project custom template to all the projects that are in your account
- Run a drift check on the project you crated in step 4. Workspaces → Lab_customized_project → Check for Drift
- After it runs you will see new resources that need to be created
- You will see the workspace for the customized project to be apply needed
- Why? This is a new change in the source code not a modifications that exist on the system
- Click Provision and Run the pipeline to apply the change
- If you go into user groups for the customized project you will see the new Security_Champions group!
Bulk Update Workspaces to Use New Configurations
- For the projects you created before switching over to use the
custom-harness-template-library— Go to Pipelines and runBulk Workspace Management
- The
workspace_typewill be type assigned to the workspace
workspace_change_sourceshould be changed to “yes”- Set the
workspace_actionto “apply”
- The
- Approve the Provision pipelines that get started - this will change the tags and source to use the custom template library and apply the changes. For this example the Security Champions group will be added to all the projects.
- The approval was added for an extra layer of protection where you can check to make sure a breaking change won’t be added.
There will be a lot of resources that are created into your account once HSF is deployed. Be sure to review this document to understand what was created and where it all lives.