forked from next-hat/nanocl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installer.yml
196 lines (186 loc) · 5.11 KB
/
installer.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
ApiVersion: v0.13
# This is the required component for nanocl ecosystem.
# It is a deployment that will be parsed and used to spin up nanocl.
# The settings may be dynamically updated when joining a cluster.
# or when a new node is added to the cluster.
Namespace: system
Cargoes:
- Name: nstore
Container:
Image: cockroachdb/cockroach:v23.1.15
Tty: true
Hostname: store.nanocl.internal
Entrypoint:
- /bin/sh
HostConfig:
NetworkMode: system
Binds:
- ${{ state_dir }}/store:${{ state_dir }}/store
Env:
- STATE_DIR=${{ state_dir }}/store
Cmd:
- -c
- |
echo "starting cockroachdb"
if [ ! -f "$STATE_DIR/ca/ca.key" ]; then
echo "generating certs"
mkdir -p $STATE_DIR/ca $STATE_DIR/certs $STATE_DIR/data
cockroach cert create-ca --certs-dir=$STATE_DIR/certs --ca-key=$STATE_DIR/ca/ca.key
cockroach cert create-node 127.0.0.1 store.nanocl.internal --certs-dir=$STATE_DIR/certs --ca-key=$STATE_DIR/ca/ca.key
cockroach cert create-client root --certs-dir=$STATE_DIR/certs --ca-key=$STATE_DIR/ca/ca.key
fi
cockroach start-single-node --listen-addr=:26257 --sql-addr=:26258 --certs-dir=$STATE_DIR/certs --store=$STATE_DIR/data
- Name: nmetrics
Container:
Image: ghcr.io/next-hat/metrsd:0.5.2
Tty: true
Cmd:
- --hosts
- unix:///run/nanocl/metrics.sock
HostConfig:
NetworkMode: system
Binds:
# {% if is_docker_desktop %}
- //run/guest-services/nanocl:/run/nanocl
# {% else %}
- /run/nanocl:/run/nanocl
# {% endif %}
- Name: nproxy
Container:
# {% if channel == "nightly" %}
Image: ghcr.io/next-hat/nproxy:1.25.4-n0.11-nightly
# {% else %}
Image: ghcr.io/next-hat/nproxy:1.25.0-n0.10
# {% endif %}
Tty: true
Env:
- STATE_DIR=${{ state_dir }}/proxy
HostConfig:
NetworkMode: host
Binds:
# {% if is_docker_desktop %}
- //run:/run
# {% else %}
- /run:/run
# {% endif %}
- ${{ state_dir }}/proxy:${{ state_dir }}/proxy
- ${{ state_dir }}/proxy/letsencrypt:/etc/letsencrypt
- Name: ncproxy
Container:
# {% if channel == "nightly" %}
Image: ghcr.io/next-hat/ncproxy:0.11.0-nightly
# {% else %}
Image: ghcr.io/next-hat/ncproxy:0.10.1
# {% endif %}
Tty: true
Cmd:
- --state-dir
- ${{ state_dir }}/proxy
HostConfig:
NetworkMode: system
Binds:
# {% if is_docker_desktop %}
- //run/guest-services/nanocl:/run/nanocl
# {% else %}
- /run/nanocl:/run/nanocl
# {% endif %}
- ${{ state_dir }}/proxy:${{ state_dir }}/proxy
- Name: ndns
Container:
# {% if channel == "nightly" %}
Image: ghcr.io/next-hat/ndns:2.90.0-n0.6-nightly
# {% else %}
Image: ghcr.io/next-hat/ndns:2.89.0-n0.5
# {% endif %}
Env:
- STATE_DIR=${{ state_dir }}/dns
HostConfig:
NetworkMode: host
Binds:
- ${{ state_dir }}/dns:${{ state_dir }}/dns
- Name: ncdns
Container:
# {% if channel == "nightly" %}
Image: ghcr.io/next-hat/ncdns:0.6.0-nightly
# {% else %}
Image: ghcr.io/next-hat/ncdns:0.5.0
# {% endif %}
Tty: true
Cmd:
- --state-dir
- ${{ state_dir }}/dns
- --dns
- 1.1.1.1
- --dns
- 1.0.0.1
HostConfig:
NetworkMode: system
Binds:
# {% if is_docker_desktop %}
- //run/guest-services/nanocl:/run/nanocl
# {% else %}
- /run/nanocl:/run/nanocl
# {% endif %}
- ${{ state_dir }}/dns:${{ state_dir }}/dns
- Name: ndaemon
Container:
# {% if channel == "nightly" %}
Image: ghcr.io/next-hat/nanocld:0.14.0-nightly
# {% else %}
Image: ghcr.io/next-hat/nanocld:0.13.0
# {% endif %}
Tty: true
Hostname: nanocl.internal
Cmd:
- --state-dir
- ${{ state_dir }}
- --conf-dir
- ${{ conf_dir }}
- --docker-host
- ${{ docker_host }}
- --gateway
- ${{ gateway }}
- --hostname
- ${{ hostname }}
- --advertise-addr
- ${{ advertise_addr }}
- --gid
- "${{ gid }}"
Env:
- NANOCL_GID=${{ gid }}
HostConfig:
NetworkMode: system
Binds:
# {% if is_docker_desktop %}
- //run/guest-services/nanocl:/run/nanocl
# {% else %}
- /run/nanocl:/run/nanocl
# {% endif %}
# {% if docker_uds_path %}
# {% if docker_uds_host_path %}
- ${{ docker_uds_host_path }}:${{ docker_uds_path }}
# {% else %}
- ${{ docker_uds_path }}:${{ docker_uds_path }}
# {% endif %}
# {% endif %}
- ${{ state_dir }}:${{ state_dir }}
- ${{ conf_dir }}:${{ conf_dir }}
# Enable vpnkit on docker desktop
# {% if is_docker_desktop %}
- Name: ncvpnkit
Container:
# {% if channel == "nightly" %}
Image: ghcr.io/next-hat/ncvpnkit:0.4.0-nightly
# {% else %}
Image: ghcr.io/next-hat/ncvpnkit:0.3.0
# {% endif %}
Tty: true
Hostname: ncvpnkit.nanocl.internal
Env:
- USER_HOME=${{ home_dir }}
HostConfig:
NetworkMode: system
Binds:
- //run/guest-services/nanocl:/run/nanocl
- //run/host-services/backend.sock:/run/host-services/backend.sock
# {% endif %}