Setup Infrastructure#
Prerequisites
Before setting up infrastructure for OSMO, ensure you have the prerequisites as specified in Cloud. This includes creating a VPC and subnets for the Kubernetes cluster, PostgreSQL database, and Redis instance.
Setup Options#
Option 1: Using Terraform (Recommended)#
This is the recommended way to set up infrastructure for OSMO and the quickest way to get started.
Automated infrastructure setup for AWS with complete reference implementation.
Automated infrastructure setup for Azure with complete reference implementation.
Option 2: Manually#
Note
Creating infrastructure manually requires familiarity with cloud resources and networking. Consider using the Terraform examples from Option 1 if you’re new to cloud infrastructure setup.
Follow the below guides to setup the infrastructure manually based on your cloud service provider of choice
Create isolated network infrastructure for your cloud resources.
Deploy managed Kubernetes service to run OSMO Service components.
Create managed PostgreSQL database for application data storage.
Set up managed Redis cache for session management and real-time data.
Configure Networking#
Required Network Connectivity
Ensure proper network connectivity between components for OSMO to function correctly.
Internal VPC Connections (Private Network):
Kubernetes ↔ PostgreSQL
Kubernetes ↔ Redis
External Connections:
Kubernetes → Cloud Storage (Outbound internet or VPC endpoint)
User → Kubernetes (Internet access via load balancer/ingress)
Best Practices#
Use managed services: Cloud providers handle patching and updates
Enable encryption: Encryption at rest and in transit for all services
Private subnets: Keep databases and Redis in private subnets
Minimal access: Use security groups to restrict access to only required ports
Service accounts: Use cloud provider IAM for service-to-service authentication