Skip to content

Commit

Permalink
Move cluster creation to post-create (#618)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Crawfis <[email protected]>
  • Loading branch information
AaronCrawfis authored Oct 17, 2023
1 parent 4985092 commit b77a492
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"image": "mcr.microsoft.com/devcontainers/universal:linux",
"workspaceFolder": "/workspaces/samples",
"onCreateCommand": "bash ./.devcontainer/on-create.sh",
"postCreateCommand": "bash ./.devcontainer/post-create.sh",
"runArgs": [
"--privileged",
"--init"
Expand Down
9 changes: 0 additions & 9 deletions .devcontainer/on-create.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#!/bin/sh

## Create a k3d cluster
k3d cluster delete
k3d cluster create -p '8081:80@loadbalancer' --k3s-arg '--disable=traefik@server:0'

## Install Dapr and init
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
dapr uninstall # clean if needed
dapr init -k

## Install rad CLI
CURRENT_BRANCH=$(git branch --show-current)

Expand Down
10 changes: 10 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

## Create a k3d cluster
k3d cluster delete
k3d cluster create -p '8081:80@loadbalancer' --k3s-arg '--disable=traefik@server:0'

## Install Dapr and init
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
dapr uninstall # clean if needed
dapr init -k

0 comments on commit b77a492

Please sign in to comment.