Secure LLMOps Platform (SLP) is a production-oriented LLMOps and Platform Engineering project designed to automate the deployment, management, and lifecycle of AI applications on AWS using Infrastructure as Code, Kubernetes, GitOps, and CI/CD.
The platform provisions cloud infrastructure using Terraform, builds and scans container images through GitHub Actions, stores them in Amazon Elastic Container Registry (ECR), and automatically deploys applications to Amazon Elastic Kubernetes Service (EKS) using Helm and ArgoCD.
SLP demonstrates how modern organizations deploy and manage AI services in production environments.
- Overview
- Project Objectives
- Features
- Architecture
- End-to-End Workflow
- Technology Stack
- Repository Structure
- Infrastructure
- Deployment Workflow
- Monitoring
- Security
- Getting Started
- Terraform
- Docker
- GitHub Actions
- Kubernetes
- Helm
- ArgoCD
- Monitoring
- Usage
- Troubleshooting
- Future Improvements
- License
SLP is not an AI model.
SLP is an AI Deployment Platform.
Its responsibility is to manage the complete lifecycle of AI applications including:
- Infrastructure provisioning
- Containerization
- Continuous Integration
- Continuous Deployment
- GitOps
- Kubernetes deployment
- Monitoring
- Security
The platform currently deploys the Enterprise Intelligence Agent (EIA).
The platform itself is generic and can deploy any AI application packaged as a Docker container.
The primary goal of this project is to build a production-style LLMOps platform that demonstrates real-world DevOps and Platform Engineering practices.
Objectives include:
- Infrastructure as Code
- Automated Kubernetes deployment
- GitOps workflow
- Secure container delivery
- Infrastructure automation
- Production-ready architecture
- Monitoring and observability
- Security scanning
- AWS VPC
- Public and Private Subnets
- Internet Gateway
- NAT Gateway
- Route Tables
- Amazon EKS
- Amazon ECR
- IAM Roles
- Modular architecture
- Remote state support
- S3 backend
- DynamoDB state locking
- Bootstrap infrastructure
- Docker
- Python 3.12
- FastAPI
- Uvicorn
GitHub Actions automatically performs:
- Checkout repository
- Install dependencies
- Execute tests
- Build Docker image
- Security scan
- Push image to Amazon ECR
ArgoCD automatically:
- Watches Git repository
- Detects Helm changes
- Synchronizes Kubernetes cluster
- Self heals deployments
Helm automatically creates:
- Deployment
- Service
- ServiceAccount
- Ingress
Prometheus
Grafana
Trivy
Amazon ECR Image Scanning
IAM
Developer
│
Git Push
│
▼
GitHub Actions
│
┌──────────────┴──────────────┐
│ │
▼ ▼
Run Tests Docker Build
│
▼
Trivy Security Scan
│
▼
Amazon ECR
│
▼
Update Helm Chart
│
▼
Git Commit
│
▼
ArgoCD
│
▼
Amazon EKS
│
▼
Enterprise AI Agent
│
▼
Prometheus Metrics
│
▼
Grafana Dashboard
The complete deployment workflow is shown below.
Developer
↓
Git Push
↓
GitHub Actions
↓
Python Dependencies
↓
Unit Tests
↓
Docker Build
↓
Security Scan
↓
Push Docker Image
↓
Amazon ECR
↓
Update Helm Values
↓
Git Commit
↓
ArgoCD Detects Change
↓
Automatic Synchronization
↓
Amazon EKS
↓
Running AI Application
↓
Prometheus
↓
Grafana
- Amazon Web Services
- Terraform
- Docker
- Amazon Elastic Container Registry
-
Kubernetes
-
Amazon Elastic Kubernetes Service
- Helm
- ArgoCD
- GitHub Actions
-
Prometheus
-
Grafana
- Trivy
- Python
- FastAPI
SLP
├── terraform/
│ ├── bootstrap/
│ ├── environments/
│ └── modules/
├── docker/
├── helm/
│ └── eia/
├── argocd/
├── monitoring/
│ ├── prometheus/
│ └── grafana/
├── security/
│ ├── trivy/
│ └── external-secrets/
├── scripts/
├── .github/
│ └── workflows/
├── Makefile
└── README.md
The platform provisions the following AWS infrastructure.
- Virtual Private Cloud
- Public Subnets
- Private Subnets
- Internet Gateway
- NAT Gateway
- Route Tables
- Elastic Kubernetes Service
- Elastic Container Registry
- IAM Roles
- Terraform Remote Backend
- DynamoDB State Locking
The platform follows GitOps.
No manual deployment is required.
The deployment pipeline is completely automated.
Developer only pushes code.
Everything else is performed automatically.
Developer
↓
Git Push
↓
CI
↓
Docker
↓
ECR
↓
Helm
↓
ArgoCD
↓
Kubernetes
Modern AI systems require significantly more than model development.
Organizations require:
- Infrastructure automation
- Secure deployment
- Version control
- Continuous deployment
- Rollback capability
- Monitoring
- Security
- Scalability
SLP provides these capabilities using modern cloud-native technologies.
Completed Components
- Terraform
- VPC
- IAM
- Amazon ECR
- Amazon EKS
- Docker
- GitHub Actions
- Helm
- ArgoCD
- Prometheus
- Grafana
- Trivy
Upcoming Enhancements
- External Secrets
- Multi-environment deployment
- Blue/Green Deployment
- Canary Releases
- Autoscaling
- OpenTelemetry
- Loki
- Alertmanager
Before deploying the Secure LLMOps Platform, ensure the following tools are installed.
Ubuntu 22.04 LTS (Recommended)
The platform can also run on:
- Ubuntu
- Debian
- macOS
- Windows (WSL2)
Terraform >= 1.8
AWS CLI v2
kubectl
Docker
Helm
Git
Python 3.12
The project uses the following AWS services.
- Amazon VPC
- Amazon EKS
- Amazon ECR
- Amazon IAM
- Amazon S3
- Amazon DynamoDB
Clone the repository.
git clone https://github.com/Debasish-87/SLP.git
cd SLPConfigure AWS CLI.
aws configureProvide
AWS Access Key ID
AWS Secret Access Key
Region
Output Format
Verify
aws sts get-caller-identityThe CI/CD pipeline requires the following repository secrets.
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
These secrets are used by GitHub Actions to authenticate with AWS and push container images into Amazon ECR.
Terraform state is stored remotely.
Bootstrap creates
- Amazon S3 Bucket
- DynamoDB Lock Table
Move into bootstrap directory.
cd terraform/bootstrapInitialize Terraform.
terraform initCreate backend resources.
terraform applyExample
Terraform
↓
Amazon S3
↓
Terraform State
↓
DynamoDB
↓
State Locking
Navigate to the development environment.
cd terraform/environments/devInitialize Terraform.
terraform initValidate configuration.
terraform validateReview execution plan.
terraform planProvision infrastructure.
terraform applyTerraform provisions
- VPC
- Public Subnets
- Private Subnets
- Internet Gateway
- NAT Gateway
- Route Tables
- IAM
- Amazon ECR
- Amazon EKS
terraform
├── bootstrap
├── environments
│ ├── dev
│ ├── staging
│ └── prod
└── modules
├── vpc
├── iam
├── ecr
└── eks
Retrieve cluster credentials.
aws eks update-kubeconfig \
--region ap-south-1 \
--name slp-devVerify cluster.
kubectl get nodesExpected output
NAME
STATUS
ROLES
AGE
VERSION
Build application image.
docker build \
-f docker/Dockerfile \
-t eia:latest .Run locally.
docker run -p 8000:8000 eia:latestVerify
http://localhost:8000
Authenticate Docker.
aws ecr get-login-password \
| docker login \
--username AWS \
--password-stdin \
<ACCOUNT_ID>.dkr.ecr.ap-south-1.amazonaws.comPush image.
docker push \
<ACCOUNT_ID>.dkr.ecr.ap-south-1.amazonaws.com/eia:latestEvery push to the main branch automatically triggers the CI/CD pipeline.
Pipeline stages
Checkout Repository
↓
Install Dependencies
↓
Execute Tests
↓
Build Docker Image
↓
Trivy Security Scan
↓
Push Image
↓
Deploy Workflow
Verify cluster.
kubectl get nodes
kubectl get pods -AVerify namespaces.
kubectl get nsValidate chart.
helm lint helm/eiaRender manifests.
helm template eia helm/eiaInstall chart.
helm install eia helm/eiaUpgrade release.
helm upgrade eia helm/eiaUninstall.
helm uninstall eiaThe Helm chart creates
-
Deployment
-
Service
-
ServiceAccount
-
Ingress
Install namespace.
kubectl create namespace argocdInstall ArgoCD.
kubectl apply -n argocd \
-f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlVerify.
kubectl get pods -n argocdForward the service.
kubectl port-forward svc/argocd-server \
-n argocd \
8080:443Open
https://localhost:8080
Retrieve admin password.
kubectl -n argocd \
get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" \
| base64 -dUsername
admin
Developer
↓
Git Push
↓
GitHub Actions
↓
Docker Build
↓
Amazon ECR
↓
Update Helm Values
↓
Git Commit
↓
ArgoCD
↓
Automatic Deployment
↓
Amazon EKS
Verify Deployment.
kubectl get deploymentsVerify Pods.
kubectl get podsVerify Services.
kubectl get svcVerify Ingress.
kubectl get ingressThe platform provides a bootstrap script.
make bootstrapor
./scripts/bootstrap.shThis command performs
-
Terraform Initialization
-
Infrastructure Provisioning
-
Kubernetes Configuration
-
ArgoCD Installation
-
Monitoring Installation
SLP provides monitoring using Prometheus and Grafana.
Monitoring enables engineers to observe cluster health, application health, resource utilization, and Kubernetes workloads.
Prometheus collects metrics from Kubernetes resources.
Collected metrics include:
- Node CPU Usage
- Node Memory Usage
- Pod CPU Usage
- Pod Memory Usage
- Deployment Status
- Replica Status
- Container Restart Count
- Kubernetes API Metrics
./monitoring/prometheus/install.shVerify installation.
kubectl get pods -n monitoringThe platform includes a ServiceMonitor resource.
This automatically instructs Prometheus to scrape metrics from the deployed application.
Example flow
Application
↓
Service
↓
ServiceMonitor
↓
Prometheus
↓
Metrics Database
Grafana is responsible for visualizing metrics collected by Prometheus.
Current deployment provides:
- Persistent Storage
- Dedicated Namespace
- Configurable Resources
./monitoring/grafana/install.shVerify installation.
kubectl get pods -n monitoringForward service.
kubectl port-forward svc/grafana \
3000:80 \
-n monitoringOpen
http://localhost:3000
Username
admin
Password
admin123
Production deployments should store credentials using Kubernetes Secrets or AWS Secrets Manager.
Application
↓
Service
↓
Prometheus
↓
Time Series Database
↓
Grafana Dashboard
Security scanning is integrated into the CI pipeline.
Every Docker image is scanned before deployment.
Trivy performs vulnerability scanning.
Scan includes
-
Operating System packages
-
Python packages
-
Known CVEs
-
High Severity Vulnerabilities
-
Critical Vulnerabilities
Docker Build
↓
Trivy Scan
↓
Pass
↓
Push Amazon ECR
If vulnerabilities exceed the configured threshold, the build fails automatically.
Amazon ECR also performs image scanning.
This provides an additional layer of protection beyond Trivy.
The platform uses dedicated IAM roles.
Cluster Role
Worker Node Role
AmazonEKSClusterPolicy
AmazonEKSWorkerNodePolicy
AmazonEKS_CNI_Policy
AmazonEC2ContainerRegistryReadOnly
Least-privilege permissions should be used in production.
SLP includes a Makefile to simplify daily operations.
Available commands
make bootstrapBootstrap the complete platform.
make buildBuild Docker image.
make deployDeploy application.
make monitorInstall monitoring stack.
make destroyDestroy infrastructure.
make lintValidate Helm chart.
make templateRender Kubernetes manifests.
The scripts directory automates common platform tasks.
scripts/
bootstrap.sh
build.sh
deploy.sh
destroy.sh
Responsibilities
- Terraform Initialization
- Infrastructure Provisioning
- Kubernetes Configuration
- ArgoCD Installation
- Monitoring Installation
Responsibilities
- Build Docker Image
Responsibilities
- Deploy Helm Chart
- Verify Kubernetes Deployment
Responsibilities
- Remove Monitoring
- Remove ArgoCD
- Destroy AWS Infrastructure
The complete operational workflow is shown below.
Developer
↓
Git Push
↓
GitHub Actions
↓
Install Dependencies
↓
Run Tests
↓
Docker Build
↓
Security Scan
↓
Amazon ECR
↓
Update Helm Values
↓
Git Commit
↓
ArgoCD
↓
Helm Release
↓
Deployment
↓
Running Pods
↓
Prometheus
↓
Grafana
The platform deploys the following resources.
Deployment
Service
ServiceAccount
Ingress
ReplicaSet
Pods
Scaling is handled through Amazon EKS Node Groups.
Application replicas are managed using Kubernetes Deployments.
Example
kubectl scale deployment eia \
--replicas=5Check rollout.
kubectl rollout status deployment/eiaRestart rollout.
kubectl rollout restart deployment/eiaRollback.
kubectl rollout undo deployment/eiaList Nodes
kubectl get nodesList Pods
kubectl get podsList Services
kubectl get svcList Deployments
kubectl get deployList Namespaces
kubectl get nsApplication logs.
kubectl logs <pod-name>Stream logs.
kubectl logs -f <pod-name>Deployment uses
-
Startup Probe
-
Readiness Probe
-
Liveness Probe
These ensure that unhealthy containers are restarted automatically.
Infrastructure Provisioning
Containerization
Continuous Integration
Continuous Deployment
GitOps
Container Registry
Kubernetes Orchestration
Monitoring
Security Scanning
Infrastructure Automation
This section covers common issues that may occur during deployment and their resolutions.
Backend configuration changed
terraform init -reconfigureUnable to locate credentials
Verify AWS credentials.
aws configureor verify GitHub repository secrets.
Required secrets:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
Verify Docker installation.
docker versionVerify Docker daemon.
docker psVerify kubeconfig.
kubectl config current-contextUpdate kubeconfig.
aws eks update-kubeconfig \
--region ap-south-1 \
--name slp-devValidate chart.
helm lint helm/eiaRender manifests.
helm template eia helm/eiaVerify application.
kubectl get applications -n argocdForce synchronization.
argocd app sync eiaVerify ServiceMonitor.
kubectl get servicemonitor -AVerify Prometheus Pods.
kubectl get pods -n monitoringCheck service.
kubectl get svc -n monitoringForward service.
kubectl port-forward svc/grafana \
3000:80 \
-n monitoringThe following practices are recommended for production deployments.
- Store Terraform state remotely.
- Enable state locking.
- Use separate AWS accounts for production.
- Enable AWS CloudTrail.
- Use least-privilege IAM policies.
- Use dedicated namespaces.
- Configure Network Policies.
- Define Resource Requests and Limits.
- Configure Pod Disruption Budgets.
- Enable Horizontal Pod Autoscaler.
- Protect the main branch.
- Require pull request reviews.
- Execute automated testing.
- Perform container image scanning.
- Use immutable image tags.
- Never deploy using
kubectl applyin production. - Treat Git as the single source of truth.
- Review deployment changes through pull requests.
- Enable automatic synchronization only after validation.
Monitor at minimum:
- Node CPU
- Node Memory
- Pod CPU
- Pod Memory
- Pod Restarts
- Deployment Availability
- Cluster Health
- Rotate credentials regularly.
- Use AWS Secrets Manager.
- Enable image scanning.
- Keep dependencies updated.
- Apply security patches promptly.
The current implementation demonstrates a production-oriented architecture.
Additional enterprise capabilities that can be introduced include:
- Blue/Green Deployments
- Canary Releases
- Horizontal Pod Autoscaler
- Vertical Pod Autoscaler
- Cluster Autoscaler
- AWS Load Balancer Controller
- External DNS
- Cert Manager
- OpenTelemetry
- Loki
- Tempo
- Alertmanager
- Karpenter
- Velero Backup
- External Secrets Operator
Planned enhancements include:
- Multi-Environment Deployment
- Multi-Cluster Support
- Multi-Region Deployment
- External Secrets
- AWS Secrets Manager
- HashiCorp Vault
- OPA Gatekeeper
- Kyverno Policies
- OpenTelemetry
- Loki
- Tempo
- Jaeger
- Distributed Tracing
- Autoscaling
- Canary Deployment
- Blue/Green Deployment
- Progressive Delivery
- Release Versioning
- Automated Rollback
- Semantic Versioning
- Release Notes Generation
Contributions are welcome.
Recommended workflow:
- Fork the repository.
- Create a feature branch.
- Commit changes.
- Push the branch.
- Open a Pull Request.
Ensure all tests pass before submitting changes.
This project is released under the MIT License.
Refer to the LICENSE file for complete licensing information.
Secure LLMOps Platform demonstrates the implementation of a modern cloud-native deployment platform for AI applications.
The project combines Infrastructure as Code, Kubernetes, GitOps, Continuous Integration, Continuous Deployment, Monitoring, and Security into a single deployment platform.
Primary capabilities include:
- AWS Infrastructure Provisioning
- Terraform Automation
- Docker Containerization
- Amazon ECR
- Amazon EKS
- GitHub Actions
- Helm
- ArgoCD
- GitOps
- Prometheus
- Grafana
- Trivy Security Scanning
The platform is designed to automate the deployment lifecycle of AI services while following modern DevOps and Platform Engineering practices.
This project demonstrates practical experience with:
- Amazon Web Services
- Terraform
- Docker
- Amazon Elastic Container Registry
- Kubernetes
- Amazon EKS
- GitHub Actions
- ArgoCD
- Helm
- Prometheus
- Grafana
- Trivy
- Infrastructure Automation
- Deployment Automation
- Kubernetes Operations
- GitOps Workflows
- Cloud Infrastructure Management
Debasish
Secure LLMOps Platform (SLP)
Production-Style LLMOps Platform for Deploying and Managing AI Applications on AWS.