vantage6 5.0.0a33__py3-none-any.whl → 5.0.0a35__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vantage6 might be problematic. Click here for more details.

Files changed (45) hide show
  1. vantage6/cli/algostore/new.py +106 -47
  2. vantage6/cli/algostore/remove.py +18 -34
  3. vantage6/cli/algostore/start.py +36 -67
  4. vantage6/cli/algostore/stop.py +43 -46
  5. vantage6/cli/cli.py +31 -33
  6. vantage6/cli/common/new.py +85 -0
  7. vantage6/cli/common/remove.py +54 -0
  8. vantage6/cli/common/start.py +36 -213
  9. vantage6/cli/common/stop.py +78 -0
  10. vantage6/cli/common/utils.py +253 -16
  11. vantage6/cli/configuration_manager.py +90 -12
  12. vantage6/cli/configuration_wizard.py +49 -414
  13. vantage6/cli/context/algorithm_store.py +7 -6
  14. vantage6/cli/context/base_server.py +22 -30
  15. vantage6/cli/context/node.py +14 -17
  16. vantage6/cli/context/server.py +16 -7
  17. vantage6/cli/globals.py +29 -8
  18. vantage6/cli/node/attach.py +1 -0
  19. vantage6/cli/node/common/__init__.py +1 -1
  20. vantage6/cli/node/create_private_key.py +9 -6
  21. vantage6/cli/node/files.py +12 -25
  22. vantage6/cli/node/new.py +348 -28
  23. vantage6/cli/node/remove.py +14 -90
  24. vantage6/cli/node/restart.py +30 -51
  25. vantage6/cli/node/set_api_key.py +7 -4
  26. vantage6/cli/node/start.py +81 -304
  27. vantage6/cli/node/stop.py +36 -96
  28. vantage6/cli/server/import_.py +1 -2
  29. vantage6/cli/server/list.py +0 -3
  30. vantage6/cli/server/new.py +72 -42
  31. vantage6/cli/server/remove.py +12 -33
  32. vantage6/cli/server/shell.py +1 -1
  33. vantage6/cli/server/start.py +22 -20
  34. vantage6/cli/server/stop.py +37 -17
  35. vantage6/cli/template/algo_store_config.j2 +195 -22
  36. vantage6/cli/template/node_config.j2 +336 -33
  37. vantage6/cli/template/server_config.j2 +255 -33
  38. vantage6/cli/utils.py +0 -2
  39. {vantage6-5.0.0a33.dist-info → vantage6-5.0.0a35.dist-info}/METADATA +4 -4
  40. vantage6-5.0.0a35.dist-info/RECORD +75 -0
  41. vantage6/cli/node/clean.py +0 -46
  42. vantage6/cli/template/server_import_config.j2 +0 -31
  43. vantage6-5.0.0a33.dist-info/RECORD +0 -75
  44. {vantage6-5.0.0a33.dist-info → vantage6-5.0.0a35.dist-info}/WHEEL +0 -0
  45. {vantage6-5.0.0a33.dist-info → vantage6-5.0.0a35.dist-info}/entry_points.txt +0 -0
