forked from Yolean/ystack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
113 lines (105 loc) · 2.63 KB
/
docker-compose.test.yml
File metadata and controls
113 lines (105 loc) · 2.63 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
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
version: '2.4'
services:
server:
build:
context: .
dockerfile: ./k3s/image/Dockerfile
command:
- server
- --https-listen-port=17143
- --disable-agent
- --node-name=server
- --no-deploy=traefik
- --no-deploy=servicelb
- --kube-apiserver-arg
- service-node-port-range=31710-31719
tmpfs:
- /run
- /var/run
privileged: true
environment:
- K3S_TOKEN=somethingtotallyrandom
- K3S_KUBECONFIG_OUTPUT=/admin/.kube/kubeconfig.yaml
- K3S_KUBECONFIG_MODE=666
expose:
- 17143
- 8472
- 10250
volumes:
- k3s-server:/var/lib/rancher/k3s
- admin:/admin
mem_limit: 300000000
memswap_limit: 0
agent:
depends_on:
- server
build:
context: .
dockerfile: ./k3s/image/Dockerfile
tmpfs:
- /run
- /var/run
privileged: true
environment:
- K3S_URL=https://server:17143
- K3S_TOKEN=somethingtotallyrandom
expose:
- 8472
- 10250
mem_limit: 1500000000
memswap_limit: 0
ystack-proxy:
depends_on:
- server
- agent
build:
context: .
dockerfile: ./k3s/docker-ystack-proxy/Dockerfile
environment:
- KUBECONFIG_WAIT=30
expose:
- 80
- 8547
volumes:
- admin:/admin
sut:
links:
- ystack-proxy:builds-registry.ystack.svc.cluster.local
- ystack-proxy:buildkitd.ystack.svc.cluster.local
build:
context: .
# Note that with the current state of https://github.com/docker/docker-py/issues/2230 we must symlink the specific dockerignore to ./.dockerignore
dockerfile: runner.Dockerfile
environment:
- KUBECONFIG_WAIT=30
- KEEP_RUNNING=false
volumes:
- admin:/admin
- ./examples:/usr/local/src/ystack/examples
entrypoint:
- /bin/bash
- -cx
command:
- |
mkdir ~/.kube
until test -f /admin/.kube/kubeconfig.yaml; do
[ $$KUBECONFIG_WAIT -gt 0 ] || exit ${BULID_EXIT_CODE_ON_NO_CLUSTER:-0}
KUBECONFIG_WAIT=$$(( $$KUBECONFIG_WAIT - 1 ))
echo "Waiting for a kubeconfig ..." && sleep 1
done
set -e
cat /admin/.kube/kubeconfig.yaml | sed 's|127.0.0.1|server|' > ~/.kube/config
kubectl-waitretry --for=condition=Ready node --all
kubectl get namespace ystack 2>/dev/null || kubectl create namespace ystack
y-cluster-install-prometheus-operator
cd /usr/local/src/ystack/examples/basic-dev-inner-loop
y-skaffold run
if [ "$$KEEP_RUNNING" = "true" ]; then
echo "Will stay running for manual work"
sleep infinity
fi
mem_limit: 80000000
memswap_limit: 0
volumes:
k3s-server: {}
admin: {}