Skip to content

Commit

Permalink
.devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu-benoit authored May 9, 2024
1 parent 8cd17e9 commit 20ff408
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "Score & Humanitec Dev Container",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"version": "latest"
},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
"version": "latest",
"helm": "latest",
"minikube": "latest"
}
},
"postCreateCommand": "bash .devcontainer/installMoreTools.sh",
"customizations": {
"vscode": {
"extensions": [
"redhat.vscode-yaml"
],
"settings": {
"yaml.schemas": {
"https://raw.githubusercontent.com/score-spec/schema/main/score-v1b1.json": "score.yaml"
}
}
}
}
}
24 changes: 24 additions & 0 deletions .devcontainer/installMoreTools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

mkdir install-more-tools
cd install-more-tools

SCORE_COMPOSE_VERSION=$(curl -sL https://api.github.com/repos/score-spec/score-compose/releases/latest | jq -r .tag_name)
wget https://github.com/score-spec/score-compose/releases/download/${SCORE_COMPOSE_VERSION}/score-compose_${SCORE_COMPOSE_VERSION}_linux_amd64.tar.gz
tar -xvf score-compose_${SCORE_COMPOSE_VERSION}_linux_amd64.tar.gz
chmod +x score-compose
sudo mv score-compose /usr/local/bin

HUMCTL_VERSION=$(curl -sL https://api.github.com/repos/humanitec/cli/releases/latest | jq -r .tag_name)
curl -fLO https://github.com/humanitec/cli/releases/download/${HUMCTL_VERSION}/cli_${HUMCTL_VERSION:1}_linux_amd64.tar.gz
tar -xvf cli_${HUMCTL_VERSION:1}_linux_amd64.tar.gz
chmod +x humctl
sudo mv humctl /usr/local/bin/humctl

KIND_VERSION=$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r .tag_name)
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${KIND_VERSION}/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

cd ..
rm -rf install-more-tools
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

Get the [Azure-Samples/aks-store-demo](https://github.com/Azure-Samples/aks-store-demo) to Score and Humanitec.

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Humanitec-DemoOrg/aks-store-demo)

![](https://github.com/Azure-Samples/aks-store-demo/raw/main/assets/demo-arch.png)

## Local deployment

You will need to [install `score-compose`](https://docs.score.dev/docs/score-implementation/score-compose/) locally.

_Note: there is a current issue in `score-compose` not supporting yet the `service` resources. [Coming soon](https://github.com/score-spec/score-compose/issues/118)._

Deploy locally:
```bash
make compose-up
Expand Down

0 comments on commit 20ff408

Please sign in to comment.