diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 0e5ee85..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM ghcr.io/pulumi/devcontainer:latest - -# Add any additional packages and customization for your project here. \ No newline at end of file diff --git a/.devcontainer/README.md b/.devcontainer/README.md deleted file mode 100644 index 3fe817b..0000000 --- a/.devcontainer/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# DO NOT EDIT DIRECTLY - -See submodule maintainer docs for instructions on how to change devcontainer configuration(s). -Changes will be overwritten. \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 4965b35..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,80 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings -{ - "name": "pulumi", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "remoteUser": "vscode", - "overrideCommand": false, - "runArgs": ["--init", "--privileged", "--network=host"], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "forwardPorts": [1313, 2222, 6000, 7681, 8080] -} diff --git a/.devcontainer/devcontainer/Dockerfile b/.devcontainer/devcontainer/Dockerfile deleted file mode 100644 index 0e5ee85..0000000 --- a/.devcontainer/devcontainer/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM ghcr.io/pulumi/devcontainer:latest - -# Add any additional packages and customization for your project here. \ No newline at end of file diff --git a/.devcontainer/devcontainer/devcontainer.json b/.devcontainer/devcontainer/devcontainer.json deleted file mode 100644 index 4965b35..0000000 --- a/.devcontainer/devcontainer/devcontainer.json +++ /dev/null @@ -1,80 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings -{ - "name": "pulumi", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "remoteUser": "vscode", - "overrideCommand": false, - "runArgs": ["--init", "--privileged", "--network=host"], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "forwardPorts": [1313, 2222, 6000, 7681, 8080] -} diff --git a/.devcontainer/devcontainer/extra/Dockerfile b/.devcontainer/devcontainer/extra/Dockerfile deleted file mode 100644 index 4d4f614..0000000 --- a/.devcontainer/devcontainer/extra/Dockerfile +++ /dev/null @@ -1,185 +0,0 @@ -FROM ghcr.io/pulumi/devcontainer:latest - -################################################################################## -# Add any additional packages and customization for your project here. -################################################################################## - -################################################################################## -# Install ttyd -# - https://tsl0922.github.io/ttyd -# - https://github.com/tsl0922/ttyd -RUN echo \ -&& export NAME=ttyd \ -&& export TEST="${NAME} --version" \ -&& export REPOSITORY="tsl0922/ttyd" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "aarch64"; else print "unknown" }') \ -&& export PKG="${NAME}.${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -# - TTYD -EXPOSE 7681 - -################################################################################## -# Install k9s CLI -# - https://k9scli.io -# - https://github.com/derailed/k9s -RUN echo \ -&& export NAME=k9s \ -&& export TEST="${NAME} version" \ -&& export REPOSITORY="derailed/k9s" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}_Linux_${ARCH}.tar.gz" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | sudo tar xzvf - --directory /tmp ${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Insall Cilium CLI -# - https://cilium.io -# - https://github.com/cilium/cilium-cli -RUN echo \ -&& export NAME=cilium \ -&& export TEST="${NAME} version --client" \ -&& export REPOSITORY="cilium/cilium-cli" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}-linux-${ARCH}.tar.gz" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}"/${PKG} \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | tar xzvf - --directory /tmp ${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Insall istioctl -# - https://istio.io -# - https://github.com/istio/istio -# - https://github.com/istio/istio/releases/download/1.20.2/istio-1.20.2-linux-arm64.tar.gz -RUN echo \ -&& export NAME=istioctl \ -&& export TEST="${NAME} version --short 2>/dev/null" \ -&& export REPOSITORY="istio/istio" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="istio-${VERSION}-linux-${ARCH}.tar.gz" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | tar xzvf - --directory /tmp istio-${VERSION}/bin/${NAME} \ -&& sudo ${INSTALL} /tmp/istio-${VERSION}/bin/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install clusterctl -RUN echo \ -&& export NAME=clusterctl \ -&& export TEST="${NAME} version" \ -&& export REPOSITORY="kubernetes-sigs/cluster-api" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}-linux-${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install talosctl -RUN echo \ -&& export NAME=talosctl \ -&& export TEST="${NAME} version --client" \ -&& export REPOSITORY="siderolabs/talos" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH="$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }')" \ -&& export PKG="${NAME}-linux-${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install virtctl -RUN echo \ -&& export NAME=virtctl \ -&& export TEST="${NAME} version --client" \ -&& export REPOSITORY="kubevirt/kubevirt" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH="$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }')" \ -&& export PKG="${NAME}-${VERSION}-linux-${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo diff --git a/.devcontainer/devcontainer/extra/devcontainer.json b/.devcontainer/devcontainer/extra/devcontainer.json deleted file mode 100644 index f30d1fd..0000000 --- a/.devcontainer/devcontainer/extra/devcontainer.json +++ /dev/null @@ -1,80 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings -{ - "name": "pulumi/devcontainer", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "remoteUser": "vscode", - "forwardPorts": [1313, 2222, 6000, 7681, 8080], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "runArgs": ["--init", "--privileged", "--network=host"], - "overrideCommand": false -} diff --git a/.devcontainer/devcontainer/kind/devcontainer.json b/.devcontainer/devcontainer/kind/devcontainer.json deleted file mode 100644 index 50720f7..0000000 --- a/.devcontainer/devcontainer/kind/devcontainer.json +++ /dev/null @@ -1,80 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings -{ - "name": "pulumi/devcontainer", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "remoteUser": "vscode", - "forwardPorts": [1313, 2222, 6000, 7681, 8080], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "runArgs": ["--init", "--privileged", "--network=host"], - "overrideCommand": false -} diff --git a/.devcontainer/extra/Dockerfile b/.devcontainer/extra/Dockerfile index 4d4f614..eaac975 100644 --- a/.devcontainer/extra/Dockerfile +++ b/.devcontainer/extra/Dockerfile @@ -1,185 +1 @@ -FROM ghcr.io/pulumi/devcontainer:latest - -################################################################################## -# Add any additional packages and customization for your project here. -################################################################################## - -################################################################################## -# Install ttyd -# - https://tsl0922.github.io/ttyd -# - https://github.com/tsl0922/ttyd -RUN echo \ -&& export NAME=ttyd \ -&& export TEST="${NAME} --version" \ -&& export REPOSITORY="tsl0922/ttyd" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "aarch64"; else print "unknown" }') \ -&& export PKG="${NAME}.${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -# - TTYD -EXPOSE 7681 - -################################################################################## -# Install k9s CLI -# - https://k9scli.io -# - https://github.com/derailed/k9s -RUN echo \ -&& export NAME=k9s \ -&& export TEST="${NAME} version" \ -&& export REPOSITORY="derailed/k9s" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}_Linux_${ARCH}.tar.gz" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | sudo tar xzvf - --directory /tmp ${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Insall Cilium CLI -# - https://cilium.io -# - https://github.com/cilium/cilium-cli -RUN echo \ -&& export NAME=cilium \ -&& export TEST="${NAME} version --client" \ -&& export REPOSITORY="cilium/cilium-cli" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}-linux-${ARCH}.tar.gz" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}"/${PKG} \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | tar xzvf - --directory /tmp ${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Insall istioctl -# - https://istio.io -# - https://github.com/istio/istio -# - https://github.com/istio/istio/releases/download/1.20.2/istio-1.20.2-linux-arm64.tar.gz -RUN echo \ -&& export NAME=istioctl \ -&& export TEST="${NAME} version --short 2>/dev/null" \ -&& export REPOSITORY="istio/istio" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="istio-${VERSION}-linux-${ARCH}.tar.gz" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | tar xzvf - --directory /tmp istio-${VERSION}/bin/${NAME} \ -&& sudo ${INSTALL} /tmp/istio-${VERSION}/bin/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install clusterctl -RUN echo \ -&& export NAME=clusterctl \ -&& export TEST="${NAME} version" \ -&& export REPOSITORY="kubernetes-sigs/cluster-api" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}-linux-${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install talosctl -RUN echo \ -&& export NAME=talosctl \ -&& export TEST="${NAME} version --client" \ -&& export REPOSITORY="siderolabs/talos" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH="$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }')" \ -&& export PKG="${NAME}-linux-${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install virtctl -RUN echo \ -&& export NAME=virtctl \ -&& export TEST="${NAME} version --client" \ -&& export REPOSITORY="kubevirt/kubevirt" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH="$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }')" \ -&& export PKG="${NAME}-${VERSION}-linux-${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo +FROM ghcr.io/pulumi/devcontainer:extra diff --git a/.devcontainer/extra/devcontainer.json b/.devcontainer/extra/devcontainer.json index f30d1fd..f2b5f65 100644 --- a/.devcontainer/extra/devcontainer.json +++ b/.devcontainer/extra/devcontainer.json @@ -1,80 +1,328 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings { - "name": "pulumi/devcontainer", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] + "name": "pulumi/devcontainer:extra", + "remoteUser": "vscode", + "dockerFile": "Dockerfile", + "init": true, + "runArgs": [], + "privileged": true, + "overrideCommand": false, + "updateRemoteUserUID": true, + "shutdownAction": "stopContainer", + "securityOpt": ["seccomp=unconfined"], + "features": {"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}}, + "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], + "postCreateCommand": "devcontainer-links", + //"workspaceFolder": "/workspaces/devcontainer", + //"workspaceMount": "source=.,target=/home/vscode/devcontainer,type=bind,consistency=cached", + //"workspaceFolder": "/home/vscode/devcontainer", + "forwardPorts": [1313, 2222, 6000, 7681, 8080], + "customizations": { + "vscode": { + "settings": { + "telemetry.enableTelemetry": "off", + "initializeCommand": "echo 'Initializing...'", + "postCreateCommand": "echo 'Post create...'", + "postStartCommand": "echo 'Post start...'", + "postAttachCommand": "echo 'Post attach...'", + "window": { + "titleBarStyle": "custom", + "title": "${localWorkspaceFolderBasename}${separator}${containerName}${separator}${profileName}${separator}${activeEditorShort}" + }, + "search": { + "defaultViewMode": "list" + }, + "vim": { + "disableExtension": true, + "useSystemClipboard": true, + "useCtrlKeys": true, + "easymotion": true, + "incsearch": true, + "hlsearch": true, + "cursorStylePerMode": { + "normal": "block", + "insert": "line", + "visual": "underline", + "visualline": "underline", + "visualblock": "underline", + "replace": "block" + }, + "insertModeKeyBindings": [ + { + "before": [ + "j", + "j" + ], + "after": [ + "" + ] + } + ], + "handleKeys": { + "": false, + "": false + } + }, + "extensions.experimental.affinity": { + "vscodevim.vim": 1 + }, + "zenmode": { + "toggle": true, + "hideTabs": false, + "fullScreen": true, + "hideMinimap": true, + "centerLayout": false, + "hideStatusBar": false, + "hideActivityBar": false, + "hideLineNumbers": false, + "silentNotifications": true, + "hideLineDecorations": false, + "hideCursorInOverviewRuler": true + }, + "editor": { + "tabSize": 4, + "fontSize": 14, + "autoSave": "onFocusChange", + "wordWrap": "off", + "showTabs": true, + "showIcons": true, + "tabSizing": "shrink", + "lineHeight": 20, + "autoIndent": true, + "lineNumbers": "relative", + "formatOnSave": true, + "insertSpaces": true, + "tabScrolling": "auto", + //"tabFocusMode": false, + //"tabMovesFocus": false, + "tabCompletion": "on", + "tabDecoration": true, + "fontLigatures": true, + "enablePreview": true, + "startupEditor": "readme", + "tabCloseButton": "right", + "minimap.enabled": false, + "openPositioning": "right", + "restoreViewState": true, + "renderWhitespace": "all", + "suggestSelection": "first", + "closeOnFileDelete": true, + "autoClosingQuotes": "always", + "snippetSuggestions": "top", + "autoClosingBrackets": "always", + "tabHistoryNavigation": true, + "quickSuggestionsDelay": 50, + "autoImportCompletions": true, + "scrollBeyondLastLine": true, + "highlightModifiedTabs": true, + "inlineSuggest.enabled": true, + "parameterHints.enabled": true, + "trimTrailingWhitespace": true, + "lineHighlightBackground": "#30BFBF", + "highlightActiveIndentGuide": true, + "fontFamily": "'FiraMono Nerd Font Mono', monospace", + "gotoLocation": { + "multipleReferences": "goto", + "multipleDefinitions": "goto", + "multipleDeclarations": "goto", + "multipleImplementations": "goto", + "multipleTypeDefinitions": "goto" + }, + "scrollbar": { + "alwaysConsumeMouseWheel": true + }, + "bracketPairColorization": { + "enabled": true + } + }, + "files": { + "encoding": "utf8", + "autoSave": "onFocusChange", + "trimFinalNewlines": true, + "insertFinalNewline": true, + "trimTrailingWhitespace": true + }, + "git": { + "enabled": true, + "autofetch": true, + "autoStash": true, + "autorefresh": true, + "gitProtocol": "https", + "ignoreSubmodules": true, + "enableSmartCommit": true, + "ignoreLegacyWarning": true, + "autoRepositoryDetection": "openEditors", + "defaultCloneParentDirectory": "/home/vscode", + "scanRepositories": [ + "/home/vscode", + "/workspaces" + ], + "path": "/usr/local/bin/git" + }, + "go": { + "testTags": "all", + "vetOnSave": "off", + "buildTags": "all", + "lintOnSave": "off", + "testOnSave": "off", + "buildOnSave": "off", + "formatTool": "goimports", + "testEnvVars": { + "GOFLAGS": "-count=1" + }, + "generateTestsFlags": [ + "-count=1" + ] + }, + "terminal": { + "integrated": { + //"cwd": "/home/vscode/devcontainer", + "fontSize": 14, + "scrollback": 10000, + "cursorStyle": "outline", + "cursorBlinking": true, + "copyOnSelection": true, + "sendKeybindingsToShell": false, + "cursorStyleInactive": "line", + "fontFamily": "FiraMono Nerd Font Mono", + "commandsToSkipShell": [], + "scrollbar": { + "alwaysConsumeMouseWheel": true + }, + "shell": { + "linux": "/usr/bin/bash" + } + } + }, + "vs-kubernetes": { + "vs-kubernetes.namespace": "*", + "vs-kubernetes.outputFormat": "yaml", + "vs-kubernetes.helm-path": "/usr/local/bin/helm", + "vs-kubernetes.kubeconfig": "/home/vscode/.kube/config", + "vs-kubernetes.kubectl-path": "/usr/local/bin/kubectl", + "vs-kubernetes.knownKubeconfigs": [ + "/workspaces/*/.kube/config", + "/home/vscode/*/.kube/config", + "/home/vscode/.kube/config" + ] + }, + "remote": { + "restoreForwardedPorts": true, + "localPortHost": "127.0.0.1" + }, + "2gua.rainbow-brackets": true, + "indentRainbow": { + "indicatorStyle": "light", + "colorOnWhiteSpaceOnly": true, + "lightIndicatorStyleLineWidth": 12, + "ignoreEmptyLines": true, + "errorColor": "rgba(255, 20, 147, 0.3)", // Bright Pink for errors + "tabmixColor": "rgba(128, 32, 96, 0.3)", // Purple for mixed tabs and spaces + "colors": [ + "rgba(50, 150, 250, 0.1)", // Bright Blue + "rgba(200, 50, 250, 0.1)", // Purple + "rgba(50, 250, 150, 0.1)", // Neon Green + "rgba(250, 50, 150, 0.1)", // Pink + "rgba(50, 200, 250, 0.1)", // Lighter Blue + "rgba(150, 50, 250, 0.1)", // Darker Purple + "rgba(50, 250, 200, 0.1)", // Brighter Green + "rgba(250, 150, 50, 0.1)" // Orange + ], + "ignoreErrorLanguages": [ + "haskell", + "markdown", + "plaintext", + "shellscript", + "dockerfile", + "plaintext" + ] + }, + "workbench": { + "colorTheme": "Cyberpunk", + "startupEditor": "readme", + "action.terminal.focusNext": { + "key": "ctrl+shift+down", + "mac": "cmd+shift+down" + } + }, + "autoOpenPreviewPanel.openPreviewToTheSide": false, + "explorer.openEditors.visible": 1, + "explorer": { + "openEditors": { + "visible": 1 + }, + "autoRevealExclude": { + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/node_modules/**": true + }, + "autoReveal": true, + "sortOrder": "filesFirst" + } + }, + "[makefile]": { + "editor.insertSpaces": false, + "editor.renderWhitespace": "selection" + }, + "[yaml]": { + "editor": { + "trimTrailingWhitespace": true, + "insertFinalNewline": true, + "wordWrap": "off", + "lineNumbers": "relative", + "renderWhitespace": "all", + "autoSave": "onFocusChange", + "formatOnSave": true, + "insertSpaces": true, + "tabSize": 2, + "minimap.enabled": true, + "scrollBeyondLastLine": true, + "scrollbar": { + "alwaysConsumeMouseWheel": true + } + } + }, + "[markdown]": { + "editor": { + "tabSize": 4, + "wordWrap": "on", + "autoSave": "onFocusChange", + "lineNumbers": "relative", + "formatOnSave": true, + "insertSpaces": true, + "minimap.enabled": false, + "renderWhitespace": "all", + "insertFinalNewline": true, + "scrollBeyondLastLine": true, + "trimTrailingWhitespace": false, + "scrollbar": { + "alwaysConsumeMouseWheel": true + } + } + }, + "extensions": [ + "golang.go", + "vscodevim.vim", + "github.copilot", + "max-ss.cyberpunk", + "ms-python.python", + "redhat.vscode-yaml", + "esbenp.prettier-vscode", + "oderwat.indent-rainbow", + "okteto.kubernetes-context", + "ms-vsliveshare.vsliveshare", + "chadonsom.auto-view-readme", + "ms-azuretools.vscode-docker", + "github.vscode-github-actions", + "ms-kubernetes-tools.kind-vscode", + "ms-vscode.vscode-typescript-next", + "github.vscode-pull-request-github", + "matt-rudge.auto-open-preview-panel", + "ms-vscode-remote.remote-containers", + "bierner.markdown-preview-github-styles", + "visualstudioexptteam.vscodeintellicode", + "bierner.markdown-preview-github-styles", + "ms-kubernetes-tools.vscode-kubernetes-tools" + ] + } } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "remoteUser": "vscode", - "forwardPorts": [1313, 2222, 6000, 7681, 8080], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "runArgs": ["--init", "--privileged", "--network=host"], - "overrideCommand": false } diff --git a/.devcontainer/kind/devcontainer.json b/.devcontainer/kind/devcontainer.json deleted file mode 100644 index 50720f7..0000000 --- a/.devcontainer/kind/devcontainer.json +++ /dev/null @@ -1,80 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings -{ - "name": "pulumi/devcontainer", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "remoteUser": "vscode", - "forwardPorts": [1313, 2222, 6000, 7681, 8080], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "runArgs": ["--init", "--privileged", "--network=host"], - "overrideCommand": false -} diff --git a/.envrc b/.envrc index 5e4e9a5..101de67 100644 --- a/.envrc +++ b/.envrc @@ -1,8 +1,19 @@ -export KUBECONFIG=$PWD/.kube/config -export PULUMI_HOME=$PWD/.pulumi +################################################################################## +# Basic Config Variables +export KUBECONFIG=${PWD}/.kube/config +export TALOSCONFIG=${PWD}/.talos/config + +################################################################################## +# Pulumi Environment Variables +# - https://www.pulumi.com/docs/cli/environment-variables +export PULUMI_HOME=${PWD}/.pulumi +export PULUMI_SKIP_CONFIRMATIONS=true +#export PULUMI_AUTOMATION_API_SKIP_VERSION_CHECK=true +#export PULUMI_SKIP_UPDATE_CHECK=true ################################################################################## -# Example variables that can be useful in the .envrc file -# -# export PULUMI_SKIP_UPDATE_CHECK=true -# export PULUMI_SKIP_CONFIRMATIONS=true +# Optional Pulumi Environment Variables +# Useful for CI testing +# Uncomment to use local backend instead of Pulumi Cloud +#export PULUMI_BACKEND_URL=${PULUMI_BACKEND_URL:-file://${PWD}/.pulumi} +#export PULUMI_CONFIG_PASSPHRASE=${PULUMI_CONFIG_PASSPHRASE:-foobarbaz} diff --git a/.github/assets/codespaces.png b/.github/assets/codespaces.png deleted file mode 100644 index 62718f8..0000000 Binary files a/.github/assets/codespaces.png and /dev/null differ diff --git a/.github/assets/devcontainer.png b/.github/assets/devcontainer.png new file mode 100644 index 0000000..9764811 Binary files /dev/null and b/.github/assets/devcontainer.png differ diff --git a/.github/assets/gh-open-codespaces.png b/.github/assets/gh-open-codespaces.png deleted file mode 100644 index cc5a0e7..0000000 Binary files a/.github/assets/gh-open-codespaces.png and /dev/null differ diff --git a/.github/assets/make-build-install-complete.png b/.github/assets/make-build-install-complete.png deleted file mode 100644 index 7440b03..0000000 Binary files a/.github/assets/make-build-install-complete.png and /dev/null differ diff --git a/.github/assets/make-build-install.png b/.github/assets/make-build-install.png deleted file mode 100644 index 7988210..0000000 Binary files a/.github/assets/make-build-install.png and /dev/null differ diff --git a/.github/assets/pulumi-login-complete.png b/.github/assets/pulumi-login-complete.png deleted file mode 100644 index d6926dd..0000000 Binary files a/.github/assets/pulumi-login-complete.png and /dev/null differ diff --git a/.github/assets/pulumi-login.png b/.github/assets/pulumi-login.png deleted file mode 100644 index 473da41..0000000 Binary files a/.github/assets/pulumi-login.png and /dev/null differ diff --git a/.github/assets/pulumi-stack.png b/.github/assets/pulumi-stack.png deleted file mode 100644 index c96d63f..0000000 Binary files a/.github/assets/pulumi-stack.png and /dev/null differ diff --git a/.github/assets/pulumi-up.png b/.github/assets/pulumi-up.png deleted file mode 100644 index 19fe83c..0000000 Binary files a/.github/assets/pulumi-up.png and /dev/null differ diff --git a/.github/docker/base/Dockerfile b/.github/docker/base/Dockerfile new file mode 100644 index 0000000..cd71dcb --- /dev/null +++ b/.github/docker/base/Dockerfile @@ -0,0 +1,127 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:base . +############################################################################### +# Base VSCode Image +FROM ghcr.io/pulumi/devcontainer:slim-all + +################################################################################# +# Base package and user configuration +################################################################################# + +# Apt Packages +ARG APT_PKGS="\ +bc \ +mc \ +btop \ +pigz \ +ripgrep \ +tcpdump \ +libwrap0 \ +neofetch \ +" + +# Apt Packages +RUN echo \ +&& export TEST="neofetch" \ +&& ${apt_update} \ +&& bash -c "${apt_install} --no-install-recommends -o Dpkg::Options::='--force-confold' ${APT_PKGS}" \ +&& bash -c "${apt_clean}" \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo + +################################################################################# +# Image Metadata +################################################################################# +LABEL tag="base" + +################################################################################## +#### Common Binary Install Arguments +################################################################################## + +# Insall Github Actions Local Testing CLI +# - https://nektosact.com +# - https://github.com/nektos/gh-act +RUN echo \ +&& export NAME=act \ +&& export TEST="${NAME} --version" \ +&& export REPOSITORY="nektos/gh-act" \ +&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ +&& export PKG="linux-${ARCH}" \ +&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ +&& echo "---------------------------------------------------------"\ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& echo "---------------------------------------------------------"\ +&& ${curl} ${URL} --output /tmp/${NAME} \ +&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo + +# Install Kubectl +# - https://kubernetes.io +# - github.com/kubernetes/kubernetes +RUN echo \ +&& export NAME=kubectl \ +&& export TEST="${NAME} version --client" \ +&& export REPOSITORY="kubernetes/kubernetes" \ +&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ +&& export PKG="${NAME}" \ +&& export URL="https://storage.googleapis.com/kubernetes-release/release/${VERSION}/bin/linux/${ARCH}/${PKG}" \ +&& echo "---------------------------------------------------------"\ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& echo "---------------------------------------------------------"\ +&& sudo ${curl} ${URL} --output /tmp/${NAME} \ +&& sudo ${INSTALL} /tmp/kubectl ${BIN}/${NAME} \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo + +# Install Krew +ARG KREW_PKG="\ +view-secret \ +view-cert \ +open-svc \ +whoami \ +konfig \ +ktop \ +neat \ +tail \ +ctx \ +ns \ +" +RUN echo \ +&& export NAME=krew \ +&& export TEST="kubectl ${NAME} version" \ +&& export REPOSITORY="kubernetes-sigs/${NAME}" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ +&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +&& export PKG="${NAME}-linux_${ARCH}.tar.gz" \ +&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ +&& echo "---------------------------------------------------------"\ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: (kubectl) ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& echo "---------------------------------------------------------"\ +&& ${curl} ${URL} | tar xzvf - --directory /tmp ./${NAME}-linux_${ARCH} \ +&& sudo ${INSTALL} /tmp/${NAME}-linux_${ARCH} ${BIN}/kubectl-${NAME} \ +&& for pkg in ${CODE_PKGS}; do kubectl ${NAME} install ${pkg}; echo "Installed: ${pkg}"; done \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo diff --git a/.github/docker/code-server/Dockerfile b/.github/docker/code-server/Dockerfile new file mode 100644 index 0000000..71651e0 --- /dev/null +++ b/.github/docker/code-server/Dockerfile @@ -0,0 +1,85 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:code . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:code +############################################################################### +FROM ghcr.io/pulumi/devcontainer:extra + +################################################################################# +# Image Metadata +################################################################################# +LABEL tag="code-server" + +# Install VSCode Service +EXPOSE 8080 +RUN set -ex \ + && export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "aarch64") print "arm64"; else print "unknown" }') \ + && export varVerCode=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | awk -F '["v,]' '/tag_name/{print $5}') \ + && curl --output /tmp/code-server.deb -L "https://github.com/coder/code-server/releases/download/v${varVerCode}/code-server_${varVerCode}_${arch}.deb" \ + && sudo apt-get update \ + && sudo apt-get install -y /tmp/code-server.deb \ + && sudo apt-get clean \ + && sudo apt-get autoremove -y \ + && sudo apt-get purge -y --auto-remove \ + && sudo rm -rf \ + /var/lib/{apt,dpkg,cache,log} \ + /usr/share/{doc,man,locale} \ + /var/cache/apt \ + /root/.cache \ + /var/tmp/* \ + /tmp/* \ + && true + +# Install VSCode Extension Plugins +ARG CODE_PKGS="\ +golang.go \ +vscodevim.vim \ +github.copilot \ +max-ss.cyberpunk \ +ms-python.python \ +redhat.vscode-yaml \ +esbenp.prettier-vscode \ +oderwat.indent-rainbow \ +okteto.kubernetes-context \ +ms-vsliveshare.vsliveshare \ +chadonsom.auto-view-readme \ +ms-azuretools.vscode-docker \ +github.vscode-github-actions \ +ms-kubernetes-tools.kind-vscode \ +ms-vscode.vscode-typescript-next \ +github.vscode-pull-request-github \ +matt-rudge.auto-open-preview-panel \ +ms-vscode-remote.remote-containers \ +bierner.markdown-preview-github-styles \ +visualstudioexptteam.vscodeintellicode \ +bierner.markdown-preview-github-styles \ +ms-kubernetes-tools.vscode-kubernetes-tools \ +" +RUN set -ex \ + && for pkg in ${CODE_PKGS}; do code-server --install-extension ${pkg}; echo "Installed: ${pkg}"; done \ + && true + +# Install ttyd +# - https://tsl0922.github.io/ttyd +# - https://github.com/tsl0922/ttyd +RUN echo \ +&& export NAME=ttyd \ +&& export TEST="${NAME} --version" \ +&& export REPOSITORY="tsl0922/ttyd" \ +&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "aarch64"; else print "unknown" }') \ +&& export PKG="${NAME}.${ARCH}" \ +&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ +&& echo "---------------------------------------------------------"\ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& echo "---------------------------------------------------------"\ +&& ${curl} ${URL} --output /tmp/${NAME} \ +&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo diff --git a/.github/docker/docker-in-docker/Dockerfile b/.github/docker/docker-in-docker/Dockerfile new file mode 100644 index 0000000..8b3d62b --- /dev/null +++ b/.github/docker/docker-in-docker/Dockerfile @@ -0,0 +1,82 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:dind . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:dind +############################################################################### +FROM ghcr.io/pulumi/devcontainer:base + +################################################################################# +# Image Metadata +################################################################################# +LABEL tag="docker-in-docker" + +################################################################################# +# Base package and user configuration +################################################################################# + +# devcontainer docker-in-docker dependencies +ARG APT_PKGS="\ +docker-buildx-plugin \ +docker-ce-cli \ +libffi-dev \ +iptables \ +" +RUN echo \ +&& ${curl} https://download.docker.com/linux/ubuntu/gpg | sudo gpg --batch --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \ +&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list \ +&& ${apt_update} \ +&& bash -c "${apt_install} ${APT_PKGS}" \ +&& bash -c "${apt_clean}" \ +&& ${dir_clean} \ +&& sudo update-alternatives --set iptables /usr/sbin/iptables-legacy \ +&& sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \ +&& echo + +# Install Kind Kubernetes-in-Docker +RUN echo \ +&& export NAME=kind \ +&& export TEST="${NAME} version" \ +&& export REPOSITORY="kubernetes-sigs/kind" \ +&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +&& export ARCH="$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }')" \ +&& export PKG="${NAME}-linux-${ARCH}" \ +&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ +&& echo "---------------------------------------------------------"\ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& echo "---------------------------------------------------------"\ +&& ${curl} ${URL} --output /tmp/${NAME} \ +&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo + +################################################################################## +# Install k9s CLI +# - https://k9scli.io +# - https://github.com/derailed/k9s +RUN echo \ +&& export NAME=k9s \ +&& export TEST="${NAME} version" \ +&& export REPOSITORY="derailed/k9s" \ +&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ +&& export PKG="${NAME}_Linux_${ARCH}.tar.gz" \ +&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ +&& echo "---------------------------------------------------------"\ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& echo "---------------------------------------------------------"\ +&& ${curl} ${URL} | sudo tar xzvf - --directory /tmp ${NAME} \ +&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo diff --git a/devcontainer/extra/Dockerfile b/.github/docker/extra/Dockerfile similarity index 76% rename from devcontainer/extra/Dockerfile rename to .github/docker/extra/Dockerfile index 4d4f614..c3a5312 100644 --- a/devcontainer/extra/Dockerfile +++ b/.github/docker/extra/Dockerfile @@ -1,50 +1,63 @@ -FROM ghcr.io/pulumi/devcontainer:latest +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:extra . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:extra +############################################################################### +FROM ghcr.io/pulumi/devcontainer:dind -################################################################################## -# Add any additional packages and customization for your project here. -################################################################################## +################################################################################# +# Image Metadata +################################################################################# +LABEL tag="extra" -################################################################################## -# Install ttyd -# - https://tsl0922.github.io/ttyd -# - https://github.com/tsl0922/ttyd +################################################################################# +# Base package and user configuration +################################################################################# + +# Apt Packages +ARG APT_PKGS="\ +fish \ +" RUN echo \ -&& export NAME=ttyd \ -&& export TEST="${NAME} --version" \ -&& export REPOSITORY="tsl0922/ttyd" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "aarch64"; else print "unknown" }') \ -&& export PKG="${NAME}.${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ +&& export TEST="fish --version" \ +&& ${apt_update} \ +&& bash -c "${apt_install} --no-install-recommends -o Dpkg::Options::='--force-confold' ${APT_PKGS}" \ +&& bash -c "${apt_clean}" \ && ${dir_clean} \ && ${TEST} \ && echo -# - TTYD -EXPOSE 7681 +# Oh My Fish (OMF) +RUN echo \ +&& export URL="https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install" \ +&& ${curl} ${URL} --output /tmp/install \ +&& fish -c '. /tmp/install --noninteractive' \ +&& ${dir_clean} \ +&& echo -################################################################################## -# Install k9s CLI -# - https://k9scli.io -# - https://github.com/derailed/k9s +# SSH & SSHD Packages +# TEST is not available normally as sshd has no version flag RUN echo \ -&& export NAME=k9s \ +&& export TEST="command -v sshd" \ +&& ${apt_update} \ +&& DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y --no-install-recommends -o Dpkg::Options::='--force-confold' openssh-server ssh-askpass ssh-import-id \ +&& sudo mkdir /var/run/sshd \ +&& bash -c "${apt_clean}" \ +&& ${dir_clean} \ +&& ${TEST} \ +&& echo + +# Helm cli +# - https://helm.sh +# - https://github.com/helm/helm +RUN echo \ +&& export NAME=helm \ && export TEST="${NAME} version" \ -&& export REPOSITORY="derailed/k9s" \ +&& export REPOSITORY="helm/helm" \ && export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ && export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}_Linux_${ARCH}.tar.gz" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ +&& export PKG="${NAME}-${VERSION}-linux-${ARCH}.tar.gz" \ +&& export URL="https://get.helm.sh/${PKG}" \ && echo "---------------------------------------------------------"\ && echo "INFO[${NAME}] Installed:" \ && echo "INFO[${NAME}] Command: ${NAME}" \ @@ -53,14 +66,13 @@ RUN echo \ && echo "INFO[${NAME}] Architecture: ${ARCH}" \ && echo "INFO[${NAME}] Source: ${URL}" \ && echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | sudo tar xzvf - --directory /tmp ${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ +&& ${curl} ${URL} | tar xzvf - --directory /tmp linux-${ARCH}/${NAME} \ +&& sudo ${INSTALL} /tmp/linux-${ARCH}/${NAME} ${BIN}/${NAME} \ && ${dir_clean} \ && ${TEST} \ && echo -################################################################################## -# Insall Cilium CLI +# Cilium CLI # - https://cilium.io # - https://github.com/cilium/cilium-cli RUN echo \ @@ -85,11 +97,9 @@ RUN echo \ && ${TEST} \ && echo -################################################################################## -# Insall istioctl +# Istioctl CLI # - https://istio.io # - https://github.com/istio/istio -# - https://github.com/istio/istio/releases/download/1.20.2/istio-1.20.2-linux-arm64.tar.gz RUN echo \ && export NAME=istioctl \ && export TEST="${NAME} version --short 2>/dev/null" \ @@ -112,8 +122,7 @@ RUN echo \ && ${TEST} \ && echo -################################################################################## -# Install clusterctl +# Clusterctl CLI RUN echo \ && export NAME=clusterctl \ && export TEST="${NAME} version" \ @@ -136,8 +145,7 @@ RUN echo \ && ${TEST} \ && echo -################################################################################## -# Install talosctl +# Talosctl CLI RUN echo \ && export NAME=talosctl \ && export TEST="${NAME} version --client" \ @@ -160,8 +168,7 @@ RUN echo \ && ${TEST} \ && echo -################################################################################## -# Install virtctl +# Virtctl CLI RUN echo \ && export NAME=virtctl \ && export TEST="${NAME} version --client" \ diff --git a/.github/docker/hugo/Dockerfile b/.github/docker/hugo/Dockerfile new file mode 100644 index 0000000..5d9dce3 --- /dev/null +++ b/.github/docker/hugo/Dockerfile @@ -0,0 +1,28 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:hugo . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:hugo +############################################################################### +# Based from the Pulumi Devcontainer SLIM image. +FROM ghcr.io/pulumi/devcontainer:slim-node + +################################################################################# +# Image Metadata +################################################################################# +LABEL tag="hugo" + +# Install hugo +EXPOSE 1313 +RUN set -ex \ + && export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ + && export urlHugoRelease="https://api.github.com/repos/gohugoio/hugo/releases/latest" \ + && export urlHugoVersion=$(curl -s ${urlHugoRelease} | awk -F '["v,]' '/tag_name/{print $5}') \ + && export urlHugoBase="https://github.com/gohugoio/hugo/releases/download" \ + && export urlHugoBin="hugo_${urlHugoVersion}_linux-${arch}.deb" \ + && export urlHugo="${urlHugoBase}/v${urlHugoVersion}/${urlHugoBin}" \ + && curl --output /tmp/${urlHugoBin} -L ${urlHugo} \ + && sudo dpkg -i /tmp/${urlHugoBin} \ + && which hugo \ + && hugo version \ + && rm -rf /tmp/* \ + && true diff --git a/.github/docker/slim-all/Dockerfile b/.github/docker/slim-all/Dockerfile new file mode 100644 index 0000000..337b7dc --- /dev/null +++ b/.github/docker/slim-all/Dockerfile @@ -0,0 +1,93 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:slim-all . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:slim-all +############################################################################### +# Base VSCode Image +FROM ghcr.io/pulumi/devcontainer:slim + +################################################################################# +# Image Metadata +LABEL tag="slim-all" + +################################################################################# +# Install Programming Language Tooling +# - golang +# - nodejs +# - python +# - dotnet +################################################################################# +# Python +ARG APT_PKGS="\ +python3 \ +python3-pip \ +python3-venv \ +" +RUN echo \ +&& bash -c "${apt_install} ${APT_PKGS}" \ +&& bash -c "${apt_clean}" \ +&& sudo update-alternatives --install \ + /usr/bin/python python \ + /usr/bin/python3 1 \ +&& ${dir_clean} \ +&& echo + +# Python Pip Packages +ARG PIP_PKGS="\ +setuptools \ +" +RUN echo \ +&& sudo python3 -m pip install ${PIP_PKGS} \ +&& ${dir_clean} \ +&& echo + + +# Golang +RUN echo ;set -ex \ +&& jq --version \ +&& export NAME="go" \ +&& export TEST="${NAME} version" \ +&& export VERSION="$(${curl} "https://go.dev/dl/?mode=json" | jq --compact-output --raw-output .[1].version)" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ +&& export PKG="${VERSION}.linux-${ARCH}.tar.gz" \ +&& export URL="https://go.dev/dl/${PKG}" \ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& ${curl} ${URL} | sudo tar -C /usr/local/ -xzvf - \ +&& sudo chmod 755 /usr/local/go/bin/* \ +&& ${TEST} \ +&& echo + +# Install nodejs npm yarn +RUN echo \ +&& export NODE_MAJOR=20 \ +&& ${curl} https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ + | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ +&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \ + | sudo tee /etc/apt/sources.list.d/nodesource.list \ +&& sudo apt-get update \ +&& sudo apt-get install nodejs \ +&& sudo apt-get clean \ +&& sudo apt-get autoremove -y \ +&& sudo apt-get purge -y --auto-remove \ +&& ${dir_clean} \ +&& node --version \ +&& npm --version \ +&& sudo npm install --global yarn \ +&& yarn --version \ +&& true + +# Dotnet +ARG APT_PKGS="\ +dotnet-sdk-7.0 \ +dotnet-runtime-7.0 \ +" +RUN echo \ +&& bash -c "${apt_install} ${APT_PKGS}" \ +&& bash -c "${apt_clean}" \ +&& ${dir_clean} \ +&& echo diff --git a/.github/docker/slim-dotnet/Dockerfile b/.github/docker/slim-dotnet/Dockerfile new file mode 100644 index 0000000..43551dd --- /dev/null +++ b/.github/docker/slim-dotnet/Dockerfile @@ -0,0 +1,24 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:slim-dotnet . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:slim-dotnet +############################################################################### +# Base VSCode Image +FROM ghcr.io/pulumi/devcontainer:slim + +################################################################################# +# Image Metadata +LABEL tag="slim-dotnet" + +################################################################################# +# Install Programming Language Tooling +# - dotnet +ARG APT_PKGS="\ +dotnet-sdk-7.0 \ +dotnet-runtime-7.0 \ +" +RUN echo \ +&& bash -c "${apt_install} ${APT_PKGS}" \ +&& bash -c "${apt_clean}" \ +&& ${dir_clean} \ +&& echo diff --git a/.github/docker/slim-golang/Dockerfile b/.github/docker/slim-golang/Dockerfile new file mode 100644 index 0000000..b2b1104 --- /dev/null +++ b/.github/docker/slim-golang/Dockerfile @@ -0,0 +1,33 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:slim-golang . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:slim-golang +############################################################################### +# Base VSCode Image +FROM ghcr.io/pulumi/devcontainer:slim + +################################################################################# +# Image Metadata +LABEL tag="slim-golang" + +################################################################################# +# Install Programming Language Tooling +# - golang +RUN echo ;set -ex \ +&& jq --version \ +&& export NAME="go" \ +&& export TEST="${NAME} version" \ +&& export VERSION="$(${curl} "https://go.dev/dl/?mode=json" | jq --compact-output --raw-output .[1].version)" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ +&& export PKG="${VERSION}.linux-${ARCH}.tar.gz" \ +&& export URL="https://go.dev/dl/${PKG}" \ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& ${curl} ${URL} | sudo tar -C /usr/local/ -xzvf - \ +&& sudo chmod 755 /usr/local/go/bin/* \ +&& ${TEST} \ +&& echo diff --git a/.github/docker/slim-node/Dockerfile b/.github/docker/slim-node/Dockerfile new file mode 100644 index 0000000..cfde6ef --- /dev/null +++ b/.github/docker/slim-node/Dockerfile @@ -0,0 +1,34 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:slim-node . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:slim-node +############################################################################### +# Base VSCode Image +FROM ghcr.io/pulumi/devcontainer:slim + +################################################################################# +# Image Metadata +LABEL tag="slim-node" + +################################################################################# +# Install Programming Language Tooling +# - nodejs +# - npm +# - yarn +RUN echo \ +&& export NODE_MAJOR=20 \ +&& ${curl} https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ + | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ +&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \ + | sudo tee /etc/apt/sources.list.d/nodesource.list \ +&& sudo apt-get update \ +&& sudo apt-get install nodejs \ +&& sudo apt-get clean \ +&& sudo apt-get autoremove -y \ +&& sudo apt-get purge -y --auto-remove \ +&& ${dir_clean} \ +&& node --version \ +&& npm --version \ +&& sudo npm install --global yarn \ +&& yarn --version \ +&& true diff --git a/.github/docker/slim-python/Dockerfile b/.github/docker/slim-python/Dockerfile new file mode 100644 index 0000000..a0ec25b --- /dev/null +++ b/.github/docker/slim-python/Dockerfile @@ -0,0 +1,37 @@ +############################################################################### +# Use: +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:slim-python . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:slim-python +############################################################################### +# Base VSCode Image +FROM ghcr.io/pulumi/devcontainer:slim + +################################################################################# +# Image Metadata +LABEL tag="slim-python" + +################################################################################# +# Install Programming Language Tooling +# - python +ARG APT_PKGS="\ +python3 \ +python3-pip \ +python3-venv \ +" +RUN echo \ +&& bash -c "${apt_install} ${APT_PKGS}" \ +&& bash -c "${apt_clean}" \ +&& sudo update-alternatives --install \ + /usr/bin/python python \ + /usr/bin/python3 1 \ +&& ${dir_clean} \ +&& echo + +# Python Pip Packages +ARG PIP_PKGS="\ +setuptools \ +" +RUN echo \ +&& sudo python3 -m pip install ${PIP_PKGS} \ +&& ${dir_clean} \ +&& echo diff --git a/docker/Dockerfile b/.github/docker/slim/Dockerfile similarity index 50% rename from docker/Dockerfile rename to .github/docker/slim/Dockerfile index 41e1f82..02618ce 100644 --- a/docker/Dockerfile +++ b/.github/docker/slim/Dockerfile @@ -1,22 +1,9 @@ -# This is the Base Pulumi Devcontainer Dockerfile -# FROM the Microsoft Ubuntu 22.04 LTS Devcontainer Base Image -# -# The Pulumi Devcontainer provides a turn key develoepr userspace -# for use with VSCode, Github Codespaces, and Github Action Runners. -# -# The Pulumi Devcontainer Image is not intended as a production application image -# and does not adhere to the principle of one service per container but rather -# is designed for one (developer workflow) purpose per container. -# ############################################################################### # Use: -# - docker build --tag ghcr.io/pulumi/devcontainer:latest . -# - docker run --rm --publish 2222:2222 --publish 7681:7681 --publish 8088:8080 -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:latest -# - docker run -d --rm --cap-add=CAP_AUDIT_WRITE --publish 2222:2222 --publish 7681:7681 --publish 8088:8080 --name devcontainer --hostname devcontainer --security-opt label=disable --pull=always ghcr.io/pulumi/devcontainer -# - docker run -it --rm --entrypoint fish --mount type=bind,source=/run/docker.sock,target=/run/docker.sock --privileged --user vscode ghcr.io/pulumi/devcontainer:latest +# - docker build --progress plain --tag ghcr.io/pulumi/devcontainer:slim . +# - docker run --rm -d --name devcontainer --hostname devcontainer ghcr.io/pulumi/devcontainer:slim ############################################################################### -# Base Image - +# Base VSCode Image FROM mcr.microsoft.com/devcontainers/base:ubuntu SHELL ["/bin/bash", "-c", "-e"] @@ -24,13 +11,16 @@ SHELL ["/bin/bash", "-c", "-e"] # additional files into the container's directory tree ADD rootfs / ADD rootfs/etc/skel/ /root/ +RUN cp -rf /etc/skel/.bashrc /root/.bashrc && rm /root/.vimrc ADD rootfs/etc/skel/ /home/runner/ ADD rootfs/etc/skel/ /home/vscode/ -RUN cat /etc/skel/.bashrc > /root/.bashrc && rm /root/.vimrc ################################################################################# # Environment Variables +# Disable LC_ALL for Nix compatibility +# currently inheriting from base MS base image +ENV LC_ALL="" # Disable timezone prompts ENV TZ=UTC # Disable package manager prompts @@ -40,20 +30,20 @@ ENV PATH="/home/vscode/.krew/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/b # Set necessary nix environment variable ENV NIX_INSTALLER_EXTRA_CONF='filter-syscalls = false' # Set default bin directory for new packages -ARG BIN="/usr/local/bin" +ENV BIN="/usr/local/bin" # Set default binary install command -ARG INSTALL="install -m 755 -o root -g root" +ENV INSTALL="install -m 755 -o root -g root" # Set additional environment variables ENV REGISTRY_AUTH_FILE='/home/vscode/.docker/config.json' ENV XDG_CONFIG_HOME=/home/vscode/.config # Common Dockerfile Container Build Functions -ARG apt_update="sudo apt-get update" -ARG apt_install="TERM=linux DEBIAN_FRONTEND=noninteractive sudo apt-get install -q --yes --purge --assume-yes --auto-remove --allow-downgrades -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'" -ARG apt_clean="sudo apt-get clean && sudo apt-get autoremove -y && sudo apt-get purge -y --auto-remove" -ARG curl="/usr/bin/curl --silent --show-error --tlsv1.2 --location" -ARG curl_github="/usr/bin/curl --silent --show-error --tlsv1.2 --request GET --header "Authorization: Bearer $GITHUB_TOKEN" --header "X-GitHub-Api-Version: 2022-11-28" --url --location" -ARG dir_clean="\ +ENV apt_update="sudo apt-get update" +ENV apt_install="TERM=linux DEBIAN_FRONTEND=noninteractive sudo apt-get install -q --yes --purge --assume-yes --auto-remove --allow-downgrades -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'" +ENV apt_clean="sudo apt-get clean && sudo apt-get autoremove -y && sudo apt-get purge -y --auto-remove" +ENV curl="/usr/bin/curl --silent --show-error --tlsv1.2 --location" +ENV curl_github="/usr/bin/curl --silent --show-error --tlsv1.2 --request GET --header \"Authorization: Bearer $GITHUB_TOKEN\" --header \"X-GitHub-Api-Version: 2022-11-28\" --url --location" +ENV dir_clean="\ sudo rm -rf \ /var/lib/{apt,cache,log} \ /usr/share/{doc,man,locale} \ @@ -71,21 +61,14 @@ sudo rm -rf \ # Apt Packages ARG APT_PKGS="\ gh \ -bc \ -mc \ -vim \ git \ +vim \ tar \ -mosh \ -fish \ file \ wget \ tree \ -pigz \ -fish \ curl \ tmux \ -tmate \ socat \ gnupg \ pipenv \ @@ -93,21 +76,12 @@ netcat \ psmisc \ procps \ passwd \ -ripgrep \ -tcpdump \ -python3 \ -pciutils \ -libwrap0 \ xz-utils \ fontconfig \ glibc-tools \ -python3-pip \ -inetutils-ping \ -ca-certificates \ build-essential \ +ca-certificates \ libarchive-tools \ -apt-transport-https \ -software-properties-common \ " # Apt Packages @@ -115,34 +89,11 @@ RUN echo \ && export TEST="gh version" \ && ${apt_update} \ && bash -c "${apt_install} --no-install-recommends -o Dpkg::Options::='--force-confold' ${APT_PKGS}" \ -&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends -o Dpkg::Options::='--force-confold' openssh-server \ -&& mkdir /var/run/sshd \ && bash -c "${apt_clean}" \ && ${dir_clean} \ && ${TEST} \ && echo -# Publish Port for SSHD -EXPOSE 2222 - -# devcontainer docker-in-docker dependencies -ARG APT_PKGS="\ -docker-buildx-plugin \ -docker-ce-cli \ -libffi-dev \ -iptables \ -" -RUN echo \ -&& ${curl} https://download.docker.com/linux/ubuntu/gpg | sudo gpg --batch --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg \ -&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list \ -&& ${apt_update} \ -&& bash -c "${apt_install} ${APT_PKGS}" \ -&& bash -c "${apt_clean}" \ -&& ${dir_clean} \ -&& sudo update-alternatives --set iptables /usr/sbin/iptables-legacy \ -&& sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy \ -&& echo - # jq RUN echo \ && export NAME="jq" \ @@ -165,29 +116,6 @@ RUN echo \ && ${TEST} \ && echo -# Nix -RUN echo \ -&& export NAME=nix-installer \ -&& export TEST="${NAME} --version" \ -&& export REPOSITORY="DeterminateSystems/nix-installer" \ -&& export VERSION="$(${curl_github} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "aarch64"; else print "unknown" }') \ -&& export PKG="${NAME}-${ARCH}-linux" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& sudo ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${NAME} install linux --init none --no-confirm --extra-conf "filter-syscalls = false" \ -&& bash -c "${TEST}" \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - # direnv RUN echo \ && export NAME="direnv"\ @@ -242,7 +170,7 @@ WORKDIR /home/vscode RUN echo \ && export USER_ID="1000" \ && export USER_NAME="vscode" \ -&& export USER_SHELL="fish" \ +&& export USER_SHELL="bash" \ && export USER_GROUPS="${USER_NAME},sudo,docker,vscode" \ && export USER_GROUP_NAME="${USER_NAME}" \ && export USER_GROUP_ID="${USER_ID}" \ @@ -302,24 +230,29 @@ RUN sudo chown runner:runner -R /home/runner ################################################################################## # Install Creature Comforts -# Oh My Fish (OMF) +# Nix RUN echo \ -&& export URL="https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install" \ -&& ${curl} ${URL} --output /tmp/install \ -&& fish -c '. /tmp/install --noninteractive' \ +&& export NAME=nix-installer \ +&& export TEST="${NAME} --version" \ +&& export REPOSITORY="DeterminateSystems/nix-installer" \ +&& export VERSION="$(${curl_github} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ +&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "x86_64"; else if ($1 == "aarch64" || $1 == "arm64") print "aarch64"; else print "unknown" }') \ +&& export PKG="${NAME}-${ARCH}-linux" \ +&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ +&& echo "INFO[${NAME}] Installed:" \ +&& echo "INFO[${NAME}] Command: ${NAME}" \ +&& echo "INFO[${NAME}] Package: ${PKG}" \ +&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ +&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ +&& echo "INFO[${NAME}] Source: ${URL}" \ +&& sudo ${curl} ${URL} --output /tmp/${NAME} \ +&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ +&& ${NAME} install linux --init none --no-confirm --extra-conf "filter-syscalls = false" \ +&& bash -c "${TEST}" \ +&& sudo chown vscode -R /nix \ +&& sudo usermod -aG nixbld vscode \ && ${dir_clean} \ -&& echo - -# Vim Plugins -RUN echo \ -&& /bin/bash -c "vim -T dumb -n -i NONE -es -S <(echo -e 'silent! PluginInstall')" \ -&& git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim \ -&& vim -E -u NONE -S ~/.vimrc +PluginInstall +qall \ -&& echo - -# TMUX Plugins -RUN echo \ -&& ~/.tmux/plugins/tpm/bin/install_plugins || true \ +&& ${TEST} \ && echo # NerdFonts: FiraCode Nerd Font Mono @@ -348,111 +281,22 @@ RUN echo \ && ${TEST} \ && echo -################################################################################# -# Install Programming Language Tooling -# - golang -# - nodejs -# - python -# - dotnet -################################################################################# - -# Install nodejs npm yarn -RUN echo \ -&& export NODE_MAJOR=20 \ -&& ${curl} https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ - | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ -&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \ - | sudo tee /etc/apt/sources.list.d/nodesource.list \ -&& sudo apt-get update \ -&& sudo apt-get install nodejs \ -&& sudo apt-get clean \ -&& sudo apt-get autoremove -y \ -&& sudo apt-get purge -y --auto-remove \ -&& ${dir_clean} \ -&& node --version \ -&& npm --version \ -&& sudo npm install --global yarn \ -&& yarn --version \ -&& true - -# Python -ARG APT_PKGS="\ -python3 \ -python3-pip \ -python3-venv \ -" -RUN echo \ -&& bash -c "${apt_install} ${APT_PKGS}" \ -&& bash -c "${apt_clean}" \ -&& sudo update-alternatives --install \ - /usr/bin/python python \ - /usr/bin/python3 1 \ -&& ${dir_clean} \ -&& echo - -# Python Pip Packages -ARG PIP_PKGS="\ -setuptools \ -" +# Vim Plugins RUN echo \ -&& sudo python3 -m pip install ${PIP_PKGS} \ -&& ${dir_clean} \ +&& /bin/bash -c "vim -T dumb -n -i NONE -es -S <(echo -e 'silent! PluginInstall')" \ +&& git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim \ +&& vim -E -u NONE -S ~/.vimrc +PluginInstall +qall \ && echo -# Dotnet -ARG APT_PKGS="\ -dotnet-sdk-7.0 \ -dotnet-runtime-7.0 \ -" +# TMUX Plugins RUN echo \ -&& bash -c "${apt_install} ${APT_PKGS}" \ -&& bash -c "${apt_clean}" \ -&& ${dir_clean} \ -&& echo - -# Golang -RUN echo ;set -ex \ -&& jq --version \ -&& export NAME="go" \ -&& export TEST="${NAME} version" \ -&& export VERSION="$(${curl} "https://go.dev/dl/?mode=json" | jq --compact-output --raw-output .[1].version)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${VERSION}.linux-${ARCH}.tar.gz" \ -&& export URL="https://go.dev/dl/${PKG}" \ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& ${curl} ${URL} | sudo tar -C /usr/local/ -xzvf - \ -&& sudo chmod 755 /usr/local/go/bin/* \ -&& ${TEST} \ +&& ~/.tmux/plugins/tpm/bin/install_plugins || true \ && echo -################################################################################# -# Image Metadata -LABEL name="pulumi-devcontainer" -LABEL distribution-scope="public" -LABEL io.k8s.display-name="Pulumi" -LABEL org.opencontainers.image.authors="github.com/pulumi" -LABEL org.opencontainers.image.source="https://github.com/pulumi/devcontainer" -LABEL org.opencontainers.image.description="A containerized environment for developing and running pulumi IaC and Provider code" -LABEL org.opencontainers.image.licenses="APACHE2" -LABEL maintainer="github.com/pulumi" - ################################################################################ # Install Pulumi CLI, ESC, & CTL -# Install Pulumi CLI Utilities and Pulumi go deps -ARG GO_PKGS="\ -golang.org/x/tools/gopls@latest \ -github.com/josharian/impl@latest \ -github.com/fatih/gomodifytags@latest \ -github.com/cweill/gotests/gotests@latest \ -github.com/go-delve/delve/cmd/dlv@latest \ -honnef.co/go/tools/cmd/staticcheck@latest \ -github.com/haya14busa/goplay/cmd/goplay@latest \ -" + +# Install Pulumi CLI Utility RUN echo \ && export NAME=pulumi \ && export TEST="pulumi version" \ @@ -473,10 +317,6 @@ RUN echo \ && sudo chmod 755 /tmp/pulumi/* \ && sudo chown root:root /tmp/pulumi/* \ && sudo mv /tmp/pulumi/* /usr/local/bin/ \ -&& echo "+-------------------------------------------------------+"\ -&& echo "| Installing Basic Pulumi Golang Deps |"\ -&& echo "+-------------------------------------------------------+"\ -&& for pkg in ${GO_PKGS}; do go install ${pkg}; echo "Installed: ${pkg}"; done \ && ${dir_clean} \ && ${TEST} \ && echo @@ -527,175 +367,23 @@ RUN echo \ && ${TEST} \ && echo -################################################################################## -#### Common Binary Install Arguments -################################################################################## - -################################################################################## -# Insall Github Actions Local Testing CLI -# - https://nektosact.com -# - https://github.com/nektos/gh-act -RUN echo \ -&& export NAME=act \ -&& export TEST="${NAME} --version" \ -&& export REPOSITORY="nektos/gh-act" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="linux-${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install Kubectl -# - https://kubernetes.io -# - github.com/kubernetes/kubernetes -RUN echo \ -&& export NAME=kubectl \ -&& export TEST="${NAME} version --client" \ -&& export REPOSITORY="kubernetes/kubernetes" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}" \ -&& export URL="https://storage.googleapis.com/kubernetes-release/release/${VERSION}/bin/linux/${ARCH}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& sudo ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/kubectl ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install Krew -ARG KREW_PKG="\ -view-utilization \ -view-secret \ -view-cert \ -rook-ceph \ -open-svc \ -whoami \ -konfig \ -ktop \ -neat \ -tail \ -ctx \ -ns \ -" -RUN echo \ -&& export NAME=krew \ -&& export TEST="kubectl ${NAME} version" \ -&& export REPOSITORY="kubernetes-sigs/${NAME}" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export PKG="${NAME}-linux_${ARCH}.tar.gz" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: (kubectl) ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | tar xzvf - --directory /tmp ./${NAME}-linux_${ARCH} \ -&& sudo ${INSTALL} /tmp/${NAME}-linux_${ARCH} ${BIN}/kubectl-${NAME} \ -&& for pkg in ${CODE_PKGS}; do kubectl ${NAME} install ${pkg}; echo "Installed: ${pkg}"; done \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install Kind Kubernetes-in-Docker -RUN echo \ -&& export NAME=kind \ -&& export TEST="${NAME} version" \ -&& export REPOSITORY="kubernetes-sigs/kind" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH="$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }')" \ -&& export PKG="${NAME}-linux-${ARCH}" \ -&& export URL="https://github.com/${REPOSITORY}/releases/download/${VERSION}/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} --output /tmp/${NAME} \ -&& sudo ${INSTALL} /tmp/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Insall helm cli -# - https://helm.sh -# - https://github.com/helm/helm -RUN echo \ -&& export NAME=helm \ -&& export TEST="${NAME} version" \ -&& export REPOSITORY="helm/helm" \ -&& export VERSION="$(${curl} https://api.github.com/repos/${REPOSITORY}/releases/latest | jq --raw-output .tag_name)" \ -&& export ARCH=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ -&& export PKG="${NAME}-${VERSION}-linux-${ARCH}.tar.gz" \ -&& export URL="https://get.helm.sh/${PKG}" \ -&& echo "---------------------------------------------------------"\ -&& echo "INFO[${NAME}] Installed:" \ -&& echo "INFO[${NAME}] Command: ${NAME}" \ -&& echo "INFO[${NAME}] Package: ${PKG}" \ -&& echo "INFO[${NAME}] Latest Release: ${VERSION}" \ -&& echo "INFO[${NAME}] Architecture: ${ARCH}" \ -&& echo "INFO[${NAME}] Source: ${URL}" \ -&& echo "---------------------------------------------------------"\ -&& ${curl} ${URL} | tar xzvf - --directory /tmp linux-${ARCH}/${NAME} \ -&& sudo ${INSTALL} /tmp/linux-${ARCH}/${NAME} ${BIN}/${NAME} \ -&& ${dir_clean} \ -&& ${TEST} \ -&& echo - -################################################################################## -# Install hugo -EXPOSE 1313 -RUN set -ex \ - && export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ - && export urlHugoRelease="https://api.github.com/repos/gohugoio/hugo/releases/latest" \ - && export urlHugoVersion=$(curl -s ${urlHugoRelease} | awk -F '["v,]' '/tag_name/{print $5}') \ - && export urlHugoBase="https://github.com/gohugoio/hugo/releases/download" \ - && export urlHugoBin="hugo_${urlHugoVersion}_linux-${arch}.deb" \ - && export urlHugo="${urlHugoBase}/v${urlHugoVersion}/${urlHugoBin}" \ - && curl --output /tmp/${urlHugoBin} -L ${urlHugo} \ - && sudo dpkg -i /tmp/${urlHugoBin} \ - && which hugo \ - && hugo version \ - && rm -rf /tmp/* \ - && true - ################################################################################# # Load startup artifacts -COPY ./bin/connect /bin/ -COPY ./bin/entrypoint /bin/ +COPY ./bin/connect /bin/ +COPY ./bin/entrypoint /bin/ +COPY ./bin/devcontainer-links /bin/ ################################################################################# # Entrypoint & default command -WORKDIR /workspaces -ENTRYPOINT /bin/entrypoint -CMD ["/usr/bin/env", "connect"] \ No newline at end of file +ENTRYPOINT ["/usr/bin/bash", "-c", "entrypoint"] +HEALTHCHECK --interval=120s --timeout=30s --start-period=5s --retries=3 CMD [ "true" ] + +################################################################################# +# Image Metadata +LABEL tag="slim" +LABEL name="Devcontainer" +LABEL io.k8s.display-name="Pulumi" +LABEL org.opencontainers.image.authors="github.com/pulumi" +LABEL org.opencontainers.image.source="https://github.com/pulumi/devcontainer" +LABEL org.opencontainers.image.licenses="APACHE-2.0" +LABEL distribution-scope="public" \ No newline at end of file diff --git a/.github/docker/slim/bin/connect b/.github/docker/slim/bin/connect new file mode 100755 index 0000000..3affd7e --- /dev/null +++ b/.github/docker/slim/bin/connect @@ -0,0 +1,5 @@ +#!/bin/bash +# Attach to the tmux session +bash -c "env | grep -v '_=' | grep -v 'PWD' | grep -v SHLVL | grep -v 'SHELL' | tee ${HOME}/.env" > /dev/null +session_name="pulumi" +tmux attach -t "$session_name" \ No newline at end of file diff --git a/.github/docker/slim/bin/devcontainer-links b/.github/docker/slim/bin/devcontainer-links new file mode 100755 index 0000000..82c19ac --- /dev/null +++ b/.github/docker/slim/bin/devcontainer-links @@ -0,0 +1,30 @@ +#!/bin/bash + +# Change ownership of all items in /workspaces to the current user +user="$(id -u)" +sudo chown "${user}" /workspaces/* 2>/dev/null + +# Iterate over directories in /workspaces +for dir in /workspaces/*; do + # Check if it's a directory + if [[ -d "${dir}" ]]; then + # Extract the directory name + dir_name=$(basename "${dir}") + + # Check if a symlink already exists in the home directory + if [[ -L "${HOME}/${dir_name}" ]]; then + # Remove the existing symlink if it exists + rm "${HOME}/${dir_name}" + elif [[ -e "${HOME}/${dir_name}" ]]; then + # Skip if it's not a symlink (to avoid destructive actions on actual directories or files) + echo "Skipping ${HOME}/${dir_name}, as it's not a symlink." + continue + fi + + # Create a new symbolic link + ln -s "${dir}" "${HOME}/${dir_name}" + fi +done + +# Allow direnv to set environment variables +direnv allow 2>/dev/null diff --git a/docker/bin/entrypoint b/.github/docker/slim/bin/entrypoint similarity index 83% rename from docker/bin/entrypoint rename to .github/docker/slim/bin/entrypoint index d7ce422..2af16c0 100755 --- a/docker/bin/entrypoint +++ b/.github/docker/slim/bin/entrypoint @@ -1,5 +1,6 @@ -#!/bin/bash -ex +#!/bin/bash source ${HOME}/.bashrc +session_name="pulumi" # define USER environment variable from 3 possible sources, in order of priority (first one wins) # 1. USER environment variable passed in from pre-existing $USER environment variable # 2. USER environment variable passed in from $(whoami) command @@ -14,13 +15,10 @@ fi ################################################################################# # Function to convert environment variables to fish syntax and save to a file -# Load environment variables into tmux session env_file="$HOME/.env_fish" -session_name="konductor" convert_env_to_fish() { - > "$1" # Clear the file content + > "$1" while IFS='=' read -r name value; do - # Skip read-only variables case "$name" in PWD|SHLVL|_) continue @@ -32,7 +30,13 @@ convert_env_to_fish() { fi done < <(env) } -convert_env_to_fish "$env_file" + +# Only run if fish is present +if command -v fish >/dev/null 2>&1; then + convert_env_to_fish "$env_file" +else + echo "Fish shell not found, skipping..." +fi # Create necessary directories for SSH create_ssh_directories() { @@ -107,7 +111,7 @@ setup_user_ssh() { chmod 600 "${ssh_key_file}" chmod 644 "${ssh_key_file}.pub" - # Append GitHub user keys to authorized_keys if GITHUB_USER_KEYS is set + # Append GitHub user keys to authorized_keys if GITHUB_USER is present if [ -n "${GITHUB_USER}" ]; then echo "Fetching SSH keys for GitHub user ${GITHUB_USER}" curl -sL "https://github.com/${GITHUB_USER}.keys" | tee -a "${ssh_dir}/authorized_keys" @@ -129,7 +133,7 @@ run_tmux_keepalive() { while true; do if ! tmux has-session -t "$session_name" 2>/dev/null; then tmux new-session -d -s "$session_name" - load_env_to_tmux "${HOME}/.env_tmux" "$session_name" + #load_env_to_tmux "${HOME}/.env_tmux" "$session_name" echo "Restarted tmux session: $session_name" fi sleep 5 @@ -152,6 +156,12 @@ run_ttyd() { done } +# Start VSCode Web Service +#run_code () { +# echo "Starting VSCode Service on port 8080" > /dev/stdout +# code-server --auth none --bind-addr 0.0.0.0:8080 & +#} + ################################################################################# # Main Execution ################################################################################# @@ -171,23 +181,27 @@ fi echo "user: $USER:$(whoami)" # Save environment variables to file for tmux to load -printenv > "${HOME}/.env_tmux" -chmod 600 "${HOME}/.env_tmux" - -# Run TTYD and SSHD only if REMOTE_ENABLED=true -run_remote_access () { - if $REMOTE_ENABLED; then - setup_user_ssh - run_sshd - run_ttyd & - fi -} - -# Ternary bash operator -# If PULUMI_TOKEN environment variable is present then run pulumi login transparently -[[ $PULUMI_TOKEN ]] && pulumi login || true +bash -c "env | grep -v '_=' | grep -v 'PWD' | grep -v SHLVL | grep -v 'SHELL' | tee ${HOME}/.env" +chmod 600 "${HOME}/.env" # Run functions -run_remote_access -run_tmux_keepalive "konductor" > /dev/null 2>&1 & + +# Only run if sshd is present +if command -v sshd >/dev/null 2>&1; then + echo "sshd is installed, proceeding with user SSH setup..." + run_sshd + setup_user_ssh +else + echo "sshd not detected, skipping setup..." +fi + +# Only run if ttyd is present +if command -v ttyd >/dev/null 2>&1; then + echo "Found TTYD, Starting service..." + run_ttyd & +else + echo "TTYD not detected, skipping setup..." +fi + +run_tmux_keepalive "pulumi" > /dev/null 2>&1 & sleep infinity diff --git a/docker/rootfs/containers/containers.conf b/.github/docker/slim/rootfs/containers/containers.conf similarity index 100% rename from docker/rootfs/containers/containers.conf rename to .github/docker/slim/rootfs/containers/containers.conf diff --git a/docker/rootfs/containers/registries.conf b/.github/docker/slim/rootfs/containers/registries.conf similarity index 100% rename from docker/rootfs/containers/registries.conf rename to .github/docker/slim/rootfs/containers/registries.conf diff --git a/docker/rootfs/docker/registry/config.yml b/.github/docker/slim/rootfs/docker/registry/config.yml similarity index 100% rename from docker/rootfs/docker/registry/config.yml rename to .github/docker/slim/rootfs/docker/registry/config.yml diff --git a/docker/rootfs/environment b/.github/docker/slim/rootfs/environment similarity index 100% rename from docker/rootfs/environment rename to .github/docker/slim/rootfs/environment diff --git a/docker/rootfs/etc/ansible/ansible.cfg b/.github/docker/slim/rootfs/etc/ansible/ansible.cfg similarity index 100% rename from docker/rootfs/etc/ansible/ansible.cfg rename to .github/docker/slim/rootfs/etc/ansible/ansible.cfg diff --git a/docker/rootfs/etc/apt/apt.conf.d/99config b/.github/docker/slim/rootfs/etc/apt/apt.conf.d/99config similarity index 100% rename from docker/rootfs/etc/apt/apt.conf.d/99config rename to .github/docker/slim/rootfs/etc/apt/apt.conf.d/99config diff --git a/docker/rootfs/etc/containers/registries.conf b/.github/docker/slim/rootfs/etc/containers/registries.conf similarity index 100% rename from docker/rootfs/etc/containers/registries.conf rename to .github/docker/slim/rootfs/etc/containers/registries.conf diff --git a/docker/rootfs/etc/docker/registry/config.yml b/.github/docker/slim/rootfs/etc/docker/registry/config.yml similarity index 100% rename from docker/rootfs/etc/docker/registry/config.yml rename to .github/docker/slim/rootfs/etc/docker/registry/config.yml diff --git a/docker/rootfs/etc/dpkg/dpkg.cfg.d/01_noman b/.github/docker/slim/rootfs/etc/dpkg/dpkg.cfg.d/01_noman similarity index 100% rename from docker/rootfs/etc/dpkg/dpkg.cfg.d/01_noman rename to .github/docker/slim/rootfs/etc/dpkg/dpkg.cfg.d/01_noman diff --git a/docker/rootfs/etc/environment b/.github/docker/slim/rootfs/etc/environment similarity index 100% rename from docker/rootfs/etc/environment rename to .github/docker/slim/rootfs/etc/environment diff --git a/docker/rootfs/etc/skel/.Xresources b/.github/docker/slim/rootfs/etc/skel/.Xresources similarity index 100% rename from docker/rootfs/etc/skel/.Xresources rename to .github/docker/slim/rootfs/etc/skel/.Xresources diff --git a/docker/rootfs/etc/skel/.actrc b/.github/docker/slim/rootfs/etc/skel/.actrc similarity index 100% rename from docker/rootfs/etc/skel/.actrc rename to .github/docker/slim/rootfs/etc/skel/.actrc diff --git a/docker/rootfs/etc/skel/.bash_profile b/.github/docker/slim/rootfs/etc/skel/.bash_profile similarity index 100% rename from docker/rootfs/etc/skel/.bash_profile rename to .github/docker/slim/rootfs/etc/skel/.bash_profile diff --git a/docker/rootfs/etc/skel/.bashrc b/.github/docker/slim/rootfs/etc/skel/.bashrc similarity index 100% rename from docker/rootfs/etc/skel/.bashrc rename to .github/docker/slim/rootfs/etc/skel/.bashrc diff --git a/docker/rootfs/etc/skel/.config/fish/conf.d/omf.fish b/.github/docker/slim/rootfs/etc/skel/.config/fish/conf.d/omf.fish similarity index 100% rename from docker/rootfs/etc/skel/.config/fish/conf.d/omf.fish rename to .github/docker/slim/rootfs/etc/skel/.config/fish/conf.d/omf.fish diff --git a/docker/rootfs/etc/skel/.config/fish/config.fish b/.github/docker/slim/rootfs/etc/skel/.config/fish/config.fish similarity index 75% rename from docker/rootfs/etc/skel/.config/fish/config.fish rename to .github/docker/slim/rootfs/etc/skel/.config/fish/config.fish index fab08b2..24dd3c3 100644 --- a/docker/rootfs/etc/skel/.config/fish/config.fish +++ b/.github/docker/slim/rootfs/etc/skel/.config/fish/config.fish @@ -74,9 +74,32 @@ function ssh_agent_init # Finally, show what keys are currently in the agent # ssh-add -l end -if test -r ~/.env_fish - source ~/.env_fish + +# Load environment variables from a file +#function envsource +# for line in (cat $argv | grep -v '^#') +# set item (string split -m 1 '=' $line) +# set -gx $item[1] $item[2] +# end +#end +function envsource + # Set default file to ~/.env + set file ~/.env + + # If an argument is provided, use it as the file + if count $argv > /dev/null + set file $argv[1] + end + + # Load environment variables from the file + for line in (cat $file | grep -v '^#') + set item (string split -m 1 '=' $line) + set -gx $item[1] $item[2] + echo "Exported key $item[1]" + end end +touch ~/.env +envsource ~/.env 2>&1 1>/dev/null ssh_agent_init 2>&1 1>/dev/null set fish_greeting diff --git a/docker/rootfs/etc/skel/.config/fish/fish_variables b/.github/docker/slim/rootfs/etc/skel/.config/fish/fish_variables similarity index 100% rename from docker/rootfs/etc/skel/.config/fish/fish_variables rename to .github/docker/slim/rootfs/etc/skel/.config/fish/fish_variables diff --git a/docker/rootfs/etc/skel/.config/fish/functions/cloc.fish b/.github/docker/slim/rootfs/etc/skel/.config/fish/functions/cloc.fish similarity index 100% rename from docker/rootfs/etc/skel/.config/fish/functions/cloc.fish rename to .github/docker/slim/rootfs/etc/skel/.config/fish/functions/cloc.fish diff --git a/.github/docker/slim/rootfs/etc/skel/.config/fish/functions/env.fish b/.github/docker/slim/rootfs/etc/skel/.config/fish/functions/env.fish new file mode 100644 index 0000000..5984df6 --- /dev/null +++ b/.github/docker/slim/rootfs/etc/skel/.config/fish/functions/env.fish @@ -0,0 +1,29 @@ +# Place this in your Fish functions folder to make it available immediately +# e.g. ~/.config/fish/functions/envsource.fish +# +# Usage: envsource + +#function envsource +# for line in (cat $argv | grep -v '^#') +# set item (string split -m 1 '=' $line) +# set -gx $item[1] $item[2] +# echo "Exported key $item[1]" +# end +#end + +function envsource + # Set default file to ~/.env + set file ~/.env + + # If an argument is provided, use it as the file + if count $argv > /dev/null + set file $argv[1] + end + + # Load environment variables from the file + for line in (cat $file | grep -v '^#') + set item (string split -m 1 '=' $line) + set -gx $item[1] $item[2] + echo "Exported key $item[1]" + end +end diff --git a/docker/rootfs/etc/skel/.config/fish/functions/k.fish b/.github/docker/slim/rootfs/etc/skel/.config/fish/functions/k.fish similarity index 100% rename from docker/rootfs/etc/skel/.config/fish/functions/k.fish rename to .github/docker/slim/rootfs/etc/skel/.config/fish/functions/k.fish diff --git a/docker/rootfs/etc/skel/.config/k9s/skin.yml b/.github/docker/slim/rootfs/etc/skel/.config/k9s/skin.yml similarity index 100% rename from docker/rootfs/etc/skel/.config/k9s/skin.yml rename to .github/docker/slim/rootfs/etc/skel/.config/k9s/skin.yml diff --git a/docker/rootfs/etc/skel/.config/starship.toml b/.github/docker/slim/rootfs/etc/skel/.config/starship.toml similarity index 100% rename from docker/rootfs/etc/skel/.config/starship.toml rename to .github/docker/slim/rootfs/etc/skel/.config/starship.toml diff --git a/docker/rootfs/etc/skel/.dir_colors b/.github/docker/slim/rootfs/etc/skel/.dir_colors similarity index 100% rename from docker/rootfs/etc/skel/.dir_colors rename to .github/docker/slim/rootfs/etc/skel/.dir_colors diff --git a/docker/rootfs/etc/skel/.docker.json b/.github/docker/slim/rootfs/etc/skel/.docker.json similarity index 100% rename from docker/rootfs/etc/skel/.docker.json rename to .github/docker/slim/rootfs/etc/skel/.docker.json diff --git a/docker/rootfs/etc/skel/.gitconfig b/.github/docker/slim/rootfs/etc/skel/.gitconfig similarity index 69% rename from docker/rootfs/etc/skel/.gitconfig rename to .github/docker/slim/rootfs/etc/skel/.gitconfig index faa6105..feaadc0 100644 --- a/docker/rootfs/etc/skel/.gitconfig +++ b/.github/docker/slim/rootfs/etc/skel/.gitconfig @@ -1,6 +1,4 @@ -[pull] - rebase = false [alias] count = "ls-files --exclude-standard -- ':!:**/*.[pjs][npv]g' ':!:**/*.ai' ':!:.idea' ':!:**/*.eslintrc' ':!:package-lock.json' ':!:LICENSE'" [core] - excludesfile = /home/k/.gitignore + excludesfile = /home/vscode/.gitignore diff --git a/docker/rootfs/etc/skel/.local/share/code-server/User/settings.json b/.github/docker/slim/rootfs/etc/skel/.local/share/code-server/User/settings.json similarity index 100% rename from docker/rootfs/etc/skel/.local/share/code-server/User/settings.json rename to .github/docker/slim/rootfs/etc/skel/.local/share/code-server/User/settings.json diff --git a/docker/rootfs/etc/skel/.tmux.conf b/.github/docker/slim/rootfs/etc/skel/.tmux.conf similarity index 100% rename from docker/rootfs/etc/skel/.tmux.conf rename to .github/docker/slim/rootfs/etc/skel/.tmux.conf diff --git a/.kube/.gitkeep b/.github/docker/slim/rootfs/etc/skel/.tmux/.gitkeep similarity index 100% rename from .kube/.gitkeep rename to .github/docker/slim/rootfs/etc/skel/.tmux/.gitkeep diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/.travis.yml b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/.travis.yml similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/.travis.yml rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/.travis.yml diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/CHANGELOG.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/CHANGELOG.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/CHANGELOG.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/CHANGELOG.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/HOW_TO_PLUGIN.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/HOW_TO_PLUGIN.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/HOW_TO_PLUGIN.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/HOW_TO_PLUGIN.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/LICENSE.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/LICENSE.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/LICENSE.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/LICENSE.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/README.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/README.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/README.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/README.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/bin/clean_plugins b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bin/clean_plugins similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/bin/clean_plugins rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bin/clean_plugins diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/bin/install_plugins b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bin/install_plugins similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/bin/install_plugins rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bin/install_plugins diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/bin/update_plugins b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bin/update_plugins similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/bin/update_plugins rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bin/update_plugins diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/bindings/clean_plugins b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bindings/clean_plugins similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/bindings/clean_plugins rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bindings/clean_plugins diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/bindings/install_plugins b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bindings/install_plugins similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/bindings/install_plugins rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bindings/install_plugins diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/bindings/update_plugins b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bindings/update_plugins similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/bindings/update_plugins rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/bindings/update_plugins diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/automatic_tpm_installation.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/automatic_tpm_installation.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/automatic_tpm_installation.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/automatic_tpm_installation.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/changing_plugins_install_dir.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/changing_plugins_install_dir.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/changing_plugins_install_dir.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/changing_plugins_install_dir.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/how_to_create_plugin.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/how_to_create_plugin.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/how_to_create_plugin.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/how_to_create_plugin.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/managing_plugins_via_cmd_line.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/managing_plugins_via_cmd_line.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/managing_plugins_via_cmd_line.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/managing_plugins_via_cmd_line.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/tpm_not_working.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/tpm_not_working.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/docs/tpm_not_working.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/docs/tpm_not_working.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/.gitignore b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/.gitignore similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/.gitignore rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/.gitignore diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/.travis.yml b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/.travis.yml similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/.travis.yml rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/.travis.yml diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/CHANGELOG.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/CHANGELOG.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/CHANGELOG.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/CHANGELOG.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/LICENSE.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/LICENSE.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/LICENSE.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/LICENSE.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/README.md b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/README.md similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/README.md rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/README.md diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/Vagrantfile b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/Vagrantfile similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/Vagrantfile rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/Vagrantfile diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/run_framework_tests b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/run_framework_tests similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/run_framework_tests rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/run_framework_tests diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/setup b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/setup similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/setup rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/setup diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/helpers/helpers.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/helpers/helpers.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/helpers/helpers.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/helpers/helpers.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/run_tests_in_isolation b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/run_tests_in_isolation similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/run_tests_in_isolation rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/run_tests_in_isolation diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_basic_script_execution.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_basic_script_execution.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_basic_script_execution.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_basic_script_execution.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_default_session_name.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_default_session_name.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_default_session_name.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_default_session_name.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_tmux_scripting.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_tmux_scripting.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_tmux_scripting.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/tests/test_tmux_scripting.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/vagrant_centos_provisioning.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/vagrant_centos_provisioning.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/vagrant_centos_provisioning.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/vagrant_centos_provisioning.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/vagrant_ubuntu_provisioning.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/vagrant_ubuntu_provisioning.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/vagrant_ubuntu_provisioning.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/lib/tmux-test/vagrant_ubuntu_provisioning.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/check_tmux_version.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/check_tmux_version.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/check_tmux_version.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/check_tmux_version.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/clean_plugins.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/clean_plugins.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/clean_plugins.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/clean_plugins.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/plugin_functions.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/plugin_functions.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/plugin_functions.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/plugin_functions.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/shell_echo_functions.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/shell_echo_functions.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/shell_echo_functions.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/shell_echo_functions.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/tmux_echo_functions.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/tmux_echo_functions.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/tmux_echo_functions.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/tmux_echo_functions.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/tmux_utils.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/tmux_utils.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/tmux_utils.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/tmux_utils.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/utility.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/utility.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/utility.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/helpers/utility.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/install_plugins.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/install_plugins.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/install_plugins.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/install_plugins.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/source_plugins.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/source_plugins.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/source_plugins.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/source_plugins.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/update_plugin.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/update_plugin.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/update_plugin.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/update_plugin.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/update_plugin_prompt_handler.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/update_plugin_prompt_handler.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/update_plugin_prompt_handler.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/update_plugin_prompt_handler.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/variables.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/variables.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/scripts/variables.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/scripts/variables.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_failed_plugin_download b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_failed_plugin_download similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_failed_plugin_download rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_failed_plugin_download diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_clean_plugins b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_clean_plugins similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_clean_plugins rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_clean_plugins diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_multiple_plugins_download b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_multiple_plugins_download similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_multiple_plugins_download rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_multiple_plugins_download diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_plugin_download b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_plugin_download similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_plugin_download rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_plugin_download diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_update_of_a_single_plugin b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_update_of_a_single_plugin similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_update_of_a_single_plugin rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_update_of_a_single_plugin diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_update_of_all_plugins b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_update_of_all_plugins similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_update_of_all_plugins rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/expect_successful_update_of_all_plugins diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/helpers/tpm.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/helpers/tpm.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/helpers/tpm.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/helpers/tpm.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_clean.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_clean.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_clean.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_clean.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_installation.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_installation.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_installation.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_installation.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_installation_legacy.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_installation_legacy.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_installation_legacy.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_installation_legacy.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_sourcing.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_sourcing.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_sourcing.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_sourcing.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_update.sh b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_update.sh similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_update.sh rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tests/test_plugin_update.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/tpm b/.github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tpm similarity index 100% rename from docker/rootfs/etc/skel/.tmux/plugins/tpm/tpm rename to .github/docker/slim/rootfs/etc/skel/.tmux/plugins/tpm/tpm diff --git a/docker/rootfs/etc/skel/.vim/colors/iceberg.vim b/.github/docker/slim/rootfs/etc/skel/.vim/colors/iceberg.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/colors/iceberg.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/colors/iceberg.vim diff --git a/docker/rootfs/etc/skel/.vim/colors/molokai.vim b/.github/docker/slim/rootfs/etc/skel/.vim/colors/molokai.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/colors/molokai.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/colors/molokai.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/.vintrc.yaml b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/.vintrc.yaml similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/.vintrc.yaml rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/.vintrc.yaml diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/CHANGELOG.md b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/CHANGELOG.md similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/CHANGELOG.md rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/CHANGELOG.md diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/LICENCE b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/LICENCE similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/LICENCE rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/LICENCE diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/README.markdown b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/README.markdown similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/README.markdown rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/README.markdown diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/_config.yml b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/_config.yml similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/_config.yml rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/_config.yml diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/autoload/nerdtree.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/autoload/nerdtree.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/autoload/nerdtree.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/autoload/nerdtree.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/autoload/nerdtree/ui_glue.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/autoload/nerdtree/ui_glue.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/autoload/nerdtree/ui_glue.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/autoload/nerdtree/ui_glue.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/doc/NERDTree.txt b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/doc/NERDTree.txt similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/doc/NERDTree.txt rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/doc/NERDTree.txt diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/doc/tags b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/doc/tags similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/doc/tags rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/doc/tags diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/bookmark.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/bookmark.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/bookmark.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/bookmark.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/creator.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/creator.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/creator.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/creator.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/event.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/event.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/event.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/event.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/flag_set.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/flag_set.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/flag_set.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/flag_set.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/key_map.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/key_map.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/key_map.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/key_map.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_controller.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_controller.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_controller.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_controller.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_item.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_item.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_item.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/menu_item.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/nerdtree.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/nerdtree.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/nerdtree.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/nerdtree.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/notifier.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/notifier.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/notifier.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/notifier.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/opener.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/opener.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/opener.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/opener.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/path.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/path.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/path.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/path.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_dir_node.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_dir_node.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_dir_node.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_dir_node.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_file_node.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_file_node.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_file_node.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/tree_file_node.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/ui.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/ui.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/ui.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/lib/nerdtree/ui.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/exec_menuitem.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/exec_menuitem.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/exec_menuitem.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/exec_menuitem.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/fs_menu.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/fs_menu.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/fs_menu.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/fs_menu.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/vcs.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/vcs.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/vcs.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/nerdtree_plugin/vcs.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/plugin/NERD_tree.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/plugin/NERD_tree.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/plugin/NERD_tree.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/plugin/NERD_tree.vim diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/screenshot.png b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/screenshot.png similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/screenshot.png rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/screenshot.png diff --git a/docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim b/.github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim similarity index 100% rename from docker/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim rename to .github/docker/slim/rootfs/etc/skel/.vim/pack/vendor/start/nerdtree/syntax/nerdtree.vim diff --git a/docker/rootfs/etc/skel/.vimrc b/.github/docker/slim/rootfs/etc/skel/.vimrc similarity index 100% rename from docker/rootfs/etc/skel/.vimrc rename to .github/docker/slim/rootfs/etc/skel/.vimrc diff --git a/docker/rootfs/etc/skel/.zshrc b/.github/docker/slim/rootfs/etc/skel/.zshrc similarity index 100% rename from docker/rootfs/etc/skel/.zshrc rename to .github/docker/slim/rootfs/etc/skel/.zshrc diff --git a/docker/rootfs/etc/ssh/sshd_config b/.github/docker/slim/rootfs/etc/ssh/sshd_config similarity index 100% rename from docker/rootfs/etc/ssh/sshd_config rename to .github/docker/slim/rootfs/etc/ssh/sshd_config diff --git a/docker/rootfs/usr/bin/run_registry.sh b/.github/docker/slim/rootfs/usr/bin/run_registry.sh similarity index 100% rename from docker/rootfs/usr/bin/run_registry.sh rename to .github/docker/slim/rootfs/usr/bin/run_registry.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 827df8e..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,140 +0,0 @@ -################################################################################## -# References: -# Built-in arguments: -# - https://docs.github.com/en/actions/learn-github-actions/contexts -# Built-in environment variables: -# - https://docs.github.com/en/enterprise-cloud@latest/actions/learn-github-actions/variables#default-environment-variables -# -# Develop this workflow locally with the following command: -# ~$ gh extension install nektos/gh-act -# ~$ gh act --env-file .env -s GITHUB_TOKEN=$GITHUB_TOKEN -s PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN - -name: Pulumi Devcontainer Build -on: - workflow_dispatch: - push: - branches: - - main - paths-ignore: - - 'devcontainer**' - - 'devcontainer/**' - - '.devcontainer/**' - - '.pulumi/**' - - '.kube/**' - - 'docs/**' - - '**.md' - pull_request: - paths-ignore: - - 'devcontainer**' - - 'devcontainer/**' - - '.devcontainer/**' - - '.pulumi/**' - - '.kube/**' - - 'docs/**' - - '**.md' - branches: - - main - schedule: - - cron: '0 0 * * 0' - -jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - actions: write - - steps: - - - name: Git Checkout - uses: actions/checkout@v4 - id: git - with: - ref: 'main' - submodules: 'recursive' - clean: '' - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - id: qemu - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - id: buildx - - - name: Login to GitHub Container Registry - id: login - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: repository_owner to lower case - id: repository_owner - uses: Entepotenz/change-string-case-action-min-dependencies@v1 - with: - string: ${{ github.repository_owner }} - - - name: repository to lower case - id: repository - uses: Entepotenz/change-string-case-action-min-dependencies@v1 - with: - string: ${{ github.repository }} - - - - name: Build Container Image - if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/main') - uses: docker/build-push-action@v5 - with: - push: false - cache-from: | - type=registry,ref=ghcr.io/${{ steps.repository.outputs.lowercase }}:build-cache - type=registry,ref=ghcr.io/${{ steps.repository.outputs.lowercase }}:latest - cache-to: type=inline,mode=max - context: ./docker - file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64 - tags: "ghcr.io/${{ steps.repository.outputs.lowercase }}:latest,ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ github.sha }}" - - - - name: Push Container Image - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - uses: docker/build-push-action@v5 - with: - push: true - cache-from: | - type=registry,ref=ghcr.io/${{ steps.repository.outputs.lowercase }}:build-cache - type=registry,ref=ghcr.io/${{ steps.repository.outputs.lowercase }}:latest - cache-to: type=registry,ref=ghcr.io/${{ steps.repository.outputs.lowercase }}:build-cache,mode=max - context: ./docker - file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64 - tags: "ghcr.io/${{ steps.repository.outputs.lowercase }}:latest,ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ github.sha }}" - -# - -# name: Build Container Image -# if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/main') -# uses: docker/build-push-action@v5 -# with: -# push: false -# cache-from: type=registry,ref=ghcr.io/${{ steps.repository.outputs.lowercase }}:latest -# cache-to: type=inline -# context: ./docker -# file: ./docker/Dockerfile -# platforms: linux/amd64,linux/arm64 -# tags: "ghcr.io/${{ steps.repository.outputs.lowercase }}:latest,ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ github.sha }}" -# -# - -# name: Push Container Image -# if: github.event_name == 'push' && github.ref == 'refs/heads/main' -# uses: docker/build-push-action@v5 -# with: -# push: true -# cache-from: type=registry,ref=ghcr.io/${{ steps.repository.outputs.lowercase }}:latest -# cache-to: type=inline -# context: ./docker -# file: ./docker/Dockerfile -# platforms: linux/amd64,linux/arm64 -# tags: "ghcr.io/${{ steps.repository.outputs.lowercase }}:latest,ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ github.sha }}" \ No newline at end of file diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 0000000..d307d17 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,97 @@ +################################################################################## +# References: +# Built-in arguments: +# - https://docs.github.com/en/actions/learn-github-actions/contexts +# Built-in environment variables: +# - https://docs.github.com/en/enterprise-cloud@latest/actions/learn-github-actions/variables#default-environment-variables +# +# Develop this workflow locally with the following command: +# ~$ gh act --env-file .env -s GITHUB_TOKEN=$GITHUB_TOKEN + +name: Build and Push Docker Images + +on: + workflow_dispatch: + push: + branches: + - main + paths-ignore: + - "docs/**" + - "Makefile" + - ".github/devcontainer**" + - ".devcontainer/**" + - "**.md" + pull_request: + branches: + - main + paths-ignore: + - "docs/**" + - "Makefile" + - ".github/devcontainer**" + - ".devcontainer/**" + - "**.md" + +jobs: + build-and-push: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - context: slim + tags: slim + - context: hugo + tags: hugo + - context: slim-python + tags: slim-python + - context: slim-golang + tags: slim-golang + - context: slim-node + tags: slim-node + - context: slim-dotnet + tags: slim-dotnet + - context: slim-all + tags: slim-all + - context: base + tags: base + - context: docker-in-docker + tags: dind + - context: extra + tags: extra + - context: code-server + tags: code-server + permissions: + contents: read + packages: write + actions: write + steps: + - name: Git Checkout + uses: actions/checkout@v4 + id: git-checkout + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + id: qemu-install + + - name: Install Docker Buildx + uses: docker/setup-buildx-action@v3 + id: buildx-install + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + id: docker-login + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Push Image + uses: docker/build-push-action@v5 + id: docker-build-push + with: + context: .github/docker/${{ matrix.context }} + file: .github/docker/${{ matrix.context }}/Dockerfile + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.tags }}:latest,ghcr.io/${{ github.repository_owner }}/${{ matrix.tags }}:${{ github.sha }} + cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.tags }}:cache + cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ matrix.tags }}:cache,mode=max diff --git a/.github/workflows/docker.yaml.bak b/.github/workflows/docker.yaml.bak new file mode 100644 index 0000000..0ed3c11 --- /dev/null +++ b/.github/workflows/docker.yaml.bak @@ -0,0 +1,123 @@ +################################################################################## +# References: +# Built-in arguments: +# - https://docs.github.com/en/actions/learn-github-actions/contexts +# Built-in environment variables: +# - https://docs.github.com/en/enterprise-cloud@latest/actions/learn-github-actions/variables#default-environment-variables +# +# Develop this workflow locally with the following command: +# ~$ gh act --env-file .env -s GITHUB_TOKEN=$GITHUB_TOKEN -s PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN + +name: Build Devcontainer Devcontainer +on: + workflow_dispatch: + push: + branches: + - main + paths-ignore: + - "Makefile" + - "devcontainer**" + - "devcontainer/**" + - ".devcontainer/**" + - ".pulumi/**" + - ".talos/**" + - ".kube/**" + - "docs/**" + - "**.md" + pull_request: + paths-ignore: + - "Makefile" + - "devcontainer**" + - "devcontainer/**" + - ".devcontainer/**" + - ".pulumi/**" + - ".talos/**" + - ".kube/**" + - "docs/**" + - "**.md" + branches: + - main + schedule: + - cron: "0 2 * * *" # Daily at 2am UTC + +jobs: + docker: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + actions: write + + steps: + - name: Git Checkout + uses: actions/checkout@v4 + id: git-checkout + with: + ref: "main" + submodules: "shallow" + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + id: qemu + + - name: Install Docker Buildx + uses: docker/setup-buildx-action@v3 + id: docker-buildx + + - name: repository_owner to lower case + uses: Entepotenz/change-string-case-action-min-dependencies@v1 + id: string-owner-to-lower + with: + string: ${{ github.repository_owner }} + + - name: Transform repository name to lower case + uses: Entepotenz/change-string-case-action-min-dependencies@v1 + id: string-repository-to-lower + with: + string: ${{ github.repository }} + + - name: Login to GitHub Container Registry + id: ghcr-login + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Slim Image + uses: docker/build-push-action@v5 + id: docker-build-cache-slim + if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref != 'refs/heads/main') + with: + push: false + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:build-cache + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim + cache-to: type=inline,mode=max + context: .github/devcontainer/docker/slim + file: .github/devcontainer/docker/slim/Dockerfile + platforms: linux/amd64,linux/arm64 + tags: "ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:latest,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" + + - name: Publish Devcontainer Container Image + uses: docker/build-push-action@v5 + id: docker-build-push-slim + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + with: + push: true + cache-from: | + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:build-cache + type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:slim + cache-to: type=registry,ref=ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:build-cache,mode=max + context: .github/devcontainer/docker/slim + file: .github/devcontainer/docker/slim/Dockerfile + platforms: linux/amd64,linux/arm64 + tags: "ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:latest,ghcr.io/${{ steps.string-repository-to-lower.outputs.lowercase }}:${{ github.sha }}" + + - name: Cleanup + id: make-clean-all + if: always() + run: make clean-all + env: + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/kind.yaml b/.github/workflows/kind.yaml new file mode 100644 index 0000000..2e10f9e --- /dev/null +++ b/.github/workflows/kind.yaml @@ -0,0 +1,103 @@ +# This GitHub Workflow will run on every push to the repository +# and will test the Kargo codebase on a Kind Kubernetes cluster. +name: CI - Kargo on Kind +on: + workflow_dispatch: + push: + branches: + - main + paths-ignore: + - "devcontainer/**" + - ".devcontainer/**" + - ".pulumi/**" + - ".talos/**" + - ".kube/**" + - "docs/**" + - "**.md" + pull_request: + branches: + - main + paths-ignore: + - "devcontainer/**" + - ".devcontainer/**" + - ".pulumi/**" + - ".talos/**" + - ".kube/**" + - "docs/**" + - "**.md" + schedule: + - cron: "0 2 * * *" + +jobs: + ci-kargo-kind: + runs-on: ubuntu-latest + + steps: + - id: checkout + name: ✨ Checkout ✨ + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - id: kind-kubernetes + name: 🔨 Kind Kubernetes 🔨 + uses: helm/kind-action@v1.8.0 + env: + ACTIONS_STEP_DEBUG: true + KUBECONFIG: .kube/config + with: + wait: 30s + cluster_name: kargo + config: hack/kind.yaml + ignore_failed_clean: true + + - id: pulumi-install + name: 📦️ Pulumi Install 📦️ + uses: pulumi/actions@v5 + + - id: pulumi-up + name: 🚀 Pulumi Up 🚀 + uses: pulumi/actions@v5 + env: + ACTIONS_STEP_DEBUG: true + KUBECONFIG: .kube/config + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_CONFIG_PASSPHRASE: foobarbaz + PULUMI_BACKEND_URL: file://./.pulumi + with: + command: up + refresh: true + upsert: true + stack-name: organization/kargo/ci + secrets-provider: passphrase + cloud-url: file://./.pulumi + work-dir: ./ + + - name: 🕚 Wait for pods 🕛 + uses: CodingNagger/minikube-wait-action@v1.1.1 + env: + ACTIONS_STEP_DEBUG: true + KUBECONFIG: .kube/config + with: + max-retry-attempts: 12 + retry-delay: 10 + + - id: pulumi-destroy + name: 💣 Pulumi Destroy 💣 + uses: pulumi/actions@v5 + if: always() + env: + ACTIONS_STEP_DEBUG: true + KUBECONFIG: .kube/config + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} + PULUMI_CONFIG_PASSPHRASE: foobarbaz + PULUMI_BACKEND_URL: file://./.pulumi + with: + command: destroy + refresh: true + stack-name: organization/kargo/ci + secrets-provider: passphrase + cloud-url: file://./.pulumi + work-dir: ./ diff --git a/.gitignore b/.gitignore index 437e287..a6d791c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,12 @@ +local +.kube +.talos +.kube +.talos +.pulumi +.kube +.pulumi +.talos .pulumi/* .kube/* frontmatter.json diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 25a840b..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule ".github/devcontainer"] - path = .github/devcontainer - url = https://github.com/pulumi/devcontainer diff --git a/.pulumi/.gitkeep b/.pulumi/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/LICENSE b/LICENSE index 261eeb9..1840fd9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,674 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/Makefile b/Makefile index e2fdc16..723cc0d 100644 --- a/Makefile +++ b/Makefile @@ -1,119 +1,223 @@ # --- Global Variables --- -# Set Pulumi Stack name to a valid Pulumi ORG/PROJECT/STACK name -PULUMI_STACK := $(or ${PULUMI_STACK},"usrbinkat/devcontainer/kubernetes") -# --- GitHub Actions --- -GITHUB_REPOSITORY_STRING := $(shell echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]') -DEVCONTAINER_NAME ?= $(if ${GITHUB_REPOSITORY_STRING},${GITHUB_REPOSITORY_STRING},pulumi/devcontainer) -DOCKER_IMAGE_NAME := "ghcr.io/${DEVCONTAINER_NAME}:latest" +DEPLOYMENT_ENVIRONMENT := dev +LOWERCASE_GITHUB_REPOSITORY := $(shell echo ${GITHUB_REPOSITORY} | tr '[:upper:]' '[:lower:]') +REPO_NAME := $(shell echo ${LOWERCASE_GITHUB_REPOSITORY} | awk -F '/' '{print $$2}') +REPO_ORG := $(shell echo ${LOWERCASE_GITHUB_REPOSITORY} | awk -F '/' '{print $$1}') +PULUMI_STACK_IDENTIFIER := ${GITHUB_USER}/${REPO_NAME}/${DEPLOYMENT_ENVIRONMENT} + +# Escape special characters in sensitive tokens +ESCAPED_PAT := $(shell echo "${PULUMI_ACCESS_TOKEN}" | sed -e 's/[\/&]/\\&/g') +ESCAPED_GITHUB_TOKEN := $(shell echo "${GITHUB_TOKEN}" | sed -e 's/[\/&]/\\&/g') + +# Define file paths for configurations +TALOS_CONFIG_FILE := ${PWD}/.talos/config +KUBE_CONFIG_FILE := ${PWD}/.kube/config + +# Check if PULUMI_ACCESS_TOKEN is set +ifeq ($(ESCAPED_PAT),) +$(warning PULUMI_ACCESS_TOKEN is not set) +endif + +# Check if GITHUB_TOKEN is set +ifeq ($(ESCAPED_GITHUB_TOKEN),) +$(warning GITHUB_TOKEN is not set) +endif + +# --- Targets --- +.PHONY: help detect-arch pulumi-login pulumi-up up talos-gen-config talos-cluster kind-cluster clean clean-all act devcontainer test-kind test-talos stop + +# --- Default Command --- +all: help # --- Help --- -# Provides a default help message displaying all available commands +# Display available commands help: @echo "Available commands:" - @echo " help Display this help message." - @echo " login Authenticate with cloud services." - @echo " esc Run a Pulumi ESC environment with an optional argument. Default is 'kubernetes'." - @echo " up Deploy Pulumi IaC program using the stack name 'codespace'." - @echo " down Destroy Pulumi infrastructure." - @echo " kind Deploy a local Kubernetes cluster using Kind (Kubernetes-in-Docker)." - @echo " clean Destroy Pulumi resources, tear down the Kind cluster, and clean up configurations." - @echo " clean-all Perform all actions in 'clean', plus remove Docker volumes." - @echo " test Run a series of commands to test the setup (kind, up, clean, clean-all)." - @echo " act Test GitHub Actions locally with the 'gh-act' extension." - @echo " devcontainer Update the .github/devcontainer submodule and sync files." - -# --- Pulumi Login Command --- -login: - @echo "Logging in to Pulumi..." - direnv allow - pulumi login + @echo " help - Display this help message." + @echo " login - Authenticate with Pulumi." + @echo " esc ENV=foobar - Run Pulumi ESC environment. Default: ENV='kubernetes'." + @echo " up - Deploy Pulumi infrastructure." + @echo " pulumi-down - Destroy deployed Pulumi infrastructure." + @echo " talos-cluster - Deploy a Talos Kubernetes cluster." + @echo " talos-config - Generate and validate Talos configuration." + @echo " talos - Create and configure a Talos Kubernetes cluster." + @echo " kind - Create a local Kubernetes cluster using Kind." + @echo " clean - Clean up resources." + @echo " clean-all - Perform 'clean' and remove Docker volumes." + @echo " act - Test GitHub Actions locally." + @echo " devcontainer - Maintain .github/devcontainer submodule." + @echo " test - Run setup tests." + @echo " stop - Stop Github Codespaces." + +# --- Detect Architecture --- +detect-arch: + @echo $(shell uname -m | awk '{ if ($$1 == "x86_64") print "amd64"; else if ($$1 == "aarch64" || $$1 == "arm64") print "arm64"; else print "unknown" }') + +# --- Pulumi Login --- +pulumi-login: + @echo "Logging into Pulumi..." + @direnv allow || true + @PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN} pulumi login 2>/dev/null | sed 's/${ESCAPED_PAT}/***PULUMI_ACCESS_TOKEN***/g' || true + @pulumi install || true + @pulumi stack select --create ${PULUMI_STACK_IDENTIFIER} || true @echo "Login successful." -# --- Pulumi ESC --- -# Accepts one argument for Pulumi ESC environment; default is 'kubernetes' -# Usage: -# - make esc ENV=dev -# - make esc ENV=test -# - make esc ENV=prod -esc: login - $(eval ENV := $(or $(ENV),kubernetes)) - @echo "Running Pulumi ESC environment with argument ${ENV}..." - @env esc open --format shell ${ENV} - @echo "Pulumi ESC environment running." - -# Deploy Pulumi infrastructure -up: - @echo "Deploying Pulumi infrastructure... $(PULUMI_STACK)" - pulumi stack select --create $(PULUMI_STACK) - pulumi install - pulumi up --yes --skip-preview --stack ${PULUMI_STACK} - sleep 10 - kubectl get po -A +# --- Pulumi Deployment --- +pulumi-up: + @echo "Deploying Pulumi infrastructure..." + @KUBECONFIG=${KUBE_CONFIG_FILE} PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN} \ + pulumi up --yes --skip-preview --refresh --stack ${PULUMI_STACK_IDENTIFIER} \ + | sed 's/${ESCAPED_PAT}/***PULUMI_ACCESS_TOKEN***/g' @echo "Deployment complete." -# Destroy Pulumi infrastructure -down: - @echo "Destroying Pulumi infrastructure..." - pulumi down--yes --skip-preview --stack ${PULUMI_STACK} 2>/dev/null || true - @echo "Infrastructure teardown complete." +pulumi-down: + @echo "Deploying Pulumi infrastructure..." + @KUBECONFIG=${KUBE_CONFIG_FILE} PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN} \ + pulumi down --yes --skip-preview --refresh --stack ${PULUMI_STACK_IDENTIFIER} \ + | sed 's/${ESCAPED_PAT}/***PULUMI_ACCESS_TOKEN***/g' || \ + KUBECONFIG=${KUBE_CONFIG_FILE} PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN} PULUMI_K8S_DELETE_UNREACHABLE=true \ + pulumi down --yes --skip-preview --refresh --stack ${PULUMI_STACK_IDENTIFIER} \ + | sed 's/${ESCAPED_PAT}/***PULUMI_ACCESS_TOKEN***/g' || true + @echo "Deployment complete." + +login: pulumi-login +up: pulumi-login pulumi-up wait-all-pods +down: pulumi-login pulumi-down + +# ---------------------------------------------------------------------------------------------- +# --- Control Flow --- +# ---------------------------------------------------------------------------------------------- -# --- Kind --- -kind: +# --- Wait for All Pods Ready --- +wait-all-pods: + @echo "Waiting for all pods in the cluster to be ready..." + @bash -c 'until [ "$$(kubectl get pods --all-namespaces --no-headers | grep -v "Running\|Completed\|Succeeded" | wc -l)" -eq 0 ]; do echo "Waiting for pods to be ready..."; sleep 5; done' + @kubectl get pods --all-namespaces --show-labels --kubeconfig ${KUBE_CONFIG_FILE} + @echo "All pods in the cluster are ready." + +# ---------------------------------------------------------------------------------------------- +# --- Talos Kubernetes Cluster --- +# ---------------------------------------------------------------------------------------------- + +# --- Talos Configuration --- +talos-gen-config: + @echo "Generating Talos Config..." + @mkdir -p ${HOME}/.kube .kube .pulumi .talos + @touch ${HOME}/.kube/config ${KUBE_CONFIG_FILE} ${TALOS_CONFIG_FILE} + @sudo talosctl gen config kargo https://10.5.0.2:6443 \ + --config-patch @.talos/patch/machine.yaml --output .talos/manifest + @sudo talosctl validate --mode container \ + --config .talos/manifest/controlplane.yaml + @echo "Talos Config generated." + +# --- Talos Cluster --- +talos-cluster: detect-arch talos-gen-config + @echo "Creating Talos Kubernetes Cluster..." + @sudo talosctl cluster create \ + --arch=$$(make detect-arch) \ + --workers 1 \ + --controlplanes 1 \ + --provisioner docker + @pulumi config set kubernetes talos || true + @echo "Talos Cluster provisioning..." + +# --- Wait for Talos Cluster Ready --- +talos-ready: + @echo "Waiting for Talos Cluster to be ready..." + @bash -c 'until kubectl --kubeconfig ${KUBE_CONFIG_FILE} wait --for=condition=Ready pod -l k8s-app=kube-scheduler --namespace=kube-system --timeout=180s; do echo "Waiting for kube-scheduler to be ready..."; sleep 5; done' + @bash -c 'until kubectl --kubeconfig ${KUBE_CONFIG_FILE} wait --for=condition=Ready pod -l k8s-app=kube-controller-manager --namespace=kube-system --timeout=180s; do echo "Waiting for kube-controller-manager to be ready..."; sleep 5; done' + @bash -c 'until kubectl --kubeconfig ${KUBE_CONFIG_FILE} wait --for=condition=Ready pod -l k8s-app=kube-apiserver --namespace=kube-system --timeout=180s; do echo "Waiting for kube-apiserver to be ready..."; sleep 5; done' + @echo "Talos Cluster is ready." + +# --- Talos --- +talos: clean-all talos-cluster talos-ready wait-all-pods + @echo "Talos Cluster ready." + +# ---------------------------------------------------------------------------------------------- +# --- Kind Kubernetes Cluster --- +# ---------------------------------------------------------------------------------------------- + +# --- Kind Cluster --- +kind-cluster: @echo "Creating Kind Cluster..." - direnv allow - docker volume create pulumi-worker-n01 - docker volume create pulumi-worker-n02 - docker volume create pulumi-control-plane-n01 - kind create cluster --retain --config hack/kind.yaml - kind get kubeconfig --name pulumi | tee .kube/config >/dev/null - sleep 5 - kubectl get po -A - @echo "Kind Cluster Created." - -# --- Docker Build --- -# Build the Docker image -build: - @echo "Building Docker image..." - clear - docker build --progress plain --pull --build-arg GITHUB_TOKEN="${GITHUB_TOKEN}" --tag ${DOCKER_IMAGE_NAME} -f ./docker/Dockerfile ./docker - @echo "Docker image built." - -# --- Docker Build & Push --- -# Build the Docker image -build-push: - @echo "Building Docker image & pushing to ${DOCKER_IMAGE_NAME}..." - clear - docker build --progress plain --push --pull --tag ${DOCKER_IMAGE_NAME} -f ./docker/Dockerfile ./docker - @echo "Docker published to ${DOCKER_IMAGE_NAME}..." + @direnv allow || true + @mkdir -p ${HOME}/.kube .kube || true + @touch ${HOME}/.kube/config .kube/config || true + @chmod 600 ${HOME}/.kube/config .kube/config || true + @sudo docker volume create cilium-worker-n01 + @sudo docker volume create cilium-worker-n02 + @sudo docker volume create cilium-control-plane-n01 + @sudo kind create cluster --wait 1m --retain --config=hack/kind.yaml + @sudo kind get clusters + @sudo kind get kubeconfig --name cilium | tee ${KUBE_CONFIG_FILE} 1>/dev/null + @sudo kind get kubeconfig --name cilium | tee ${HOME}/.kube/config 1>/dev/null + @sudo chown -R $(id -u):$(id -g) ${KUBE_CONFIG_FILE} + @pulumi config set kubernetes kind || true + @echo "Created Kind Cluster." + +# --- Wait for Kind Cluster Ready --- +kind-ready: + @echo "Waiting for Kind Kubernetes API to be ready..." + @kubectl get all --all-namespaces --show-labels --kubeconfig ${KUBE_CONFIG_FILE} || sleep 5 + @bash -c 'until kubectl --kubeconfig ${KUBE_CONFIG_FILE} wait --for=condition=Ready pod -l component=kube-apiserver --namespace=kube-system --timeout=180s; do echo "Waiting for kube-apiserver to be ready..."; sleep 5; done' + @bash -c 'until kubectl --kubeconfig ${KUBE_CONFIG_FILE} wait --for=condition=Ready pod -l component=kube-scheduler --namespace=kube-system --timeout=180s; do echo "Waiting for kube-scheduler to be ready..."; sleep 5; done' + @bash -c 'until kubectl --kubeconfig ${KUBE_CONFIG_FILE} wait --for=condition=Ready pod -l component=kube-controller-manager --namespace=kube-system --timeout=180s; do echo "Waiting for kube-controller-manager to be ready..."; sleep 5; done' + @echo "Kind Cluster is ready." + +kind: clean kind-cluster kind-ready + +# ---------------------------------------------------------------------------------------------- +# --- Maintenance --- +# ---------------------------------------------------------------------------------------------- # --- Cleanup --- -clean: down - @echo "Cleaning up..." - kind delete cluster --name pulumi || true - rm -rf .kube/config || true +clean: login down + @echo "Cleaning up resources..." + @sudo kind delete cluster --name cilium \ + || echo "Kind cluster not found." + @sudo kind delete cluster --name kind \ + || echo "Kind cluster not found." + @sudo talosctl cluster destroy \ + || echo "Talos cluster not found." @echo "Cleanup complete." clean-all: clean - @echo "Deep clean in progress..." - docker volume rm pulumi-worker-n01 || true - docker volume rm pulumi-worker-n02 || true - docker volume rm pulumi-control-plane-n01 || true - @echo "Deep cleanup complete." + @echo "Performing extended cleanup..." + @sudo docker volume rm cilium-worker-n01 cilium-worker-n02 cilium-control-plane-n01 \ + || echo "Docker volumes not found." + @rm -rf Pulumi.*.yaml + @echo "Extended cleanup complete." -# --- GitHub Actions --- +# --- GitHub Actions Testing --- act: - @echo "Testing GitHub Workflows locally." - act -s GITHUB_TOKEN=${GITHUB_TOKEN} -s ACTIONS_RUNTIME_TOKEN=${GITHUB_TOKEN} -s GHA_GITHUB_TOKEN=${GITHUB_TOKEN} + @echo "Testing GitHub Workflows locally..." + @direnv allow || true + @GITHUB_TOKEN=${GITHUB_TOKEN} PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN} \ + act --container-options "--privileged" --rm \ + --var GITHUB_TOKEN=${GITHUB_TOKEN} \ + --var PULUMI_ACCESS_TOKEN=${PULUMI_ACCESS_TOKEN} \ + | sed 's/${ESCAPED_PAT}/***PULUMI_ACCESS_TOKEN***/g' @echo "GitHub Workflow Test Complete." # --- Maintain Devcontainer --- devcontainer: - git submodule update --init --recursive .github/devcontainer - git submodule update --remote --merge .github/devcontainer - rsync -av .github/devcontainer/devcontainer/* .devcontainer + @echo "Updating devcontainer Devcontainer..." + @docker pull ghcr.io/pulumi/devcontainer:latest 1>/dev/null & + @git submodule update --init .github/devcontainer + @git submodule update --remote --merge .github/devcontainer + @mkdir -p .devcontainer + @rsync -av .github/devcontainer/.github/devcontainer/* .devcontainer/ + @echo "Devcontainer is up to date." # --- Testing --- -test: kind up clean clean-all +test-kind: clean kind pulumi-up + @echo "Kind test complete." -# --- Default Command --- -all: help +test-talos: clean talos pulumi-up + @echo "Talos test complete." + +# --- Stop Codespaces --- +stop: clean + @echo "Stopping Codespaces..." + @gh codespace --codespace ${CODESPACE_NAME} stop + @echo "Codespaces stopped." diff --git a/README.md b/README.md index d031d7c..d05204b 100644 --- a/README.md +++ b/README.md @@ -9,19 +9,19 @@ This is a [Github Template Repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) which provides a Pulumi [Devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) together with GitOps ready boilerplate for quickly starting new Pulumi IaC projects. The Pulumi [Devcontainer](https://code.visualstudio.com/docs/devcontainers/containers) is designed with deep [VS Code](https://code.visualstudio.com) and [Github Codespaces](https://github.com/features/codespaces) integration to streamline a common Pulumi IaC and Provider development environment. dependencies and prerequisites as much as possible using [Dev Containers](https://containers.dev/) to prepare your development environment, or even just run your development directly in the browser with [Github CodeSpaces](https://github.com/features/codespaces). - +![Devcontainer](.github/assets/devcontainer.png) ![CodeSpaces Screenshot](./.github/assets/codespaces.png) # Getting Started With multiple ways to get started, it is a good idea to briefly review: +- [Pulumi Dev Container](#pulumi-dev-container) - [Getting Started](#getting-started) -- [Git Submodule](#git-submodule) - [Github CodeSpaces](#github-codespaces) + - [First time setup](#first-time-setup) - [VS Code Dev Container](#vs-code-dev-container) -- [First time setup](#first-time-setup) -- [Pulumi Dev Container](#pulumi-dev-container) +- [Git Submodule](#git-submodule) # Github CodeSpaces diff --git a/devcontainer/Dockerfile b/devcontainer/Dockerfile deleted file mode 100644 index 0e5ee85..0000000 --- a/devcontainer/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM ghcr.io/pulumi/devcontainer:latest - -# Add any additional packages and customization for your project here. \ No newline at end of file diff --git a/devcontainer/devcontainer.json b/devcontainer/devcontainer.json deleted file mode 100644 index 4965b35..0000000 --- a/devcontainer/devcontainer.json +++ /dev/null @@ -1,80 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings -{ - "name": "pulumi", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "remoteUser": "vscode", - "overrideCommand": false, - "runArgs": ["--init", "--privileged", "--network=host"], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "forwardPorts": [1313, 2222, 6000, 7681, 8080] -} diff --git a/devcontainer/extra/devcontainer.json b/devcontainer/extra/devcontainer.json deleted file mode 100644 index f30d1fd..0000000 --- a/devcontainer/extra/devcontainer.json +++ /dev/null @@ -1,80 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings -{ - "name": "pulumi/devcontainer", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "remoteUser": "vscode", - "forwardPorts": [1313, 2222, 6000, 7681, 8080], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "runArgs": ["--init", "--privileged", "--network=host"], - "overrideCommand": false -} diff --git a/devcontainer/kind/devcontainer.json b/devcontainer/kind/devcontainer.json deleted file mode 100644 index 50720f7..0000000 --- a/devcontainer/kind/devcontainer.json +++ /dev/null @@ -1,80 +0,0 @@ -// Reference: -// - https://containers.dev/features -// - https://containers.dev/implementors/features -// - https://containers.dev/implementors/json_reference -// - https://code.visualstudio.com/docs/getstarted/settings -{ - "name": "pulumi/devcontainer", - "dockerFile": "Dockerfile", - "customizations": { - "vscode": { - "settings": { - // https://github.com/VSCodeVim/Vim - "vim.disableExtension": true, - "vim.easymotion": true, - "vim.incsearch": true, - "vim.useSystemClipboard": true, - "vim.useCtrlKeys": true, - "vim.hlsearch": true, - "vim.insertModeKeyBindings": [ - { - "before": ["j", "j"], - "after": [""] - } - ], - "vim.handleKeys": { - "": false, - "": false - }, - "extensions.experimental.affinity": { - "vscodevim.vim": 1 - }, - "go.testTags": "all", - "go.buildTags": "all", - "editor.minimap.enabled": false, - "editor.lineNumbers": "relative", - "editor.quickSuggestionsDelay": 0, - "editor.suggestSelection": "first", - "editor.snippetSuggestions": "top", - "editor.gotoLocation.multipleReferences": "goto", - "editor.gotoLocation.multipleDefinitions": "goto", - "editor.gotoLocation.multipleDeclarations": "goto", - "editor.gotoLocation.multipleImplementations": "goto", - "editor.gotoLocation.multipleTypeDefinitions": "goto", - "editor.terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.shell.linux": "/usr/bin/bash", - "terminal.integrated.sendKeybindingsToShell": true, - "workbench.colorTheme": "Dracula Soft", - "explorer.openEditors.visible": 1, - "files.trimTrailingWhitespace": true, - "files.trimFinalNewlines": true - }, - "extensions": [ - "golang.go", - "vscodevim.vim", - "github.copilot", - "vscodevim.vim", - "ms-python.python", - "redhat.vscode-yaml", - "esbenp.prettier-vscode", - "ms-vsliveshare.vsliveshare", - "ms-azuretools.vscode-docker", - "github.vscode-github-actions", - "ms-vscode.vscode-typescript-next", - "github.vscode-pull-request-github", - "ms-vscode-remote.remote-containers", - "visualstudioexptteam.vscodeintellicode", - "bierner.markdown-preview-github-styles" - ] - } - }, - "features": { - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {} - }, - "mounts": ["source=dind-var-lib-docker,target=/var/lib/docker,type=volume"], - "remoteUser": "vscode", - "forwardPorts": [1313, 2222, 6000, 7681, 8080], - "postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true", - "runArgs": ["--init", "--privileged", "--network=host"], - "overrideCommand": false -} diff --git a/docker/bin/connect b/docker/bin/connect deleted file mode 100755 index 1ea9bdf..0000000 --- a/docker/bin/connect +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -env_file="$HOME/.env_fish" -session_name="konductor" - -# Function to convert environment variables to fish syntax and save to a file -convert_env_to_fish() { - > "$1" # Clear the file content - while IFS='=' read -r name value; do - # Skip read-only variables - case "$name" in - PWD|SHLVL|_) - continue - ;; - esac - - if [[ -n "$name" && -n "$value" ]]; then - echo "set -gx $name '$value';" >> "$1" - fi - done < <(env) -} - -# Convert environment variables and save to a file -convert_env_to_fish "$env_file" - -# Attach to the tmux session -tmux attach -t "$session_name" \ No newline at end of file diff --git a/docker/rootfs/etc/skel/.tmux/.gitkeep b/docker/rootfs/etc/skel/.tmux/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitattributes b/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitattributes deleted file mode 100644 index 80772e4..0000000 --- a/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitattributes +++ /dev/null @@ -1,9 +0,0 @@ -# Force text files to have unix eols, so Windows/Cygwin does not break them -*.* eol=lf - -# These files are unfortunately not recognized as text files so -# explicitly listing them here -tpm eol=lf -bin/* eol=lf -bindings/* eol=lf -tests/* eol=lf diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitignore b/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitignore deleted file mode 100644 index 8a94156..0000000 --- a/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -**/.vagrant/ -run_tests -tests/run_tests_in_isolation -tests/helpers/helpers.sh diff --git a/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitmodules b/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitmodules deleted file mode 100644 index 5e44e3c..0000000 --- a/docker/rootfs/etc/skel/.tmux/plugins/tpm/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib/tmux-test"] - path = lib/tmux-test - url = https://github.com/tmux-plugins/tmux-test.git diff --git a/hack/act.json b/hack/act.json new file mode 100644 index 0000000..176cfa8 --- /dev/null +++ b/hack/act.json @@ -0,0 +1,3 @@ +{ + "act": true +} diff --git a/hack/kind.yaml b/hack/kind.yaml index 9057a52..4f35cf5 100644 --- a/hack/kind.yaml +++ b/hack/kind.yaml @@ -1,48 +1,47 @@ +apiVersion: "kind.x-k8s.io/v1alpha4" kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -name: pulumi +name: kargo networking: - apiServerPort: 6443 - apiServerAddress: "0.0.0.0" - serviceSubnet: "10.12.0.0/16" - podSubnet: "10.242.0.0/16" ###################################################################### # The following is required for Cilium to work with kind - # Uncomment the next 2 lines to replace with cilium cni - # disableDefaultCNI: true # disable kindnet - # kubeProxyMode: none # disable kube-proxy + podSubnet: "10.242.0.0/16" + serviceSubnet: "10.12.0.0/16" + kubeProxyMode: none # disable kube-proxy + disableDefaultCNI: true # disable kindnet + apiServerPort: 16443 +# apiServerAddress: "127.0.0.1" nodes: -- role: control-plane - image: kindest/node:v1.29.0 - extraMounts: # Persistent image cache - - hostPath: /var/lib/docker/volumes/cilium-control-plane-n01/_data - containerPath: /var/lib/containerd -- role: worker - image: kindest/node:v1.29.0 - extraMounts: # Persistent image cache - - hostPath: /var/lib/docker/volumes/cilium-worker-n01/_data - containerPath: /var/lib/containerd -- role: worker - image: kindest/node:v1.29.0 - extraMounts: # Persistent image cache - - hostPath: /var/lib/docker/volumes/cilium-worker-n02/_data - containerPath: /var/lib/containerd - # Expose ports on the host: - # - 80/tcp - # - 443/tcp - extraPortMappings: - - listenAddress: "0.0.0.0" - protocol: TCP - hostPort: 80 - containerPort: 80 - - listenAddress: "0.0.0.0" - protocol: TCP - hostPort: 443 - containerPort: 443 - kubeadmConfigPatches: - - | - # Label the worker node listening on service ports - kind: JoinConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "ingress-ready=true" + - role: control-plane + image: kindest/node:v1.29.0 + extraMounts: # Persistent image cache + - hostPath: /var/lib/docker/volumes/kargo-control-plane-n01/_data + containerPath: /var/lib/containerd + - role: worker + image: kindest/node:v1.29.0 + extraMounts: # Persistent image cache + - hostPath: /var/lib/docker/volumes/kargo-worker-n01/_data + containerPath: /var/lib/containerd + - role: worker + image: kindest/node:v1.29.0 + extraMounts: # Persistent image cache + - hostPath: /var/lib/docker/volumes/kargo-worker-n02/_data + containerPath: /var/lib/containerd + # Expose ports on the host: + # - 80/tcp + # - 443/tcp + extraPortMappings: + - listenAddress: "0.0.0.0" + protocol: TCP + hostPort: 80 + containerPort: 80 + - listenAddress: "0.0.0.0" + protocol: TCP + hostPort: 443 + containerPort: 443 + kubeadmConfigPatches: + - | + # Label the worker node listening on service ports + kind: JoinConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "ingress-ready=true"