Skip to content

Instantly share code, notes, and snippets.

View richardcase's full-sized avatar

Richard Case richardcase

View GitHub Profile
@richardcase
richardcase / README.md
Last active February 6, 2024 09:50
Rancher Turtles: Create cluster via GitOps with cluster annotation

These steps assume that the previous test scenarios have been done.

  1. In Rancher Manager go to Continous Delivery
  2. Using the namespace drop down in the top bar select fleet-local
  3. Click Git Repos on the left navigation
  4. Click Add Repository button
  5. Fill in the following information:
  • Name: clusters
  • Repository URL: https://github.com/rancher-sandbox/rancher-turtles-fleet-example
  • Branch Name: per-cluster-import
@richardcase
richardcase / README.md
Last active February 6, 2024 10:18
Rancher Turtles: Create cluster via GitOps with namespace annotation

This assumes that that previous test steps have been executed. These instructions will be updated when annotating the namespaces works from the UI extension.

  1. Run the following command to annotate the default namespace for auto import
kubectl label namespace default cluster-api.cattle.io/rancher-auto-import=true
  1. In Rancher Manager go to Continous Delivery
  2. Using the namespace drop down in the top bar select fleet-local
  3. Click Git Repos on the left navigation
@richardcase
richardcase / README.md
Last active February 5, 2024 15:07
Rancher Turtles: Install latest UI extenion

Install Rancher Turtles UI Extension

  1. In the side bar click Extensions
  2. Click Enable
  3. On the Enable Extension Support popup select OK
  4. Wait for the Extensions screen to load, it should have the Installed, Available, Updates and All tabs
  5. Click the the "3 dots" button to the right and click Manage Repositories
  6. Click Create
  7. Enter the following:
  • Name: turtlesui
@richardcase
richardcase / manager server
Last active January 30, 2024 19:18
44245
sudo INSTALL_RKE2_VERSION=v1.26.10+rke2r2 ./install.sh
sudo systemctl enable –now rke2-server
helm repo add rancher-latest https://releases.rancher.com/server-charts/latest
helm repo add jetstack https://charts.jetstack.io
helm repo update
sudo cp /etc/rancher/rke2/rke2.yaml .
sudo chmod a+rw rke2.yaml
export KUBECONFIG=/home/richard/rke2.yaml
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.5.1
@richardcase
richardcase / main.go
Created July 4, 2023 11:02
CEL & CAPI WatchFilter
package main
import (
"log"
"github.com/google/cel-go/cel"
)
func main() {
env, err := cel.NewEnv(
@richardcase
richardcase / README.md
Created June 26, 2023 14:44
Crossplane EKS

Steps

  1. Create file with the AWS creds called aws-creds.conf
aws_access_key_id = <AWS_ACCESS_KEY_I>
aws_secret_access_key = <AWS_SECRET_ACCESS_KE>

Create the secret:

@richardcase
richardcase / local-ngrok.md
Last active March 27, 2024 15:51
Rancher - run locally

Run Rancher Locally with Ngrok

  • Install k3s and k3d locally
k3d cluster create rancher-test
  • Install cert manager
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml
Last login: Tue Jan 10 14:07:16 on ttys017
~ using ☁️ default/
➜ fig debug logs
fig2023-01-10T18:37:54.108855Z DEBUG fig_desktop::webview::notification: 45: Broadcasting webview notification notification_type=NotifyOnLocalStateChanged
2023-01-10T18:37:54.109043Z DEBUG fig_desktop::file_watcher: 196: State added key=developer.logging value=true
2023-01-10T18:37:54.111762Z DEBUG fig_desktop::webview::notification: 45: Broadcasting webview notification notification_type=NotifyOnLocalStateChanged
2023-01-10T18:37:58.753526Z DEBUG fig_desktop::webview: 934: Network reachability flags flags=REACHABLE
2023-01-10T18:37:59.948097Z DEBUG macos_utils::window_server: 352: app com.microsoft.teams is already registered
2023-01-10T18:37:59.955505Z INFO fig_input_method::imk: 189: responds_to_selector
@richardcase
richardcase / index.js
Created June 27, 2022 09:40
Flintlock Node Client
var PROTO_PATH = [
'/home/richard/code/ww/flintlock/api/types/microvm.proto',
'/home/richard/code/ww/flintlock/api/services/microvm/v1alpha1/microvms.proto'
];
var grpc = require('@grpc/grpc-js');
var protoLoader = require('@grpc/proto-loader');
var packageDefinition = protoLoader.loadSync(
PROTO_PATH,
This file has been truncated, but you can view the full file.
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
kind: Release
metadata:
creationTimestamp: "2022-03-02T02:15:44Z"
name: eks-anywhere
spec:
latestVersion: v0.0.0-dev+build.1669
releases:
- bundleManifestUrl: https://gist.githubusercontent.com/richardcase/97711a6d47db20be8005a67d70552ab3/raw/15d8c35f1af2b8c2ad0e0d662270a2dde5da583b/bundle-override-2.yaml
date: 2021-09-03 01:05:39.437599334 +0000 UTC