wos-deploy 2.2.0__tar.gz → 2.3.0__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.
- {wos_deploy-2.2.0/src/wos_deploy.egg-info → wos_deploy-2.3.0}/PKG-INFO +1 -1
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/pyproject.toml +1 -1
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/__init__.py +1 -1
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/README.md +27 -1
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/private/100_rfq_setup_addon.py +22 -3
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/wos-deploy.py +69 -2
- {wos_deploy-2.2.0 → wos_deploy-2.3.0/src/wos_deploy.egg-info}/PKG-INFO +1 -1
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/LICENSE +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/README.md +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/setup.cfg +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/cli.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/docker-compose.rfq-feeder-primary.yml +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/docker-compose.rfq-feeder-secondary.yml +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/docker-compose.rfq.yml +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/docker-compose.secondary.yml +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/docker-compose.yml +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/__init__.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/__init__.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/common/__init__.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/common/setup_database.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/common/setup_executable_hosts.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/common/setup_namespace.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/common/ssh_self_trust.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/global/010_core_setup_namespace.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/global/020_core_setup_master.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/global/021_setup_database.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/global/042_setup_global_ctp.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/global/099_core_setup_runtime_scripts.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/global/__init__.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/private/010_core_setup_namespace.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/private/021_setup_database.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/private/030_core_setup_gateway.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/private/040_core_setup_executable_hosts.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/private/099_core_setup_runtime_scripts.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/private/__init__.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/run_function.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/utils.py +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/init/chown.sh +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/init/postinit.sh +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/init/preinit.sh +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/templates/setup_database.yml.template +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/templates/setup_gateway.yml.template +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/templates/setup_global_ctp.yml.template +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy.egg-info/SOURCES.txt +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy.egg-info/dependency_links.txt +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy.egg-info/entry_points.txt +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy.egg-info/top_level.txt +0 -0
- {wos_deploy-2.2.0 → wos_deploy-2.3.0}/tests/test_wos_deploy.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wos-deploy
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Deploy and operate WOS server instances (ring, global, tick-quote add-on) with Docker Compose on published images
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Keywords: wos,deployment,docker,docker-compose
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "wos-deploy"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.3.0"
|
|
8
8
|
description = "Deploy and operate WOS server instances (ring, global, tick-quote add-on) with Docker Compose on published images"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -281,13 +281,39 @@ rendered there into a 0600 ini; never in `.env`, the compose config or a log. `w
|
|
|
281
281
|
shows the two endpoint addresses and prints everything else as `***`. Re-running
|
|
282
282
|
`setup-rfq` re-renders everything and keeps stored inputs unless re-entered.
|
|
283
283
|
|
|
284
|
+
**What the feeder captures, and how it follows a roll.** Two inputs decide the set:
|
|
285
|
+
|
|
286
|
+
- the **markets** are those the full ring's web API lists for the client uuid
|
|
287
|
+
(`--dirac-client-uuid`: the markets whose `dirac` is that uuid);
|
|
288
|
+
- the **commodities** of those markets are `--commodities` (`WOS_RFQ_COMMODITIES`): a comma list of
|
|
289
|
+
`MARKET:commodity` entries, `MARKET:*` for every commodity of a market, or `*` (the default) for
|
|
290
|
+
every commodity that has a `<00>` mapping. An entry the market list does not hold stops the
|
|
291
|
+
feeder at start with one `FATAL` line.
|
|
292
|
+
|
|
293
|
+
| Setting (flag / variable) | Default | Meaning |
|
|
294
|
+
|---|---|---|
|
|
295
|
+
| `--subscribe` / `WOS_RFQ_SUBSCRIBE` | `all` | `all`: every listed (unexpired) contract of each captured commodity, so a roll never loses data; `main`: only the `<00>` main, plus the previous main through the trade day of a roll (`roll <market> <commodity>: <old> -> <new>` is logged once) |
|
|
296
|
+
| `--roll-source` / `WOS_RFQ_ROLL_SOURCE` | `metadata` | the main contract is the web API's `<commodity><00>` → `real_contract_code`, the ring's own mapping, so the add-on's main never deviates from the ring's. `open_interest` is reserved (refused) |
|
|
297
|
+
| `--commodities` / `WOS_RFQ_COMMODITIES` | `*` | see above |
|
|
298
|
+
| `--market-fails` / `WOS_RFQ_MARKET_FAILS` | `6` | consecutive market-list failures, with no list held, before the feeder exits non-zero |
|
|
299
|
+
|
|
300
|
+
The settings are kept in `./rfq-ctp.env` with the inputs above (they are not secret; `wos-deploy
|
|
301
|
+
config` shows them). The feeder keeps its last good market list in `rfq_markets.json` in its work
|
|
302
|
+
directory (`volumes/data-secondary/rfq-ctp/`, or `volumes/data/rfq/ctp/` on the primary) and uses it
|
|
303
|
+
at start when the web API fails (`market list from cache (age …)`). A failing market list is retried
|
|
304
|
+
with back-off (15 s, 30 s, 60 s … 5 min), each attempt logged with its count; a rejected token
|
|
305
|
+
(`Invalid token or token expired`) makes it log in again with its own account. With no list and no
|
|
306
|
+
cache it exits after `WOS_RFQ_MARKET_FAILS` attempts (about 8 minutes at the default).
|
|
307
|
+
**The market account must be used by this feeder only:** one account admits one session, and any
|
|
308
|
+
other login of it (a person, another feeder) evicts the feeder's.
|
|
309
|
+
|
|
284
310
|
What the developer must bring (the tool cannot provide it):
|
|
285
311
|
|
|
286
312
|
| Needed | Without it |
|
|
287
313
|
|---|---|
|
|
288
314
|
| an image tag carrying `WOS_ROLE=rfq` | `setup-rfq: <image> has no WOS_ROLE=rfq start role ...` and nothing is initialised |
|
|
289
315
|
| (realtime) a CTP account: broker id, investor id, password, a market-data front | front unreachable: `[wos-rfq] ERROR: CTP front ... is NOT reachable`, then `ERROR: no CTP login after 60 s and no answer from the front`; refused login: `ERROR: CTP login REFUSED ... OnRspUserLogin <code> (<msg>)` |
|
|
290
|
-
| (realtime) an account + a client uuid on a full ring's web API (the market list) | the feeder log shows `
|
|
316
|
+
| (realtime) an account + a client uuid on a full ring's web API (the market list), used by nothing else | the feeder log shows `market list fetch failed (attempt N …)` with back-off; with no cached list it exits after `WOS_RFQ_MARKET_FAILS` attempts with one `FATAL` line |
|
|
291
317
|
| (realtime) an x64 host, or amd64 emulation on arm64 | the feeder binary exists only in the amd64 image |
|
|
292
318
|
| (realtime) an image whose feeder reconnects to a restarted master | after `wos-deploy restart wos-primary` an older feeder stays disconnected: restart `wos-secondary` too (the tool warns) |
|
|
293
319
|
|
|
@@ -85,9 +85,9 @@ fi
|
|
|
85
85
|
mkdir -p "$INI_DIR" "$WORK"
|
|
86
86
|
chown wolverine:wolverine "$INI_DIR" "$WORK" 2>/dev/null || true
|
|
87
87
|
chmod 700 "$INI_DIR"
|
|
88
|
-
{PY} - "$SECRETS" "$INI" "$MASTER_HOST" "$MASTER_PORT" "$FEEDER_LOG" <<'PYEOF' || {{ log "ERROR: the feeder ini could not be rendered (see the line above) - the realtime feeder is NOT started"; exit 0; }}
|
|
88
|
+
{PY} - "$SECRETS" "$INI" "$MASTER_HOST" "$MASTER_PORT" "$FEEDER_LOG" "$WORK" <<'PYEOF' || {{ log "ERROR: the feeder ini could not be rendered (see the line above) - the realtime feeder is NOT started"; exit 0; }}
|
|
89
89
|
import configparser, os, socket, sys
|
|
90
|
-
src, dst, mhost, mport, flog = sys.argv[1:
|
|
90
|
+
src, dst, mhost, mport, flog, work = sys.argv[1:7]
|
|
91
91
|
vals = {{}}
|
|
92
92
|
for raw in open(src, encoding="utf-8"):
|
|
93
93
|
line = raw.rstrip("\\n")
|
|
@@ -108,6 +108,24 @@ ini["dirac_client"] = {{"uuid": vals["WOS_RFQ_DIRAC_CLIENT_UUID"]}}
|
|
|
108
108
|
ini["slave"] = {{"ip": mhost, "port": mport, "namespace": "1"}}
|
|
109
109
|
ini["ctp"] = {{"broker_id": vals["WOS_RFQ_CTP_BROKER_ID"], "user_id": vals["WOS_RFQ_CTP_INVESTOR_ID"],
|
|
110
110
|
"password": vals["WOS_RFQ_CTP_PASSWORD"], "front_end": vals["WOS_RFQ_CTP_FRONT_END"]}}
|
|
111
|
+
# The capture settings (not secret; defaults when the secrets file predates them):
|
|
112
|
+
# subscribe all = every listed contract of each captured commodity, so a roll never loses data
|
|
113
|
+
# main = the <00> main only, plus the previous main through the trade day of a roll
|
|
114
|
+
# roll_source metadata = the main is the web API's <commodity><00> -> real_contract_code, i.e. the
|
|
115
|
+
# ring's own mapping, so the stored main never deviates from the ring's (open_interest is
|
|
116
|
+
# reserved: the feeder refuses it)
|
|
117
|
+
# commodities MARKET:commodity,... | MARKET:* | * -- WHICH commodities; the MARKETS are those the web API
|
|
118
|
+
# lists for [dirac_client] uuid. An entry the list does not hold stops the feeder at start.
|
|
119
|
+
# market_fails consecutive market-list failures with no list held (no web answer, no cache) before the
|
|
120
|
+
# feeder exits non-zero; retries back off 15 s, 30 s, 60 s ... 5 min
|
|
121
|
+
# market_cache the last good market list, used at start when the web API fails (kept on the bind mount)
|
|
122
|
+
# The market account ([web_service]) must be used by this feeder ONLY: one account admits one session and
|
|
123
|
+
# a later login (a person, another feeder) evicts this one; the feeder then re-logs in with back-off.
|
|
124
|
+
ini["rfq"] = {{"subscribe": vals.get("WOS_RFQ_SUBSCRIBE") or "all",
|
|
125
|
+
"roll_source": vals.get("WOS_RFQ_ROLL_SOURCE") or "metadata",
|
|
126
|
+
"commodities": vals.get("WOS_RFQ_COMMODITIES") or "*",
|
|
127
|
+
"market_fails": vals.get("WOS_RFQ_MARKET_FAILS") or "6",
|
|
128
|
+
"market_cache": work + "/rfq_markets.json"}}
|
|
111
129
|
ini["logger"] = {{"log_file_path": flog}}
|
|
112
130
|
old = os.umask(0o077)
|
|
113
131
|
with open(dst, "w", encoding="utf-8") as handle:
|
|
@@ -115,7 +133,8 @@ with open(dst, "w", encoding="utf-8") as handle:
|
|
|
115
133
|
os.umask(old)
|
|
116
134
|
os.chmod(dst, 0o600)
|
|
117
135
|
shown_keys = {{("web_service", "url"), ("ctp", "front_end"), ("slave", "ip"), ("slave", "port"),
|
|
118
|
-
("slave", "namespace"), ("logger", "log_file_path")
|
|
136
|
+
("slave", "namespace"), ("logger", "log_file_path"), ("rfq", "subscribe"), ("rfq", "roll_source"),
|
|
137
|
+
("rfq", "commodities"), ("rfq", "market_fails"), ("rfq", "market_cache")}}
|
|
119
138
|
for sec in ini.sections():
|
|
120
139
|
for key, value in ini[sec].items():
|
|
121
140
|
shown = value if (sec, key) in shown_keys else "***"
|
|
@@ -24,7 +24,7 @@ from typing import Dict, Optional
|
|
|
24
24
|
|
|
25
25
|
# Kept equal to wos-deploy-pkg's version (pyproject.toml, wos_deploy/__init__.py);
|
|
26
26
|
# wos-deploy-pkg/build.sh refuses to build when they differ.
|
|
27
|
-
WOS_DEPLOY_VERSION = "2.
|
|
27
|
+
WOS_DEPLOY_VERSION = "2.3.0"
|
|
28
28
|
|
|
29
29
|
DEFAULT_ENV = "prod"
|
|
30
30
|
DEFAULT_PORT_OFFSET = 3
|
|
@@ -131,6 +131,54 @@ RFQ_CTP_INPUTS = (
|
|
|
131
131
|
("WOS_RFQ_MARKET_PASSWORD", None, "market-list web API password", True),
|
|
132
132
|
("WOS_RFQ_DIRAC_CLIENT_UUID", "dirac_client_uuid", "client uuid the feeder identifies with on that ring", False),
|
|
133
133
|
)
|
|
134
|
+
# (key, flag, default, help) -- the feeder's non-secret capture settings. Stored in the same
|
|
135
|
+
# RFQ_SECRETS_FILE (the one file the feeder launcher reads) and shown in clear by `config`.
|
|
136
|
+
RFQ_FEEDER_SETTINGS = (
|
|
137
|
+
("WOS_RFQ_SUBSCRIBE", "rfq_subscribe", "all",
|
|
138
|
+
"capture scope: all = every listed contract of each captured commodity (a roll never loses data); "
|
|
139
|
+
"main = only the <00> main, plus the previous main through the trade day of a roll"),
|
|
140
|
+
("WOS_RFQ_ROLL_SOURCE", "rfq_roll_source", "metadata",
|
|
141
|
+
"which contract is the main: metadata = the web API's <commodity><00> -> real_contract_code, the "
|
|
142
|
+
"ring's own mapping (open_interest is reserved; the feeder refuses it)"),
|
|
143
|
+
("WOS_RFQ_COMMODITIES", "rfq_commodities", "*",
|
|
144
|
+
"the commodities captured: MARKET:commodity,...; MARKET:* = every commodity of a market; * = every "
|
|
145
|
+
"commodity (with a <00>) of every market the web API serves for the client uuid"),
|
|
146
|
+
("WOS_RFQ_MARKET_FAILS", "rfq_market_fails", "6",
|
|
147
|
+
"consecutive market-list failures, with no list held (neither a web answer nor the on-disk cache), "
|
|
148
|
+
"after which the feeder exits non-zero (retries back off 15 s, 30 s, ... 5 min: 6 = ~8 min)"),
|
|
149
|
+
)
|
|
150
|
+
RFQ_COMMODITY_ENTRY = re.compile(r"^[A-Za-z0-9_]+:([A-Za-z0-9_]+|\*)$")
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
def resolve_rfq_feeder_settings(args: argparse.Namespace, existing: Dict[str, str]) -> Dict[str, str]:
|
|
154
|
+
"""flag > environment > the existing secrets file > the default; validated here so a bad value
|
|
155
|
+
stops setup-rfq instead of the feeder."""
|
|
156
|
+
values: Dict[str, str] = {}
|
|
157
|
+
for key, flag, default, _ in RFQ_FEEDER_SETTINGS:
|
|
158
|
+
value = getattr(args, flag, None) or os.environ.get(key) or existing.get(key) or default
|
|
159
|
+
values[key] = str(value).strip()
|
|
160
|
+
if values["WOS_RFQ_SUBSCRIBE"] not in ("all", "main"):
|
|
161
|
+
raise SystemExit(f"WOS_RFQ_SUBSCRIBE must be all or main, got {values['WOS_RFQ_SUBSCRIBE']!r}")
|
|
162
|
+
if values["WOS_RFQ_ROLL_SOURCE"] == "open_interest":
|
|
163
|
+
raise SystemExit("WOS_RFQ_ROLL_SOURCE=open_interest is reserved: the feeder follows the ring's <00> "
|
|
164
|
+
"mapping only (metadata), so the stored main never deviates from the ring's. The "
|
|
165
|
+
"open-interest main is a client-side reading of the stored ticks.")
|
|
166
|
+
if values["WOS_RFQ_ROLL_SOURCE"] != "metadata":
|
|
167
|
+
raise SystemExit(f"WOS_RFQ_ROLL_SOURCE must be metadata, got {values['WOS_RFQ_ROLL_SOURCE']!r}")
|
|
168
|
+
if not values["WOS_RFQ_MARKET_FAILS"].isdigit() or int(values["WOS_RFQ_MARKET_FAILS"]) < 1:
|
|
169
|
+
raise SystemExit(f"WOS_RFQ_MARKET_FAILS must be a positive integer, got {values['WOS_RFQ_MARKET_FAILS']!r}")
|
|
170
|
+
entries = [e.strip() for e in re.split(r"[,\s]+", values["WOS_RFQ_COMMODITIES"]) if e.strip()]
|
|
171
|
+
if not entries or "*" in entries:
|
|
172
|
+
values["WOS_RFQ_COMMODITIES"] = "*"
|
|
173
|
+
else:
|
|
174
|
+
bad = [e for e in entries if not RFQ_COMMODITY_ENTRY.match(e)]
|
|
175
|
+
if bad:
|
|
176
|
+
raise SystemExit("WOS_RFQ_COMMODITIES entries must be MARKET:commodity, MARKET:* or *; got "
|
|
177
|
+
+ ", ".join(repr(b) for b in bad))
|
|
178
|
+
values["WOS_RFQ_COMMODITIES"] = ",".join(entries)
|
|
179
|
+
return values
|
|
180
|
+
|
|
181
|
+
|
|
134
182
|
class Colors:
|
|
135
183
|
RED = "\033[91m"
|
|
136
184
|
GREEN = "\033[92m"
|
|
@@ -551,6 +599,7 @@ class WOSDeployment:
|
|
|
551
599
|
if '"' in values[key] or "\\" in values[key] or "\n" in values[key]:
|
|
552
600
|
raise SystemExit(f"{key} contains a quote, a backslash or a newline, which the feeder "
|
|
553
601
|
"cannot pass through (it writes the value into a JSON login body / an ini)")
|
|
602
|
+
values.update(resolve_rfq_feeder_settings(args, existing))
|
|
554
603
|
kept = [k for k, _, _, _ in RFQ_CTP_INPUTS if existing.get(k) and existing.get(k) == values[k]]
|
|
555
604
|
if kept:
|
|
556
605
|
self.logger.info(f"setup-rfq: kept from {RFQ_SECRETS_FILE}: {', '.join(kept)}")
|
|
@@ -566,6 +615,12 @@ class WOSDeployment:
|
|
|
566
615
|
handle.write("# The tick-quote add-on's realtime inputs (wos-deploy setup-rfq). Mode 0600; never commit or share.\n")
|
|
567
616
|
for key, _, _, _ in RFQ_CTP_INPUTS:
|
|
568
617
|
handle.write(f"{key}={values[key]}\n")
|
|
618
|
+
handle.write("# The feeder's capture settings (not secret). The market account above must be used by\n"
|
|
619
|
+
"# this feeder ONLY: one account admits one session, a later login (a person, another\n"
|
|
620
|
+
"# feeder) evicts this one -- the feeder then re-logs in with back-off, and with no\n"
|
|
621
|
+
"# market list and no cache it exits after WOS_RFQ_MARKET_FAILS failures.\n")
|
|
622
|
+
for key, _, default, _ in RFQ_FEEDER_SETTINGS:
|
|
623
|
+
handle.write(f"{key}={values.get(key, default)}\n")
|
|
569
624
|
os.chmod(tmp, 0o600)
|
|
570
625
|
os.replace(tmp, path)
|
|
571
626
|
self.logger.info(f"setup-rfq: wrote {path.name} (mode 0600)")
|
|
@@ -1158,6 +1213,9 @@ class WOSDeployment:
|
|
|
1158
1213
|
if key in inputs:
|
|
1159
1214
|
shown = inputs[key] if key in RFQ_SHOWN_INPUTS or not inputs[key] else "***"
|
|
1160
1215
|
self.logger.info(f"{key}={shown}")
|
|
1216
|
+
if inputs:
|
|
1217
|
+
for key, _, default, _ in RFQ_FEEDER_SETTINGS:
|
|
1218
|
+
self.logger.info(f"{key}={inputs.get(key) or default}")
|
|
1161
1219
|
|
|
1162
1220
|
def confirm_setup(self, namespace: str, env_vars: Dict[str, str],
|
|
1163
1221
|
rfq_inputs: Optional[Dict[str, str]] = None) -> None:
|
|
@@ -1839,7 +1897,16 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
1839
1897
|
rfq.add_argument("--market-account", dest="market_account",
|
|
1840
1898
|
help="account on that web API [WOS_RFQ_MARKET_ACCOUNT]; password: [WOS_RFQ_MARKET_PASSWORD] or prompt")
|
|
1841
1899
|
rfq.add_argument("--dirac-client-uuid", dest="dirac_client_uuid",
|
|
1842
|
-
help="client uuid the feeder identifies with on that ring [WOS_RFQ_DIRAC_CLIENT_UUID]"
|
|
1900
|
+
help="client uuid the feeder identifies with on that ring [WOS_RFQ_DIRAC_CLIENT_UUID]; "
|
|
1901
|
+
"it selects the MARKETS: the web API lists the markets whose dirac is this uuid")
|
|
1902
|
+
rfq.add_argument("--subscribe", dest="rfq_subscribe", choices=["all", "main"],
|
|
1903
|
+
help="capture scope (default all) [WOS_RFQ_SUBSCRIBE]: " + RFQ_FEEDER_SETTINGS[0][3])
|
|
1904
|
+
rfq.add_argument("--roll-source", dest="rfq_roll_source", choices=["metadata", "open_interest"],
|
|
1905
|
+
help="main-contract source (default metadata) [WOS_RFQ_ROLL_SOURCE]: " + RFQ_FEEDER_SETTINGS[1][3])
|
|
1906
|
+
rfq.add_argument("--commodities", dest="rfq_commodities", metavar="LIST",
|
|
1907
|
+
help="commodities captured (default *) [WOS_RFQ_COMMODITIES]: " + RFQ_FEEDER_SETTINGS[2][3])
|
|
1908
|
+
rfq.add_argument("--market-fails", dest="rfq_market_fails", metavar="N",
|
|
1909
|
+
help="(default 6) [WOS_RFQ_MARKET_FAILS]: " + RFQ_FEEDER_SETTINGS[3][3])
|
|
1843
1910
|
|
|
1844
1911
|
deploy = subparsers.add_parser("deploy", help="Start services")
|
|
1845
1912
|
deploy.add_argument("--skip-pull", action="store_true")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wos-deploy
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Deploy and operate WOS server instances (ring, global, tick-quote add-on) with Docker Compose on published images
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Keywords: wos,deployment,docker,docker-compose
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/docker-compose.rfq-feeder-primary.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/__init__.py
RENAMED
|
File without changes
|
{wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/common/__init__.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
|
{wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/global/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/private/__init__.py
RENAMED
|
File without changes
|
{wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/scripts/functions/run_function.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/templates/setup_database.yml.template
RENAMED
|
File without changes
|
{wos_deploy-2.2.0 → wos_deploy-2.3.0}/src/wos_deploy/templates/templates/setup_gateway.yml.template
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|