1. Deploy the ibm-cpd-platform-instance helm chart on AWS EKS

    TypeScript

    To deploy the IBM Cloud Pak for Data (CPD) platform as a Helm chart on Amazon EKS, you'll have to go through a series of steps. Since EKS is the Kubernetes service offered by AWS, we'll need to create an EKS cluster before we can deploy any Helm charts on it.

    Here is a high-level overview of the steps we're going to take:

    1. Set up an Amazon EKS cluster.
    2. Deploy the IBM CPD platform Helm chart to the EKS cluster.

    Let's start by setting up the EKS cluster. We'll use Pulumi's eks package to create an EKS cluster as it abstracts away much of the complexity involved in creating a Kubernetes cluster on AWS.

    After creating the cluster, we will then use Pulumi's Kubernetes package to deploy the IBM CPD platform instance helm chart.

    Below is the Pulumi TypeScript program to achieve this:

    import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws"; import * as eks from "@pulumi/eks"; import * as k8s from "@pulumi/kubernetes"; // Create an EKS cluster. const cluster = new eks.Cluster("my-cluster", { // Specify the desired number and size of nodes in the default node group. desiredCapacity: 2, minSize: 1, maxSize: 2, instanceType: "t3.medium", // Choose an instance type suitable for your workload }); // Export the cluster's kubeconfig. export const kubeconfig = cluster.kubeconfig; // Create a k8s provider using the kubeconfig from the EKS cluster we just created. const k8sProvider = new k8s.Provider("k8s-provider", { kubeconfig: kubeconfig.apply(JSON.stringify), }); // Deploy the IBM CPD platform instance helm chart using the EKS cluster's k8s provider. const cpdChart = new k8s.helm.v3.Chart("ibm-cpd-platform", { chart: "ibm-cpd-platform-instance", version: "YOUR_CHART_VERSION", // Specify the Helm chart version you want to deploy fetchOpts:{ repo: "https://raw.githubusercontent.com/IBM/charts/master/repo/stable/", // Replace with the actual repo URL if it's different }, // Define values to customize your installation according to IBM's documentation. values: { // ... provide necessary values }, }, { provider: k8sProvider }); // Export endpoint to access the Cloud Pak for Data platform (Cloud Pak for Data Console) export const cpdConsoleEndpoint = pulumi.interpolate`http://${cpdChart.getResourceProperty("v1/Service", "ibm-cpd-console", "status").apply(status => status.loadBalancer.ingress[0].hostname)}`;

    Please replace "YOUR_CHART_VERSION" with the actual chart version you'd like to use. The repository URL provided is a placeholder and should be replaced with the actual location of the IBM CPD platform helm chart repository.

    This program does the following:

    • Imports the required Pulumi packages to our program.
    • Creates an EKS cluster with a configurable capacity and instance size according to the requirements of the IBM CPD platform.
    • Exports the kubeconfig of the created cluster, which is needed for the Kubernetes provider to interact with the cluster.
    • Sets up the Kubernetes provider with the kubeconfig.
    • Uses the helm.v3.Chart class from @pulumi/kubernetes to deploy the IBM CPD platform instance chart to the EKS cluster, fetching it from the specified repository and using specified versions and values.

    After writing and deploying this Pulumi code with pulumi up, it will provision an EKS cluster and deploy the IBM CPD platform onto it. Please ensure you have your AWS credentials configured for Pulumi and that you have Helm chart details, such as values and version, ready for deployment.