Skip to main content

Overview

This article walks the installer through the process of bringing the environment up to test LILT in a secure platform, whether in the cloud (public or private), or on bare-metal hardware. The intent is to limit the amount of manual console interaction in favor of scripted installation that is fully documented. In working through the installation, references will be made as appropriate to provide context.

System Parameters/Versions:

  • LILT: 5.0-5.1
  • Base OS:
    • Amazon Linux 2023: ami-05576a079321f21f8
    • Rocky 8.10/9.5
  • K8S: 1.32.4
  • Pause: 3.10 (can be configured in containerd/config.toml)
  • Containerd:
    • 2.0.5 (v2.0.0+ requires K8 >= 1.30 and Rocky 9 with kernel 5.x)
    • 1.6.x/1.7.x (Rocky 8 with kernel 4.x)
  • Runc: 1.2.6
  • CNI plugin: 1.7.1
  • Flannel, 0.26.0
  • NVIDIA Driver: 565.57.01, dkms
  • Cuda: 12.7
  • Cuda-toolkit: 12.6
  • Cudnn: 9.6.0
  • GPU: L4 (current standard; A10G also validated)

Tools you will need

SSH to connect to systems.
  • On the Mac or Linux, you can open a terminal window and use ssh.
  • On Windows, you can use the PuTTY ssh client.
Web browser for post installation and verification.

Installer privileges

Many sections of this article include text formatted to indicate console input and output. The commands are prefixed with a $ or # depending on if the administrator should run them as root or not. Additionally, to assist the user to know which machine to run commands on, the prefix node, master, and gpu will be given when the machine should be switched. All following commands after a switch should use those.

Prerequisites

Before running installation scripts we need to prepare the system with all the dependencies.

Data Location

For the rest of the installation, please ensure that: Containerd, images and RPM packages are mounted and available to all of the nodes (master, worker, and GPU). In the typical installation, the system administrator will receive this data from LILT prior to installation, and the system administrator will mount all requirements.

Kubernetes Cluster Installation

Installation Overview

Kubernetes
The LILT system is a collection of containers that interact with each other. LILT requires the use of Kubernetes to handle orchestration. Further, there must be persistent volume storage mounted to nodes in Kubernetes.
LILT Component Overview
Note: See the section “LILT System Architecture Diagram” for a visual depiction of the following information. The LILT application consists of three major logical component groups:
  • “Front”, which services API calls as well as the interface and editor logic
  • “Neural”, which performs neural machine translation
  • “Core”, which performs linguistic pre-processing and post-processing, as well as document import and export
RabbitMQ is used for message passing between the services; MySQL is used for the application database, ElasticSearch for search purposes, Minio as s3 storage, OpenEBS for storage allocation, nginx-ingress as ingress controller and Redis for a memory cache. For each of these 7 services, LILT will provide a containerd image that is installed as part of the installation process. Optionally, customers can use a self-hosted version of any of those five services that can be pointed to by the LILT system (for example, a separately running ElasticSearch instance, AWS RDS in place of mysql, or s3 instead of minio). Finally, there must be a persistent location for stored user documents that is mountable as a persistent volume to a Kubernetes node. This volume will be used by Minio, Elasticsearch, MySql, Redis and RabbitMQ.

LILT System Architecture Diagram

Refer to: https://self-managed-docs.lilt.com/kb/lilt-system-architecture

System Maintenance and Update Frequency

LILT recommends a system update every quarter. The update can proceed in one of two ways:
  1. (Recommended) A customer systems engineer installs the system from scratch given an installation document and assets package delivered via cloud or flash drive.
  2. A LILT systems engineer is given SSH access to the customer system, and performs the update remotely.
To schedule a system update, contact your Account Manager. LILT recommends a minimum of three separate servers as nodes for the kubernetes cluster.

k8s-master server

This server controls cluster scheduling, networking and health. In comparison to the node server(s), it is resource-light. Instance type: m5.xlarge (4 vCPUs, 16 GB RAM) Disk space: 500 GB

k8s-node server(s)

