Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
layout redesign for modular support
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat authored Jan 22, 2024
1 parent 84e701c commit 6c128b7
Show file tree
Hide file tree
Showing 16 changed files with 865 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ghcr.io/pulumi/devcontainer:latest

# Add any additional packages and customization for your project here.
4 changes: 4 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# DO NOT EDIT DIRECTLY

See submodule maintainer docs for instructions on how to change devcontainer configuration(s).
Changes will be overwritten.
80 changes: 80 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// 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": ["<Esc>"]
}
],
"vim.handleKeys": {
"<C-a>": false,
"<C-f>": 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]
}
3 changes: 3 additions & 0 deletions .devcontainer/devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ghcr.io/pulumi/devcontainer:latest

# Add any additional packages and customization for your project here.
80 changes: 80 additions & 0 deletions .devcontainer/devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// 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": ["<Esc>"]
}
],
"vim.handleKeys": {
"<C-a>": false,
"<C-f>": 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]
}
185 changes: 185 additions & 0 deletions .devcontainer/devcontainer/extra/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
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
Loading

0 comments on commit 6c128b7

Please sign in to comment.