Skip to content

Latest commit

 

History

History
69 lines (56 loc) · 2.19 KB

README.md

File metadata and controls

69 lines (56 loc) · 2.19 KB

DevOps on Pi

A lightweight DevOps platform for home servers using Raspberry Pi and Kubernetes. This platform enables easy deployment, scaling, and management of containerized applications on low-cost hardware. It is ideal for learning Kubernetes, automating home projects, or running self-hosted services with minimal resources.

Prerequisites

  • Raspberry Pi OS: Ensure that you have Raspberry Pi OS installed on your Raspberry Pi. You can download the latest version from the official Raspberry Pi website.

Setup

  1. To keep your system up to date, use the following commands:

    sudo apt update && sudo apt upgrade
  2. Configure cgroups:

    chmod +x Scripts/setup_cgroups.sh
    sudo ./Scripts/setup_cgroups.sh
  3. Install K3s:

    curl -sfL https://get.k3s.io | sh -
  4. Set up ArgoCD:

    kubectl create namespace argocd
    kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
  5. Get the ArgoCD admin password:

    kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
  6. Patch the ArgoCD Service to NodePort. You can choose how you want to access the UI; other options include LoadBalancer or Ingress:

    kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'
  7. Change permissions and set KUBECONFIG:

    sudo chmod 644 /etc/rancher/k3s/k3s.yaml
    export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
  8. Install the ArgoCD CLI:

    curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-arm64
    sudo install -m 555 argocd-linux-arm64 /usr/local/bin/argocd
    rm argocd-linux-arm64
  9. Log in to ArgoCD if you prefer using the CLI:

    argocd login <<IP>>:<<PORT>>
  10. Create a repository in ArgoCD:

    argocd repo add https://charts.bitnami.com/bitnami --type helm --name bitnami

Gotchas

Failed to find memory cgroup: You may need to add "cgroup_memory=1 cgroup_enable=memory" to your Linux command line.

  • Fix:
    sudo reboot