Configuring Services
Services are the building blocks of your infrastructure. OpenPrime provides a configuration-driven approach to defining and deploying cloud services.
Available Services​
Compute​
| Service | AWS | Azure | GCP | On-Premise |
|---|---|---|---|---|
| Kubernetes | EKS | AKS | GKE | K8s |
| Virtual Machines | EC2 | VMs | Compute Engine | - |
| Serverless | Lambda | Functions | Cloud Functions | - |
Storage​
| Service | AWS | Azure | GCP |
|---|---|---|---|
| Object Storage | S3 | Blob Storage | Cloud Storage |
| Block Storage | EBS | Managed Disks | Persistent Disk |
| File Storage | EFS | Azure Files | Filestore |
Database​
| Service | AWS | Azure | GCP |
|---|---|---|---|
| PostgreSQL | RDS | Database for PostgreSQL | Cloud SQL |
| MySQL | RDS | Database for MySQL | Cloud SQL |
| Redis | ElastiCache | Cache for Redis | Memorystore |
Kubernetes Configuration​
Basic Setup​
kubernetes:
enabled: true
clusterName: my-cluster
version: "1.28"
Node Groups​
Define multiple node groups for different workloads:
kubernetes:
nodeGroups:
- name: system
instanceType: t3.medium
desiredSize: 3
minSize: 3
maxSize: 5
labels:
role: system
taints:
- key: CriticalAddonsOnly
effect: NoSchedule
- name: workload
instanceType: t3.large
desiredSize: 5
minSize: 2
maxSize: 20
labels:
role: workload
Networking​
kubernetes:
networking:
vpcCidr: "10.0.0.0/16"
podCidr: "10.244.0.0/16"
serviceCidr: "10.96.0.0/12"
publicSubnets:
- "10.0.1.0/24"
- "10.0.2.0/24"
privateSubnets:
- "10.0.10.0/24"
- "10.0.11.0/24"
Add-ons​
kubernetes:
addons:
- name: vpc-cni
version: latest
- name: coredns
version: latest
- name: kube-proxy
version: latest
Database Configuration​
RDS PostgreSQL​
database:
enabled: true
engine: postgresql
version: "15"
instanceClass: db.t3.medium
allocatedStorage: 100
maxAllocatedStorage: 500
multiAZ: true
publiclyAccessible: false
backupRetention: 7
High Availability​
database:
multiAZ: true
readReplicas: 2
backupRetention: 30
deletionProtection: true
Storage Configuration​
S3 Buckets​
storage:
enabled: true
buckets:
- name: app-assets
versioning: true
encryption: AES256
lifecycle:
- id: archive-old
prefix: logs/
transitions:
- days: 30
storageClass: STANDARD_IA
- days: 90
storageClass: GLACIER
Service Dependencies​
OpenPrime automatically handles service dependencies:
graph TD
A[Helm Charts] --> B[Kubernetes]
C[Load Balancer] --> B
D[Ingress] --> B
E[Service Mesh] --> B
Where service definitions come from​
Services used to be a hand-written schema in servicesConfig.js. They are now
extracted from the Terraform templates at runtime — see
Service Catalog.
servicesConfig.js still exists, but it is hydrated from the catalog rather
than being the source of truth. Editing it does not add a service; adding a
decorator to the templates does.
A field you see in the wizard traces back to a decorator:
# templates/terraform/aws/terraform.auto.tfvars
# @module services.eks | displayName=Elastic Kubernetes Service (EKS) | category=Compute
# @param services.eks.kubernetesVersion | displayName=Kubernetes Version | type=dropdown | options=[{"value":"1.34","label":"1.34"},{"value":"1.36","label":"1.36"}]
kubernetes_version = "1.34"
That one decorator supplies the label, the widget, the options and the default.
The value the user picks is written back into this same line of the generated
terraform.auto.tfvars.
Consequences worth knowing:
- The service list is whatever the templates currently declare. It is not enumerated anywhere in the frontend.
- A new knob reaches the wizard without a frontend release. Production clones
the templates repository's
mainunpinned. - A service can be hidden with
available=falseon its@module—lambdais hidden this way, because it generates fine but expects deployment packages the wizard cannot supply. - Validation patterns come from the catalog too, so the wizard and the backend check the same shape.
Which services exist today​
The AWS catalog declares: aurora, cloudfront, ecr, eks, elasticache,
lambda (hidden), msk, opensearch, rds, route53, s3, sns, sqs,
vpc, waf.
To see the live list for yourself:
curl -H "Authorization: Bearer $JWT" https://api.openprime.io/api/catalog | jq '.services | keys'
Provider-specific options​
Only the AWS tree carries decorators today. Azure, GCP and on-premise appear as provider choices but have no catalog behind them and generate no working stack. See Limitations.
Best Practices​
- Start small - Begin with minimal resources, scale up
- Use tags - Apply consistent tags for cost tracking
- Enable monitoring - Always include monitoring services
- Plan for HA - Use multi-AZ for production
- Secure defaults - Private subnets, encryption enabled