These server(s) are the main application workhorse and listen to the master server, host containerd containers for the main application, and mount storage. Usually, one node suffices, but for increased system performance, multiple nodes can be setup. In that case, the hardware requirements should be correspondingly replicated for each node, with the exception of the disk mounts. Disk mounts need to be shared across all nodes. A few notes here:
  1. The total system requirements for the node server can either be fulfilled on a single machine, or split among multiple nodes that in sum are equal or greater than the recommended system requirements. However, if splitting the node server into separate physical nodes, please note that individual nodes have minimum requirements; see the details below.
  2. On the nodes with GPUs installed, NVIDIA drivers will have to be installed (these will be specified in the installation document).
Worker Node
Instance type: r5n.24xlarge (96 vCPUs, 768 GB RAM) Total disk space: 2 TB
  • If create multiple drives
    • Boot disk space: 400 GB
    • Common space: 1.6 TB (increase based on total documents ingested).3
      • containerd and all PVCs
If unable to create multiple mounts/drives and all data is stored in root, one drive of 2TB is sufficient.
GPU Node
V4 models require a minimum of 24 GB GPU memory; either two combined T4s, one L4, one A10, or one A100. Batch processing requires a minimum of one GPU; T4, L4, A10, or A100. The following are tested recommendations but any configure can be utilized as long as the minimum requirements are met. Minimum instances, T4 GPUs (node with 2 GPUs required for translate v4, node with 1 GPU required for batch):
  • 1 x g4ad.8xlarge (32 vCPUs, 128 GB RAM, 2 GPUs)
  • 1 x g4dn.4xlarge (16 vCPUs, 64 GB RAM, 1 GPU)
Sufficient instance type, T4 GPUs: g4dn.12xlarge (48 vCPUs, 192 GB RAM, 4 GPUs) Preferred instance type, L4 GPUs (current standard; see Self-Managed Hardware Requirements): g6.12xlarge (48 vCPUs, 192 GB RAM, 4 GPUs) Optimal instance type, L4 GPUs: g6.48xlarge (192 vCPUs, 768 GB RAM, 8 GPUs) Alternative instance type, A10 GPUs (still supported): g5.12xlarge (48 vCPUs, 192 GB RAM, 4 GPUs) or g5.48xlarge (192 vCPUs, 768 GB RAM, 8 GPUs) Total disk space: 2 TB. These store pods’ runtime assets, including large neural assets.

Install Kubernetes Cluster

All Nodes (master, worker, gpu)

Login to the each node and complete the following steps. Commands have to be performed as root (since it involves installation of Kubernetes).

Step 1: Update base OS, Install required packages

Each base OS has different package requirements.
  • Amazon Linux 2023:
  • Rocky 8/9:

Step 4: Set kernel parameters as required by Istio

Step 5: Set kernel parameters as required by Kubernetes

Step 6: Turn off swap, disable SELinux, update local firewall changes, and modify max_map_count

NOTE: if using version of K8S older than v1.29, it is possible that insecure port (10255) is still being utilized. The following setup does NOT include the old insecure port. It is highly recommended that customers upgrade to K8S v1.30 or higher which includes the new secure port (10250) by default.

Step 7: Install containerd and add runc to the runtime

Step 8: Install cni plugin

Step 9: Setup containerd

Create containerd directory:
NOTE: If need to specify pause sand_box image, add the following to each respective config.toml:
Master and Worker Nodes:
GPU Nodes:

Step 10: Install & Setup - Kubernetes

Verify the installation by checking the packages version

Step 11: Reboot node/server

Step 12 (GPU NODE ONLY): Install NVIDIA Drivers

Each base OS has different package requirements.
  • Amazon Linux 2023:
  • Rocky 8:
  • Rocky 9:
Verify that all NVIDIA drivers/packages were correctly installed
Output should be similar to the following (depending on the number of server GPUs). If not, reinstall NVIDIA drivers from the previous section:
Verify cuda toolkit installed:
Output should be similar to the following:
Very container-toolkit installed:
Output should be similar to the following:

Initialize Cluster

Master Node