@@ -1,33 +1,336 @@
1
- api_path: {{ api_path }}
2
- encryption:
3
- enabled: false
4
- private_key: null
5
- logging:
6
- backup_count: 5
7
- datefmt: '%Y-%m-%d %H:%M:%S'
8
- file: {{ logging["file"] }}
9
- format: '%(asctime)s - %(name)-14s - %(levelname)-8s - %(message)s'
10
- level: DEBUG
11
- max_size: 1024
12
- use_console: true
13
- loggers:
14
- - level: warning
15
- name: urllib3
16
- - level: warning
17
- name: requests
18
- - level: warning
19
- name: engineio.client
20
- - level: warning
21
- name: docker.utils.config
22
- - level: warning
23
- name: docker.auth
24
- - level: warning
25
- name: kubernetes.client.rest
26
- node_proxy_port: {{ node_proxy_port }}
27
- port: {{ port }}
28
- server_url: {{ server_url }}
29
- task_dir: {{ task_dir}}
30
- dev:
31
- task_dir_extension: {{ task_dir_extension }}
32
- task_namespace: {{ task_namespace }}
33
- {{- user_provided_config -}}
1
+ # override the chart name
2
+ nameOverride: {{ nameOverride | default('vantage6-node') }}
3
+ # Optional, by default the Release.Namespace is used
4
+ # namespace: vantage6-node
5
+ node:
6
+
7
+ # Set to false to prevent creation of node secrets (useful when secrets are managed
8
+ # externally)
9
+ createSecrets: {{ node.createSecrets | default(true) }}
10
+
11
+ name: {{ node.name | default('put-your-node-name-here') }}
12
+ apiKey: {{ node.apiKey | default('put-your-api-key-here') }}
13
+
14
+ # Keycloak configuration
15
+ keycloakUrl: {{ node.keycloakUrl | default('http://vantage6-auth-keycloak.vantage6.svc.cluster.local') }}
16
+ keycloakRealm: {{ node.keycloakRealm | default('vantage6') }}
17
+
18
+ # TODO v5+ set the url/port directly on node-configmap.yaml using \{\{ .Release.Name \}\}-vantage6-server-service
19
+ {% if node.server is defined %}
20
+ server:
21
+ url: {{ node.server.url | default('http://vantage6-server-vantage6-server-service') }}
22
+ port: {{ node.server.port | default(7601) }}
23
+ path: {{ node.server.path | default('/server') }}
24
+ {% else %}
25
+ server:
26
+ url: http://vantage6-server-vantage6-server-service
27
+ port: 7601
28
+ path: /server
29
+ {% endif %}
30
+
31
+
32
+ image: {{ node.image | default('harbor2.vantage6.ai/infrastructure/node:latest') }}
33
+
34
+ # Namespace in which the task kubernetes resources are created. This must be a
35
+ # namespace where the node has access to create pods.
36
+ taskNamespace: {{ node.taskNamespace | default('vantage6-tasks') }}
37
+
38
+ # Kubernetes node name, used for local persistent volumes
39
+ k8sNodeName: {{ node.k8sNodeName | default('docker-desktop') }}
40
+
41
+ logging:
42
+ # Controls the logging output level. Could be one of the following
43
+ # levels: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET
44
+ level: {{ node.logging.level | default('INFO') }}
45
+
46
+ # Location to the log file
47
+ file: {{ node.logging.file | default('node.log') }}
48
+
49
+ # Size in kb of a single log file
50
+ max_size: {{ node.logging.max_size | default(1024) }}
51
+ use_console: {{ node.logging.use_console | default(true) }}
52
+
53
+ # Date format for the log file
54
+ datefmt: "{{ node.logging.datefmt | default('%Y-%m-%d %H:%M:%S') }}"
55
+
56
+ # Format for the log file
57
+ format: "{{ node.logging.format | default('%(asctime)s - %(name)-14s - %(levelname)-8s - %(message)s') }}"
58
+
59
+ # Maximum number of log files to keep. Log files are rotated when the size of the
60
+ # current log file exceeds `max_size`.
61
+ backup_count: {{ node.logging.backup_count | default(5) }}
62
+
63
+ # Loggers to include in the log file
64
+ loggers:
65
+ {% if node.logging.loggers is defined %}
66
+ {% for logger in node.logging.loggers %}
67
+ - level: {{ logger.level }}
68
+ name: {{ logger.name }}
69
+ {% endfor %}
70
+ {% endif %}
71
+ {% if node.logging.loggers is not defined %}
72
+ - level: warning
73
+ name: urllib3
74
+ - level: warning
75
+ name: socketIO-client
76
+ - level: warning
77
+ name: socketio.server
78
+ - level: warning
79
+ name: engineio.server
80
+ - level: warning
81
+ name: sqlalchemy.engine
82
+ {% endif %}
83
+
84
+ {% if node.encryption is defined %}
85
+ encryption:
86
+ # Whether encryption is enabled or not. This should be the same as the `encrypted`
87
+ # setting of the collaboration to which this node belongs.
88
+ enabled: {{ node.encryption.enabled | default(false) }}
89
+
90
+ # Location to the private key file. Required if encryption is enabled.
91
+ {% if node.encryption.enabled | default(false) %}
92
+ private_key: {{ node.encryption.private_key | default('/path/to/private_key.pem') }}
93
+ {% else %}
94
+ # private_key: /path/to/private_key.pem
95
+ {% endif %}
96
+ {% else %}
97
+ encryption:
98
+ # Whether encryption is enabled or not. This should be the same as the `encrypted`
99
+ # setting of the collaboration to which this node belongs.
100
+ enabled: false
101
+
102
+ # Location to the private key file. Required if encryption is enabled.
103
+ # private_key: /path/to/private_key.pem
104
+ {% endif %}
105
+
106
+ # Port for the node proxy to run on
107
+ proxyPort: {{ node.proxyPort | default(7654) }}
108
+
109
+ # Storage settings on host of the node machine. This defines where the database is
110
+ # stored as well as the task directory (which will contain the input/output of the
111
+ # tasks).
112
+ {% if node.persistence is defined %}
113
+ persistence:
114
+ tasks:
115
+ storageClass: {{ node.persistence.tasks.storageClass | default('local-storage') }}
116
+ size: {{ node.persistence.tasks.size | default('10Gi') }}
117
+ hostPath: {{ node.persistence.tasks.hostPath | default('/path/to/where/task/files/are/stored') }}
118
+ database:
119
+ storageClass: {{ node.persistence.database.storageClass | default('local-storage') }}
120
+ size: {{ node.persistence.database.size | default('5Gi') }}
121
+ {% else %}
122
+ persistence:
123
+ tasks:
124
+ storageClass: local-storage
125
+ size: 10Gi
126
+ hostPath: /path/to/where/task/files/are/stored
127
+ database:
128
+ storageClass: local-storage
129
+ size: 5Gi
130
+ {% endif %}
131
+
132
+
133
+ # It is also possible not to specify the details of the service-based databases
134
+ # here. The node will then automatically detect the databases in the environment
135
+ # variables. This allows parent charts to specify the databases in their own
136
+ # values.yaml file or define them runtime using the CLI.
137
+ #
138
+ # In this case, the node expects the following environment variables to be set:
139
+ #
140
+ # DATABASE_LABELS: comma-separated list of database labels
141
+ # DATABASE_[LABEL]_URI: URI of the database
142
+ # DATABASE_[LABEL]_TYPE: type of the database
143
+ #
144
+ # Optionally, you can also specify additional environment variables for each
145
+ # database by setting the DATABASE_[LABEL]_SOME_OTHER_KEY variable.
146
+ #
147
+ # DATABASE_[LABEL]_SOME_OTHER_KEY: some_other_value
148
+ #
149
+ # It is recommended to do this through Kubernetes secrets. If you specify the
150
+ # details here, secrets will be used. File-based databases are automatically made
151
+ # available to your node.
152
+ {% if node.databases is defined %}
153
+ databases:
154
+ {% if node.databases.fileBased is defined %}
155
+ fileBased:
156
+ {% for db in node.databases.fileBased %}
157
+ - name: {{ db.name }}
158
+ uri: {{ db.uri }}
159
+ type: {{ db.type }}
160
+ volumePath: {{ db.volumePath }}
161
+ originalName: {{ db.originalName }}
162
+ {% endfor %}
163
+ {% endif %}
164
+ {% if node.databases.serviceBased is defined %}
165
+ serviceBased:
166
+ {% for db in node.databases.serviceBased %}
167
+ - name: {{ db.name }}
168
+ uri: {{ db.uri }}
169
+ type: {{ db.type }}
170
+ env:
171
+ {% for key, value in db.env.items() %}
172
+ {{ key }}: {{ value }}
173
+ {% endfor %}
174
+ {% endfor %}
175
+ {% endif %}
176
+ {% else %}
177
+ databases: []
178
+ {% endif %}
179
+
180
+ # Whether or not your node shares some configuration (e.g. which images are
181
+ # allowed to run on your node) with the central server. This can be useful
182
+ # for other organizations in your collaboration to understand why a task
183
+ # is not completed. Obviously, no sensitive data is shared. Default true
184
+ share_config: {{ node.share_config | default(true) }}
185
+
186
+ # Whether or not to share algorithm logs with the server. Otherwise they will
187
+ # only be displayed as part of the node logs. Default is true.
188
+ # NOTE: It's recommented to set this to false when using sensitive data
189
+ share_algorithm_logs: {{ node.share_algorithm_logs | default(true) }}
190
+
191
+ # Define who is allowed to run which algorithms on this node.
192
+ {% if node.policies is defined %}
193
+ policies:
194
+ # Control which algorithm images are allowed to run on this node. This is
195
+ # expected to be a valid regular expression. If you don't specify this, all algorithm
196
+ # images are allowed to run on this node (unless other policies restrict this).
197
+ {% if node.policies.allowed_algorithms is defined %}
198
+ allowed_algorithms:
199
+ {% for algo in node.policies.allowed_algorithms %}
200
+ - {{ algo }}
201
+ {% endfor %}
202
+ {% else %}
203
+ # allowed_algorithms:
204
+ # - ^harbor2\.vantage6\.ai/[a-zA-Z]+/[a-zA-Z]+
205
+ # - ^myalgorithm\.ai/some-algorithm
206
+ {% endif %}
207
+
208
+ # It is also possible to allow all algorithms from particular algorithm stores. Set
209
+ # these stores here. They may be strings or regular expressions. If you don't specify
210
+ # this, algorithms from any store are allowed (unless other policies prevent this).
211
+ {% if node.policies.allowed_algorithm_stores is defined %}
212
+ allowed_algorithm_stores:
213
+ {% for store in node.policies.allowed_algorithm_stores %}
214
+ - {{ store }}
215
+ {% endfor %}
216
+ {% else %}
217
+ # allowed_algorithm_stores:
218
+ # # allow all algorithms from the vantage6 community store
219
+ # - https://store.cotopaxi.vantage6.ai
220
+ # # allow any store that is a subdomain of vantage6.ai
221
+ # - ^https://[a-z]+\.vantage6\.ai$
222
+ {% endif %}
223
+
224
+ # If you define both `allowed_algorithm_stores` and `allowed_algorithms`, you can
225
+ # choose to only allow algorithms that both policies allow, or you can allow
226
+ # algorithms that either of them allows. By default, only algorithms that are given
227
+ # in *both* the `allowed_algorithms` and `allowed_algorithm_stores` are allowed by
228
+ # setting this to the default value `false`.
229
+ allow_either_whitelist_or_store: {{ node.policies.allow_either_whitelist_or_store | default(false) }}
230
+
231
+ # Define which users are allowed to run algorithms on your node by their ID
232
+ {% if node.policies.allowed_users is defined %}
233
+ allowed_users:
234
+ {% for user in node.policies.allowed_users %}
235
+ - {{ user }}
236
+ {% endfor %}
237
+ {% else %}
238
+ # allowed_users:
239
+ # - 2
240
+ {% endif %}
241
+
242
+ # Define which organizations are allowed to run images on your node by
243
+ # their ID or name
244
+ {% if node.policies.allowed_organizations is defined %}
245
+ allowed_organizations:
246
+ {% for org in node.policies.allowed_organizations %}
247
+ - {{ org }}
248
+ {% endfor %}
249
+ {% else %}
250
+ # allowed_organizations:
251
+ # - 6
252
+ # - root
253
+ {% endif %}
254
+
255
+ # Set to true to always require that the algorithm image is successfully pulled. This
256
+ # ensures that no potentially outdated local images are used if internet connection
257
+ # is not available. This option should be set to false if you are testing with local
258
+ # algorithm images. Default value is true.
259
+ require_algorithm_pull: {{ node.policies.require_algorithm_pull | default(true) }}
260
+ {% else %}
261
+ policies:
262
+ # Control which algorithm images are allowed to run on this node. This is
263
+ # expected to be a valid regular expression. If you don't specify this, all algorithm
264
+ # images are allowed to run on this node (unless other policies restrict this).
265
+ # allowed_algorithms:
266
+ # - ^harbor2\.vantage6\.ai/[a-zA-Z]+/[a-zA-Z]+
267
+ # - ^myalgorithm\.ai/some-algorithm
268
+
269
+ # It is also possible to allow all algorithms from particular algorithm stores. Set
270
+ # these stores here. They may be strings or regular expressions. If you don't specify
271
+ # this, algorithms from any store are allowed (unless other policies prevent this).
272
+ # allowed_algorithm_stores:
273
+ # # allow all algorithms from the vantage6 community store
274
+ # - https://store.cotopaxi.vantage6.ai
275
+ # # allow any store that is a subdomain of vantage6.ai
276
+ # - ^https://[a-z]+\.vantage6\.ai$
277
+
278
+ # If you define both `allowed_algorithm_stores` and `allowed_algorithms`, you can
279
+ # choose to only allow algorithms that both policies allow, or you can allow
280
+ # algorithms that either of them allows. By default, only algorithms that are given
281
+ # in *both* the `allowed_algorithms` and `allowed_algorithm_stores` are allowed by
282
+ # setting this to the default value `false`.
283
+ # allow_either_whitelist_or_store: false
284
+
285
+ # Define which users are allowed to run algorithms on your node by their ID
286
+ # allowed_users:
287
+ # - 2
288
+ # Define which organizations are allowed to run images on your node by
289
+ # their ID or name
290
+ # allowed_organizations:
291
+ # - 6
292
+ # - root
293
+
294
+ # Set to true to always require that the algorithm image is successfully pulled. This
295
+ # ensures that no potentially outdated local images are used if internet connection
296
+ # is not available. This option should be set to false if you are testing with local
297
+ # algorithm images. Default value is true.
298
+ require_algorithm_pull: true
299
+ {% endif %}
300
+
301
+ # Prometheus settings, for sending system metadata to the server.
302
+ {% if node.prometheus is defined %}
303
+ prometheus:
304
+ # Whether or not to enable Prometheus reporting. Default is false.
305
+ enabled: {{ node.prometheus.enabled | default(false) }}
306
+
307
+ # Interval (in seconds) at which the node sends system metadata to the server.
308
+ # This should align with the Prometheus scrape_interval to avoid stale data.
309
+ report_interval_seconds: {{ node.prometheus.report_interval_seconds | default(45) }}
310
+ {% else %}
311
+ prometheus:
312
+ # Whether or not to enable Prometheus reporting. Default is false.
313
+ enabled: false
314
+
315
+ # Interval (in seconds) at which the node sends system metadata to the server.
316
+ # This should align with the Prometheus scrape_interval to avoid stale data.
317
+ # report_interval_seconds: 45
318
+ {% endif %}
319
+
320
+ {% if node.debug is defined %}
321
+ # Debug settings
322
+ debug:
323
+ # Set to `true` to enable print debug messages from Flask/socketio.
324
+ socketio: {{ node.debug.socketio | default(false) }}
325
+
326
+ # Set to `true` to set the Flask app used for proxy service into debug mode.
327
+ proxy_server: {{ node.debug.proxy_server | default(false) }}
328
+ {% endif %}
329
+
330
+ {% if node.dev is defined %}
331
+ dev:
332
+ # Set extension for the task directory. In the development environment, the task
333
+ # directory is mounted as a volume. If multiple nodes are then running on the same
334
+ # machine, this extension is added to the task directory to avoid conflicts.
335
+ task_dir_extension: {{ node.dev.task_dir_extension }}
336
+ {% endif %}
@@ -1,34 +1,256 @@
1
- allow_drop_all: false
2
- api_path: /api
3
- description: 'defaultserver'
4
- ip: 0.0.0.0
5
- logging:
6
- backup_count: 5
7
- datefmt: '%Y-%m-%d %H:%M:%S'
8
- file: test-server.log
9
- format: '%(asctime)s - %(name)-14s - %(levelname)-8s - %(message)s'
10
- level: DEBUG
11
- max_size: 1024
12
- use_console: true
13
- loggers:
14
- - level: warning
15
- name: urllib3
16
- - level: warning
17
- name: socketIO-client
18
- - level: warning
19
- name: socketio.server
20
- - level: warning
21
- name: engineio.server
22
- - level: warning
23
- name: sqlalchemy.engine
24
- - level: warning
25
- name: requests_oauthlib.oauth2_session
26
- port: {{ port }}
27
- uri: sqlite:///default.sqlite
28
- dev:
29
- host_uri: {{ host_uri }}
30
- server_url: http://localhost:{{ port }}/api
1
+ # Override the chart name
2
+ nameOverride: {{ nameOverride | default('vantage6-server') }}
3
+ # Optional, by default the Release.Namespace is used
4
+ # namespace: vantage6-server
5
+ server:
6
+ # The description of the server
7
+ description: {{ server.description | default('Vantage6 server version 5') }}
8
+
9
+ # The external URL of the server
10
+ baseUrl: {{ server.baseUrl | default('http://localhost:7601') }}
11
+ apiPath: {{ server.apiPath | default('/server') }}
12
+
13
+ # Keycloak configuration
14
+ keycloakUrl: {{ server.keycloakUrl }}
15
+ keycloakRealm: {{ server.keycloakRealm | default('vantage6') }}
16
+ keycloakAdminUsername: {{ server.keycloakAdminUsername | default('admin') }}
17
+ keycloakAdminPassword: {{ server.keycloakAdminPassword | default('admin') }}
18
+ keycloakAdminClient: {{ server.keycloakAdminClient | default('backend-admin-client') }}
19
+ keycloakAdminClientSecret: {{ server.keycloakAdminClientSecret | default('myadminclientsecret') }}
20
+ {% if server.keycloak is defined %}
21
+ keycloak:
22
+ manage_users_and_nodes: {{ server.keycloak.manage_users_and_nodes | default(true) }}
23
+ {% endif %}
24
+ {% if server.keycloak is not defined %}
25
+ keycloak:
26
+ manage_users_and_nodes: true
27
+ {% endif %}
28
+
29
+ {% if server.internal is defined %}
30
+ internal:
31
+ port: {{ server.internal.port | default(7601) }}
32
+ {% endif %}
33
+ {% if server.internal is not defined %}
34
+ internal:
35
+ port: 7601
36
+ {% endif %}
37
+
38
+ port: {{ server.port | default(7601) }}
39
+
40
+ # The number of replicas of the server
41
+ replications: {{ server.replications | default(1) }}
42
+
43
+ # The image used to start the server
44
+ image: {{ server.image | default('harbor2.vantage6.ai/infrastructure/server:latest') }}
45
+
46
+ logging:
47
+ # Controls the logging output level. Could be one of the following
48
+ # levels: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET
49
+ level: {{ server.logging.level | default('INFO') }}
50
+
51
+ # Location to the log file
52
+ file: {{ server.logging.file | default('server.log') }}
53
+
54
+ # Size in kb of a single log file
55
+ max_size: {{ server.logging.max_size | default(1024) }}
56
+ use_console: {{ server.logging.use_console | default(true) }}
57
+
58
+ # Date format for the log file
59
+ datefmt: "{{ server.logging.datefmt | default('%Y-%m-%d %H:%M:%S') }}"
60
+
61
+ # Format for the log file
62
+ format: "{{ server.logging.format | default('%(asctime)s - %(name)-14s - %(levelname)-8s - %(message)s') }}"
63
+
64
+ # Maximum number of log files to keep. Log files are rotated when the size of the
65
+ # current log file exceeds `max_size`.
66
+ backup_count: {{ server.logging.backup_count | default(5) }}
67
+
68
+ # Loggers to include in the log file
69
+ loggers:
70
+ {% if server.logging.loggers is defined %}
71
+ {% for logger in server.logging.loggers %}
72
+ - level: {{ logger.level }}
73
+ name: {{ logger.name }}
74
+ {% endfor %}
75
+ {% endif %}
76
+ {% if server.logging.loggers is not defined %}
77
+ - level: warning
78
+ name: urllib3
79
+ - level: warning
80
+ name: socketIO-client
81
+ - level: warning
82
+ name: socketio.server
83
+ - level: warning
84
+ name: engineio.server
85
+ - level: warning
86
+ name: sqlalchemy.engine
87
+ {% endif %}
88
+
89
+ {% if server.jwt is defined and server.jwt.secret is defined %}
90
+ # Setting constant secret for the JWT token. This is not recommended for production
91
+ # environments.
92
+ jwt:
93
+ secret: {{ server.jwt.secret }}
94
+ {% endif %}
95
+
96
+ {% if server.dev is defined %}
97
+ dev:
98
+ host_uri: {{ server.dev.host_uri | default('host.docker.internal') }}
99
+ # This should be set to true if you are running the algorithm store in the same
100
+ # cluster and namespace as the server
101
+ store_in_local_cluster: {{ server.dev.store_in_local_cluster | default(false) }}
102
+ {% endif %}
103
+
104
+ # If you want to couple algorithm stores to the server on startup, you can add them here.
105
+ # The name is used to identify the algorithm store in the server's database.
106
+ # The url is the URL of the algorithm store's API.
107
+ {% if server.algorithm_stores is defined %}
108
+ algorithm_stores:
109
+ {% for store in server.algorithm_stores %}
110
+ - name: {{ store.name }}
111
+ url: {{ store.url }}
112
+ {% endfor %}
113
+ {% else %}
114
+ # algorithm_stores:
115
+ # - name: local store
116
+ # url: http://localhost:7602/api
117
+ {% endif %}
118
+
119
+ # Cleanup settings: This is used to cleanup the database from old results.
120
+ # Every hour, results older than the threshold for completed runs are deleted.
121
+ # Disabled unless you specify this option. Careful! Make sure you have regular
122
+ # backups of your database before enabling this feature, as a wrong configuration
123
+ # could lead to data loss.
124
+ {% if server.runs_data_cleanup_days is defined %}
125
+ runs_data_cleanup_days: {{ server.runs_data_cleanup_days }}
126
+ {% endif %}
127
+ {% if server.runs_data_cleanup_days is not defined %}
128
+ # runs_data_cleanup_days: 30
129
+ {% endif %}
130
+ # Whether to also delete the algorithm arguments of the runs. False by default.
131
+ {% if server.runs_data_cleanup_include_args is defined %}
132
+ runs_data_cleanup_include_args: {{ server.runs_data_cleanup_include_args }}
133
+ {% endif %}
134
+ {% if server.runs_data_cleanup_include_args is not defined %}
135
+ # runs_data_cleanup_include_args: false
136
+ {% endif %}
137
+
138
+ # Settings for enabling monitoring of vantage6 nodes resource usage (e.g. CPU, memory).
139
+ # This is done using Prometheus. There are two components to this:
140
+ # 1. The Prometheus exporter (running as part of the vantage6 server), which collects
141
+ # the metrics from the nodes.
142
+ # 2. The Prometheus server (running as a separate Docker container), which scrapes the
143
+ # metrics exposed by the Prometheus exporter and stores them.
144
+ # The exporter is started by default when the server starts (if prometheus is enabled).
145
+ # The Prometheus server can be started separately.
146
+ prometheus:
147
+ # Set to true to enable Prometheus reporting. Default is false.
148
+ {% if server.prometheus is defined %}
149
+ enabled: {{ server.prometheus.enabled | default(false) }}
150
+ {% else %}
151
+ enabled: false
152
+ {% endif %}
153
+ # Set to true to start the Prometheus server when starting the server
154
+ {% if server.prometheus is defined and server.prometheus.start_with_server is defined %}
155
+ start_with_server: {{ server.prometheus.start_with_server }}
156
+ {% else %}
157
+ # start_with_server: false
158
+ {% endif %}
159
+ # The port on which the Prometheus exporter will be available. This is the port that the Prometheus server will scrape.
160
+ # Note: The Prometheus server assumes the exporter is accessible via the Docker container's hostname.
161
+ # Ensure that Prometheus is in the same Docker network as the vantage6 server to resolve the hostname.
162
+ {% if server.prometheus is defined and server.prometheus.exporter_port is defined %}
163
+ exporter_port: {{ server.prometheus.exporter_port }}
164
+ {% else %}
165
+ # exporter_port: 7603
166
+ {% endif %}
167
+
168
+ # set up with which origins the server should allow CORS requests. The default
169
+ # is to allow all origins. If you want to restrict this, you can specify a list
170
+ # of origins here. Below are examples to allow requests from the Cotopaxi UI, and
171
+ # port 7600 on localhost. Usually, only the UI needs to access the server.
172
+ {% if server.cors_allowed_origins is defined %}
173
+ cors_allowed_origins:
174
+ {% for origin in server.cors_allowed_origins %}
175
+ - {{ origin }}
176
+ {% endfor %}
177
+ {% else %}
178
+ # cors_allowed_origins:
179
+ # - https://portal.cotopaxi.vantage6.ai
180
+ # - http://localhost:7600
181
+ {% endif %}
182
+
183
+ rabbitmq:
184
+ # The image of the RabbitMQ server
185
+ image:
186
+ {% if rabbitmq.image is defined %}
187
+ repository: {{ rabbitmq.image.repository | default('rabbitmq') }}
188
+ tag: {{ rabbitmq.image.tag | default('3-management') }}
189
+ {% else %}
190
+ repository: rabbitmq
191
+ tag: 3-management
192
+ {% endif %}
193
+
194
+ # The username of the RabbitMQ server
195
+ username: {{ rabbitmq.username | default('rabbitmquser') }}
196
+
197
+ # The password of the RabbitMQ server
198
+ password: {{ rabbitmq.password | default('rabbitmquserpassword') }}
199
+
200
+ # The vhost of the RabbitMQ server
201
+ vhost: {{ rabbitmq.vhost | default('/vantage6') }}
202
+
203
+ database:
204
+ # whether or not to use an external database
205
+ external: {{ database.external | default(false) }}
206
+ {% if database.external is defined and database.external %}
207
+ # the URI of the external database
208
+ uri: {{ database.uri | default('postgresql://vantage6:vantage6@localhost:5432/vantage6') }}
209
+ {% else %}
210
+ # The image of the database
211
+ image:
212
+ {% if database.image is defined %}
213
+ repository: {{ database.image.repository | default('postgres') }}
214
+ tag: {{ database.image.tag | default('13') }}
215
+ {% else %}
216
+ repository: postgres
217
+ tag: 13
218
+ {% endif %}
219
+
220
+ # The username of the database
221
+ username: {{ database.username | default('vantage6') }}
222
+
223
+ # The password of the database
224
+ password: {{ database.password | default('vantage6') }}
225
+
226
+ # The name of the database
227
+ name: {{ database.name | default('vantage6') }}
228
+
229
+ #hostpath of the database mount
230
+ volumePath: {{ database.volumePath }}
231
+
232
+ # The name of the k8s node where the database is running
233
+ k8sNodeName: {{ database.k8sNodeName }}
234
+ {% endif %}
235
+
31
236
  ui:
