Project Setup Guide
This document provides comprehensive step-by-step instructions to deploy Infosys Agentic Foundry in Amazon Elastic Kubernetes Service (EKS).
Prerequisites
Before setting up the project, ensure you have the following requirements and access permissions:
Ensure users have access to the following:
- Python 3.12+ - Required Python version
-
React - Frontend framework
-
Infosys GitHub Repo: Infosys-Agentic-Foundry
- Ensure users have their AWS Bedrock / Amazon Comprehend / Amazon Transcribe (Speech-to-Text) Keys and Endpoints as required.
- Ensure AWS resources are created, and you have access/connectivity to push and pull from these resources:
- Amazon Elastic Container Registry (ECR)
- Amazon Elastic Kubernetes Service (EKS)
- Amazon RDS for PostgreSQL (Instance equivalent: db.t3.small – 2 vCPUs, 4 GiB memory, 32 GiB storage or as per requirement)
- Amazon EC2 Linux Virtual Machine
- Install Docker, AWS CLI, and kubectl on your EC2 instance
- Create a namespace in the EKS cluster as per your requirement (Optional)
kubectl create namespace <namespace>
AWS Deployment
ARIZE PHOENIX
STEPS FOR DEPLOYING ARIZE PHOENIX IN EKS
- Create a YAML file for deploying Arize Phoenix as a container. You can use the Arize Phoenix image in the YAML file.
nano filename1.yaml
Info
You can get the image from Docker - Phoenix or any other trusted source which your organization allows
- Now you need to use this command for creating deployment and service:
kubectl apply -f filename1.yaml - You can check the pods deployed using the command below
kubectl get pods -n namespace - You can check the services deployed using the command below
kubectl get svc -n namespace - Note down the load balancer IP for the container. You need to update it in the
.envof your backend and frontend folders before creating the respective docker images.
REDIS
STEPS FOR DEPLOYING REDIS IN EKS
- Create a YAML file for deploying Redis as a container. You can use the Redis image in the YAML file.
nano filename2.yaml
Info
You can get the image from Image Layer Details - redis:8.2.1 or any other trusted source which your organization allows
- Now you need to use this command for creating deployment and service:
kubectl apply -f filename2.yaml - You can check the pods deployed using the command below
kubectl get pods -n namespace - You can check the services deployed using the command below
kubectl get svc -n namespace - Note down the load balancer IP for the container. You need to update it in the
.envof your backend folder before creating the respective docker image.
GRAFANA
STEPS FOR DEPLOYING GRAFANA IN EKS
- Create a YAML file for deploying Grafana as a container. You can use the Grafana image in the YAML file.
nano filename3.yaml
Info
You can get the image from Image Layer Details - grafana/grafana:11.2.0 or any other trusted source which your organization allows
- Now you need to use this command for creating deployment and service:
kubectl apply -f filename3.yaml - You can check the pods deployed using the command below
kubectl get pods -n namespace - You can check the services deployed using the command below
kubectl get svc -n namespace - Note down the load balancer IP for the container. You need to update it in the
.envof your backend and frontend folders before creating the respective docker images.
ELASTIC SEARCH
STEPS FOR DEPLOYING ELASTIC SEARCH IN EKS
- Create a YAML file for deploying Elasticsearch as a container. You can use the Elasticsearch image in the YAML file.
nano filename4.yaml
Info
You can get the image from elasticsearch - Official Image | Docker Hub or any other trusted source which your organization allows
- Now you need to use this command for creating deployment and service:
kubectl apply -f filename4.yaml - You can check the pods deployed using the command below
kubectl get pods -n namespace - You can check the services deployed using the command below
kubectl get svc -n namespace - Note down the load balancer IP for the container and update it in the OpenTelemetry YAML script.
OPEN-TELEMETRY
STEPS FOR DEPLOYING OPEN-TELEMETRY IN EKS
- Create a YAML file for deploying OpenTelemetry as a container, and use the OpenTelemetry Collector image in the YAML file.
nano filename5.yaml
Info
You can get the image from otel/OpenTelemetry-collector-contrib - Docker Image or any other trusted source your organization allows
- Now you need to use this command for creating deployment and service:
kubectl apply -f filename5.yaml - You can check the pods deployed using the command below
kubectl get pods -n namespace -
You can check the services deployed using the command below
kubectl get svc -n namespace -
Note down the load balancer IP for the container. You need to update it in the
.envof your backend folder before creating the respective docker image.
MODEL SERVER
STEPS TO SET UP MODEL SERVER
For detailed instructions on deploying and configuring your model server, refer to the Model Server Deployment guide.
Note
You need to update the URL for the model server in the .env of the backend folder
BACKEND
STEPS TO SET UP BACKEND
Download Backend code from GitHub. For detailed instructions, see Download the Backend Project Code.
- Log in to AWS EC2 Linux OS (AWS VM).
- Download Backend source code folder into AWS VM.
- Before starting backend image creation make sure that Arize Phoenix, OpenTelemetry, Grafana, Elasticsearch, Redis, and Model server are set up as per instructions provided above. Update the respective URLs of all these services in
.envfile. - Update the remaining values for the variables in the
.envfile. - Change working directory to the Backend Folder:
cd `<BE foldername>` - Create a Dockerfile inside the Backend folder to create docker image for Backend code.
- Create backend image:
docker build -f `<dockerfile-name>` -t `<tag-name>` - Retag the created image to ECR name:
docker tag localhost/<imagename>:<tag> <ecr login server>/<imagename>:<tag> - Log in to ECR:
docker login <ecr login server> - Push the retagged image to ECR:
docker push <ecr login server>/<imagename>:<tag> - Create backend deployment file:
nano <deployment filename.yaml> - Log in to EKS
- Execute the deployment file:
kubectl apply -f <deployment filename.yaml> - Check if the pods are deployed successfully:
kubectl get pods -n <namespace> - Check if the service is up & running successfully:
kubectl get svc -n <namespace>
FRONTEND
STEPS TO SET UP FRONTEND
Download Frontend code from GitHub. For detailed instructions, see Download the Frontend Project Code.
- Log in to AWS VM
- Download Frontend source code folder into AWS VM
- Before starting frontend image creation make sure that Arize Phoenix and Grafana are set up as per instructions provided above. Update the respective URLs of all these services in
.envfile. - Change working directory to the Frontend Folder:
cd <Frontend foldername> - Create a Dockerfile inside the Frontend folder to create docker image from Frontend code.
-
In
.envfile of Frontend, update the following service load balancer URLs, which were generated after deployment of the backend server in Amazon Elastic Kubernetes Service (EKS).REACT_APP_BASE_URL(use Backend URL),REACT_APP_MKDOCS_BASE_URL(use mkdocs URL),REACT_APP_LIVE_TRACKING_URL(use Arize Phoenix URL),REACT_APP_GRAFANA_DASHBOARD_URL(use Grafana URL)
-
Create Frontend image:
docker build -f <dockerfile-name> -t <tag-name> - Retag the created image to ECR name:
docker tag localhost/<imagename>:<tag> <ecr login server>/<imagename>:<tag> - Log in to ECR:
docker login <ecr login server> - Push the retagged image to ECR:
docker push <ecr login server>/<imagename>:<tag> - Create Frontend deployment file:
nano <deployment filename.yaml> - Log in to Amazon Elastic Kubernetes Service (EKS)
- Execute the deployment file:
kubectl apply -f <deployment filename.yaml> - Check if the pods are deployed successfully:
kubectl get pods -n <namespace> - Check if the service is up & running successfully:
kubectl get svc -n <namespace>
Troubleshooting
Virtual Environment Activation Fails
- Permissions Error: Try running command prompt as administrator
Dependency Installation Errors
Update pip to the latest version:
python -m pip install --upgrade pip
- Check for typos in commands or file names
- To troubleshoot, check pod logs in Kubernetes using the following commands:
kubectl describe pods <pod_name> -n <namespace> kubectl logs <pod_name> -n <namespace>