Login to the k8s-master node and follow the below steps. Note that the following steps have to be performed as root (sudo su -) (since it involves installation of Kubernetes). Run below command to initialize and setup Kubernetes master.
NOTE: Ensure that CNI and Service CIDRs do NOT conflict with local server/node IP addresses. CNI_CIDR must match Flannel IP value set below.
CIDR, 192.168.100.0/19, will allow for up to 32 nodes (flannel reserves one subnet for each node). If more nodes are required, need to increase netmask/subnet size. CNI and service CIDRs can be modified to match respective network requirements:
Save the section of the output that resembles the following, as you will need it to join the worker nodes to the master:
To use kubectl commands, need to update kubeconfig (regular or root user):
Verify that node has been installed correctly:
Expected output:
NOTE: STATUS will be NotReady until Flannel is installed.
If a period of time has passed between initializing cluster and joining nodes and the join token is expired, run the following command to create a new join token:

Worker Node

Login to the k8s-worker node and follow the below steps. Note that the following steps have to be performed as root (sudo su -) (since it involves installation of Kubernetes). Run following command to join the Kubernetes cluster created in the previous section:
From the master node, verify that the worker node has joined correctly:
Expected output:
NOTE: STATUS will be NotReady until Flannel is installed.

GPU Node

Login to the k8s-gpu node and follow the below steps. Note that the following steps have to be performed as root (sudo su -) (since it involves installation of Kubernetes). Run following command to join the Kubernetes cluster created in the previous section:
From the master node, verify that the worker node has joined correctly:
Expected output:
NOTE: STATUSwill be NotReady until Flannel is installed.

Prepare the LILT Platform

Import Dependencies

All images and scripts are packaged based on system requirements. Lilt is designed to work as a distributed system, utilizing specific nodes for each workload. It is not necessary to download the entire install package on each node. The following examples utilize a remote s3 bucket for retrieving data.
Highly recommended to use a central repository for all images. The below examples utilize local image storage on each node. If using a central repository, containerd image import sections can be ignored. If use a central repository, ensure to modify all helm charts to replace the default value lilt-registry.local.io:80

Step 1: Set Release Tag (all nodes)

This can be ignored if downloading the entire package separately. Login to each node (master, worker, gpu) and set release tag var:

Step 2: Import install packages and images

Master Node Login to the k8s-master node and follow the below steps. Note that the following steps have to be performed as root (sudo su -). Move to the root directory:
Download install package and documentation from remote s3 bucket:
Unpack installer:
If not using a central image repository, complete the following:
  • Download required images:
    • istio pilot/proxyv2/install-cni/ztunnel/kiali
    • flannel
  • Load images to containerd (update <release-tag>):
Worker Node Login to the k8s-worker node and follow the below steps. Note that the following steps have to be performed as root (sudo su -). Move to the root directory:
If not using a central image repository, complete the following:
  • Download required images (all of them):
Load images to containerd (update <release-tag>):
GPU Node Login to the k8s-gpu node and follow the below steps. Note that the following steps have to be performed as root (sudo su -). Move to the root directory:
If not using a central image repository, complete the following:
  • Download required images:
    • istio_pilot/proxyv2/install-cni/ztunnel/kiali/k8s-device-plugin/metrics-server/flannel
    • all neural/llm/batch
  • Load images to containerd (update <release-tag>):

Step 3: Label Nodes

Lilt cluster utilizes nodeSelector for scheduling pods on specific nodes. This is a simple way to control where pods are scheduled by adding a key-value pair to chart/manifest specifications. Master Node Login to the k8s-master node and follow the below steps. Note that the following steps have to be performed as root (sudo su -). Worker node is used for running the bulk of application workloads, typically separate from the master and GPU nodes. Label this node as worker (node name set in the above section) by executing the following command:
GPU node is generally used for running GPU intensive pods/applications aside from the worker node; however, this node can also be used for additional workloads if the instance has sufficient resources to handle GPU and application tasks. This decision is up to the cluster admin to determine if GPU nodes can also handle application workloads. If using this node for standard GPU services (translate, batch) and LLM services (llama, gemma and whisper) label as gpu (node name set in the above section) by executing the following command:
Optional: if the GPU node has sufficient resources to run additional workloads, also add worker label:
Verify output:
If necessary to remove a previous node label, use the following command. Is this example, removing node-type label from the gpu node

Step 4: Create Namespaces

The cluster uses various namespace to separate pods and services. Master Node Login to the k8s-master node and follow the below steps. Note that the following steps have to be performed as root (sudo su -).
Confirm that namespaces were created:
Output should be similar to the following:

