1. Deploy the ibm-cp4d-analytics-engine-instance helm chart on Oracle Kubernetes Engine (OKE)

    TypeScript

    To deploy a Helm chart on Oracle Kubernetes Engine (OKE) with Pulumi, we will follow these steps:

    1. Create an Oracle Kubernetes Engine cluster.
    2. Deploy the IBM Cloud Pak for Data (cp4d) analytics engine instance using the Helm chart.

    First, ensure that you have Pulumi installed and configured with the appropriate Oracle cloud credentials. You'll need to install the Oracle Cloud Infrastructure (OCI) Pulumi provider, along with the Kubernetes provider to interact with the Kubernetes cluster.

    Below is a TypeScript program that uses the OCI provider to create an OKE cluster and the Kubernetes provider to deploy a Helm chart. The program assumes that the Helm chart for the IBM cp4d analytics engine instance is available in a repository.

    import * as pulumi from '@pulumi/pulumi'; import * as oci from '@pulumi/oci'; import * as k8s from '@pulumi/kubernetes'; // Step 1: Create an OKE cluster. // Documentation: https://www.pulumi.com/registry/packages/oci/api-docs/containerengine/cluster/ const cluster = new oci.containerengine.Cluster("myOkeCluster", { // Provide your compartment ID compartmentId: "your-compartment-id", // Specify the VCN and subnet IDs where the cluster and its nodes should reside vcnId: "your-vcn-id", kubernetesVersion: "v1.20.8", // Specify the Kubernetes version for the cluster options: { // Customize your cluster options accordingly serviceLbSubnetIds: ["your-lb-subnet-id1", "your-lb-subnet-id2"], addOns: { isKubernetesDashboardEnabled: true, // Option to enable Kubernetes Dashboard }, }, }); // Step 2: Use the Helm chart to deploy the IBM analytics engine instance. // Documentation: https://www.pulumi.com/registry/packages/kubernetes/api-docs/helm/v3/chart/ const analyticsEngineChart = new k8s.helm.v3.Chart("analyticsEngine", { chart: "ibm-cp4d-analytics-engine-instance", // Replace with the actual version of the Helm chart you would like to deploy version: "your-chart-version", // Specify the repository that hosts the Helm chart fetchOpts: { repo: "https://charts.your-helm-chart-repo.com/", }, // Use the cluster information to configure the Kubernetes provider provider: new k8s.Provider("k8sProvider", { kubeconfig: cluster.kubeConfigs[0].content.apply((c) => c), }), // Provide custom values required by the IBM analytics engine instance Helm chart values: { // Customize these values as per the Helm chart's requirements. // For example: // cp4d: { // license: "accept", // Example setting to accept license terms // }, }, }, { dependsOn: [cluster] }); // Export the cluster's name and kubeconfig export const clusterName = cluster.name; export const kubeconfig = cluster.kubeConfigs[0].content;

    This Pulumi program completes the following actions:

    • It declares an Oracle Kubernetes Engine cluster with defined options, such as the Kubernetes version and networking settings.
    • It then defines a Helm chart resource, pointing to the IBM Cloud Pak for Data analytics engine instance Helm chart. It fetches the chart from your specified repository and configures it to deploy on the cluster you've just created.
    • We include a Kubernetes provider instance that uses the kubeconfig output of the cluster resource to interact with our newly created Kubernetes cluster.
    • Finally, the program exports the cluster's name and kubeconfig, which you can use to interact with the cluster via kubectl.

    Please replace the placeholders such as your-compartment-id, your-vcn-id, your-lb-subnet-id1, and your-helm-chart-repo.com/ with your actual OCI and Helm chart details.

    Upon running this program with Pulumi, you should see the resources being created and updates regarding the deployment in your console. After the deployment is complete, you can use the exported kubeconfig to check the status of your Helm chart deployment with kubectl.