Skip to content

Always-Free VMs in Oracle Cloud, with Github Workflows and Terraform. k3s cluster + flux in progress.

Notifications You must be signed in to change notification settings

sredevopsorg/gitops-oci

terraform-cluster-oci

Work in progress! 🚧

Testers, reviewers, enthusiasths wanted

What's working

Terraform

  • OCI Infrastructure, always free resources.
  • Github Workflow and automation for CI with Terraform.
  • Very poor management of the state through artifacts

What's pending

  • k3s deployment automation
  • k3s load balancer or ingress
  • flux bootstraping, all resources except base infra and k3s

You'll need an Oracle CLoud Account - Always Free Tier

Requirements (local execution)

The following tools must be installed., and available in the path for this project to work properly:

Terraform

macOS

    brew install terraform

Linux

    
wget <https://releases.hashicorp.com/terraform/0.12.24/terraform_0.12.24_linux_amd64.zip>
unzip terraform_0.12.24_linux_amd64.zip
sudo mv terraform /usr/local/bin/
direnv

macOS

    brew install direnv

Linux

    sudo apt-get install direnv
kubectl

macOS

brew install kubectl

Linux

curl -LO "https://dl.k8s.io/release/stable.txt"
VERSION=$(cat stable.txt)
curl -LO <https://dl.k8s.io/${VERSION}/bin/linux/amd64/kubectl>
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
Helm

macOS

    brew install helm

Linux

    wget <https://get.helm.sh/helm-v3.2.4-linux-amd64.tar.gz>
    tar -zxvf helm-v3.2.4-linux-amd64.tar.gz
    sudo mv linux-amd64/helm /usr/local/bin/

 Environment variables (.envrc.sample)

export TF_VAR_compartment_id=""
export TF_VAR_user_ocid=""
export TF_VAR_fingerprint=""
export TF_VAR_private_key=""
export TF_VAR_ssh_authorized_keys=""
export TF_VAR_ssh_public_key=""
export TF_VAR_image_ocid=""
export TF_VAR_cluster_token=""
export TF_VAR_region=""
export TF_VAR_private_key_path=""
export TF_VAR_tenancy_ocid=""
export TF_VAR_compartment_ocid=""
export TF_VAR_current_user_ocid=""
export TF_VAR_region=""
export TF_VAR_tenancy_ocid=""
export TF_VAR_ssh_private_key_path=""
export TF_VAR_ssh_private_key=""

Visual Studio Code Configuration

To make sure all the required tools are correctly configured in Visual Studio Code, the following extensions should be installed:

Additionally, the following settings in Visual Studio Code should be configured:

    {
      "terraform.path": "/usr/local/bin/terraform",
      "kubectl.path": "/usr/local/bin/kubectl",
      "helm.path": "/usr/local/bin/helm",
      "direnv.enable": true
      }

Review the .envrc.example file

About

Always-Free VMs in Oracle Cloud, with Github Workflows and Terraform. k3s cluster + flux in progress.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages