For an interne project I have to use Oracle Cloud Infrastructure. I was very skeptical about it and I’m wondering why OCI? Anyway, it was time to discover what it is and automate things to avoid to do again boring tasks. Today there are so many Infrastructure as Code solutions (pulumi, terraform and others) but it always good to go with The Hard Way to discover a solution. This is why I decided to write some bash scripts executing oci cli commands covering my needs:

  • create a compartment, it’s like a tenant
  • create VCN, like a VPC
  • create Public & Private Subnets
  • create internet gateway
  • create ingress firewall rules
  • create instance of my Linux sixty9 jumpBox, configure iptables, wireguard VPN and DNS
  • possibility to deploy VMs as master/worker kubernetes nodes and bare metal worker kubernetes node with GPU in same VCN
  • use kubespray to setup kubernetes from sixty9
  • obviously destroy all the things

These scripts give me flexibility to test things, to add nodes when it’s needed. A perfect use case for me. I share it with you in a git repo a subpart of cloud-garage repo.

OCI portal: OCI Portal

VCN configuration: VCN

With wireguard, I can directly interact with kubernetes from my laptop without exposing it publicly: VCN

Finally OCI is an excellent solution. I don’t regret discovering Oracle Cloud Infrastructure.

Enjoy!