-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (64 loc) · 2.59 KB
/
Makefile
File metadata and controls
76 lines (64 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Disable all the default make stuff
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
## Display a list of the documented make targets
.PHONY: help
help:
@echo Documented Make targets:
@perl -e 'undef $$/; while (<>) { while ($$_ =~ /## (.*?)(?:\n# .*)*\n.PHONY:\s+(\S+).*/mg) { printf "\033[36m%-30s\033[0m %s\n", $$2, $$1 } }' $(MAKEFILE_LIST) | sort
.PHONY: .FORCE
.FORCE:
build:
go build ./cmd/score-radius/
test:
go vet ./...
go test -v ./... -cover -race
build-container:
docker build -t score-radius:local .
test-app: build
./score-radius --version
./score-radius init
./score-radius generate score.yaml
cat app.bicep
test-app-with-full: build
./score-radius --version
./score-radius init --no-sample
./score-radius generate examples/score/score-full.yaml
cat app.bicep
test-app-with-redis: build
./score-radius --version
./score-radius init --no-sample --provisioners examples/provisioners/redis.provisioners.yaml
./score-radius generate examples/score/score-redis.yaml -i ghcr.io/radius-project/samples/demo:latest
cat app.bicep
test-app-with-podinfo: build
./score-radius --version
./score-radius init --no-sample --provisioners examples/provisioners/redis.provisioners.yaml
./score-radius generate examples/score/score-podinfo-with-redis.yaml -i ghcr.io/stefanprodan/podinfo
cat app.bicep
test-container: build-container
mkdir test
sudo chown -R 65532:65532 test/
cd test
docker run --rm score-radius:local --version
docker run --rm -v .:/score-radius score-radius:local init
cat score.yaml
## Create a local Kind cluster.
.PHONY: setup-kind-cluster
setup-kind-cluster:
./scripts/setup-kind-cluster.sh
## Deploy podinfo to Radius and Kind cluster.
.PHONY: deploy-podinfo-to-radius
deploy-podinfo-to-radius:
rad workspace create kubernetes default
rad group create default --workspace default
rad env create default --group default
#rad recipe register default --environment default --resource-type "Applications.Datastores/redisCaches" --template-kind bicep --template-path "ghcr.io/radius-project/recipes/local-dev/rediscaches:latest"
./score-radius init --no-sample --provisioners examples/provisioners/redis.provisioners.yaml
#cp ./examples/score/score-podinfo-with-redis.yaml ./score.yaml
cp ./examples/score/score-podinfo.yaml ./score.yaml
./score-radius generate score.yaml -i ghcr.io/stefanprodan/podinfo:latest -o app.bicep
cat app.bicep
cp ./examples/bicepconfig.json ./
rad deploy app.bicep --group default --application podinfo --environment default
kubectl wait deployments/podinfo -n default-podinfo --for condition=Available --timeout=90s
kubectl get all -n default-podinfo