copyright | lastupdated | keywords | subcollection | content-type | services | account-plan | completion-time | ||
---|---|---|---|---|---|---|---|---|---|
|
2022-10-26 |
onboard software, operator, validate, test, Red Hat OpenShift cluster, sample Node-RED Operator, CSV file, CSV, operator bundle, TGZ file |
account |
tutorial |
Registry |
paid |
45m |
{{site.data.keyword.attribute-definition-list}}
{: #catalog-operator-gh} {: toc-content-type="tutorial"} {: toc-services="Registry"} {: toc-completion-time="45m"}
This tutorial walks you through how to onboard a sample Operator from a GitHub repository to your account. You can onboard an Operator bundle using a TGZ file or an Operator using a CSV file. By completing this tutorial, you learn how to create a private catalog, import your CSV or TGZ file, validate that it can be installed on a Red Hat OpenShift cluster, and make the Operator available to users who have access to your account. {: shortdesc}
{: #catalog-operator-prereqs}
-
Verify that you're using a Pay-As-You-Go or Subscription account. See Viewing your account type for more details.
-
Upload your Operator and application images to {{site.data.keyword.registrylong}}.
-
Upload your source code to your GitHub repository.
Use the latest release of the sample Node-RED Operator{: external} as an example of how to set up your directory structure. {: tip}
-
Make sure you're assigned the {{site.data.keyword.cloud_notm}} Identity and Access Management (IAM) editor role on the catalog management service. See Assigning access to account management services for more information.
-
For Operator bundles, you also need the following {{site.data.keyword.cloud_notm}} Identity and Access Management (IAM) roles.
- Administrator on all account management services and all IAM-enabled services
- Editor on the software instance service
- Editor on the {{site.data.keyword.registrylong_notm}} service
- Administrator on the {{site.data.keyword.openshiftshort}} cluster
Make sure that you use the same account to access {{site.data.keyword.registrylong_notm}} and to create the {{site.data.keyword.openshiftshort}} cluster. {: important}
{: #catalog-operator-private} {: step}
- Go to Manage > Catalogs in the {{site.data.keyword.cloud_notm}} console, and click Create a catalog.
- Select Product default as the catalog type.
- Enter the name of your catalog, for example,
Sample Operator
. - Select No products to exclude all products in the {{site.data.keyword.cloud}} catalog from your catalog. For more information about how this affects which products are visible in the catalog, see Managing catalog settings.
- Click Create.
{: #catalog-operator-import} {: step}
-
On the Private products page, click Add.
-
Select Operator from GitHub repository as your deployment method.
-
Confirm that Public repository is selected as the repository type.
-
Enter
https://github.com/IBM-Cloud/operator-bundle-sample/archive/refs/tags/v0.0.3.tar.gz
as your source URL. -
Enter the software version in the format of major version, minor version, and revision, for example,
1.0.0
.Enter the version of your software and not the version of your Operator. For example, you might be using Operator version 1.3.0 to install software version 3.1.1. {: important}
-
Click Add product.
{: #catalog-operator-review-version} {: step}
From the Configure version tab, you can review your version details. After you review your version details, click Next.
{: #catalog-operator-secret} {: step}
When you create your {{site.data.keyword.openshiftlong}} cluster, the cluster includes an IAM service ID that is given reader access to {{site.data.keyword.registrylong_notm}}. The service ID credentials are authenticated in a non-expiring service ID API key that is stored in image pull secrets in your cluster. As part of configuring the deployment details, you set a pull secret that's used to access and pull your images from the private {{site.data.keyword.registrylong_notm}} repository.
- From the Set an image pull secret section, click Add image pull secret.
- Enter the name and value of the image pull secret.
- Click Update.
- From the Image pull secret name list, select the image pull secret that you just added.
- Click Next.
{: #catalog-operator-license} {: step}
If users are required to accept any license agreements beyond the {{site.data.keyword.cloud_notm}} Services Agreement, provide the URL to each agreement. Or, if users can bring their own licenses, you can provide that URL as well.
- Click Add license agreements > Add.
- Enter the name and URL, and click Update.
- After entering all additional license agreements, click Next.
{: #catalog-operator-readme} {: step}
When users access your Operator from your account, they can select the link to your readme file in your private catalog to view product information. The readme file information is automatically generated from the details in your TGZ or CSV file.
- From the Edit readme tab, click the Edit icon .
- Preview how the information in the readme file will be displayed to users when they install the Operator.
- If you need to make changes, edit the information in your source and import the updated software to your private catalog.
- Click Next.
{: #catalog-operator-validate} {: step}
To publish the Operator to your account, you're required to validate that it can be successfully installed on the target Red Hat OpenShift cluster.
-
From the Validate product tab, select the target cluster and project, and click Next.
-
Enter the name of your Schematics workspace, select a resource group, select a Schematics region, and click Next.
In the Tags field, you can enter a name of a specific tag to attach to your Operator. Tags provide a way to organize, track usage costs, and manage access to the resources in your account. {: tip}
-
Click Validate.
{: #catalog-operator-controls} {: step}
Controls are safeguards that are used to meet security and compliance requirements. Only controls that are supported by Security and Compliance Center, formatted correctly, and validated by Code Risk Analysis and Security and Compliance Center scans appear in the catalog. For more information, see Adding compliance details.
{: #catalog-operator-add-controls}
You can review the controls that were added from your readme file and add additional controls.
- Click Add controls.
- Choose a profile.
- Select the controls that you want to add to your version.
- Click Add.
{: #catalog-operator-cra-scan}
Scan your source code with Code Risk Analyzer to identify any security vulnerabilities that you need to assess.
- Click Run scan.
- Wait for the scan to finish.
{: #catalog-operator-scc-scan}
Add the scans that you previously ran in the Security and Compliance Center. Security and Compliance Center scans determine adherence to regulatory controls. For more information, see Scheduling a scan.
- Select the profile that you scanned.
- Select the Security and Compliance Center scan.
- Click Add scan.
- Click Next.
{: #operator-review-reqs}
You must complete validation and any other requirements to publish to your account.
{: #catalog-operator-next}
After you onboard and validate your Operator, you're ready to publish it to your account. From the Actions menu, select Publish to account. As a result, the Operator is available only to users who have access to the Sample Operator
private catalog in your account.