Step 5: Modify Flannel Helm Chart Values

Flannel helm chart CIDR must match k8s CIDR range. Master Node Login to the k8s-master node and follow the below steps. Note that the following steps have to be performed as root (sudo su -). Modify flannel on-prem-values.yaml:
Edit podCidr to match k8s CNI_CIDRset above:
Save file and exit.

Step 6: Image Pull Secrets (optional)

If using a private central repository for hosting images that requires authentication, create image pull secrets for the cluster to reference. The following example utilizes username and password, for service accounts with a json key use this document Create imagePullSecrets Master Node Login to the k8s-master node and follow the below steps. Note that the following steps have to be performed as root (sudo su -). Create cluster image pull secret:
NOTE: Image pull secrets are namespace specific, must create a new secret for each additional namespace.
Verify secret was created:
LILT helm charts utilize a custom values file, usually on-prem-values.yaml. Update these files with the new imagePullSecret. As an example, this is from redis custom values:

Install LILT

LILT app

Assuming that all images have been loaded into the nodes as explained in the previous steps, we can proceed to install the apps

Step 1: Installation

Run the main install script, this includes all third-party and lilt dependencies. This can take up to two hours to fully complete. Change to install directory:
Run install script:
If installed k9s, can monitor install progress:
If did not install k9s, use kubectl to watch pods:
Can also watch k8s events:
When ready, list all pods:
Output should be similar to the following:

Step 2: Access Lilt Main Page

Once all pods are running/ready, connect to the LILT main page. Default domain name is bare.lilt.com, and is reachable via nginx-ingress running on the worker node. If accessing from a workstation inside the cluster network, get the local ip address of the worker node:
If accessing from an external source, check the cloud provider public IPv4 address assigned to the worker node Once the correct ip address is determined, modify the hosts file on your local workstation:
Add a line for the worker node ip address and bare.lilt.com:
Navigate to LILT using a browser, bare.lilt.com:
After the admin password is set, LILT can be accessed via bare.lilt.com/signin.

Debugging

Depending on network speed(to download/upload containerd images) some of the pods can take more time than others, here are some known debugging techniques:
  1. If you see
Error: UPGRADE FAILED: timed out waiting for the condition, please continue as this can happen due to time taken by the pods to startup, apps deployment happens as expected.
  1. If you see pods stuck in
ContainerCreating for a longer time(>15 mins), it’s safe to restart the pods by using kubectl delete pod -n lilt <podname>
  1. If the apps aren’t healthy even after all containerd images have been loaded to the node, it’s safe to revert to previous version and redo the install, use below commands for the same:

Flannel Error

Sometimes flannel does not load correctly on all nodes. Verify which node that the flannel init container does not complete and restart containerd:

Gateway Error 502

Sometimes after a server reboot, nginx-ingress needs to be restarted to include new values for front. Try restarting the nginx-ingress daemonset:

CORE Pods

When a cluster is restarted, core pods may be stuck in CrashLoopBackOff. A potential fix is to delete the elasticsearch helm deployment and PVCs and then re-deploy elasticsearch:
If some core pods are still not running, try to restart lilt-beehive deployment:

GPUs

If GPUs are not working, verify that the expected number is allocated to the cluster:
Output should similar to the following (GPU node shows 8, main and worker nodes show 0):
If the output shows zero for all nodes, reinstall GPU drivers from the above section and reapply nvidia-device-plugin sh install_scripts/install-nvidia-device-plugin.sh

Translate v4

Sometimes after a server reboot, translate pods will not initialize. This can be attributed to service endpoints not refreshing from the previous deployment. Possible solutions are restarting the rabbitmq statefulset and minio deployment:

Restart all Deployments/Statefulsets

If have various pod failures, can also try and restart all Lilt deployments and statefulsets:

Reset Cluster

If there are any issues that can’t be resolved, as last resort reset each node in the cluster.
NOTE: reseting the cluster will not remove all configuration artifacts. Follow the onscreen output instructions from the below reset command.

All Nodes (master, worker, gpu)

Login to the each node and complete the following steps. Commands have to be performed as root (since it involves installation of Kubernetes).
Reset the node:
Reinstall the cluster starting from the beginning of this document.