1. Deploy the pinot helm chart on Oracle Kubernetes Engine (OKE)

    TypeScript

    To deploy the Pinot Helm chart on Oracle Kubernetes Engine (OKE), you'll need to perform a series of steps using Pulumi with TypeScript. First, ensure you have a Kubernetes cluster available on OKE to deploy Pinot to. You can manage your OKE cluster with Pulumi using the oci.ContainerEngine.Cluster resource. Once you have a cluster, you'll use the kubernetes.helm.v3.Chart resource to deploy the Pinot Helm chart into your Kubernetes cluster.

    Here's an outline of what you need to do:

    1. Set up Pulumi and authenticate with Oracle Cloud Infrastructure (OCI).
    2. Create an OKE cluster using the oci.ContainerEngine.Cluster resource.
    3. Obtain the kubeconfig from the created OKE cluster to communicate with it.
    4. Deploy the Pinot Helm chart using the kubernetes.helm.v3.Chart resource.

    Below is a Pulumi program in TypeScript that illustrates these steps. It assumes you have an existing Virtual Cloud Network (VCN) and subnet IDs which are typically prerequisites for creating an OKE cluster. Ensure you replace placeholders with the correct values for your environment (such as <compartment-id>, <vcn-id>, <public-subnet-id>, <private-subnet-id>).

    import * as pulumi from "@pulumi/pulumi"; import * as oci from "@pulumi/oci"; import * as k8s from "@pulumi/kubernetes"; // Step 1: Initialize OCI provider with necessary credentials. const provider = new oci.Provider("oci", { // Credentials can be set up using config or environment variables. }); // Step 2: Provision an OKE cluster. const okeCluster = new oci.containerengine.Cluster("okeCluster", { // Replace with your compartment ID compartmentId: "<compartment-id>", vcnId: "<vcn-id>", kubernetesVersion: "v1.19.7", options: { serviceLbSubnetIds: ["<public-subnet-id>", "<private-subnet-id>"], // Add other options as needed }, }, { provider }); // Step 3: Obtain the kubeconfig from the created OKE cluster. const kubeconfig = pulumi.all([okeCluster.id, okeCluster.name]).apply(([clusterId, clusterName]) => { return oci.containerengine.getClusterKubeconfig({ clusterId: clusterId, name: clusterName, }); }); // Initialize a new Kubernetes provider with the obtained kubeconfig. const k8sProvider = new k8s.Provider("okeK8sProvider", { kubeconfig: kubeconfig.apply(c => c.content), }); // Step 4: Deploy the Pinot Helm chart. const pinot = new k8s.helm.v3.Chart("pinot", { chart: "pinot", version: "0.1.0", // Specify the version of the Pinot Helm chart you wish to deploy fetchOpts: { repo: "https://helm.pinot.apache.org/", // Use the correct Helm repo for Pinot }, }, { providers: { kubernetes: k8sProvider } }); // Export the kubeconfig and cluster name export const clusterKubeconfig = kubeconfig.apply(c => c.content); export const clusterName = okeCluster.name;

    This program sets up Pulumi to communicate with OCI and creates an OKE cluster. It then generates a kubeconfig file that you can use to interact with your Kubernetes cluster. After setting up the kubeconfig, the program creates a Kubernetes provider instance to deploy Pinot using its Helm chart.

    Before running this code:

    • Install Pulumi CLI and set up your OCI credentials according to Pulumi's documentation.
    • Install Node.js and npm to run the Pulumi program.
    • Have the Helm chart values and versions ready for Pinot.

    To execute the program, run the following commands in your terminal:

    pulumi up

    This will set up the cluster and deploy the Pinot Helm chart according to the configuration specified in the program. You can adjust the details of the cluster and chart as necessary for your use case.