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


    To deploy the Riemann Helm chart on Oracle Kubernetes Engine (OKE), you'll first need to set up and configure your OKE cluster. Once you have your OKE cluster ready, you'll use Pulumi's Kubernetes provider to deploy the Riemann Helm chart to your cluster.

    Here is a step-by-step guide along with a Pulumi TypeScript program that will help you complete the task:

    1. Setting up the OKE Cluster: Before deploying the Helm chart, you will need an existing OKE cluster. You can create one using the OCI Console or the OCI CLI. Make sure you have the necessary privileges to deploy applications to the cluster. If you're using the OCI CLI, it should be configured with the appropriate context for your OKE cluster.

    2. Install Pulumi CLI and Configure Kubernetes Provider: Make sure you have the Pulumi CLI installed and logged into your Pulumi account. You can find installation instructions on Pulumi's installation guide.

    3. Writing Pulumi Program: In your Pulumi project, you will create a TypeScript program that describes the deployment of the Riemann Helm chart using the Kubernetes provider.

    The following TypeScript program demonstrates how to deploy the Riemann Helm chart to the OKE cluster:

    import * as k8s from "@pulumi/kubernetes"; // Assume that the Pulumi setup and Kubernetes context (kubeconfig) have been set up to point to the OKE cluster. // This context will be used to communicate with the cluster. // Create a Kubernetes provider instance using the current context from the kubeconfig to interact with your OKE cluster. const provider = new k8s.Provider("oke-provider", { kubeconfig: process.env.KUBECONFIG, }); // Deploy a Helm chart for Riemann to OKE. You would replace `riemannRepoUrl` and `chartVersion` with the appropriate URL // to the repository that hosts the Riemann chart and the version of the chart you want to deploy. const riemannChart = new k8s.helm.v3.Chart("riemann-chart", { chart: "riemann", // The name of the chart. version: "chartVersion", // The specific chart version you wish to deploy. fetchOpts: { repo: "riemannRepoUrl", // Helm repository URL where the Riemann chart is located. }, values: { // Define any custom values for your Riemann chart here. // Example: serviceType: "LoadBalancer", // Customize these values according to your exact needs for Riemann. }, // Provide the provider created above to interact with your OKE cluster. }, { provider }); // Export any useful information, such as the external IP address that you might need to interact with Riemann. export const riemannUrl = riemannChart.getResourceProperty( "v1/Service", // Assuming the service you want to inspect is a v1 Service. "riemann-chart-riemann", // This would be the actual name of the deployed Riemann service resource. "status" ).apply(status => status.loadBalancer.ingress[0].ip); // This example assumes you're using a LoadBalancer service type.

    In the code above:

    • We import the Kubernetes package from Pulumi library which will be used to operate on Kubernetes resources.
    • We instantiate a Provider object with our Kubernetes configuration. Here, we assume that you have set the KUBECONFIG environment variable to point to the kubeconfig file of your cluster. If you haven't, make sure to set this up before running the program.
    • We use the Chart class to deploy the Riemann Helm chart. You need to provide the repo URL where the Helm chart is stored and the version of the chart to use. The values object is where you can pass in any configuration options that Riemann supports.
    • We export the riemannUrl, which will fetch the IP address of the LoadBalancer once the service is up and running. This allows you to access the Riemann dashboard or API externally.

    To run this Pulumi program:

    1. Save the code in a file named index.ts within your Pulumi project directory.
    2. Run pulumi up from your command line in the same directory. This will start the deployment process.
    3. Once deployment is complete, Pulumi will give you an output with the LoadBalancer IP, which you can use to access Riemann.

    This program is a template and might need adjustments, especially regarding the Helm chart's specific values and the properties you want to export based on your requirements for the Riemann application.