Populate the IBM Cloud Private Catalog From Your Git Organization

3 min read

The IBM Cloud private catalog offers users the ability to import IBM Cloud Terraform templates as products to make them available to your users.

With a private catalog, you can limit the services that you want your users to see and the service settings that they can adjust. This way, you have more control over the type of service that is provisioned in your account and can ensure people follow naming conventions for services and service components.

Onboarding multiple templates from the Git repository one-by-one is a time-consuming and tedious task. You can bypass this monotonous task by using an automation template to onboard into your private catalog.

Here, you will learn how to onboard multiple Terraform templates in your private catalog using Schematics Action.

Step-by-step instructions

From your browser, access the documentation and click the Onboard to IBM Cloud catalog button to get started with the process.

You can follow the steps below  to complete the onboarding process:

Step 1: Create an action

  • Once you click on Onboard to IBM Cloud catalog, you are redirected to the IBM Cloud Schematics Action page in your IBM Cloud account, as shown in the following image:
    The action name, the resource group and the location parameter are customizable.

    The action name, the resource group and the location parameter are customizable.

  • Once the action is created, you will see the action Settings page:
    Wait until your action is created successfully.

    Wait until your action is created successfully.

Step 2: Set up an Ansible playbook

  • Click Edit import > Retrieve playbooks.
  • Select the Ansible playbook (main.yml) that is pointing to our automation script.
  • Set the Verbosity level to control the depth of information that will be shown when you run the playbook in Schematics. The default value is 0 (Normal):
    Set the Verbosity level to control the depth of information that will be shown when you run the playbook in Schematics. The default value is 0 (Normal):
  • Required: Expand the Advanced options to enter all the required input variables in key-value pairs as shown in the table and the image. For more information on the required parameters for running the automation, refer here:
    • GIT_BASE_URL: https://github.com/Cloud-Schematics
    • GITHUB_TOKEN: Provide your GitHub token
    • CATALOG_NAME: Provider your catalog name
    • CATALOG_MANAGEMENT_APIKEY: Provide your API key
      IMAGE 4
  • Click Save.

Step 3: Run your playbook

  • Click Run action to run your Ansible playbook, which will fetch all the validated IBM Cloud Terraform templates and onboard them as offerings in your private catalog.
  • Observe your job logs by refreshing until you see a “Run successful” message. If there are any issues, view the log file, edit the settings accordingly and click Run action.
  • Once the run is successful, open the IBM Cloud catalog management and select your catalog from the dropdown next to the search bar. You will be able to see the offerings listed in your catalog, as shown below:
    Once the run is successful, open the IBM Cloud catalog management and select your catalog from the dropdown next to the search bar. You will be able to see the offerings listed in your catalog, as shown below:

Step 4: Keep your catalog up to date

After onboarding all the templates, you can perform the following list of actions:

  • Manage each offering individually.
  • Keep the catalog up to date by simply running the Run action again to update all the offerings with latest versions of the templates.
  • Onboard all the new templates as offerings.
  • Remove the deleted templates from the catalog.

Explore more

The legacy way of onboarding Terraform templates had to done one-by-one, but with the new approach, you can add multiple Terraform templates all at once — in much less time — and manage them as per your requirements. This helps you to easily create an IBM Cloud Schematics workspace and provision the resources quickly with a few steps.

Be the first to hear about news, product updates, and innovation from IBM Cloud