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.
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:
- Once the action is created, you will see the action Settings page:
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):
- 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
- 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:
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.
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.
- To try onboarding the Terraform template yourself, refer to the Terraform on IBM Cloud documentation.
- To explore the Terraform templates individually, based on your requirements, refer to the sample templates.
- To contribute in creating your Terraform templates, refer to guidelines to contribute into IBM Cloud Schematics Git repository.