Skip to content

Commit 7b2fcb8

Browse files
initial
1 parent b9d6ee0 commit 7b2fcb8

File tree

7 files changed

+135
-0
lines changed

7 files changed

+135
-0
lines changed

β€Ž.devcontainer/Dockerfileβ€Ž

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile
2+
ARG VARIANT="3.11"
3+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} as devcontainer
4+
ARG INSTALL_NODE="true"
5+
ARG NODE_VERSION="lts/*"
6+
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
7+
USER vscode
8+
RUN pip3 --disable-pip-version-check --no-cache-dir install -U \
9+
'poetry==1.6.1' \
10+
'pre-commit==3.6.0' \
11+
'pip==23.2.1'
12+
RUN npm install -g @devcontainers/cli@v0.30.0
13+
ENV DEBIAN_FRONTEND=noninteractive
14+
RUN sudo apt-get update -y && sudo apt-get install -y \
15+
iputils-ping \
16+
traceroute \
17+
kmod
18+
ENV PATH="/workspaces/shadowfax/bin:/home/vscode/.local/bin/:$PATH"
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"postCreateCommand": "make post-create",
3+
"postStartCommand": "make post-start",
4+
"remoteUser": "vscode",
5+
"customizations": {
6+
"vscode": {
7+
"settings": {
8+
"terminal.integrated.defaultProfile.linux": "zsh",
9+
"python.pythonPath": "/usr/local/bin/python"
10+
},
11+
"extensions": [
12+
"ms-python.python",
13+
"mutantdino.resourcemonitor",
14+
"github.copilot",
15+
"github.copilot-chat"
16+
]
17+
}
18+
},
19+
"build": {
20+
"dockerfile": "Dockerfile",
21+
"target": "devcontainer",
22+
"context": "..",
23+
"args": {
24+
"VARIANT": "3.11",
25+
"INSTALL_NODE": "true",
26+
"NODE_VERSION": "18.7"
27+
}
28+
},
29+
"runArgs": [ // maybe remove this
30+
"--network=host",
31+
],
32+
"features": {
33+
"ghcr.io/devcontainers-contrib/features/cloudflared:1": {},
34+
"ghcr.io/devcontainers/features/go:1": {
35+
},
36+
"ghcr.io/devcontainers/features/aws-cli": {
37+
"version": "2.6.3"
38+
},
39+
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
40+
"omzPlugins": "zsh-syntax-highlighting zsh-autosuggestions"
41+
},
42+
"ghcr.io/devcontainers-contrib/features/starship-homebrew:1": {},
43+
"ghcr.io/devcontainers-contrib/features/aws-cdk:2": {
44+
"version": "2.59.0"
45+
},
46+
"ghcr.io/devcontainers/features/azure-cli:1": {},
47+
"ghcr.io/devcontainers/features/terraform:1": {
48+
"version": "1.6.2"
49+
},
50+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
51+
"ghcr.io/devcontainers-contrib/features/kind:1": {},
52+
"ghcr.io/devcontainers-contrib/features/packer-asdf:2": {},
53+
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
54+
"version": "1.25.6"
55+
},
56+
"ghcr.io/rio/features/k3d:1": {},
57+
// "ghcr.io/devcontainers/features/nix:1": {},
58+
"ghcr.io/devcontainers-contrib/features/infracost:1": {
59+
"version": "0.10.30"
60+
},
61+
"ghcr.io/dhoeric/features/google-cloud-cli:1": {
62+
},
63+
"ghcr.io/devcontainers-contrib/features/terraform-docs:1": {
64+
},
65+
"ghcr.io/devcontainers/features/github-cli:1": {
66+
},
67+
"ghcr.io/rio/features/k9s:1": {
68+
},
69+
"ghcr.io/devcontainers-contrib/features/vercel-cli:1": {
70+
},
71+
},
72+
"mounts": [
73+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached",
74+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached",
75+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached",
76+
// "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind,consistency=cached",
77+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zsh_history,target=/home/vscode/.zsh_history,type=bind,consistency=cached",
78+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshrc,target=/home/vscode/.zshrc,type=bind,consistency=cached",
79+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.zshenv,target=/home/vscode/.zshenv,type=bind,consistency=cached",
80+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.terraform.d,target=/home/vscode/.terraform.d,type=bind,consistency=cached",
81+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.azure,target=/home/vscode/.azure,type=bind,consistency=cached",
82+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/infracost,target=/home/vscode/.config/infracost,type=bind,consistency=cached",
83+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/gcloud,target=/home/vscode/.config/gcloud,type=bind,consistency=cached",
84+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config/starship.toml,target=/home/vscode/.config/starship.toml,type=bind,consistency=cached",
85+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.kube,target=/home/vscode/.kube,type=bind,consistency=cached",
86+
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.gitconfig,target=/home/vscode/.gitconfig,type=bind,consistency=cached",
87+
]
88+
}

β€ŽMakefileβ€Ž

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SHELLOPTS := $(if $(SHELLOPTS),$(SHELLOPTS):, )xtrace pipefail errexit nounset
2+
3+
.PHONY: post-create
4+
post-create:
5+
@echo "post-create"
6+
7+
.PHONY: post-start
8+
post-start:
9+
@echo "post-start"
10+
./scripts/setup-krew.sh
11+
12+
docs:
13+
terraform-docs markdown ./modules/treebeardkf > ./modules/treebeardkf/README.md
14+
go install github.com/norwoodj/helm-docs/cmd/helm-docs@latest
15+
helm-docs
16+
17+
fmt:
18+
terraform fmt **/*modules
19+
.PHONY: build

β€Žmain.tfβ€Ž

Whitespace-only changes.

β€Žoutputs.tfβ€Ž

Whitespace-only changes.

β€Žscripts/setup-krew.shβ€Ž

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export KREW_ROOT=/workspaces/shadowfax
2+
set -x; cd "$(mktemp -d)" &&
3+
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
4+
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
5+
KREW="krew-${OS}_${ARCH}" &&
6+
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
7+
tar zxvf "${KREW}.tar.gz" &&
8+
./"${KREW}" install krew
9+
10+
bash -c 'kubectl krew install resource-capacity'

β€Žvariables.tfβ€Ž

Whitespace-only changes.

0 commit comments

Comments
Β (0)