Setting up GroundX On-Prem on AWS
A Simple Guide to Installing GroundX On-Prem onto AWS
In this tutorial we’ll deploy GroundX On-Prem onto AWS, and then use that On-Prem instance to implement Retrieval Augmented Generation (RAG) in a manner that can be isolated from all external dependencies. isolated RAG might be useful in a variety of use cases, especially those where RAG functionality is required within highly secure environments.
GroundX On-Prem is offered in a variety of forms:
- As a free and open source repo (github)
- As a paid product with more advanced capabilities than the free version
- As a service with white glove support
We’ll be using the free and open source version.
⚠️ Warning ⚠️
The resources created by following this guide will incur cost via AWS. It is recommended to follow all instructions accurately and completely. Taredown instructions are provided which, when followed, will properly discard all created resources. Experience with AWS is recommended.
Prerequisites
Please ensure you have the following software tools installed before proceeding:
- bash shell (version 4.0 or later recommended. AWS Cloud Shell has insufficient resources.)
- terraform (Setup Docs)
- AWS CLI (Setup Docs)
- kubectl (Setup Docs)
1) Defining the Infrastructure
Naturally, a good first step is to clone this repo. If you haven’t yet, run
Then run
env.tfvars
is the configuration file terraform will use when defining the resources. The content of env.tfvars
can be modified to update this configuration as necessary. By copying env.tfvars.example
to env.tfvars
you will be using the default configuration.
Once that’s been set up, you can trigger terraform to set up the requisite resources via the following command:
You will be prompted for an AWS region to set up your cluster, and will also be asked to double check that you’re happy with the state of the configuration file.
Once this command has executed all infrasturcual resources will have been created, and you can proceed to deploying GroundX.
2) Deploying GroundX
Not that the compute resources necessary to deploy GroundX have been constructed, we can deploy GroundX onto those resources.
First, run
This copies an example config file for the GroundX application, similarly to what was done in step 1. Now, however, some configuration is required.
For security reasons, you MUST modify the following within operator/env.tfvars
:
admin.api_key
: Set this to a random UUID. You can generate one by runningbin/uuid
. This will be the API key associated with the admin account and will be used for inter-service communications.admin.username
: Set this to a random UUID. You can generate one by runningbin/uuid
. This will be the user ID associated with the admin account and will be used for inter-service communications.admin.email
: Set this to the email address you want associated with the admin account.
once operator/env.tfvars
has been properly configured, run
This will deploy GroundX On-Prem onto the kubernetes cluster defined in Step 1.
3) Setting Up A Client To Talk TO GroundX On-Prem
Once the setup is complete, run kubectl -n eyelevel get svc
to get the API endpoint. It will be the external IP associated with the GroundX load balancer.
For instance, the “external IP” might resemble the following:
That endpoint, in conjunction with the admin.api_key
defined when configuring operator/env.tfvars
, can be used to configure the GroundX SDKs to communicate with your On-Prem instance of GroundX.
A GroundX client which points to an On-Prem instance of GroundX behaves similarly to a traditional client which points to the hosted version of GroundX. See the API Documentation for more tutorials and documentation about specific endpoints and their usage.