- Introduction
- Getting Started
- Prerequisites
- Setup on Civo
- Project Configuration
- Deployment Configuration
- Commands to Setup the Application
- Customizable Steps in the Values
- Troubleshooting
- Contributing
OpenHands OpenHands is an innovative open-source AI-powered software development agent created by All Hands AI. This tool is designed to autonomously tackle software development tasks, significantly enhancing productivity for developers. This project is designed to run OpenHands over a Kubernetes Cluster on Civo Cloud using Terraform.
- A Civo Cloud account.
- A Civo Cloud API Key.
- Terraform installed on your machine.
- Helm installed on your machine
-
Obtain your Civo API key from the Civo Cloud dashboard.
-
Create a file named terraform.tfvars in the project's root directory.
-
Insert your Civo API key into this file as follows:
civo_token = "YOUR_API_KEY"
Project configurations are managed within the tf/variables.tf
file. This file contains definitions and default values for the Terraform variables used in the project.
Variable | Description | Type | Default Value |
---|---|---|---|
cluster_name |
The name of the cluster. | string | "civo-openhands" |
cluster_node_size |
The GPU node instance to use for the cluster. | string | "g4c.kube.medium" |
cluster_node_count |
The number of nodes to provision in the cluster. | number | 2 |
civo_token |
The Civo API token, set in terraform.tfvars. | string | N/A |
region |
The Civo Region to deploy the cluster in. | string | "LON1" |
Key | Value | Description |
---|---|---|
replicaCount |
1 |
The number of replicas to run for the deployment |
image |
docker.all-hands.dev/all-hands-ai/openhands:0.19 |
The Docker image to use for the deployment |
SANDBOX_RUNTIME_CONTAINER_IMAGE |
docker.all-hands.dev/all-hands-ai/runtime:0.19-nikolaik |
The default sandbox container runtime image for Openhands |
Make sure you're in the correct directory openhands-infra/tf/
before running the following set of commands:
-
Initialize Terraform:
terraform init
This command initializes Terraform, installs the required providers, and prepares the environment for deployment.
❗️Note: Be sure to replace the
civo_token
variable with yourCivo API Key
in theterraform.tfvars
file -
Plan Deployment:
terraform plan
This command displays the deployment plan, showing what resources will be created or modified.
-
Apply Deployment:
terraform apply
This command applies the deployment plan. Terraform will prompt for confirmation before proceeding with the creation of resources.
Once all of the resources get created and the application has been deployed you should be able to see the application pod running in the openhands
namespace.
After making sure the application pod is happy, you can access the Openhands application by following either choice of methods:
a. Service LoadBalancer External IP
kubectl get svc -n openhands
b. Port forward the application container
kubectl port-forward <pod-name> <local-port>:3000
c. Access via civo loadbalancer dns from your civo dashboard
- Once you have access to the application you should be able to add your choice of LLM model along with the corresponding API Key. For more info on advanced configuration, refer the openhands documentation.
- Once you've connected your LLM, give it a prompt or connect it to your github repository and play around with it.
The values.yaml
file contains customizable settings for the OpenHands deployment. You can modify the values to suit your specific needs.
Key | Value | Description |
---|---|---|
openhands.config |
{key: value} |
Custom configuration for OpenHands |
pvc.size |
300Gi |
The size of the persistent volume claim |
service.type |
LoadBalancer |
The type of service to expose |
To customize the values, modify the file values.yaml
with the desired settings.
- If you encounter issues with the deployment, check the Helm logs by running the command
helm logs openhands
. - If you encounter issues with the OpenHands application, check the container logs by running the command
kubectl logs <pod-name>
.
To contribute to the OpenHands on Civo project, follow these steps:
- Fork the repository to your own GitHub account.
- Create a new branch for your feature or bug fix.
- Make changes to the code and commit them to your branch.
- Open a pull request to the main repository.
- Wait for the pull request to be reviewed and merged.