chore: clean up readme indentation

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2023-07-15 16:42:01 -04:00
1 parent 0e687e0b4e
commit 4eb56a0f6e
1 file changed
+119 -119
+119 -119
View File
@@ -123,15 +123,15 @@ Clone **your new repo** to you local workstation and `cd` into it.
2. [Homebrew] Install [go-task](https://github.com/go-task/task) 2. [Homebrew] Install [go-task](https://github.com/go-task/task)
```sh ```sh
brew install go-task/tap/go-task brew install go-task/tap/go-task
``` ```
3. [Homebrew] Install the other workstation dependencies 3. [Homebrew] Install the other workstation dependencies
```sh ```sh
task brew:deps task brew:deps
``` ```
### 🔐 Setting up Age ### 🔐 Setting up Age
@@ -139,23 +139,23 @@ Clone **your new repo** to you local workstation and `cd` into it.
1. Create a Age private / public key 1. Create a Age private / public key
```sh ```sh
age-keygen -o age.agekey age-keygen -o age.agekey
``` ```
2. Create the directory for the Age key and move the Age file to it 2. Create the directory for the Age key and move the Age file to it
```sh ```sh
mkdir -p ~/.config/sops/age mkdir -p ~/.config/sops/age
mv age.agekey ~/.config/sops/age/keys.txt mv age.agekey ~/.config/sops/age/keys.txt
``` ```
3. Export the `SOPS_AGE_KEY_FILE` variable in your `bashrc`, `zshrc` or `config.fish` and source it, e.g. 3. Export the `SOPS_AGE_KEY_FILE` variable in your `bashrc`, `zshrc` or `config.fish` and source it, e.g.
```sh ```sh
export SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt export SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt
source ~/.bashrc source ~/.bashrc
``` ```
4. Fill out the Age public key in the appropriate variable in configuration section below, **note** the public key should start with `age`... 4. Fill out the Age public key in the appropriate variable in configuration section below, **note** the public key should start with `age`...
@@ -173,10 +173,10 @@ In order to use `cert-manager` with the Cloudflare DNS challenge you will need t
5. Under `Permissions`, click `+ Add More` and add each permission below: 5. Under `Permissions`, click `+ Add More` and add each permission below:
```text ```text
Zone - DNS - Edit # should be there already if using the template from the previous step Zone - DNS - Edit # should be there already if using the template from the previous step
Account - Cloudflare Tunnel - Read Account - Cloudflare Tunnel - Read
``` ```
📍 Feel free to limit the permissions to a specific account and zone resources. 📍 Feel free to limit the permissions to a specific account and zone resources.
@@ -188,15 +188,15 @@ In order to expose services to the internet you will need to create a [Cloudflar
1. Authenticate cloudflared to your domain 1. Authenticate cloudflared to your domain
```sh ```sh
cloudflared tunnel login cloudflared tunnel login
``` ```
2. Create the tunnel 2. Create the tunnel
```sh ```sh
cloudflared tunnel create k8s cloudflared tunnel create k8s
``` ```
3. In the `~/.cloudflared` directory there will be a json file with details you need to populate in configuration section below. You can ignore the `cert.pem` file. 3. In the `~/.cloudflared` directory there will be a json file with details you need to populate in configuration section below. You can ignore the `cert.pem` file.
@@ -206,15 +206,15 @@ In order to expose services to the internet you will need to create a [Cloudflar
1. Copy the configuration and addons files and start filling out all the variables. 1. Copy the configuration and addons files and start filling out all the variables.
```sh ```sh
task init task init
``` ```
2. Once done run the following command which will verify and generate all the files needed to continue. 2. Once done run the following command which will verify and generate all the files needed to continue.
```sh ```sh
task configure task configure
``` ```
### 📂 Repository structure ### 📂 Repository structure
@@ -237,33 +237,33 @@ The configure script will have created a `./ansible` directory and the following
2. Install the Ansible deps 2. Install the Ansible deps
```sh ```sh
task ansible:deps task ansible:deps
``` ```
3. Verify Ansible can view your config 3. Verify Ansible can view your config
```sh ```sh
task ansible:list task ansible:list
``` ```
4. Verify Ansible can ping your nodes 4. Verify Ansible can ping your nodes
```sh ```sh
task ansible:ping task ansible:ping
``` ```
5. Run the Ansible prepare playbook 5. Run the Ansible prepare playbook
```sh ```sh
task ansible:prepare task ansible:prepare
``` ```
6. Reboot the nodes (if not done in step 5) 6. Reboot the nodes (if not done in step 5)
```sh ```sh
task ansible:force-reboot task ansible:force-reboot
``` ```
### ⛵ Installing k3s with Ansible ### ⛵ Installing k3s with Ansible
@@ -273,30 +273,30 @@ The configure script will have created a `./ansible` directory and the following
1. Verify Ansible can view your config 1. Verify Ansible can view your config
```sh ```sh
task ansible:list task ansible:list
``` ```
2. Verify Ansible can ping your nodes 2. Verify Ansible can ping your nodes
```sh ```sh
task ansible:ping task ansible:ping
``` ```
3. Install k3s with Ansible 3. Install k3s with Ansible
```sh ```sh
task ansible:install task ansible:install
``` ```
4. Verify the nodes are online 4. Verify the nodes are online
```sh ```sh
kubectl get nodes -o wide kubectl get nodes -o wide
# NAME STATUS ROLES AGE VERSION # NAME STATUS ROLES AGE VERSION
# k8s-0 Ready control-plane,etcd,master 1h v1.27.3+k3s1 # k8s-0 Ready control-plane,etcd,master 1h v1.27.3+k3s1
# k8s-1 Ready worker 1h v1.27.3+k3s1 # k8s-1 Ready worker 1h v1.27.3+k3s1
``` ```
### 🔹 GitOps with Flux ### 🔹 GitOps with Flux
@@ -304,43 +304,43 @@ The configure script will have created a `./ansible` directory and the following
1. Verify Flux can be installed 1. Verify Flux can be installed
```sh ```sh
flux check --pre flux check --pre
# ► checking prerequisites # ► checking prerequisites
# ✔ kubectl 1.27.3 >=1.18.0-0 # ✔ kubectl 1.27.3 >=1.18.0-0
# ✔ Kubernetes 1.27.3+k3s1 >=1.16.0-0 # ✔ Kubernetes 1.27.3+k3s1 >=1.16.0-0
# ✔ prerequisites checks passed # ✔ prerequisites checks passed
``` ```
2. Push you changes to git 2. Push you changes to git
📍 **Verify** all the `*.sops.yaml` and `*.sops.yaml` files under the `./ansible`, and `./kubernetes` directories are **encrypted** with SOPS 📍 **Verify** all the `*.sops.yaml` and `*.sops.yaml` files under the `./ansible`, and `./kubernetes` directories are **encrypted** with SOPS
```sh ```sh
git add -A git add -A
git commit -m "Initial commit :rocket:" git commit -m "Initial commit :rocket:"
git push git push
``` ```
3. Install Flux and sync the cluster to the Git repository 3. Install Flux and sync the cluster to the Git repository
```sh ```sh
task cluster:install task cluster:install
# namespace/flux-system configured # namespace/flux-system configured
# customresourcedefinition.apiextensions.k8s.io/alerts.notification.toolkit.fluxcd.io created # customresourcedefinition.apiextensions.k8s.io/alerts.notification.toolkit.fluxcd.io created
# ... # ...
``` ```
4. Verify Flux components are running in the cluster 4. Verify Flux components are running in the cluster
```sh ```sh
kubectl -n flux-system get pods -o wide kubectl -n flux-system get pods -o wide
# NAME READY STATUS RESTARTS AGE # NAME READY STATUS RESTARTS AGE
# helm-controller-5bbd94c75-89sb4 1/1 Running 0 1h # helm-controller-5bbd94c75-89sb4 1/1 Running 0 1h
# kustomize-controller-7b67b6b77d-nqc67 1/1 Running 0 1h # kustomize-controller-7b67b6b77d-nqc67 1/1 Running 0 1h
# notification-controller-7c46575844-k4bvr 1/1 Running 0 1h # notification-controller-7c46575844-k4bvr 1/1 Running 0 1h
# source-controller-7d6875bcb4-zqw9f 1/1 Running 0 1h # source-controller-7d6875bcb4-zqw9f 1/1 Running 0 1h
``` ```
### 🎤 Verification Steps ### 🎤 Verification Steps
@@ -441,9 +441,9 @@ The benefits of a public repository include:
1. Generate new SSH key: 1. Generate new SSH key:
```sh ```sh
ssh-keygen -t ecdsa -b 521 -C "github-deploy-key" -f ./kubernetes/bootstrap/github-deploy.key -q -P "" ssh-keygen -t ecdsa -b 521 -C "github-deploy-key" -f ./kubernetes/bootstrap/github-deploy.key -q -P ""
``` ```
2. Paste public key in the deploy keys section of your repository settings 2. Paste public key in the deploy keys section of your repository settings
3. Create sops secret in `./kubernetes/bootstrap/github-deploy-key.sops.yaml` with the contents of: 3. Create sops secret in `./kubernetes/bootstrap/github-deploy-key.sops.yaml` with the contents of:
@@ -469,46 +469,46 @@ The benefits of a public repository include:
4. Encrypt secret: 4. Encrypt secret:
```sh ```sh
sops --encrypt --in-place ./kubernetes/bootstrap/github-deploy-key.sops.yaml sops --encrypt --in-place ./kubernetes/bootstrap/github-deploy-key.sops.yaml
``` ```
5. Apply secret to cluster: 5. Apply secret to cluster:
```sh ```sh
sops --decrypt ./kubernetes/bootstrap/github-deploy-key.sops.yaml | kubectl apply -f - sops --decrypt ./kubernetes/bootstrap/github-deploy-key.sops.yaml | kubectl apply -f -
``` ```
6. Update `./kubernetes/flux/config/cluster.yaml`: 6. Update `./kubernetes/flux/config/cluster.yaml`:
```yaml ```yaml
apiVersion: source.toolkit.fluxcd.io/v1beta2 apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository kind: GitRepository
metadata: metadata:
name: home-kubernetes name: home-kubernetes
namespace: flux-system namespace: flux-system
spec: spec:
interval: 10m interval: 10m
# 6a: Change this to your user and repo names # 6a: Change this to your user and repo names
url: ssh://git@github.com/$user/$repo url: ssh://git@github.com/$user/$repo
ref: ref:
branch: main branch: main
secretRef: secretRef:
name: github-deploy-key name: github-deploy-key
``` ```
7. Commit and push changes 7. Commit and push changes
8. Force flux to reconcile your changes 8. Force flux to reconcile your changes
```sh ```sh
flux reconcile -n flux-system kustomization cluster --with-source flux reconcile -n flux-system kustomization cluster --with-source
``` ```
9. Verify git repository is now using SSH: 9. Verify git repository is now using SSH:
```sh ```sh
flux get sources git -A flux get sources git -A
``` ```
10. Optionally set your repository to Private in your repository settings. 10. Optionally set your repository to Private in your repository settings.