Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cotyhamilton/gitops
https://github.com/cotyhamilton/gitops
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cotyhamilton/gitops
- Owner: cotyhamilton
- Created: 2022-05-02T03:42:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-11T03:30:57.000Z (over 2 years ago)
- Last Synced: 2023-03-08T23:57:24.530Z (almost 2 years ago)
- Language: HCL
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gitops
⚠️ wip
Example of using packer, ansible, and terraform together to build a highly available k3s cluster on digitalocean
---
## Optional
Use the helper setenv.sh script to set environment variables for packer and terraform.Copy the .env.example to .env and fill out the values
```sh
source ./setenv.sh
```---
## Prerequisites
- DigitalOcean Account with following resources (see `terraform/data.tf`)
- ssh key
- domain
- wildcard ssl cert for domain
- personal preference to use an external cert and configure the load balancer to terminate ssl connections instead of using cert manager with LE inside the cluster and risk hitting the rate limits, especially while testing and iterating.---
## Usage
```sh
# build the image with packer, save the image id to use in terraform
packer build packer# deploy cluster with terraform
cd terraform
terraform apply# print kubeconfig
terraform output --raw kubeconfig# or save
terraform output --raw kubeconfig > ~/.kube/config# verify
kubectl get nodes# install example apps
cd ../apps
# install a blank nginx webserver
# update example-website.values.yaml with the correct host for ingress
helm install example-website example-website --values example-website.values.yaml# install a pod info webserver
# udpate k8s-info.values.yaml with the correct host for ingress
helm install k8s-info k8s-info --values k8s-info.values.yaml
```