32
- enabled: true
33
- port: {{ ui_port }}
34
- {{ user_provided_config }}
237
+
238
+ # The image of the UI
239
+ image: {{ ui.image | default('harbor2.vantage6.ai/infrastructure/ui:latest') }}
240
+ # Service port for the UI
241
+ port: 7600
242
+ # keycloak realm
243
+ keycloakRealm: {{ ui.keycloakRealm | default('vantage6') }}
244
+ # keycloak client
245
+ keycloakClient: {{ ui.keycloakClient | default('public_client') }}
246
+ # keycloak public URL
247
+ keycloakPublicUrl: {{ ui.keycloakPublicUrl | default('http://localhost:8080') }}
248
+
249
+ # Allowed algorithm stores for Bearer token inclusion (comma-separated URLs)
250
+ # Use "*" to allow all stores (less secure) or specify specific URLs
251
+ # allowedAlgorithmStores: "http://localhost:7602 https://store.cotopaxi.vantage6.ai"
252
+ allowedAlgorithmStores: "{{ ui.allowedAlgorithmStores | default('*') }}"
253
+ # Community algorithm store URL.
254
+ communityStoreUrl: {{ ui.communityStoreUrl | default('https://store.cotopaxi.vantage6.ai') }}
255
+ # Community algorithm store API path
256
+ communityStoreApiPath: {{ ui.communityStoreApiPath | default('/api') }}
vantage6/cli/utils.py CHANGED
@@ -32,8 +32,6 @@ def check_config_name_allowed(name: str) -> None:
32
32
  f"Name '{name}' is not allowed. Please use only the following "
33
33
  "characters: a-zA-Z0-9_.-"
34
34
  )
35
- # FIXME: FM, 2023-01-03: I dont think this is a good side effect. This
36
- # should be handled by the caller.
37
35
  exit(1)
38
36
 
39
37