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

    TypeScript

    To deploy the ReportPortal Helm chart on Oracle Kubernetes Engine (OKE), you will need to perform several steps:

    1. Set up an OCI (Oracle Cloud Infrastructure) provider configuration to interact with your Oracle Cloud account.
    2. Create or obtain credentials for an existing Oracle Kubernetes Engine (OKE) cluster where you'll deploy the ReportPortal application.
    3. Use the oci.ContainerEngine.Cluster resource to represent the OKE cluster if you're managing it within Pulumi. Otherwise, you can set up a kubeconfig file to connect to an existing cluster.
    4. Utilize the kubernetes.helm.sh/v3.Chart resource from the Kubernetes provider to deploy the ReportPortal Helm chart onto your OKE cluster.

    Below is a TypeScript program that will guide you through the process of deploying the ReportPortal Helm chart to OKE. Before you proceed with the code, ensure you have the following prerequisites met:

    • The Pulumi CLI is installed and set up.
    • Oracle Cloud Infrastructure account is set up with necessary permissions.
    • You've got (or created) kubeconfig details for your OKE cluster.
    • You have Helm chart details (available on the ReportPortal GitHub or Helm repository).

    Here's the TypeScript program:

    import * as pulumi from '@pulumi/pulumi'; import * as k8s from '@pulumi/kubernetes'; import * as oci from '@pulumi/oci'; // Configuration for OCI provider // Ensure that your Oracle Cloud Infrastructure provider is configured with the required credentials. const provider = new oci.Provider('oci', { // Region e.g. 'us-ashburn-1' region: 'your-region', // Use your tenancy OCID tenancyOcid: 'your-tenancy-ocid', // Use your user OCID userOcid: 'your-user-ocid', // Use the private key from a keypair generated using OCI guidelines privateKey: 'your-private-key', // Use your fingerprint fingerprint: 'your-fingerprint', // Define your compartment OCID compartmentOcid: 'your-compartment-ocid', }); // Load kubeconfig from existing Oracle Kubernetes Engine (OKE) cluster const kubeconfig = 'content-of-your-kubeconfig'; const k8sProvider = new k8s.Provider('oke-k8s', { kubeconfig }); // Deploy the ReportPortal Helm chart const reportPortalChart = new k8s.helm.v3.Chart('reportportal', { // Define the Helm chart repository and name chart: 'reportportal', // Define the version of the Helm chart to use version: 'your-chart-version', // Define the values passed to the Helm chart, which configure ReportPortal values: { // Provide configuration options here. e.g., // service: { type: 'ClusterIP' }, }, }, { provider: k8sProvider }); // Export the ReportPortal endpoint export const reportPortalEndpoint = reportPortalChart.getResourceProperty('v1/Service', 'reportportal-ui', 'status').apply(status => `http://${status.loadBalancer.ingress[0].hostname}`);

    In the program above, you need to replace placeholder values such as your-region, your-tenancy-ocid, and other OCI-related details with your actual OCI account details. The kubeconfig variable should contain the kubeconfig file's content that is needed to connect to your OKE cluster.

    The kubernetes.helm.sh/v3.Chart resource is used to deploy the ReportPortal Helm chart. You need to provide the specific version you want to deploy in your-chart-version. If you need to configure specific values for the deployment (for example, to set up persistent storage or ingress settings), you can pass them in the values property of the Helm chart resource.

    The reportPortalChart.getResourceProperty function is used to extract the status of the service that ReportPortal creates, which can be used to get the external endpoint for accessing ReportPortal's UI if it's exposed publicly.

    Remember to consult the ReportPortal Helm chart documentation for detailed information about the configuration options available for the Helm chart.

    After setting the above values, you can deploy the Helm chart using the Pulumi CLI:

    pulumi up

    This will start the deployment process of ReportPortal on your OKE cluster. After the process is finished, Pulumi will output the reportPortalEndpoint, which you can use to access the ReportPortal UI if it is exposed to the public.