-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
119 lines (104 loc) · 3.55 KB
/
Taskfile.yml
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
version: "3"
includes:
istio:
taskfile: ./examples/istio
dir: ./examples/istio
simple-api:
taskfile: ./examples/simple-api
dir: ./examples/simple-api
tasks:
devenv-init:
desc: create podman machine and minikube cluster
dir: ./
platforms: [darwin]
cmds:
- touch "$(pwd)/devenv-minikube-config"
- export "KUBECONFIG=$(pwd)/devenv-minikube-config"
- podman machine init --cpus=2 --memory=5120
- podman machine set --rootful
- podman machine start
- minikube start --cpus=2 --memory=4096 --addons=ingress --driver=podman --container-runtime=containerd --profile devenv
devenv-init-chromeOS:
desc: create minikube cluster
dir: ./
platforms: [linux]
cmds:
- sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $USER
- sudo mkdir -p /etc/containers
- sudo cp policy.json /etc/containers/
- sudo cp registries.conf /etc/containers/
- export PODMAN_IGNORE_CGROUPSV1_WARNING=true
- podman system migrate
- touch "$(pwd)/devenv-minikube-config"
- export "KUBECONFIG=$(pwd)/devenv-minikube-config"
- sudo adduser $USER libvirt
- echo -e "user = \"root\"\ngroup = \"root\"\nremember_owner = 0\nnamespaces = []" > qemu.conf
- sudo chown root:root qemu.conf
- sudo chmod 600 qemu.conf
- sudo cp qemu.conf /etc/libvirt/qemu.conf
- sudo rm qemu.conf
- minikube start --cpus=4 --memory=4096 --addons=ingress --driver=kvm2 --profile devenv
devenv-init-large:
desc: create podman machine and minikube cluster with extra resources
dir: ./
platforms: [darwin]
cmds:
- touch "$(pwd)/devenv-minikube-config"
- export "KUBECONFIG=$(pwd)/devenv-minikube-config"
- podman machine init --cpus=4 --memory=18432
- podman machine set --rootful
- podman machine start
- minikube start --cpus=4 --memory=16384 --driver=podman --container-runtime=containerd --profile devenv
devenv-minikube-start:
desc: start minikube cluster
platforms: [darwin]
cmds:
- minikube start --driver=podman --container-runtime=containerd --profile devenv
devenv-minikube-stop:
desc: stop minikube cluster
platforms: [darwin]
cmds:
- minikube stop --profile devenv
devenv-destroy:
desc: destroys all minikube clusters and the podman machine
deps: [devenv-minikube-stop]
dir: ./
platforms: [darwin]
cmds:
- minikube delete --all
- podman machine stop
- podman machine rm -f
- rm devenv-minikube-config
devenv-destroy-chromeOS:
desc: destroys all minikube clusters and the podman machine
deps: [devenv-minikube-stop]
dir: ./
platforms: [linux]
cmds:
- minikube delete --all
- rm devenv-minikube-config
devenv-status:
desc: check status of dev environment
cmds:
- podman system connection list
- podman machine list
- minikube status --profile devenv
devenv-hung:
desc: minikube not responding
dir: ./
platforms: [darwin]
preconditions:
- "[[ $(ps aux | grep podman | grep -v grep | wc -l) -gt 0 ]]"
cmds:
- ps aux | grep podman | grep -v grep | awk '{print $2}' | xargs kill
- podman machine rm -f
- minikube delete --all
- rm devenv-minikube-config
devenv-dashboard:
desc: start minikube dashboard
cmds:
- minikube addons enable metrics-server --profile devenv
- minikube dashboard --profile devenv
default:
desc: check status of dev environment
deps: [devenv-status]