Installation on AWS with Terraform
Last updated
Last updated
This guide describes the full installation process of UltiHash in AWS environment including:
provision of EKS cluster in a dedicated VPC
deployment of the essential Kubernetes controllers
installation of UltiHash on the EKS cluster
This guide outlines the recommended UltiHash setup for managing 10 TB of data for testing purposes. The setup diagram in shown below. UltiHash cluster is deployed on a single EC2 instance of type r8g.4xlarge
with a network load balancer that routes traffic to it. The cluster uses gp3
volumes optimized for performance, ensuring efficient storage management.
Expected performance:
Write thoughput: up to 200 MB/s
Read throughput: up to 1000 MB/s
Expected costs:
Hourly:
EC2 cost: 1.14 USD
EBS cost: 1.58 USD
Monthly:
EC2 cost: 829.98 USD
EBS cost: 1152.38 USD
In case you have other storage requirements, you may freely change the volume sizes in the configuration. While this setup is intended as a test environment for UltiHash, you are free to select any EC2 instance type and EBS volume configurations for production purposes based on your specific needs.
AWS account
installed and configured AWS CLI
installed terraform
installed kubectl of version 1.28
personal credentials found on the UltiHash dashboard
Since the Terraform state for this setup has to be stored on S3, need to provision a dedicated S3 bucket. Execute the following command, replacing the <bucket-name>
and <aws-region>
placeholders:
Clone the repository by executing the command below:
Later its code will be required to setup UltiHash in AWS environment.
Since UltiHash has to be deployed on Kubernetes cluster, need to provision EKS cluster on AWS. For this purpose use this Terraform project. The project deploys a dedicated VPC and provisions there an EKS cluster with a single c5.large
machine to host the essential Kubernetes controllers.
Once the scripts repository is cloned, perform the following actions to deploy the Terraform project:
Update the bucket name
and its region
in the main.tf with the onces done at the previous step.
Update the configuration in config.tfvars. The only required change is the parameter cluster_admins
- specify the list of ARNs of IAM users and/or IAM roles that need to have access to the provisioned EKS cluster. Other parameters could be left intact.
Initialize and apply the Terraform project
Wait until the installation is completed.
Make sure the access to the EKS cluster has been granted to the required IAM users and roles To check that, download the kubeconfig
for the EKS cluster, executing the command below. Replace the <cluster-name>
(by default ultihash-test
) and the <aws-region>
(by default eu-central-1
) with the corresponding values defined in config.tfvars
Execute the following kubectl
command to check the available EKS cluster nodes:
The command has to output a name of a single provisioned EC2 instance.
The next step is installation of the essential Kubernetes controllers on the provisioned EKS cluster. For this purpose use this Terraform project. The project deploys the following Kuberentes controllers on the EKS cluster:
Nginx Ingress
- exposes UltiHash outside of the EKS cluster with a Network Load Balancer.
Load Balancer Controller
- provisions a Network Load Balancer for the Nginx Ingress
controller.
Karpenter
- provisions EC2 instances on-demand to host UltiHash workloads.
EBS CSI Driver
- CSI controller that automatically provisions persistent volumes the UltiHash workfloads. The volumes are based on gp3
storage class and optimised in terms of performance.
Perform the following actions to deploy the Terraform project:
Update the bucket name
and its region
in the main.tf with the onces done at the previous step.
Update the configuration in config.tfvars if required. The helm values for the deployed controlers are found here. It is not recommended to change any of these configurations, the only parameter that should be selected in advance is the Network Load Balancer type
(internal
or internet-facing
) in this file.
In case it is required to change the instance type for the UltiHash services, update it in the following Karpenter manifest.
Initialize and apply the Terraform project
Wait until the installation is completed. A Network Load balancer should be provisioned in the same region as the EKS cluster.
The last step is installation of UltiHash. For this purpose use this Terraform project. Perform the following actions to deploy the Terraform project:
Update the bucket name
and its region
in the main.tf with the ones done at the previous step.
Update the configuration in config.tfvars with the credentials obtained from your account on ultihash.io. The credentials in the config.tfvars
are mocked. The helm values for UltiHash are found here.
Initialize and apply the Terraform project
Wait until the installation is completed.
The UltiHash cluster is installed in the default
Kuberentes namespace, you kubectl
to see the deployed workloads:
To get access to the deployed UltiHash cluster, configure your AWS CLI/SDK with the Ultihash root credentials:
Finally access the UltiHash cluster by using AWS CLI/SDK, use the domain name of the Network Load Balancer provisioned at the previous step:
To uninstall all previously deployed AWS resources follow these steps:
Uninstall UltiHash:
Uninstall Kubernetes controllers:
Uninstall the EKS cluster: