Adding custom applications
To add custom applications to the IBM® Cloud Private Catalog, create a Helm chart.
Kubernetes packages that are managed by Helm are also known as charts. The terms packages and charts are referenced interchangeably in this user guide.
You can add charts that you create or download from the Internet to either an external Helm repository or the internal IBM Cloud Private repository.
- Package a Helm chart
- Add the chart to an external repository
- Add the chart to the internal repository
Package a Helm chart
- Set up the Helm command line interface (CLI). See Installing the Helm CLI (helm).
-
Create a Helm chart. For example, to create the
demoapp
Helm chart, run the following command:helm create demoapp
-
View the contents of the Helm chart. To view the contents of the
demoapp
Helm chart, run the following command:tree demoapp
The contents of the chart display:
demoapp |-- charts |-- Chart.yaml |-- templates | |-- deployment.yaml | |-- _helpers.tpl | |-- NOTES.txt | `-- service.yaml `-- values.yaml
-
Configure the Helm chart. See Getting Started with a Chart Template . You can add maintainer information, software version, code source to the
Chart.yaml
file. You can also modify thedeployment.yaml
andservice.yaml
files or add more templates directories. -
Verify that the chart is well-formatted. Run the following command:
helm lint --strict demoapp
The output resembles the following code:
==> Linting demoapp Lint OK 1 chart(s) linted, no failures
-
Package your chart and confirm that the chart was added.
helm package demoapp ; ls -l
If the chart was added, the chart package is in the local repository. In the following output, the
demoapp-0.1.0.tgz
package is shown:drwxr-xr-x 4 root root 4096 Jan 8 10:23 demoapp -rw-r--r-- 1 root root 1768 Jan 8 10:37 demoapp-0.1.0.tgz
-
Upload the Docker images for the chart to the source registry that it specifies. If you use the private image registry that is provided with IBM Cloud Private, see Pushing and pulling images.
-
Add the chart to either an external repository or the IBM Cloud Private internal repository.
Add the chart to an external repository
After you package the Helm chart, you can add it to an external repository to make it available to IBM Cloud Private.
-
Update the index of the remote chart repository.
-
Get the
index.yaml
file for the remote chart repository.wget http://<remote_host>/charts/index.yaml
-
Update the
index.yaml
file based on your chart../helm repo index --merge index.yaml --url http://<remote_host>/charts/ ./
The
--url
option specifies the location of the chart repository. This path is the location from which the Helm CLI can get the new chart package.
-
-
Upload your chart to the remote repository.
Copy both the updated
index.yaml
and the new chart package files from your local host to the matching directory on the remote host. -
Update the chart repository by using the IBM Cloud Private cluster management console.
Required user type or access level to sync, add, or remove repositories: Cluster administrator
- From the IBM Cloud Private management console, click Menu > Manage > Helm Repositories.
- If you do not see the repository in the list, add it. See Adding a Helm repository.
- Click Sync Repositories.
- Click Catalog in the top right corner. The new Helm charts load into the Catalog, and you can install them into your cluster.
Add the chart to the internal repository
After you package the Helm chart, you can add it to the internal repository that is provided with IBM Cloud Private.
Required user type or access level: Cluster administrator
Before you load the chart, complete the following prerequisites:
- Install the IBM Cloud Private CLI and log in to your cluster. See Installing the IBM Cloud Private CLI.
-
Add the cluster IP address and cluster CA domain name to the hosts file as shown in step 1 of Configuring authentication for the Docker CLI.
-
Package the Helm chart.
-
If you have not logged in, log in to your cluster from the IBM Cloud Private CLI and log in to the Docker private image registry.
cloudctl login -a https://<cluster_CA_domain>:8443 --skip-ssl-validation
Here,
cluster_CA_domain
is the certificate authority (CA) domain. If you did not specify a CA domain, the default value ismycluster.icp
. See Specifying your own certificate authority (CA) for IBM Cloud Private services. -
Install the Helm chart:
cloudctl catalog load-chart --archive <helm_chart_archive>
Here,
helm_chart_archive
is the name of your compressed Helm chart file and<cluster_CA_domain>
is the certificate authority (CA) domain.