Commit b0767b9
committed
pants-plugins/uses_services: prepare to allow alternative st2cluster hosts/ports
In the uses_services plugin, I am now adding env var support
(in several PRs), but so far I've avoiding parsing conf files.
Plus, allowing reconfiguration of the st2cluster hosts/ports
would require the st2client and st2 dev cluster config to align.
Today, the st2cluster integration tests hardcode st2client's
base_url to `http://127.0.0.1`. Technically someone could override
the endpoint URLs with ST2_{AUTH,API,STREAM}_URL env vars, but
they would also need to make sure whatever cluster they use
has the examples pack and other things handled by `launchdev.sh`.
Today, the other alternative for using a different cluster would
be to forward the service ports to the localhost at the standard
ports.
For now, just use a separate host for each endpoint so it is
easier to support overriding via env vars and/or conf files
at some point in the future--if someone needs that. Until then,
we'll go with the minimal implementation that assumes the
default hosts and ports.1 parent 50c91cc commit b0767b9
File tree
2 files changed
+43
-12
lines changed- pants-plugins/uses_services
- scripts
2 files changed
+43
-12
lines changedLines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
56 | 79 | | |
57 | 80 | | |
58 | 81 | | |
| |||
113 | 136 | | |
114 | 137 | | |
115 | 138 | | |
116 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
117 | 144 | | |
118 | 145 | | |
119 | 146 | | |
| |||
0 commit comments