arcsecond 4.4.2__tar.gz → 4.4.4__tar.gz
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.
- {arcsecond-4.4.2 → arcsecond-4.4.4}/PKG-INFO +1 -1
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/composedoc.py +46 -1
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/docker/docker-compose.yml +44 -11
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/lifecycle.py +4 -1
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/local.py +2 -1
- {arcsecond-4.4.2 → arcsecond-4.4.4}/pyproject.toml +1 -1
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_composedoc.py +50 -1
- {arcsecond-4.4.2 → arcsecond-4.4.4}/uv.lock +1 -1
- {arcsecond-4.4.2 → arcsecond-4.4.4}/.docker/Dockerfile_postgres +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/.docker/Dockerfile_redis +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/.flake8 +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/.gitattributes +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/.github/dependabot.yml +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/.github/workflows/pythonpublish.yml +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/.github/workflows/tests.yml +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/.gitignore +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/LICENSE +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/Makefile +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/README.md +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/__version__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/alpaca/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/alpaca/commands.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/alpaca/dome_probe.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/alpaca/probe.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/alpaca/telescope_probe.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/api/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/api/config.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/api/constants.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/api/endpoint.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/api/main.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/api/resources.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cli.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/auth.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/resources.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/constants.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/context.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/context.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/errors.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/uploader.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/datafiles/utils.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/errors.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/logger.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/uploader.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/utils.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploader/walker.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/cloud/uploads.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/docgen.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/errors.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/backups.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/database.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/docker/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/doctor.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/network/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/network/guard.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/network/manifest.toml +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/network/outbound.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/network/probe.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/network/sheet.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/skybrightness.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/stack.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/token.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/hosting/utils.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/autostart.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/commands.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/detection.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/proxy.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/registry.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/runtime.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/sources/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/sources/base.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/sources/filewatch.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/sources/mdns.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/sources/network.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/sources/opencv.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/imagesources/store.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/options.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/arcsecond/targets.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/examples/example_upload_files.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/requirements.txt +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/setup.cfg +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/setup.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/sonar-project.properties +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/api/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/api/test_api.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/api/test_api_endpoint.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/api/test_config.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/api/test_config_pointer.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/api/test_targets.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/uploader/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/__init__.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_errors.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_full_process.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_init.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_prepare.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_upload.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/conftest.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/fixtures/docker-compose-6.2.yml +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/fixtures/docker-compose-6.4.yml +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/fixtures/file1.fits +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_alpaca_probe.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_cli.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_cli_api_commands.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_docgen.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_backups_install_dir.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_backups_restore.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_database.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_doctor.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_lifecycle.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_local.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_network_guard.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_network_manifest.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_network_outbound.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_network_probe.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_network_sheet.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_skybrightness.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_stack.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_token.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_hosting_utils_secret_key.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_imagesources_autostart.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_imagesources_commands.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_imagesources_detection.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_imagesources_mdns.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_imagesources_network.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_imagesources_proxy.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_imagesources_store.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_imagesources_webcam.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/test_targets_planning.py +0 -0
- {arcsecond-4.4.2 → arcsecond-4.4.4}/tests/utils.py +0 -0
|
@@ -34,6 +34,7 @@ from .local import (
|
|
|
34
34
|
MARKER_START = re.compile(r"^\s*# >>> arcsecond:(\S+)\s*$")
|
|
35
35
|
MARKER_END = re.compile(r"^\s*# <<< arcsecond:(\S+)\s*$")
|
|
36
36
|
ENV_REF = re.compile(r"\$\{([A-Z_][A-Z0-9_]*)(?::-[^}]*)?\}")
|
|
37
|
+
ENV_DEFAULT = re.compile(r"^\$\{[A-Z_][A-Z0-9_]*:-([^}]*)\}$")
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
@dataclass
|
|
@@ -50,6 +51,7 @@ class Service:
|
|
|
50
51
|
volumes: List[str] = field(default_factory=list)
|
|
51
52
|
healthcheck: bool = False
|
|
52
53
|
stop_grace_period: Optional[str] = None
|
|
54
|
+
logging: Optional[str] = None # e.g. "*default-logging", the shared anchor
|
|
53
55
|
env_vars: List[str] = field(default_factory=list)
|
|
54
56
|
optional: Optional[str] = None # the marker name, e.g. "alerts"
|
|
55
57
|
|
|
@@ -58,6 +60,12 @@ def _strip_comment(line: str) -> str:
|
|
|
58
60
|
return line.strip().lstrip("#").strip()
|
|
59
61
|
|
|
60
62
|
|
|
63
|
+
def _as_shipped(value: str) -> str:
|
|
64
|
+
"""A `${VAR:-default}` value as an installation that leaves VAR unset runs it."""
|
|
65
|
+
match = ENV_DEFAULT.match(value)
|
|
66
|
+
return match.group(1) if match else value
|
|
67
|
+
|
|
68
|
+
|
|
61
69
|
class _Reader:
|
|
62
70
|
"""Walks the template line by line, keeping the comments."""
|
|
63
71
|
|
|
@@ -132,9 +140,10 @@ class _Reader:
|
|
|
132
140
|
"restart": "restart",
|
|
133
141
|
"entrypoint": "entrypoint",
|
|
134
142
|
"stop_grace_period": "stop_grace_period",
|
|
143
|
+
"logging": "logging",
|
|
135
144
|
}
|
|
136
145
|
if key in scalar:
|
|
137
|
-
setattr(self.current, scalar[key], value)
|
|
146
|
+
setattr(self.current, scalar[key], _as_shipped(value))
|
|
138
147
|
elif key == "healthcheck":
|
|
139
148
|
self.current.healthcheck = True
|
|
140
149
|
elif key == "ports" and value.startswith("["):
|
|
@@ -222,6 +231,20 @@ ENV_KEYS: Dict[str, tuple] = {
|
|
|
222
231
|
"NASA GCN client credentials for the optional transient-alerts service. Empty until you paste yours.",
|
|
223
232
|
),
|
|
224
233
|
"GCN_CONSUMER_CLIENT_SECRET": (OPERATOR, "See GCN_CONSUMER_CLIENT_ID."),
|
|
234
|
+
"FINK_ENABLED": (
|
|
235
|
+
BACKEND,
|
|
236
|
+
"`false` turns off the survey alerts from Fink in the optional transient-alerts service; GCN keeps "
|
|
237
|
+
"running. Fink needs no credentials, so it is on wherever the service runs.",
|
|
238
|
+
),
|
|
239
|
+
"FINK_KAFKA_GROUP_ID": (
|
|
240
|
+
BACKEND,
|
|
241
|
+
"The installation's consumer group at Fink. Empty: `arcsecond-local-` and this machine's fingerprint, "
|
|
242
|
+
"which no other installation shares. Two installations sharing a group split the alerts between them.",
|
|
243
|
+
),
|
|
244
|
+
"FINK_TOPICS": (
|
|
245
|
+
BACKEND,
|
|
246
|
+
"Comma-separated Fink topics, each ending in its survey (`_ztf`). Empty: the topics Arcsecond chose.",
|
|
247
|
+
),
|
|
225
248
|
FRONTEND_HOST_ENV_KEY: (
|
|
226
249
|
OPERATOR,
|
|
227
250
|
"The address other computers reach the installation at, port included (e.g. 192.168.1.42:5555). The backend "
|
|
@@ -289,6 +312,28 @@ ENV_KEYS: Dict[str, tuple] = {
|
|
|
289
312
|
OPERATOR,
|
|
290
313
|
"How many jobs the data worker runs at once. Default 2; each can hold a few hundred MB.",
|
|
291
314
|
),
|
|
315
|
+
"ARCSECOND_API_IMAGE": (
|
|
316
|
+
OPERATOR,
|
|
317
|
+
"The image the backend, both workers, beat and the alerts consumer run instead of the published one: "
|
|
318
|
+
"one built from the backend's sources, e.g. `arcsecond-api:latest`. Empty: the published image. Set "
|
|
319
|
+
"ARCSECOND_API_PULL_POLICY to `never` with it, then `arcsecond restart`.",
|
|
320
|
+
),
|
|
321
|
+
"ARCSECOND_API_PULL_POLICY": (
|
|
322
|
+
OPERATOR,
|
|
323
|
+
"`never` when ARCSECOND_API_IMAGE names an image that exists on this machine only, so `arcsecond update` "
|
|
324
|
+
"and `arcsecond start --pull` leave it alone rather than fail to download it. Default `missing`.",
|
|
325
|
+
),
|
|
326
|
+
"ARCSECOND_WEB_IMAGE": (
|
|
327
|
+
OPERATOR,
|
|
328
|
+
"The image the web interface runs instead of the published one: one built from the webapp's sources, "
|
|
329
|
+
"e.g. `arcsecond-web:latest`. Empty: the published image. Set ARCSECOND_WEB_PULL_POLICY to `never` "
|
|
330
|
+
"with it, then `arcsecond restart web`.",
|
|
331
|
+
),
|
|
332
|
+
"ARCSECOND_WEB_PULL_POLICY": (
|
|
333
|
+
OPERATOR,
|
|
334
|
+
"`never` when ARCSECOND_WEB_IMAGE names an image that exists on this machine only, as "
|
|
335
|
+
"ARCSECOND_API_PULL_POLICY does for the backend's. Default `missing`.",
|
|
336
|
+
),
|
|
292
337
|
}
|
|
293
338
|
|
|
294
339
|
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# === Arcsecond.local config. ===
|
|
2
2
|
# *** DO NOT change any name or port number. ***
|
|
3
|
-
# Version 7.
|
|
3
|
+
# Version 7.7
|
|
4
|
+
|
|
5
|
+
# One log setting for every service, so no service can fill the disk with
|
|
6
|
+
# its log: five files of 20 MB each, the oldest dropped first. A full disk
|
|
7
|
+
# stops the database and the broker from saving, and the whole stack with them.
|
|
8
|
+
x-logging: &default-logging
|
|
9
|
+
driver: json-file
|
|
10
|
+
options:
|
|
11
|
+
max-size: "20m"
|
|
12
|
+
max-file: "5"
|
|
4
13
|
|
|
5
14
|
services:
|
|
6
15
|
# Database (PostgresQL)
|
|
@@ -8,6 +17,7 @@ services:
|
|
|
8
17
|
image: postgres:16
|
|
9
18
|
container_name: arcsecond-db
|
|
10
19
|
restart: unless-stopped
|
|
20
|
+
logging: *default-logging
|
|
11
21
|
# No host port. The backend reaches the DB over the internal Docker
|
|
12
22
|
# network (hostname `arcsecond-db`), and every CLI command that needs
|
|
13
23
|
# the DB (backups, restore, password rotation) goes through `docker exec`
|
|
@@ -24,14 +34,21 @@ services:
|
|
|
24
34
|
image: redis:7.4
|
|
25
35
|
container_name: arcsecond-broker
|
|
26
36
|
restart: unless-stopped
|
|
37
|
+
logging: *default-logging
|
|
27
38
|
# No host port either: Redis with no auth must never be reachable from
|
|
28
39
|
# outside the stack, and the backend reaches it over the Docker network.
|
|
29
40
|
|
|
30
41
|
# Arcsecond backend (REST APIs). Can be used for API calls and external pipelines, scripts etc.
|
|
31
42
|
backend:
|
|
32
|
-
image
|
|
43
|
+
# ARCSECOND_API_IMAGE swaps the published image for one built from the
|
|
44
|
+
# backend's sources, here and on every service below that runs it.
|
|
45
|
+
# ARCSECOND_API_PULL_POLICY=never goes with it: such an image exists on
|
|
46
|
+
# this machine only, and `arcsecond update` must not try to download it.
|
|
47
|
+
image: ${ARCSECOND_API_IMAGE:-ghcr.io/arcsecond-io/arcsecond-api:latest}
|
|
48
|
+
pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
|
|
33
49
|
container_name: arcsecond-api
|
|
34
50
|
restart: unless-stopped
|
|
51
|
+
logging: *default-logging
|
|
35
52
|
entrypoint: /home/app/entrypoint-server.sh
|
|
36
53
|
# This machine only. Browsers and other computers go through the webapp's
|
|
37
54
|
# port, which serves the very same API under /api/; 8800 is for the
|
|
@@ -72,9 +89,11 @@ services:
|
|
|
72
89
|
# Arcsecond worker, for offloading background work: the Control Room's
|
|
73
90
|
# exposures and procedures, and everything else someone is waiting on.
|
|
74
91
|
worker:
|
|
75
|
-
image: ghcr.io/arcsecond-io/arcsecond-api:latest
|
|
92
|
+
image: ${ARCSECOND_API_IMAGE:-ghcr.io/arcsecond-io/arcsecond-api:latest}
|
|
93
|
+
pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
|
|
76
94
|
container_name: arcsecond-worker
|
|
77
95
|
restart: unless-stopped
|
|
96
|
+
logging: *default-logging
|
|
78
97
|
entrypoint: /home/app/entrypoint-worker.sh
|
|
79
98
|
depends_on:
|
|
80
99
|
backend:
|
|
@@ -100,9 +119,11 @@ services:
|
|
|
100
119
|
# storages, database backups, keograms, catalogue refreshes. On its own
|
|
101
120
|
# queue, so a long zip can never hold up a frame the observer is waiting for.
|
|
102
121
|
dataworker:
|
|
103
|
-
image: ghcr.io/arcsecond-io/arcsecond-api:latest
|
|
122
|
+
image: ${ARCSECOND_API_IMAGE:-ghcr.io/arcsecond-io/arcsecond-api:latest}
|
|
123
|
+
pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
|
|
104
124
|
container_name: arcsecond-dataworker
|
|
105
125
|
restart: unless-stopped
|
|
126
|
+
logging: *default-logging
|
|
106
127
|
entrypoint: /home/app/entrypoint-worker.sh
|
|
107
128
|
depends_on:
|
|
108
129
|
backend:
|
|
@@ -126,9 +147,11 @@ services:
|
|
|
126
147
|
|
|
127
148
|
# Arcsecond beat, to launch specific background tasks at specific times.
|
|
128
149
|
beat:
|
|
129
|
-
image: ghcr.io/arcsecond-io/arcsecond-api:latest
|
|
150
|
+
image: ${ARCSECOND_API_IMAGE:-ghcr.io/arcsecond-io/arcsecond-api:latest}
|
|
151
|
+
pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
|
|
130
152
|
container_name: arcsecond-beat
|
|
131
153
|
restart: unless-stopped
|
|
154
|
+
logging: *default-logging
|
|
132
155
|
entrypoint: /home/app/entrypoint-beat.sh
|
|
133
156
|
depends_on:
|
|
134
157
|
backend:
|
|
@@ -142,6 +165,7 @@ services:
|
|
|
142
165
|
image: ghcr.io/arcsecond-io/arcsecond-service-platesolver-astrometry:latest
|
|
143
166
|
container_name: arcsecond-platesolver
|
|
144
167
|
restart: unless-stopped
|
|
168
|
+
logging: *default-logging
|
|
145
169
|
# No host port. Only the backend calls the solver, over the internal Docker
|
|
146
170
|
# network; it has no authentication and nothing outside the stack needs it.
|
|
147
171
|
|
|
@@ -149,9 +173,13 @@ services:
|
|
|
149
173
|
# organisation-based and therefore always a portal, so the second port that
|
|
150
174
|
# used to be here (5577) served the very same app.
|
|
151
175
|
web:
|
|
152
|
-
|
|
176
|
+
# ARCSECOND_WEB_IMAGE and ARCSECOND_WEB_PULL_POLICY: the same as the
|
|
177
|
+
# backend's pair above, for an image built from the webapp's sources.
|
|
178
|
+
image: ${ARCSECOND_WEB_IMAGE:-ghcr.io/arcsecond-io/arcsecond-web:latest}
|
|
179
|
+
pull_policy: ${ARCSECOND_WEB_PULL_POLICY:-missing}
|
|
153
180
|
container_name: arcsecond-web
|
|
154
181
|
restart: unless-stopped
|
|
182
|
+
logging: *default-logging
|
|
155
183
|
depends_on:
|
|
156
184
|
backend:
|
|
157
185
|
condition: service_started
|
|
@@ -177,15 +205,20 @@ services:
|
|
|
177
205
|
|
|
178
206
|
# >>> arcsecond:alerts
|
|
179
207
|
# Arcsecond transient-alerts consumer (optional).
|
|
180
|
-
# Long-lived Kafka
|
|
181
|
-
# auth.gcn.nasa.gov on 443, then kafka, kafka1, kafka2
|
|
182
|
-
# kafka3.gcn.nasa.gov on 9092. Requires GCN_CONSUMER_CLIENT_ID /
|
|
183
|
-
# GCN_CONSUMER_CLIENT_SECRET in .env; idles harmlessly
|
|
208
|
+
# Long-lived Kafka clients, outbound only — nothing listens.
|
|
209
|
+
# NASA GCN, over TLS: auth.gcn.nasa.gov on 443, then kafka, kafka1, kafka2
|
|
210
|
+
# and kafka3.gcn.nasa.gov on 9092. Requires GCN_CONSUMER_CLIENT_ID /
|
|
211
|
+
# GCN_CONSUMER_CLIENT_SECRET in .env; idles harmlessly without them.
|
|
212
|
+
# Fink survey alerts, unencrypted (public data): kafka-ztf.fink-broker.org
|
|
213
|
+
# and the brokers it hands out, all on 24499. Needs nothing in .env;
|
|
214
|
+
# FINK_ENABLED=false turns it off.
|
|
184
215
|
# Single instance only — do not scale it.
|
|
185
216
|
alerts:
|
|
186
|
-
image: ghcr.io/arcsecond-io/arcsecond-api:latest
|
|
217
|
+
image: ${ARCSECOND_API_IMAGE:-ghcr.io/arcsecond-io/arcsecond-api:latest}
|
|
218
|
+
pull_policy: ${ARCSECOND_API_PULL_POLICY:-missing}
|
|
187
219
|
container_name: arcsecond-alerts
|
|
188
220
|
restart: unless-stopped
|
|
221
|
+
logging: *default-logging
|
|
189
222
|
entrypoint: /home/app/entrypoint-alerts.sh
|
|
190
223
|
depends_on:
|
|
191
224
|
backend:
|
|
@@ -272,7 +272,10 @@ def status(directory):
|
|
|
272
272
|
@basic_options
|
|
273
273
|
def logs(directory, service, follow, tail):
|
|
274
274
|
"""Show recent logs. Services are named as in `arcsecond status`:
|
|
275
|
-
backend, worker, dataworker, beat, web, db, broker, platesolver, alerts.
|
|
275
|
+
backend, worker, dataworker, beat, web, db, broker, platesolver, alerts.
|
|
276
|
+
|
|
277
|
+
Each service keeps the last 100 MB of its log, so a busy one cannot fill
|
|
278
|
+
the disk; older lines are dropped."""
|
|
276
279
|
install = stack.resolve_install_dir(directory)
|
|
277
280
|
stack.ensure_docker()
|
|
278
281
|
args = ["logs", "--tail", str(tail)]
|
|
@@ -605,7 +605,8 @@ def setup(with_alerts, lan_host, with_sky_map):
|
|
|
605
605
|
"\nTransient alerts next steps: create GCN credentials (see "
|
|
606
606
|
"https://docs.arcsecond.io/guides/operating/transient-alerts), paste them into "
|
|
607
607
|
".env as GCN_CONSUMER_CLIENT_ID / GCN_CONSUMER_CLIENT_SECRET, then "
|
|
608
|
-
"run: arcsecond restart alerts"
|
|
608
|
+
"run: arcsecond restart alerts. Survey alerts from Fink need nothing: "
|
|
609
|
+
"they start with the service."
|
|
609
610
|
)
|
|
610
611
|
|
|
611
612
|
click.echo("\nNext: " + click.style("arcsecond start", bold=True))
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"""The services and environment reference, read from the packaged template."""
|
|
2
2
|
|
|
3
|
+
import re
|
|
4
|
+
|
|
3
5
|
from click.testing import CliRunner
|
|
4
6
|
|
|
5
7
|
from arcsecond import cli
|
|
6
|
-
from arcsecond.hosting import composedoc, local
|
|
8
|
+
from arcsecond.hosting import composedoc, lifecycle, local
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
def _services():
|
|
@@ -44,6 +46,28 @@ def test_facts_are_read_where_the_template_states_them():
|
|
|
44
46
|
assert any("/data" in v for v in s["backend"].volumes)
|
|
45
47
|
|
|
46
48
|
|
|
49
|
+
def test_every_service_keeps_a_capped_log():
|
|
50
|
+
"""One shared setting, so no service can fill the disk with its log; a
|
|
51
|
+
service added without it fails here."""
|
|
52
|
+
text = local.packaged_compose_text()
|
|
53
|
+
assert (
|
|
54
|
+
"x-logging: &default-logging\n"
|
|
55
|
+
" driver: json-file\n"
|
|
56
|
+
" options:\n"
|
|
57
|
+
' max-size: "20m"\n'
|
|
58
|
+
' max-file: "5"\n'
|
|
59
|
+
) in text
|
|
60
|
+
for service in composedoc.parse_services(text):
|
|
61
|
+
assert service.logging == "*default-logging", service.name
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def test_the_logs_help_states_the_cap_the_template_sets():
|
|
65
|
+
text = local.packaged_compose_text()
|
|
66
|
+
size = int(re.search(r'max-size: "(\d+)m"', text).group(1))
|
|
67
|
+
files = int(re.search(r'max-file: "(\d+)"', text).group(1))
|
|
68
|
+
assert f"last {size * files} MB" in lifecycle.logs.help
|
|
69
|
+
|
|
70
|
+
|
|
47
71
|
def test_the_comments_are_kept_as_documentation():
|
|
48
72
|
s = _services()
|
|
49
73
|
assert s["db"].description == ["Database (PostgresQL)"]
|
|
@@ -56,6 +80,31 @@ def test_optional_services_are_recognised_by_their_markers():
|
|
|
56
80
|
assert s["alerts"].optional == "alerts"
|
|
57
81
|
assert s["web"].optional is None
|
|
58
82
|
assert "GCN_CONSUMER_CLIENT_ID" in " ".join(s["alerts"].description)
|
|
83
|
+
assert "FINK_ENABLED" in " ".join(s["alerts"].description)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def test_every_service_on_the_backend_image_can_be_given_a_local_build():
|
|
87
|
+
s = _services()
|
|
88
|
+
api = [name for name, service in s.items() if "arcsecond-api" in service.image]
|
|
89
|
+
assert api == ["backend", "worker", "dataworker", "beat", "alerts"]
|
|
90
|
+
for name in api:
|
|
91
|
+
assert "ARCSECOND_API_IMAGE" in s[name].env_vars, name
|
|
92
|
+
assert "ARCSECOND_API_PULL_POLICY" in s[name].env_vars, name
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def test_the_web_interface_can_be_given_a_local_build():
|
|
96
|
+
web = _services()["web"]
|
|
97
|
+
assert (
|
|
98
|
+
web.image == "ghcr.io/arcsecond-io/arcsecond-web:latest"
|
|
99
|
+
) # what an unset key runs
|
|
100
|
+
assert "ARCSECOND_WEB_IMAGE" in web.env_vars
|
|
101
|
+
assert "ARCSECOND_WEB_PULL_POLICY" in web.env_vars
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def test_every_key_the_template_reads_is_documented():
|
|
105
|
+
for service in composedoc.parse_services(local.packaged_compose_text()):
|
|
106
|
+
for key in service.env_vars:
|
|
107
|
+
assert key in composedoc.ENV_KEYS, (service.name, key)
|
|
59
108
|
|
|
60
109
|
|
|
61
110
|
def test_every_key_setup_writes_is_documented():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arcsecond-4.4.2 → arcsecond-4.4.4}/tests/cloud/uploader/datafiles/test_uploader_full_process.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|