diff --git a/.devcontainer/ci/features/install.sh b/.devcontainer/ci/features/install.sh index c23b6e9b..5089e137 100644 --- a/.devcontainer/ci/features/install.sh +++ b/.devcontainer/ci/features/install.sh @@ -4,33 +4,38 @@ set -o noglob apk add --no-cache \ bash bind-tools ca-certificates curl python3 \ - py3-pip moreutils jq git iputils \ - openssh-client starship fzf + py3-pip moreutils jq git iputils openssh-client \ + starship fzf fish apk add --no-cache \ --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \ - age direnv fish helm kubectl kustomize sops + helm kubectl sops sudo apk add --no-cache \ --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing \ lsd -for installer_path in \ +for app in \ "budimanjojo/talhelper!" \ - "cilium/cilium-cli!!?as=cilium" \ - "cli/cli!!?as=gh" \ - "cloudflare/cloudflared!" \ - "derailed/k9s!" \ - "fluxcd/flux2!!?as=flux" \ - "go-task/task!" \ - "k0sproject/k0sctl!" \ - "kubecolor/kubecolor!" \ - "stern/stern!" \ - "siderolabs/talos!!?as=talosctl" \ - "yannh/kubeconform!" \ - "mikefarah/yq!" + "cilium/cilium-cli!!?as=cilium&type=script" \ + "cli/cli!!?as=gh&type=script" \ + "cloudflare/cloudflared!!?as=cloudflared&type=script" \ + "derailed/k9s!!?as=k9s&type=script" \ + "direnv/direnv!!?as=direnv&type=script" \ + "FiloSottile/age!!?as=age&type=script" \ + "fluxcd/flux2!!?as=flux&type=script" \ + "go-task/task!!?as=task&type=script" \ + "k0sproject/k0sctl!!?as=k0sctl&type=script" \ + "kubecolor/kubecolor!!?as=kubecolor&type=script" \ + "kubernetes-sigs/krew!!?as=krew&type=script" \ + "kubernetes-sigs/kustomize!!?as=kustomize&type=script" \ + "stern/stern!!?as=stern&type=script" \ + "siderolabs/talos!!?as=talosctl&type=script" \ + "yannh/kubeconform!!?as=kubeconform&type=script" \ + "mikefarah/yq!!?as=yq&type=script" do - curl -fsSL "https://i.jpillora.com/${installer_path}" | bash + echo "=== Installing ${app} ===" + curl -fsSL "https://i.jpillora.com/${app}" | bash done # Create the fish configuration directory diff --git a/.envrc b/.envrc index 3bf7f2d4..a2e7de09 100644 --- a/.envrc +++ b/.envrc @@ -15,3 +15,5 @@ export K8S_AUTH_KUBECONFIG="$(expand_path ./kubeconfig)" # k0s export DISABLE_TELEMETRY="true" export DISABLE_UPGRADE_CHECK="true" +# Bin +PATH_add "$(expand_path ./.bin)" diff --git a/.gitignore b/.gitignore index c8699cb7..5b63c724 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ kubeconfig *.key # Private .private +.bin # Ansible .venv* # Taskfile diff --git a/.taskfiles/Workstation/Taskfile.yaml b/.taskfiles/Workstation/Taskfile.yaml index 93b336d3..1aae05c7 100644 --- a/.taskfiles/Workstation/Taskfile.yaml +++ b/.taskfiles/Workstation/Taskfile.yaml @@ -43,3 +43,28 @@ tasks: sh: "command -v yay || command -v paru" preconditions: - { msg: "Missing Archfile", sh: "test -f {{.ARCHFILE}}" } + + generic-linux: + desc: Attempt to install CLI tools into the project directory using curl + dir: "{{.ROOT_DIR}}/.bin" + platforms: ["linux/amd64", "linux/arm64"] + cmds: + - for: + - budimanjojo/talhelper?as=talhelper&type=script + - cloudflare/cloudflared?as=cloudflared&type=script + - FiloSottile/age?as=age&type=script + - fluxcd/flux2?as=flux&type=script + - getsops/sops?as=sops&type=script + - jqlang/jq?as=jq&type=script + - k0sproject/k0sctl?as=k0sctl&type=script + - kubernetes-sigs/kustomize?as=kustomize&type=script + - siderolabs/talos?as=talosctl&type=script + - yannh/kubeconform?as=kubeconform&type=script + - mikefarah/yq?as=yq&type=script + cmd: curl -fsSL "https://i.jpillora.com/{{.ITEM}}" | bash + - cmd: curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + platforms: ["linux/amd64"] + - cmd: curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl" + platforms: ["linux/arm64"] + - cmd: chmod +x kubectl + - cmd: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | USE_SUDO="false" HELM_INSTALL_DIR="." bash diff --git a/README.md b/README.md index 02a26eb2..9a8d2d3f 100644 --- a/README.md +++ b/README.md @@ -192,13 +192,15 @@ You have two different options for setting up your local workstation. First one 3. Install the additional **required** CLI tools - 📍 _**Not using Homebrew or ArchLinux?** Make sure to look up how to install the **latest** version of the CLI tools listed in the [Brewfile](.taskfiles/Workstation/Brewfile)/[Archfile](.taskfiles/Workstation/Archfile) and install them._ + 📍 _**Not using Homebrew or ArchLinux?** Try using the generic Linux task below, if that fails check out the [Brewfile](.taskfiles/Workstation/Brewfile)/[Archfile](.taskfiles/Workstation/Archfile) for what CLI tools needed and install them._ ```sh # Homebrew task workstation:brew # or, Arch with yay/paru - go-task workstation:arch + task workstation:arch + # or, Generic Linux + task workstation:generic-linux ``` 4. Setup a Python virual environment by running the following task command.