Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

117 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCI Free Tier Manager

License: MIT CI OpenTofu OCI Free Tier

OpenTofu infrastructure for OCI Always Free tier - provisions Ampere A1.Flex (ARM64) by default, with E2.1.Micro instances opt-in via micro_nodes.

Supports two modes via the omni_ready toggle:

Mode omni_ready OS Kubernetes
Default false Ubuntu (custom image) Bring your own
Talos + Omni true Talos Linux Enrolled into Omni via SideroLink

Structure

tofu/oci/       OpenTofu module — instances, networking, budget
scripts/        Helper scripts (state backend, capacity check)

Quick Start

Prerequisites

  • OCI account (PAYG recommended for Ampere availability)
  • OCI CLI configured (~/.oci/config)
  • OpenTofu ≥ 1.8

Configure

cp tofu/oci/terraform.tfvars.example tofu/oci/terraform.tfvars
# Edit terraform.tfvars — set compartment OCID, SSH key, image OCIDs

Key variables:

# Default (Ubuntu)
omni_ready = false

# Talos + Omni enrollment
omni_ready       = true
talos_image_ocid = "ocid1.image.oc1..."   # auto-fetched from syscode-homelab-gitops-apps in CI
omni_endpoint    = "omni.example.com:8090"
omni_join_token  = "..."                  # or pass via -var / TF_VAR_omni_join_token

# Optional K8s ingress reserved IP (default: disabled)
create_ingress_ip = true

Deploy

cd tofu/oci
tofu init
tofu plan
tofu apply

Talos Mode

When omni_ready = true:

  1. Nodes boot Talos Linux (custom OCI image from oci-free-tier-images)
  2. user_data injects a Talos MachineConfig that joins Omni via SideroLink
  3. Omni detects the nodes and provisions the cluster
  4. Argo CD GitOps is managed by syscode-homelab-gitops-apps

OCI Free Tier Resources

Compute

  • Ampere A1: 2 OCPUs + 12 GB RAM total (ARM64, flexible — split across up to 2 instances)
  • E2.1.Micro: 2 instances × 1/8 OCPU + 1 GB RAM (AMD)

Storage

  • Block volumes: 200 GB total (includes all boot volumes)
  • Object storage: 20 GB

Networking

  • VCNs: 2
  • Load balancer: 1 (10 Mbps)
  • Egress: 10 TB/month

Troubleshooting

"Out of capacity" for Ampere

Normal — Ampere instances are highly contested. The CI deploy workflow retries automatically. For manual deployments:

  • Re-run tofu apply — OCI eventually allocates capacity
  • Try a different availability domain within the same region
  • Try off-peak hours

Storage limit exceeded

200 GB includes all boot volumes. Example allocations:

  • 4× Ampere at 47 GB = 188 GB (leaves 12 GB)
  • 3x Ampere at 50 GB = 150 GB (default)
  • 3x Ampere + 1x Micro at 50 GB = 200 GB (maxed; opt in with micro_nodes = [{}])

Related Repositories

License

MIT License

About

A comprehensive toolkit for maximizing Oracle Cloud Infrastructure (OCI) Always Free tier resources.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages