This repository has been archived by the owner on Dec 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
cloud.yml
125 lines (118 loc) · 2.35 KB
/
cloud.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
120
121
122
123
124
125
parameters:
numcpus: 4
network: default
enableroot: false
extra_disks: []
master_memory: 8192
worker_memory: 8192
bootstrap_memory: 4096
disk_size: 30
image: rhcos44
cluster: testk
domain: karmalabs.com
masters: 1
workers: 0
scale: false
tag: cnvlab
api_internal: false
api.{{ cluster }}:
type: loadbalancer
domain: {{ domain }}
checkport: 6080
checkpath: /readyz
{% if not api_internal %}
alias: ['api-int.{{ cluster }}.{{ domain }}']
{% endif %}
ports:
- 6443
- 22623
vms:
- {{ cluster }}-bootstrap
{% for num in range(0, masters) %}
- {{ cluster }}-master-{{ num }}
{% endfor %}
{% if api_internal %}
api-int.{{ cluster }}:
type: loadbalancer
internal: true
domain: {{ domain }}
checkport: 6080
ports:
- 6443
- 22623
vms:
- {{ cluster }}-bootstrap
{% for num in range(0, masters) %}
- {{ cluster }}-master-{{ num }}
{% endfor %}
{% endif %}
apps.{{ cluster }}:
type: loadbalancer
domain: {{ domain }}
checkport: 80
alias: ['*']
ports:
- 80
- 443
vms:
{% if workers > 0 %}
{% for num in range(0, workers) %}
- {{ cluster }}-worker-{{ num }}
{% endfor %}
{% else %}
{% for num in range(0, masters) %}
- {{ cluster }}-master-{{ num }}
{% endfor %}
{% endif %}
{% if not scale %}
{{ cluster }}-bootstrap:
image: {{ image }}
enableroot: {{ enableroot }}
numcpus: 2
memory: {{ bootstrap_memory }}
nets:
- name: {{ network }}
reservedns: true
disks:
- size: {{ disk_size }}
tags: [{{ tag }}]
{% for num in range(0, masters) %}
{{ cluster }}-master-{{ num }}:
domain: {{ cluster }}.{{ domain }}
image: {{ image }}
enableroot: {{ enableroot }}
numcpus: {{ numcpus }}
memory: {{ master_memory }}
nets:
- name: {{ network }}
reservedns: true
disks:
- size: {{ disk_size }}
files:
{% if type == 'gcp' %}
- path: /usr/local/bin/gcp-hack.sh
origin: gcp-hack.sh
mode: 755
- path: /etc/systemd/system/gcp-hack.service
origin: gcp-hack.service
mode: 644
- path: /etc/systemd/system-preset/00-gcp-hack.preset
origin: gcp-hack.preset
mode: 644
{% endif %}
tags: [{{ tag }}]
{% endfor %}
{% endif %}
{% for num in range(0, workers) %}
{{ cluster }}-worker-{{ num }}:
domain: {{ cluster }}.{{ domain }}
image: {{ image }}
enableroot: {{ enableroot }}
numcpus: {{ numcpus }}
memory: {{ worker_memory }}
nets:
- name: {{ network }}
reservedns: true
disks: {{ [disk_size] + extra_disks }}
tags: [{{ tag }}]
{% endfor %}