An open API service indexing awesome lists of open source software.

https://github.com/sredevopsorg/gitops-oci

Always-Free VMs in Oracle Cloud, with Github Workflows and Terraform. k3s cluster + flux in progress.
https://github.com/sredevopsorg/gitops-oci

infrastructure-as-code kubernetes terraform

Last synced: 5 months ago
JSON representation

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

Awesome Lists containing this project

README

          

[![terraform-cluster-oci](https://github.com/sredevopsdev/gitops-oci/actions/workflows/terraform-cicdv2.yaml/badge.svg)](https://github.com/sredevopsdev/gitops-oci/actions/workflows/terraform-cicdv2.yaml)

# 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](https://www.oracle.com/cl/cloud/free/)

## Requirements (local execution)

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

Terraform

### macOS

```bash
brew install terraform
```

### Linux

```bash

wget
unzip terraform_0.12.24_linux_amd64.zip
sudo mv terraform /usr/local/bin/

```

direnv

### macOS

```bash
brew install direnv

```

### Linux

```bash
sudo apt-get install direnv
```

kubectl

### macOS

```bash
brew install kubectl
```

### Linux

```bash
curl -LO "https://dl.k8s.io/release/stable.txt"
VERSION=$(cat stable.txt)
curl -LO
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
```

Helm

### macOS

```bash
brew install helm
```

### Linux

```bash
wget
tar -zxvf helm-v3.2.4-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/
```

#  Environment variables (.envrc.sample)

```bash
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:

- [Terraform](https://marketplace.visualstudio.com/items?itemName=mauve.terraform)
- [Kubernetes](https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools)
- [Helm](https://marketplace.visualstudio.com/items?itemName=tjl.vscode-helm)

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

```json
{
"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