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:
-
Setting up a load balancer or services mesh to handle SSL is recommended, see Configuring Optimizer Hub with SSL Authentication.
-
Check Recommended Kubernetes Pods and Nodes Sizing to define the sizing of your cluster.
-
Helm is required to set up your Optimizer Hub instance. Azul provides Optimizer Hub Helm Charts on GitHub, which you can download as a zip package.
-
If you are upgrading an existing installation, make sure to check "Upgrading Optimizer Hub".
Recommended Kubernetes Pods and Nodes Sizing
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".
-
Install Azul Zing Builds of OpenJDK 24.02 or newer on your client machine.
-
Make sure your Helm version is
v3.8.0or newer. -
Add the Azul Helm repository to your Helm environment:
helm repo add opthub-helm https://azulsystems.github.io/opthub-helm-charts/ helm repo update -
Create a namespace (i.e.
my-opthub) for Optimizer Hub.kubectl create namespace my-opthub -
Create the
values-override.yamlfile in your local directory. -
If you have a custom cluster domain name, specify it in
values-override.yaml:clusterName: "example.org" -
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 -
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.yamlfile:simpleSizing: vCores: 39 minVCores: 39 maxVCores: 113Based on your needs, you can go up to
maxVCores: 500. -
Configure the blob storage according to your environment in your
values-override.yamlfile: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:
-
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.
-
Install using Helm, passing in the
values-override.yamlfile.helm install opthub opthub-helm/azul-opthub \ -n my-opthub \ -f values-override.yamlThis 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 -
Verify that all started pods are ready:
kubectl get all -n my-opthub -
Configure Prometheus and Grafana as described here. These are required for monitoring and getting insights into how Optimizer Hub is uses within your environment.