#OCI #Oracle #Terraform #CloudEngineering #IaC #DevOps #InfrastructureAsCode #Linux #Autoscaling #InstancePools
OCI Instance Pools: Auto-Scaling Apache Servers on Oracle Cloud
Deploy a fleet of Apache web servers on Oracle Cloud using Instance Pools and Terraform — with CPU-based autoscaling, a flexible load balancer, and zero custom images required. Every instance displays its own metadata: private IP, instance ID, availability domain, and shape.
WHAT YOU'LL LEARN
Deploying an OCI Instance Pool with Terraform
Wiring Instance Configuration, Instance Pool, and Autoscaling Configuration together
Why OCI requires both scale-out AND scale-in rules (and how to disable scale-in in practice)
Using OCI IMDSv2 to read instance metadata at boot
Handling Oracle Linux 9 firewalld alongside OCI security lists
Working around cloud-init network timing with a dnf retry loop
INFRASTRUCTURE DEPLOYED
VCN with public subnet (load balancer) and private subnet (instances)
Internet Gateway for inbound traffic, NAT Gateway for instance outbound access
OCI Flexible Load Balancer (L7) with HTTP health checks
Instance Configuration: VM.Standard.A1.Flex (Ampere ARM, 1 OCPU, 4 GB)
Instance Pool: min 1, initial 3, max 6 — spread across AD-1 and AD-2
Autoscaling: scale-out +1 when CPU greater than 60%, 300s cool-down
GitHub
https://github.com/mamonaco1973/oci-i...
README
https://github.com/mamonaco1973/oci-i...
TIMESTAMPS
00:00 Introduction
00:29 Architecture
01:28 Build the Code
01:47 Build Results
02:30 Rack Placement