1. Deploy the ibm-cp4d-watson-knowledge-catalog-instance helm chart on AWS EKS


    To deploy the IBM Cloud Pak for Data (CP4D) Watson Knowledge Catalog instance using a Helm Chart on an AWS EKS cluster, you will follow these steps:

    1. Create an AWS EKS Cluster: First, you'll create an EKS cluster where your Helm chart will be deployed. This involves defining the necessary compute, network, and IAM resources.

    2. Install the Kubernetes provider: Before deploying the Helm chart, the Kubernetes provider for Pulumi needs to be configured. This enables Pulumi to interact with your Kubernetes environment.

    3. Deploy the Helm Chart: Lastly, you'll use Pulumi's Kubernetes provider to deploy the Helm chart for the IBM CP4D Watson Knowledge Catalog onto your EKS cluster.

    Below is the Pulumi program written in TypeScript:

    import * as aws from "@pulumi/aws"; import * as eks from "@pulumi/eks"; import * as pulumi from "@pulumi/pulumi"; import * as k8s from "@pulumi/kubernetes"; // Initialize a Pulumi program. const projectName = "ibm-cp4d-eks-deployment"; // Create an EKS cluster. // Documentation: https://www.pulumi.com/docs/reference/pkg/aws/eks/cluster/ const myCluster = new eks.Cluster(projectName, { instanceType: "t3.medium", desiredCapacity: 2, minSize: 1, maxSize: 3, storageClasses: "gp2", deployDashboard: false, }); // Export the cluster's kubeconfig. export const kubeconfig = myCluster.kubeconfig; // Create a Kubernetes Provider instance using the kubeconfig from the EKS cluster above. const k8sProvider = new k8s.Provider(projectName, { kubeconfig: myCluster.kubeconfig.apply(JSON.stringify), }); // Deploy the Helm Chart for IBM CP4D Watson Knowledge Catalog. // You'll need to substitute the `chart`, `version`, and `values` properties with actual values. // Documentation: https://www.pulumi.com/docs/reference/pkg/kubernetes/helm/v3/chart/ const watsonKnowledgeCatalog = new k8s.helm.v3.Chart(projectName, { chart: "ibm-cp4d-watson-knowledge-catalog-instance", // Replace with the correct chart name version: "x.x.x", // Specify the version of the Helm chart fetchOpts: { repo: "https://raw.githubusercontent.com/IBM/charts/master/repo/entitled/", // The Helm repo URL where the chart is located }, values: { // Provide the necessary values to configure the IBM CP4D Watson Knowledge Catalog }, }, { provider: k8sProvider }); // Export the DNS name of the cluster's load balancer. // This assumes that the deployed Helm chart includes a Service of type LoadBalancer. export const watsonKnowledgeCatalogEndpoint = watsonKnowledgeCatalog.getResource("v1/Service", "watson-catalog-service").status.apply(status => status.loadBalancer.ingress[0].hostname);

    In this program:

    • We start by importing required packages from Pulumi's AWS, EKS, Kubernetes, and core packages.
    • An EKS cluster is created using sensible defaults, such as instance type and scaling configurations.
    • We set up a Kubernetes provider instance configured to communicate with the newly created EKS cluster.
    • The k8s.helm.v3.Chart resource is used to deploy the IBM CP4D Watson Knowledge Catalog instance using Helm. Specify the correct chart name, version, and repository URL along with any necessary chart values in the values object.
    • An endpoint for the Watson Knowledge Catalog service is exported, assuming that the Helm chart exposes a service with type LoadBalancer. You should adjust the resource names and properties according to the actual Helm chart specifications.

    Please note, you should replace the placeholder values in the chart, version, and repo fields with the actual details for the IBM CP4D Watson Knowledge Catalog Helm chart that you wish to deploy. This information is typically found in IBM's documentation or the Helm repository for the chart.

    To run this program, you'll need to have Pulumi installed and configured to use AWS credentials and the Kubernetes provider. After you've placed this code in a file (e.g., index.ts), you can execute it using the Pulumi CLI:

    # Log in to the Pulumi Service pulumi login # Create a new stack for the project, which is an isolated environment for this instance of the program pulumi stack init dev # Install dependencies from package.json npm install # Preview the deployment plan pulumi preview # Deploy the infrastructure to AWS pulumi up # Once you're done, you can destroy the resources to avoid incurring any charges pulumi destroy

    This example assumes a certain level of familiarity with Kubernetes, Helm, and Amazon EKS. If you're new to any of these technologies, I would recommend starting with their respective documentation to become familiar with basic concepts and terminology.