1. Deploy the wavefront helm chart on Azure Managed Openshift Service

    TypeScript

    To deploy the Wavefront Helm chart on an Azure Red Hat OpenShift (ARO) cluster, you'll need to accomplish a multi-step process:

    1. Create an Azure Red Hat OpenShift cluster: You would use the azure-native.redhatopenshift.OpenShiftCluster resource to create an ARO cluster.

    2. Install Helm: Helm is a package manager for Kubernetes. You'll be using Helm to deploy the Wavefront chart.

    3. Deploy Wavefront Helm chart: Make use of the kubernetes.helm.sh/v3.Chart resource to deploy the Wavefront chart once Helm is installed and you have access to the ARO cluster.

    Below is the Pulumi program in TypeScript that demonstrates these steps. This program assumes you've already logged in to Azure through the Azure CLI (az login) and have also set up the Pulumi CLI with your account information.

    Let's go through the detailed program:

    import * as pulumi from "@pulumi/pulumi"; import * as azureNative from "@pulumi/azure-native"; import * as k8s from "@pulumi/kubernetes"; // Step 1: Create an Azure Red Hat OpenShift cluster // Consider changing parameters accordingly const openShiftCluster = new azureNative.redhatopenshift.v20200430.OpenShiftCluster("aroCluster", { resourceGroupName: "myResourceGroup", // ensure the resource group exists or is created separately resourceName: "aroCluster", location: "eastus", clusterProfile: { pullSecret: "<Your Pull Secret>", domain: "example.com", // replace with your domain version: "4.3.25", // specify your desired OpenShift version }, masterProfile: { vmSize: "Standard_D8s_v3", // choose the appropriate VM size }, networkProfile: { vnetCidr: "10.0.0.0/22", }, workerProfiles: [{ vmSize: "Standard_D4s_v3", // choose the appropriate VM size diskSizeGB: 128, name: "worker", // a name for the worker profile count: 3, // specify the number of worker nodes }], }); // After cluster creation, we will use a Kubernetes Provider to connect to the OpenShift cluster. // Note that you'll need to retrieve the kubeconfig from Azure manually or // set up a method to retrieve it programmatically. // Placeholder for Kubernetes cluster configuration const kubeconfig: pulumi.Output<string> = pulumi.output("your-kubeconfig-content"); // Step 2: Setup Kubernetes provider to interact with Azure Red Hat OpenShift const openshiftProvider = new k8s.Provider("openshiftProvider", { kubeconfig: kubeconfig, }); // Step 3: Deploy Helm chart for Wavefront const wavefrontChart = new k8s.helm.v3.Chart("wavefront", { chart: "wavefront", version: "1.3.0", // use the version of the helm chart that you want to deploy namespace: "wavefront", fetchOpts: { repo: "https://wavefronthq.github.io/helm/", // official Wavefront Helm chart repository URL }, // Specify the helm values.yaml content or use 'set' for overrides // Here is an example of 'set' for overriding values in the values.yaml file /* values: { clusterName: "production", wavefront: { url: "https://YOUR_CLUSTER.wavefront.com", token: "YOUR_API_TOKEN", }, }, */ }, { provider: openshiftProvider }); // Stack export of the chart status export const chartStatus = wavefrontChart.status;

    Explanation

    • Resource Group: The OpenShift cluster is deployed into an Azure resource group specified by resourceGroupName. Replace "myResourceGroup" with your existing or new resource group name.

    • Cluster Profile: The clusterProfile includes the OpenShift pull secret which can be obtained through Red Hat, and the domain for routing.

    • VM Size: The master and worker node sizes are specified in masterProfile and workerProfiles. Choose appropriate sizes based on the workload.

    • Networking: The networkProfile defines the overall network CIDR for the cluster.

    • Kubeconfig: Before this code can work, you'd need to obtain the kubeconfig from your ARO cluster, which can be obtained through Azure CLI or the Azure portal once the cluster is provisioned. This will allow the Provider to manage resources in the cluster.

    • Wavefront Chart: The chart is deployed using the Pulumi Kubernetes provider, specifying the repository where the Wavefront Helm chart is stored.

    • Chart Version: Make sure to specify the version of the Wavefront Helm chart you wish to deploy.

    • Values: You can specify or override specific Helm chart values as needed. In the example, the values section is commented out, but you can uncomment and replace the placeholders with actual configuration values for Wavefront.

    Important Notes

    • Manual Steps: The generation and retrieval of the kubeconfig file for the OpenShift cluster is a manual step and must be done outside the Pulumi program. Refer to Azure documentation on how to get this information after deploying an ARO cluster.

    • Permissions: Ensure that you have the necessary permissions in both Azure and Pulumi to create these resources.

    • Costs: Remember that deploying cloud resources will incur costs. Check the Azure pricing pages for details on the cost of Azure Red Hat OpenShift (ARO) clusters and related services.

    • Helm Values: You’ll need to configure the Helm chart with accurate values for your Wavefront installation, such as the URL and the API token, which are not included in this example for security reasons.

    This program should give you a working starting point to deploy the Wavefront Helm chart on an Azure Red Hat OpenShift Service. Adjust any parameters as necessary according to your specific requirements and use cases. After deploying it, ensure to monitor your deployment within the Azure Portal and Wavefront to confirm that everything is functioning as expected.