Visit Azul.com Support

Installing Optimizer Hub on Kubernetes

Optimizer Hub uses Helm as the deployment manifest package manager. There is no need to manually edit any Kubernetes deployment manifests. You can configure the installation overriding the default settings from values.yaml in a custom values file. Here we refer to the file as values-override.yaml but you can give it any name.

You should install Optimizer Hub in a location to which the JVM machines have unauthenticated access. You can run Optimizer Hub in the same Kubernetes cluster as the client VMs or in a separate cluster.

Prerequisites

Before installing Optimizer Hub, make sure to check the following prerequisites:

Please follow these guidelines to set up your Kubernetes environment.

Kubernetes Pods

The sizes for the pods are specified in values.yaml file, as part of the Helm chart:

  • Gateway: CPU 7, RAM 28GB

  • Compile Broker: CPU 7, RAM 28GB

  • Cache: CPU 7, RAM 28GB

  • gwProxy: CPU 7, RAM 1GB

  • Management Gateway: CPU 2, RAM 2GB

  • Operator: CPU 1, RAM 2GB

Requirements for ephemeral storage (temporary storage space allocated to Kubernetes pods that is non-persistent and exists only for the lifetime of the pod):

  • Compile Broker: 8GB

  • All other pods: 1GB

Kubernetes Nodes

The underlying Kubernetes nodes (either cloud instances or physical computers) have to be large enough to fit one or more of the pods. This means they need to provide a multiple of 8 vCores with 4GB of RAM per vCore. For example: 8 vCore with 32GB, 16 vCores with 64GB, etc.

Note
Ensure the instances you run your Optimizer Hub have enough CPU to handle your requests. For example, on AWS use m6 and m7 instances, and on Google Cloud Platform c2-standard-8 instances.

Installing Optimizer Hub

These instructions are for installing a full Optimizer Hub instance with both Cloud Native Compiler and ReadyNow Orchestrator. In case you only want to install the full Optimizer Hub, but only a part of the services, see "Configuring the Active Optimizer Hub Services".

  1. Install Azul Zing Builds of OpenJDK 24.02 or newer on your client machine.

  2. Make sure your Helm version is v3.8.0 or newer.

  3. Add the Azul Helm repository to your Helm environment:

     
    helm repo add opthub-helm https://azulsystems.github.io/opthub-helm-charts/ helm repo update
  4. Create a namespace (i.e. my-opthub) for Optimizer Hub.

     
    kubectl create namespace my-opthub
  5. Create the values-override.yaml file in your local directory.

  6. If you have a custom cluster domain name, specify it in values-override.yaml:

     
    clusterName: "example.org"
  7. If you want specific labels being added to your Kubernetes objects, define them in your values-override.yaml, for example as follows:

     
    gateway: applicationLabels: # Additional labels for Deployment/StatefulSet podTemplateLabels: # Additional labels for POD serviceLabels: # Additional labels for Service
  8. Configure sizing of the Optimizer Hub components according to the sizing guide. By default, autoscaling is enabled and Optimizer Hub requires 39 vCores and can scale up to 10 Compile Brokers. For example, you could set the following in your values-override.yaml file:

     
    simpleSizing: vCores: 39 minVCores: 39 maxVCores: 113

    Based on your needs, you can go up to maxVCores: 500.

  9. Configure the blob storage according to your environment in your values-override.yaml file:

     
    storage: # Available options: s3, azure-blob, gcp-blob blobStorageService: s3 # Depending on the type of storage, configure the extra settings s3: ... azureBlob: ... gcpBlob: ...

    For more detailed blob storage instructions, please check:

  10. If needed, configure external access in your cluster. If your JVMs are running within the same cluster as Optimizer Hub, you can ignore this step. Otherwise, it is necessary to configure an external load balancer in values-override.yaml.

    For clusters running on AWS an example configuration file is available on Azul’s GitHub.

  11. Install using Helm, passing in the values-override.yaml file.

     
    helm install opthub opthub-helm/azul-opthub \ -n my-opthub \ -f values-override.yaml

    This command should produce output similar to this:

     
    NAME: opthub LAST DEPLOYED: Wed Jan 31 12:19:58 2024 NAMESPACE: my-opthub STATUS: deployed REVISION: 1 TEST SUITE: None
  12. Verify that all started pods are ready:

     
    kubectl get all -n my-opthub
  13. Configure Prometheus and Grafana as described here. These are required for monitoring and getting insights into how Optimizer Hub is uses within your environment.

Specifying Numeric Configuration Values

You can define size values in helm charts, e.g. values-override.yaml, with different notations.

  • Number format

    Example: 5000000

  • Decimal format: M, G,…​

    Example: 5M instead of 5000000

  • Binary format: Mi, Gi,…​

    Example: 20Mi instead of 20971520

Cleaning Up

To uninstall a deployed Optimizer Hub, run the following command:

 
helm uninstall opthub -n my-opthub kubectl delete namespace my-opthub