copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2021-06-14 |
catalog, catalogs, private catalogs, account catalogs, catalog visibility, software visibility, import software |
account |
{:shortdesc: .shortdesc} {:codeblock: .codeblock} {:screen: .screen} {:tip: .tip} {:note: .note} {:important: .important} {:external: target="_blank" .external} {:beta: .beta} {:ui: .ph data-hd-interface='ui'} {:cli: .ph data-hd-interface='cli'} {:api: .ph data-hd-interface='api'} {:java: .ph data-hd-programlang='java'} {:python: .ph data-hd-programlang='python'} {:javascript: .ph data-hd-programlang='javascript'} {:curl: .ph data-hd-programlang='curl'} {:go: .ph data-hd-programlang='go'}
{: #create-private-catalog}
You can build and onboard software solutions to a private catalog to then share them with your organization. {: shortdesc}
{: #prereq-create}
- Review the list of supported software that you can onboard:
- Helm charts
- Terraform templates
- OVA images deployed on VMware vCenter Server
- Virtual server images with Terraform deployed on VPC infrastructure
- Operators deployed on Red Hat OpenShift
- Upload your soure code in a GitHub repository. For more information, see Managing releases in a repository{: external}.
- Make sure you're assigned the following IAM access:
- Editor role on the catalog management service
- Viewer role on all resource groups in your account
- Writer role on the {{site.data.keyword.secrets-manager_short}} service
- Install the IBM Cloud CLI and the IBM Cloud Schematics plug-in. See Setting up the CLI for more information.
For containerized apps, complete the following prerequisites:
- Create your Kubernetes cluster or Red Hat OpenShift cluster.
- For deployments to {{site.data.keyword.cloud_notm}} Kubernetes Service, set up your Helm chart.
- For deployments to Red Hat OpenShift, set up your Helm chart or operator.
For virtual server images, complete the following prerequisites:
- Review the list of supported images.
- Create your Terraform template.
- Create an instance of {{site.data.keyword.cloud_notm}} Object Storage and add your image to a bucket.
{: #create-catalog} {: ui}
- Go to Manage > Catalogs, and select Private catalogs.
- Click Create.
- Select Product default as the catalog type.
- Enter a name and description of your catalog.
- Select whether to exclude all products in the {{site.data.keyword.cloud}} catalog from your catalog.
- Click Create.
{: #add-public-repo} {: ui}
Complete the following steps to add a product to your catalog:
- Click Private catalogs, and select your private catalog from the list.
- Click Private products > Add.
- Select whether you are adding your product from a private or public repository.
- Enter your repository's URL or TGZ archive.
- If you're adding your product from a private repository, you can choose to provide a personal access token or you can use a secret. Instead of giving users a personal access token, you can give them access to a secret and add the token to a secret and centrally manage all tokens and access the secret allows.
-
If you're using a personal access token, select No to indicate you aren't using a secret and provide your personal access token.
-
If you're using a secret, select Yes and click Select from Secrets Manager. Select your service instance, secret group, and secret. If you don't see your secret, make sure you're using the correct secret group and service instance.
The message
No service instance available
might be displayed if you haven't created a secret or if you don't have the correct access to use secrets, even if you have service instances that are created. {: note}
- Select a category and your deployment target.
- Click Add.
{: #validating-software} {: ui}
After you add your product to your catalog, you're ready to publish it to your account. Complete the following steps to validate and publish your product:
- Review the product details by selecting Configure product, Add license, and Edit readme.
- Select Validate product.
- Select a cluster.
- Click Validate to ensure that your product can be installed successfully. This step is required before you can make it available for users in your account, and the validation can take several minutes. In the Validation summary section, the status is displayed as Validated when the deployment is complete.
- Click the Actions icon , and select Publish to account to make your product available to all users in your account through your private catalog.
{: #create-cicd-product} {: cli}
Complete the following steps to add your software by using the CLI. You can use this task in a CI/CD process.
-
Add software to your private catalog. For more information, see the cli documentation for adding software to your private catalog.
ibmcloud catalog offering create --catalog "Name of catalog" --zipurl https://software.url.com.tgz
{: codeblock}
-
Add the Developer Tools category. For more information, see the cli documentation for adding a category.
ibmcloud catalog offering add-category --catalog "Name of catalog" --offering "software-offering" --category "Developer Tools"
{: codeblock}
-
Validate the software. For more information, see the cli documentation for validating the software.
You need the version locator for your software. To find it, run the
ibmcloud catalog offering list --catalog "Name of catalog"
command, and search for the particular version of your software. Also, use the cluster that you created when you set up the required resources. {: important}ibmcloud catalog offering validate --version-locator <LOCATOR> --cluster <CLUSTER> --namespace "software-offering"
{: codeblock}
Deploying the software can take a few minutes. You can check the validation status by querying the product validation state. The validation is complete when the state is Valid. For more information, see the cli documentation for validation status.
ibmcloud catalog offering validate-status --version-locator <LOCATOR>
{: codeblock}
-
Publish your software to make it available to users in your account. For more information, see the cli documentation for publishing to your account.
ibmcloud catalog offering publish-to-account --version-locator <LOCATOR>
{: codeblock}
{: create-product-api} {: api}
You can programmatically add an offering to your catalog by calling the Catalog Management API as shown in the following sample request. For detailed information about the API, see Catalog Management API.
String id = "{id}";
String name = "{name}";
String label = "{label}";
CreateOfferingOptions offeringOptions = new CreateOfferingOptions.Builder().catalogIdentifier(id).name(name).label(label).build();
Response<Offering> response = service.createOffering(offeringOptions).execute();
System.out.println(response.getResult());
{: codeblock} {: java}
id = "{id}";
name = "{name}";
label = "{label}";
response = await service.createOffering({ 'catalogIdentifier': id, 'id': id, 'name': name, 'label': label });
console.log(response);
{: codeblock} {: javascript}
id = "{id}"
name = "{name}"
label = "{label}"
response = self.service.create_offering(catalog_identifier=id, name=name, label=label)
print(response)
{: codeblock} {: python}
id := "{id}"
name := "{name}"
label := "{label}"
offeringOptions := service.NewCreateOfferingOptions(id)
offeringOptions.SetName(name)
offeringOptions.SetLabel(label)
_, response, _ := service.CreateOffering(offeringOptions)
fmt.Println(response)
{: codeblock} {: go}