Skip to content

Commit 4a50515

Browse files
authored
Add devcontainer so that you can run locally and not just in GH Codespaces. (#10)
1 parent 4c0eb42 commit 4a50515

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

.devcontainer/devcontainer.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "default",
3+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
6+
"version": "latest"
7+
},
8+
"ghcr.io/devcontainers/features/python:1": {
9+
"version": "3.12.1",
10+
},
11+
},
12+
"overrideFeatureInstallOrder": [
13+
"ghcr.io/devcontainers/features/python",
14+
"ghcr.io/devcontainers/features/docker-in-docker",
15+
]
16+
}
17+

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ pyenv.cfg
44
.DS_Store
55
*otelcol-config-extras*.yml
66
*test*
7-
*secret*
7+
*secret*
8+
*scratchpad*

docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '0.1'
21
x-default-logging: &logging
32
options:
43
max-size: "5m"

src/scripts/01-install-kind.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@
66

77
# Install KinD
88
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
9+
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-arm64
10+
911
chmod +x ./kind
1012
sudo mv ./kind /usr/local/bin/kind
1113
kind --version
1214

1315
# Create KinD cluster
14-
kind create cluster --name otel-target-allocator-talk
16+
kind create cluster --name otel-target-allocator-talk
17+
18+
# Install kubectl
19+
[ $(uname -m) = x86_64 ] && curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
20+
[ $(uname -m) = aarch64 ] && curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
21+
22+
chmod +x ./kubectl
23+
sudo mv ./kubectl /usr/local/bin/kubectl

0 commit comments

Comments
 (0)