xpk 1.0.0__py3-none-any.whl → 1.1.1__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.
- xpk/commands/cluster.py +29 -30
- xpk/commands/cluster_gcluster.py +19 -14
- xpk/commands/cluster_test.py +1 -21
- xpk/commands/common.py +39 -6
- xpk/commands/common_test.py +170 -0
- xpk/commands/info.py +9 -5
- xpk/commands/inspector.py +33 -4
- xpk/commands/inspector_test.py +142 -0
- xpk/commands/workload.py +35 -17
- xpk/commands/workload_test.py +70 -3
- xpk/core/blueprint/blueprint_generator.py +19 -8
- xpk/core/blueprint/testing/data/a3_ultra.yaml +3 -1
- xpk/core/blueprint/testing/data/a4.yaml +3 -1
- xpk/core/capacity.py +37 -17
- xpk/core/capacity_test.py +66 -1
- xpk/core/cluster.py +10 -10
- xpk/core/cluster_private.py +3 -3
- xpk/core/cluster_test.py +29 -2
- xpk/core/docker_container.py +55 -30
- xpk/core/docker_manager.py +4 -4
- xpk/core/docker_resources.py +4 -1
- xpk/core/kueue_manager.py +6 -8
- xpk/core/kueue_manager_test.py +4 -5
- xpk/core/nap.py +14 -3
- xpk/core/nodepool.py +46 -13
- xpk/core/nodepool_test.py +143 -8
- xpk/core/pathways.py +4 -8
- xpk/core/remote_state/fuse_remote_state.py +1 -1
- xpk/core/scheduling.py +16 -13
- xpk/core/scheduling_test.py +15 -7
- xpk/core/system_characteristics.py +6 -0
- xpk/core/telemetry.py +11 -1
- xpk/core/telemetry_test.py +39 -0
- xpk/core/testing/commands_tester.py +26 -0
- xpk/core/testing/commands_tester_test.py +20 -1
- xpk/core/workload_decorators/rdma_decorator.py +9 -0
- xpk/parser/cluster.py +11 -1
- xpk/parser/cluster_test.py +59 -1
- xpk/parser/common.py +11 -0
- xpk/parser/storage.py +3 -3
- xpk/utils/console.py +1 -1
- xpk/utils/feature_flags.py +7 -3
- {xpk-1.0.0.dist-info → xpk-1.1.1.dist-info}/METADATA +37 -21
- {xpk-1.0.0.dist-info → xpk-1.1.1.dist-info}/RECORD +48 -55
- xpk-1.1.1.dist-info/top_level.txt +1 -0
- integration/README.md +0 -19
- integration/__init__.py +0 -15
- integration/docker_manager_test.py +0 -102
- integration/gcluster_a3mega_test.py +0 -215
- integration/gcluster_a3ultra_test.py +0 -187
- integration/gcluster_a4_test.py +0 -187
- integration/gcluster_test.py +0 -107
- xpk/utils/user_input.py +0 -48
- xpk/utils/user_input_test.py +0 -92
- xpk-1.0.0.dist-info/top_level.txt +0 -2
- {xpk-1.0.0.dist-info → xpk-1.1.1.dist-info}/WHEEL +0 -0
- {xpk-1.0.0.dist-info → xpk-1.1.1.dist-info}/entry_points.txt +0 -0
- {xpk-1.0.0.dist-info → xpk-1.1.1.dist-info}/licenses/LICENSE +0 -0
xpk/parser/cluster_test.py
CHANGED
|
@@ -15,8 +15,8 @@ limitations under the License.
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
import argparse
|
|
18
|
-
from xpk.parser.cluster import set_cluster_create_parser, set_cluster_create_pathways_parser, set_cluster_create_ray_parser
|
|
19
18
|
import pytest
|
|
19
|
+
from xpk.parser.cluster import set_cluster_create_parser, set_cluster_create_pathways_parser, set_cluster_create_ray_parser, set_cluster_adapt_parser
|
|
20
20
|
from ..utils.feature_flags import FeatureFlags
|
|
21
21
|
|
|
22
22
|
|
|
@@ -261,3 +261,61 @@ def test_cluster_create_num_slices_has_no_default_if_superslicing_feature():
|
|
|
261
261
|
)
|
|
262
262
|
|
|
263
263
|
assert args.num_slices is None
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
def test_cluster_adapt_sub_slicing_is_hidden_with_flag_off():
|
|
267
|
+
FeatureFlags.SUB_SLICING_ENABLED = False
|
|
268
|
+
parser = argparse.ArgumentParser()
|
|
269
|
+
|
|
270
|
+
set_cluster_adapt_parser(parser)
|
|
271
|
+
help_str = parser.format_help()
|
|
272
|
+
|
|
273
|
+
assert "--sub-slicing" not in help_str
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def test_cluster_adapt_sub_slicing_is_shown_with_flag_on():
|
|
277
|
+
FeatureFlags.SUB_SLICING_ENABLED = True
|
|
278
|
+
parser = argparse.ArgumentParser()
|
|
279
|
+
|
|
280
|
+
set_cluster_adapt_parser(parser)
|
|
281
|
+
help_str = parser.format_help()
|
|
282
|
+
|
|
283
|
+
assert "--sub-slicing" in help_str
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def test_cluster_adapt_super_slicing_is_hidden_with_flag_off():
|
|
287
|
+
FeatureFlags.SUPER_SLICING_ENABLED = False
|
|
288
|
+
parser = argparse.ArgumentParser()
|
|
289
|
+
|
|
290
|
+
set_cluster_adapt_parser(parser)
|
|
291
|
+
help_str = parser.format_help()
|
|
292
|
+
|
|
293
|
+
assert "--super-slicing" not in help_str
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
def test_cluster_adapt_super_slicing_is_shown_with_flag_on():
|
|
297
|
+
FeatureFlags.SUPER_SLICING_ENABLED = True
|
|
298
|
+
parser = argparse.ArgumentParser()
|
|
299
|
+
|
|
300
|
+
set_cluster_adapt_parser(parser)
|
|
301
|
+
help_str = parser.format_help()
|
|
302
|
+
|
|
303
|
+
assert "--super-slicing" in help_str
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
def test_cluster_adapt_memory_limit_is_shown():
|
|
307
|
+
parser = argparse.ArgumentParser()
|
|
308
|
+
|
|
309
|
+
set_cluster_adapt_parser(parser)
|
|
310
|
+
help_str = parser.format_help()
|
|
311
|
+
|
|
312
|
+
assert "--memory-limit" in help_str
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
def test_cluster_adapt_cpu_limit_is_shown():
|
|
316
|
+
parser = argparse.ArgumentParser()
|
|
317
|
+
|
|
318
|
+
set_cluster_adapt_parser(parser)
|
|
319
|
+
help_str = parser.format_help()
|
|
320
|
+
|
|
321
|
+
assert "--cpu-limit" in help_str
|
xpk/parser/common.py
CHANGED
|
@@ -83,6 +83,17 @@ def add_shared_arguments(
|
|
|
83
83
|
help='GCE project name, defaults to "gcloud config project."',
|
|
84
84
|
required=required,
|
|
85
85
|
)
|
|
86
|
+
custom_parser_or_group.add_argument(
|
|
87
|
+
'--project-number',
|
|
88
|
+
type=str,
|
|
89
|
+
default=None,
|
|
90
|
+
help=(
|
|
91
|
+
'GCE project number. If provided, skips the Cloud Resource Manager'
|
|
92
|
+
' API call to translate project ID to project number. Useful when'
|
|
93
|
+
' the API is not enabled or you lack permissions.'
|
|
94
|
+
),
|
|
95
|
+
required=False,
|
|
96
|
+
)
|
|
86
97
|
custom_parser_or_group.add_argument(
|
|
87
98
|
'--zone',
|
|
88
99
|
type=str,
|
xpk/parser/storage.py
CHANGED
|
@@ -127,7 +127,7 @@ def add_storage_attach_parser(
|
|
|
127
127
|
type=str,
|
|
128
128
|
help=(
|
|
129
129
|
'(optional) Name of the bucket. If not set, then the "name" parameter'
|
|
130
|
-
' is
|
|
130
|
+
' is inferred as a bucket name.'
|
|
131
131
|
),
|
|
132
132
|
)
|
|
133
133
|
gcsfuse_args.add_argument(
|
|
@@ -165,7 +165,7 @@ def add_storage_attach_parser(
|
|
|
165
165
|
type=str,
|
|
166
166
|
help=(
|
|
167
167
|
'(optional) Name of the filestore instance. If not set, then the'
|
|
168
|
-
' "name" parameter is
|
|
168
|
+
' "name" parameter is inferred as an instance name.'
|
|
169
169
|
),
|
|
170
170
|
)
|
|
171
171
|
|
|
@@ -238,7 +238,7 @@ def add_storage_create_parser(storage_subcommands_parser: Subcommands) -> None:
|
|
|
238
238
|
type=str,
|
|
239
239
|
help=(
|
|
240
240
|
'(optional) Name of the filestore instance. If not set, then the'
|
|
241
|
-
' "name" parameter is
|
|
241
|
+
' "name" parameter is inferred as an instance name.'
|
|
242
242
|
),
|
|
243
243
|
)
|
|
244
244
|
opt_args.add_argument(
|
xpk/utils/console.py
CHANGED
|
@@ -51,7 +51,7 @@ def ask_for_user_consent(
|
|
|
51
51
|
question: str, default_option: Literal["Y", "N"] = "N"
|
|
52
52
|
) -> bool:
|
|
53
53
|
"""Prompts user with the given question, asking for a yes/no answer and returns a relevant boolean.
|
|
54
|
-
Important:
|
|
54
|
+
Important: immediately returns `True` in quiet mode!
|
|
55
55
|
|
|
56
56
|
Example prompt for `question='Continue?'`: `[XPK] Continue? (y/N): `.
|
|
57
57
|
|
xpk/utils/feature_flags.py
CHANGED
|
@@ -17,20 +17,24 @@ limitations under the License.
|
|
|
17
17
|
import os
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
def is_tester() -> bool:
|
|
21
|
+
"""Returns true if user is a tester."""
|
|
22
|
+
return os.getenv("XPK_TESTER", "").lower() == "true"
|
|
23
|
+
|
|
24
|
+
|
|
20
25
|
def _get_boolean_flag(flag: str, default: bool) -> bool:
|
|
21
26
|
experiment_value = os.getenv(flag, "").lower()
|
|
22
27
|
if experiment_value in ["true", "false"]:
|
|
23
28
|
return experiment_value == "true"
|
|
24
29
|
|
|
25
|
-
|
|
26
|
-
return xpk_tester or default
|
|
30
|
+
return is_tester() or default
|
|
27
31
|
|
|
28
32
|
|
|
29
33
|
class _FeatureFlags:
|
|
30
34
|
SUB_SLICING_ENABLED = _get_boolean_flag("SUB_SLICING_ENABLED", default=False)
|
|
31
35
|
TELEMETRY_ENABLED = _get_boolean_flag("TELEMETRY_ENABLED", default=True)
|
|
32
36
|
SUPER_SLICING_ENABLED = _get_boolean_flag(
|
|
33
|
-
"SUPER_SLICING_ENABLED", default=
|
|
37
|
+
"SUPER_SLICING_ENABLED", default=True
|
|
34
38
|
)
|
|
35
39
|
|
|
36
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xpk
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: xpk helps Cloud developers to orchestrate training jobs on accelerators on GKE.
|
|
5
5
|
Author-email: XPK team <xpk-code-reviewers@google.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -93,28 +93,41 @@ XPK supports a variety of hardware accelerators.
|
|
|
93
93
|
|
|
94
94
|
XPK also supports the following [Google Cloud Storage solutions](./docs/usage/storage.md):
|
|
95
95
|
|
|
96
|
-
| Storage Type | Documentation
|
|
97
|
-
|
|
98
|
-
| Cloud Storage FUSE | [docs](./docs/usage/storage.md#fuse)
|
|
99
|
-
| Filestore | [docs](./docs/usage/storage.md#filestore)
|
|
100
|
-
| Parallelstore | [docs](./docs/usage/storage.md#parallelstore)
|
|
101
|
-
| Block storage (Persistent Disk, Hyperdisk) | [docs](./docs/usage/storage.md#block-storage-persistent-disk-hyperdisk)
|
|
96
|
+
| Storage Type | Documentation |
|
|
97
|
+
| ------------------------------------------ | ----------------------------------------------------------------------- |
|
|
98
|
+
| Cloud Storage FUSE | [docs](./docs/usage/storage.md#fuse) |
|
|
99
|
+
| Filestore | [docs](./docs/usage/storage.md#filestore) |
|
|
100
|
+
| Parallelstore | [docs](./docs/usage/storage.md#parallelstore) |
|
|
101
|
+
| Block storage (Persistent Disk, Hyperdisk) | [docs](./docs/usage/storage.md#block-storage-persistent-disk-hyperdisk) |
|
|
102
102
|
|
|
103
103
|
# Documentation
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
- [Permissions](./docs/permissions.md)
|
|
106
|
+
- [Installation](./docs/installation.md)
|
|
107
|
+
- Usage:
|
|
108
|
+
- [Clusters](./docs/usage/clusters.md)
|
|
109
|
+
- [GPU](./docs/usage/gpu.md)
|
|
110
|
+
- [CPU](./docs/usage/cpu.md)
|
|
111
|
+
- [Autoprovisioning](./docs/usage/autoprovisioning.md)
|
|
112
|
+
- [Workloads](./docs/usage/workloads.md)
|
|
113
|
+
- [Docker](./docs/usage/docker.md)
|
|
114
|
+
- [Storage](./docs/usage/storage.md)
|
|
115
|
+
- [Advanced](./docs/usage/advanced.md)
|
|
116
|
+
- [Inspector](./docs/usage/inspector.md)
|
|
117
|
+
- [Troubleshooting](./docs/troubleshooting.md)
|
|
118
|
+
|
|
119
|
+
# Dependencies
|
|
120
|
+
|
|
121
|
+
| Dependency | When used |
|
|
122
|
+
| ------------------------------------------------------------------------------------------------------------ | --------------------------- |
|
|
123
|
+
| [Google Cloud SDK (gcloud)](https://cloud.google.com/sdk/docs/install) | _always_ |
|
|
124
|
+
| [kubectl](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_kubectl) | _always_ |
|
|
125
|
+
| [ClusterToolkit](https://github.com/GoogleCloudPlatform/cluster-toolkit) | Provisioning GPU clusters |
|
|
126
|
+
| [Kueue](https://github.com/kubernetes-sigs/kueue) | Scheduling workloads |
|
|
127
|
+
| [JobSet](https://github.com/kubernetes-sigs/jobset) | Workload creation |
|
|
128
|
+
| [Docker](https://docs.docker.com/engine/install/) | Building workload container |
|
|
129
|
+
| [CoreDNS](https://github.com/coredns/deployment/tree/master/kubernetes) | Cluster set up |
|
|
130
|
+
| [PathwaysJob](https://github.com/google/pathways-job) | Running Pathways workloads |
|
|
118
131
|
|
|
119
132
|
# Privacy notice
|
|
120
133
|
|
|
@@ -129,11 +142,14 @@ XPK telemetry overall is handled in accordance with the [Google Privacy Policy](
|
|
|
129
142
|
you use XPK to interact with or utilize GCP Services, your information is handled in accordance with the
|
|
130
143
|
[Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice).
|
|
131
144
|
|
|
132
|
-
|
|
133
145
|
# Contributing
|
|
134
146
|
|
|
135
147
|
Please read [`contributing.md`](./docs/contributing.md) for details on our code of conduct, and the process for submitting pull requests to us.
|
|
136
148
|
|
|
149
|
+
# Get involved
|
|
150
|
+
|
|
151
|
+
We'd love to hear from you! If you have questions or want to discuss ideas, join us on [GitHub Discussions](https://github.com/AI-Hypercomputer/xpk/discussions). Found a bug or have a feature request? Please let us know on [GitHub Issues](https://github.com/AI-Hypercomputer/xpk/issues).
|
|
152
|
+
|
|
137
153
|
# License
|
|
138
154
|
|
|
139
155
|
This project is licensed under the Apache License 2.0 - see the [`LICENSE`](./LICENSE) file for details
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
integration/README.md,sha256=EZwllubkB7mJt-DzPRNrhD0kkSV7TwaihmOX1mjNvAk,296
|
|
2
|
-
integration/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
|
|
3
|
-
integration/docker_manager_test.py,sha256=J2xijy6crRtrwQXrEvtOEY7mo1kEJYhcIYMZ7w0OGa4,2514
|
|
4
|
-
integration/gcluster_a3mega_test.py,sha256=DoDEWWPTxjvn6T1ZNNXJEC64vlA7ywvtrSwYUEUn5Gg,6522
|
|
5
|
-
integration/gcluster_a3ultra_test.py,sha256=XGZXuir2PeLjEI2Yt8VlIEmxtPHEHjeKQeMMBKTSGVg,6322
|
|
6
|
-
integration/gcluster_a4_test.py,sha256=c5asoFLioHznq6-F7GjZf2JRqQuTODX5_bjJWuBcRwU,6230
|
|
7
|
-
integration/gcluster_test.py,sha256=3GSOMszzNW6Yr4T4PFIpmszonwDAAGpSdKutUA77O-g,3304
|
|
8
1
|
xpk/__init__.py,sha256=7mu-VQDQMyxM5To0KOhuYe4y2TYGsEkfV7hXZmUyih4,561
|
|
9
2
|
xpk/main.py,sha256=esCpSoFhiA9ZGxcm6XWI6m2OIOsEeMnZt6OCkqMkjs0,3288
|
|
10
3
|
xpk/telemetry_uploader.py,sha256=DW-eXiWpxc0Ga3igehhVIz-F3CmBwe1kl1Lbgbn0MOE,901
|
|
@@ -20,58 +13,60 @@ xpk/blueprints/a4/config-map.yaml.tftpl,sha256=o6LeGIYUfFGyj3vj-8ztV5ildQ46QZVl7
|
|
|
20
13
|
xpk/blueprints/a4/nccl-rdma-installer-a4.yaml,sha256=if3WOmNLVGTJIJHU76EWC1FyiIXDTRIXcwo4OsBxarQ,2113
|
|
21
14
|
xpk/blueprints/a4/storage_crd.yaml,sha256=r4WFXnSJJ25EUF-t4Ljfbl-cJoSaiFiZkP8451eTub4,1260
|
|
22
15
|
xpk/commands/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
|
|
23
|
-
xpk/commands/cluster.py,sha256=
|
|
24
|
-
xpk/commands/cluster_gcluster.py,sha256=
|
|
16
|
+
xpk/commands/cluster.py,sha256=9LGVlrXg5C2w7wRKYTWe6lh3wSl7ZFpaNXSlpBfd0tc,45311
|
|
17
|
+
xpk/commands/cluster_gcluster.py,sha256=H6_pphIrIzDCHZg-ZH3o-xA2AgVQKSjE2HKbhIW6-Xo,13727
|
|
25
18
|
xpk/commands/cluster_gcluster_test.py,sha256=zdxz5gAMu3HRVNsj7F-VYRf4TYSPMjuOG7DolQN2Pb4,6263
|
|
26
|
-
xpk/commands/cluster_test.py,sha256=
|
|
27
|
-
xpk/commands/common.py,sha256=
|
|
19
|
+
xpk/commands/cluster_test.py,sha256=va1ODWx0Y2fSZIGzIsqEIVN25tIsfYr95ubcyxTMDfA,23494
|
|
20
|
+
xpk/commands/common.py,sha256=fsM4Sud3y1RU6a8JHi99l13O4raYvW2oPahCBzvMwh4,3884
|
|
21
|
+
xpk/commands/common_test.py,sha256=BDYFtN-cVfpEpj6akZy4R2KrnP53AIV1Lh1FEImhXx0,6106
|
|
28
22
|
xpk/commands/config.py,sha256=L_zRpQTxMcSh6rxOT8gG263V6YGqzVoz4UxdWywTFdA,850
|
|
29
|
-
xpk/commands/info.py,sha256=
|
|
30
|
-
xpk/commands/inspector.py,sha256=
|
|
23
|
+
xpk/commands/info.py,sha256=iVGWMIaxPB54-nQGW7YqFdpVcgaKVJ5r4LZVxcSlo5Y,7486
|
|
24
|
+
xpk/commands/inspector.py,sha256=M_py1VFSTSYUrlUS32i3qUM8LkuHqPQ73FS1dkR6wfM,13911
|
|
25
|
+
xpk/commands/inspector_test.py,sha256=Jc-YnWW8eOHI8RDyz8HoJvN1XxG9XQTa0xe3scHiOXM,4305
|
|
31
26
|
xpk/commands/managed_ml_diagnostics.py,sha256=87wmFbnYQY-kEpJfPo1Up53xM5P_P5wOlXczxHzxJjQ,6984
|
|
32
27
|
xpk/commands/managed_ml_diagnostics_test.py,sha256=pQ1YUGMGRQFJYTS_1o9YyGUzYdLaBdA84LjbnncaeEo,3828
|
|
33
28
|
xpk/commands/storage.py,sha256=cSTJN9Mjvdsvk_Nk43kVdQFhp89nxWbanDsTOGZCkpQ,10708
|
|
34
29
|
xpk/commands/version.py,sha256=k30rdLP9clUM8eeSwRFhpfzSb1qwcQImTfuC59Ed6CA,771
|
|
35
|
-
xpk/commands/workload.py,sha256=
|
|
36
|
-
xpk/commands/workload_test.py,sha256=
|
|
30
|
+
xpk/commands/workload.py,sha256=Xhu_xNzGnKVfU3Piwf-rJbNO0r0LCjwslYjYlvOjD8Y,32347
|
|
31
|
+
xpk/commands/workload_test.py,sha256=m79x6YDYn-36BX0CttTtAMdt_O-WJY40FLTGa6KwKg8,9804
|
|
37
32
|
xpk/core/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
|
|
38
|
-
xpk/core/capacity.py,sha256=
|
|
39
|
-
xpk/core/capacity_test.py,sha256=
|
|
40
|
-
xpk/core/cluster.py,sha256=
|
|
41
|
-
xpk/core/cluster_private.py,sha256=
|
|
42
|
-
xpk/core/cluster_test.py,sha256=
|
|
33
|
+
xpk/core/capacity.py,sha256=MGiNOwBCwg8Ci-hsssbZYIJ2xXTm6Y5yKTO4J5ozqEk,11053
|
|
34
|
+
xpk/core/capacity_test.py,sha256=04ecANSECL3APmFCjdtkw2Wz6JxWkRZwE_QHa2m1_68,6026
|
|
35
|
+
xpk/core/cluster.py,sha256=RC-91Dk4nx9F-jLmZPP78ALlUgSBq670geaIqnRMZxY,24184
|
|
36
|
+
xpk/core/cluster_private.py,sha256=43BEO49MA-p1KfKuchxVZk6wwIlRCUU17j-6MMMeq4I,6868
|
|
37
|
+
xpk/core/cluster_test.py,sha256=VeC1C7kN0OJe6yeoL8GCaFk4uPhijP6CjvQAcE7q9xw,6653
|
|
43
38
|
xpk/core/commands.py,sha256=at73VJHdZ4rVA8uvW997tNrvnCjP9v6zaw96bU0kd74,10841
|
|
44
39
|
xpk/core/config.py,sha256=U2JDXx-XBuqQpZJf2iUDoww5--E8ejZfgmIxKeGu-gU,4668
|
|
45
40
|
xpk/core/config_test.py,sha256=POSuofK0LFbNNygDAo2fjtKY4NMrRjUFeGcpBh9JOS4,3569
|
|
46
|
-
xpk/core/docker_container.py,sha256=
|
|
41
|
+
xpk/core/docker_container.py,sha256=SZ3msIMx-2gBIok3j5N73KO1wVcMfzw1pQpgTdyZOQA,8243
|
|
47
42
|
xpk/core/docker_image.py,sha256=9vwqbb6Mc3C5ZEOph03WS-EWI5hxMYGGigqzIMkDTjE,6909
|
|
48
|
-
xpk/core/docker_manager.py,sha256=
|
|
49
|
-
xpk/core/docker_resources.py,sha256=
|
|
43
|
+
xpk/core/docker_manager.py,sha256=vGPCWPDB507sxEsXvSD4IM-h5HqQzYLk7WSdCUmSDb4,10568
|
|
44
|
+
xpk/core/docker_resources.py,sha256=7EXV1CvwCVogE5-m6utSE1GXxwf6EpB4QDYeuGXWHmI,12547
|
|
50
45
|
xpk/core/filestore.py,sha256=mcuUzsAPARbnrBG4fIGsEoN8NmzjaQ6k0tvIwMtjO9k,8068
|
|
51
46
|
xpk/core/gcloud_context.py,sha256=d1wQ76zp7QMdG5BxB3sJz4b4OF5Mc8OzmPd_m0xd-Ys,6810
|
|
52
47
|
xpk/core/gcloud_context_test.py,sha256=M8rp6S1zaEcAI7u4Bt8ukWKzv82HH5h9oYVojBcKgHk,5987
|
|
53
48
|
xpk/core/gcluster_manager.py,sha256=lyv_MvdnkByy9_PEBj_ugAEBwnCbFNiWTSrEFjrMlPc,6236
|
|
54
49
|
xpk/core/gcsfuse.py,sha256=kg5pgxdTjgiqquuGjev9fXzJPb8oiWPTK6wzCddzheQ,2125
|
|
55
50
|
xpk/core/jobset.py,sha256=PJ4Fd8TNNLuYKNOMehoMYRIUEXyc5jsbHctJGqfW_8Y,4037
|
|
56
|
-
xpk/core/kueue_manager.py,sha256=
|
|
57
|
-
xpk/core/kueue_manager_test.py,sha256=
|
|
51
|
+
xpk/core/kueue_manager.py,sha256=qpz4Df7tfWNKzBFlTbMUfsHnXl15SdI7r_mHlCFRYdc,19998
|
|
52
|
+
xpk/core/kueue_manager_test.py,sha256=iJZFQE-fhQAI8MVXe66zUJpSbU5HHUZmNFnnCPCXNZs,22042
|
|
58
53
|
xpk/core/monitoring.py,sha256=__bzTq_DIDAK8yIaN4F3MJh-yjYw5X1OlxmRgYOpf1g,4332
|
|
59
54
|
xpk/core/mtc.py,sha256=pO7p3l-EzLFdTE8MdwWV8i0Zu-7epGql_kPoksVofIU,6259
|
|
60
|
-
xpk/core/nap.py,sha256=
|
|
55
|
+
xpk/core/nap.py,sha256=gBxXu8Png1-BlAHbxLWZgbSXeLMGVixufkQVMR0fmvk,12963
|
|
61
56
|
xpk/core/network.py,sha256=Oulb7U69lWkpOKxOC1C7ekJDpC51TLwd7XdZA3NQ7E0,10505
|
|
62
|
-
xpk/core/nodepool.py,sha256=
|
|
63
|
-
xpk/core/nodepool_test.py,sha256=
|
|
64
|
-
xpk/core/pathways.py,sha256=
|
|
57
|
+
xpk/core/nodepool.py,sha256=FX2ljKvwMsG3fXfn_CDCRwiKH4UAArQeDiFLq3XK9F0,25495
|
|
58
|
+
xpk/core/nodepool_test.py,sha256=9xSFpn-1j9Vd0J8KFzbq8ywS_Ibsbx4CgR1er68mRnw,17542
|
|
59
|
+
xpk/core/pathways.py,sha256=9w_VrpLLjQSSdNd8HJLWWtIYzA0NpR7t70knRSVLK0w,11574
|
|
65
60
|
xpk/core/pathways_test.py,sha256=UeuSo_g9BNI27to-wflQwc6dJFVSA5-kOK_cjmY5qgU,1809
|
|
66
61
|
xpk/core/ray.py,sha256=JWhc_ToRHpF4_URGnuE_47FMgamaRsA4KVUMpqThWzw,6145
|
|
67
62
|
xpk/core/resources.py,sha256=dDsG_LOtcU17p1UKgOYyjdPxbMfqcb7pJ4SjfLDA6Os,9389
|
|
68
|
-
xpk/core/scheduling.py,sha256=
|
|
69
|
-
xpk/core/scheduling_test.py,sha256=
|
|
63
|
+
xpk/core/scheduling.py,sha256=J0yTpb4jBTQTFJ5QPyycFPFAKXC0fnmxeXRxZbvx8k8,12542
|
|
64
|
+
xpk/core/scheduling_test.py,sha256=zoGLoxNYLQGeQKtWOhBPP0bj4B0zXylRKhRIjO-TyTc,16280
|
|
70
65
|
xpk/core/storage.py,sha256=NILvVAcLNMLmp4wKx_TEKbMMF5X1oL-FrQV46PT0_ds,16902
|
|
71
|
-
xpk/core/system_characteristics.py,sha256=
|
|
66
|
+
xpk/core/system_characteristics.py,sha256=8WXi48mZ7eT9r57FZ5eFtmdonik7MItGTYiuYvcjXG8,34335
|
|
72
67
|
xpk/core/system_characteristics_test.py,sha256=XVaKJ5wYdNwwwUKBnuK3zd1u-Qj3VnJR7MHlOeCa-K0,8029
|
|
73
|
-
xpk/core/telemetry.py,sha256=
|
|
74
|
-
xpk/core/telemetry_test.py,sha256=
|
|
68
|
+
xpk/core/telemetry.py,sha256=IRwv91p_1-u_Pza-5GaV3wDibpZrTG0e3JMADyea9O8,7794
|
|
69
|
+
xpk/core/telemetry_test.py,sha256=o0ueLPXbKAn86CXIhooSef9iiU1uB7T5cbIZOMuQN6w,9556
|
|
75
70
|
xpk/core/updates.py,sha256=FxLDgEL2O-qnslhT9U60NG5gzXmSv8Fn2wPUf3YZLM8,1734
|
|
76
71
|
xpk/core/updates_test.py,sha256=oeGMv-wOHcOhWKGI4GnVLZ4Z_vCxLzLHeXRCi8rIDIM,2704
|
|
77
72
|
xpk/core/vertex.py,sha256=DSrwoLmpWMZZe9ABdTxYI--50E11oEUC1mBLdrzOvdo,3573
|
|
@@ -79,35 +74,35 @@ xpk/core/workload.py,sha256=6TVZM15n8W7046VgmmH9Jv54MrhExtLQH3GaiwlV8Xs,8959
|
|
|
79
74
|
xpk/core/workload_test.py,sha256=tVTvrwDRXD3O1GCoftgEBWilCYTN74ayP1KRP0vptx0,857
|
|
80
75
|
xpk/core/blueprint/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
|
|
81
76
|
xpk/core/blueprint/blueprint_definitions.py,sha256=OgKkMnz4xAnmnZLaXuehVzNm1Gr2R4HWgofc7qd_mC4,2258
|
|
82
|
-
xpk/core/blueprint/blueprint_generator.py,sha256
|
|
77
|
+
xpk/core/blueprint/blueprint_generator.py,sha256=-30_3bn103CwJ4FONLRaSpAOuQk7FakRFO9mSal-FyA,38362
|
|
83
78
|
xpk/core/blueprint/blueprint_test.py,sha256=8wgH-HdYDySCVJh9RnxOTrkfBc1Nmv6ZXfzBzLlow54,7550
|
|
84
79
|
xpk/core/blueprint/testing/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
|
|
85
80
|
xpk/core/blueprint/testing/data/a3_mega.yaml,sha256=K3JMFuj-ZHgHPimeL_GJqmib47O0BMIp_DywzHG1wSU,3988
|
|
86
81
|
xpk/core/blueprint/testing/data/a3_mega_spot.yaml,sha256=HLKNx4PxomvPtT0m_hcc7hFVraFalu-xlakqn6RxB_s,3843
|
|
87
|
-
xpk/core/blueprint/testing/data/a3_ultra.yaml,sha256=
|
|
88
|
-
xpk/core/blueprint/testing/data/a4.yaml,sha256=
|
|
82
|
+
xpk/core/blueprint/testing/data/a3_ultra.yaml,sha256=vYq5kEGvz_Q6M4r6rOLktneZTtGF8sd8-O3zNrZSjCY,6221
|
|
83
|
+
xpk/core/blueprint/testing/data/a4.yaml,sha256=VVTKXkoLH0pxes9vMvUBgka1Lj_zCMNbXZKmrraiZzc,5740
|
|
89
84
|
xpk/core/remote_state/__init__.py,sha256=PkV8D9WOtlJHH5AIxsQaKeIBcmupT_Ol_bwJgN6G2I8,561
|
|
90
|
-
xpk/core/remote_state/fuse_remote_state.py,sha256=
|
|
85
|
+
xpk/core/remote_state/fuse_remote_state.py,sha256=IuTzeMSZRiAnMsBT4AJ7v9ITwueLw53S1Rkh6rIDWbA,3247
|
|
91
86
|
xpk/core/remote_state/remote_state_client.py,sha256=6PcR92Xy_RMjlF4AscanQ1jXNHnewLWGNC2v53jbzD4,1077
|
|
92
87
|
xpk/core/testing/__init__.py,sha256=PkV8D9WOtlJHH5AIxsQaKeIBcmupT_Ol_bwJgN6G2I8,561
|
|
93
|
-
xpk/core/testing/commands_tester.py,sha256=
|
|
94
|
-
xpk/core/testing/commands_tester_test.py,sha256=
|
|
88
|
+
xpk/core/testing/commands_tester.py,sha256=ISnb20BF9nb8WxQKhzIdfYHOX7JTwHYQhgxhKvN7XOU,5181
|
|
89
|
+
xpk/core/testing/commands_tester_test.py,sha256=ZnnZp35edfuJslqtOPxkLYmeA5gjsXz_q3Zdak2utgM,4589
|
|
95
90
|
xpk/core/workload_decorators/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
|
|
96
|
-
xpk/core/workload_decorators/rdma_decorator.py,sha256=
|
|
91
|
+
xpk/core/workload_decorators/rdma_decorator.py,sha256=7UDJol77-NOl7C4BlK4bwab-HL-PyqzDPegT5t7o0oY,3841
|
|
97
92
|
xpk/core/workload_decorators/storage_decorator.py,sha256=DDYQVO1OKTLhveDOA4V6b2RWr4n0fbwHdnoFFmW7iaQ,2000
|
|
98
93
|
xpk/core/workload_decorators/tcpx_decorator.py,sha256=cLOntH2ekBcPeiPW0sU3TRozSCpcTxgxpzncrMbRj44,5962
|
|
99
94
|
xpk/core/workload_decorators/tcpx_decorator_test.py,sha256=BmTWsFoBeLb9xhQh3kpqSiarkYax4bj2wLeZ9GrQzag,6089
|
|
100
95
|
xpk/core/workload_decorators/tcpxo_decorator.py,sha256=5SgL-7aTHclN7rvCGvEOjZoUixBmyjfuhVIUBFmneug,6124
|
|
101
96
|
xpk/parser/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
|
|
102
|
-
xpk/parser/cluster.py,sha256=
|
|
103
|
-
xpk/parser/cluster_test.py,sha256=
|
|
104
|
-
xpk/parser/common.py,sha256=
|
|
97
|
+
xpk/parser/cluster.py,sha256=2ib6qpIOPsw8nGlUM0qBzcgHrmRyDrmM8a8jzZEbz5E,31675
|
|
98
|
+
xpk/parser/cluster_test.py,sha256=_ssBirp_TnNny_mdHUgWmagxeTiCg23U1Nk_m-ZPf08,8015
|
|
99
|
+
xpk/parser/common.py,sha256=dCh_mtRzlmXwh__nKGjSrmkenzZieJpcrQrsEOQYtd0,7162
|
|
105
100
|
xpk/parser/common_test.py,sha256=_6Fm2pUF7h4K0G5qxGabXSYr4ng9ihOzlViE6oLQwQs,1557
|
|
106
101
|
xpk/parser/config.py,sha256=-XnWx9aFsBW4Uzo_hpOMD2ZQ0bdZLvq1ksv83_5jqSM,1633
|
|
107
102
|
xpk/parser/core.py,sha256=rUgPYrqBgqoeuVVwcu3qMABs5KZ3jZI-lfkKywwpGYo,3340
|
|
108
103
|
xpk/parser/info.py,sha256=UJohxVVWdt9IgUXoPsrVae2DN1BjAVGWrSN2ajrB8RQ,1860
|
|
109
104
|
xpk/parser/inspector.py,sha256=hAPAZ2k9iSJgC1mjnz3rMleInsAQ8PmkyyUKFyBmsgY,1997
|
|
110
|
-
xpk/parser/storage.py,sha256=
|
|
105
|
+
xpk/parser/storage.py,sha256=2rpM3scZTGqeC_AVogQnInj3BGdClxhCHWSP3_0mnyA,9948
|
|
111
106
|
xpk/parser/storage_test.py,sha256=i_F9cuQXHRvUy4RJwbfuuI8ZVpTpkkY96sZ1GZ4dLPw,1494
|
|
112
107
|
xpk/parser/validators.py,sha256=-NBZelvfwZRzjz-YUCreD8EzMLHll8PZM-d-MVm2PG4,1192
|
|
113
108
|
xpk/parser/version.py,sha256=eJo4PAbbmRQZulgKBs_ytbVgV9zAaaXeNzMMxmgFMVY,769
|
|
@@ -128,10 +123,10 @@ xpk/templates/kueue_super_slicing_topology.yaml.j2,sha256=4WkSfQ2A5-jnKWiHWj2WXl
|
|
|
128
123
|
xpk/templates/mtc-cpc.yaml,sha256=MPx75tog09kjRAvHoNOPCEobigQ17d7pYCUnZCevSDQ,340
|
|
129
124
|
xpk/templates/storage.yaml,sha256=AykdyMtDnKZF8Y_0BYxoYP03hEIzEk6iNalXAQHgAls,163
|
|
130
125
|
xpk/utils/__init__.py,sha256=YPwWBbgLAu7L-YlTVGB2r8ZV4TzypURMRBcehSHHlLY,561
|
|
131
|
-
xpk/utils/console.py,sha256=
|
|
126
|
+
xpk/utils/console.py,sha256=2f2ZjVXjH5z3VInMCPXAsJeH0I6kle7WfzcK86fkcXc,2463
|
|
132
127
|
xpk/utils/console_test.py,sha256=x1v7v9VrIZwAKH-eOzj1lAY4EsHxJ6ruhfEOzpssO6o,2944
|
|
133
128
|
xpk/utils/execution_context.py,sha256=hONGz1hQSKE-puah2rE_uN9YUeEC4oW82VOryw5_Vgo,1181
|
|
134
|
-
xpk/utils/feature_flags.py,sha256=
|
|
129
|
+
xpk/utils/feature_flags.py,sha256=_Cbr4YQzk25fuSWYzinVnXfyTRnM9D0WMU_01mBTgBM,1223
|
|
135
130
|
xpk/utils/file.py,sha256=yB1-k3FahoxkBpojB59vQNeZYOXB3pmktnjU4Ceah7M,2605
|
|
136
131
|
xpk/utils/gcs_utils.py,sha256=zg-XSTv4G4TFjeT2bNBm2WLdDXPrOZi0rNv_JdppNg4,4113
|
|
137
132
|
xpk/utils/kubectl.py,sha256=WKB9UhpouPN9G4n2ejRi_PgsYLI0R01gzkS1WGU6mJA,1828
|
|
@@ -143,15 +138,13 @@ xpk/utils/topology.py,sha256=MK9s2drBkL1F6V_uFh5K9jneOZ-VUbYLuTMFQWELwFU,1485
|
|
|
143
138
|
xpk/utils/topology_test.py,sha256=jDXCPgBPfByqjhi0W9A5c8uOHOYjRav53nNlg71ipjk,1943
|
|
144
139
|
xpk/utils/user_agent.py,sha256=1NMtixC1RIr_MwM5pJ0THQ0x1-fCQA92TFHjWAVZldw,1083
|
|
145
140
|
xpk/utils/user_agent_test.py,sha256=lkv8LqzhlA1gXFVeBzoLwE1_iGnm8G9LzkkElMrIrx0,1774
|
|
146
|
-
xpk/utils/user_input.py,sha256=kMdCcPWdkI31f1mJcMsNGda-xKyKxEerpSLpCqIWYPc,1503
|
|
147
|
-
xpk/utils/user_input_test.py,sha256=xO34jkMoTAk5Cmw7yHTk-7YexzC2UZ6ajihV8lnlAyI,2666
|
|
148
141
|
xpk/utils/validation.py,sha256=rE9LTkXJT7jIesodFb9pONL7ixhLqiQleyoaz7N39Dw,2765
|
|
149
142
|
xpk/utils/validation_test.py,sha256=PEDSMUqZdt_Lx1FSR-LOTXKKtsJ47JH1fxugM0Gfz6Y,1168
|
|
150
143
|
xpk/utils/versions.py,sha256=_Ep68W70a9605XjiaOOpBa9Is9jXlsoOiwL8v5Xt-WA,897
|
|
151
144
|
xpk/utils/yaml.py,sha256=j8xuAJ9yAAwnQi6ozwZ-nMnDyDnc3xWkeBZMtSuP4RU,844
|
|
152
|
-
xpk-1.
|
|
153
|
-
xpk-1.
|
|
154
|
-
xpk-1.
|
|
155
|
-
xpk-1.
|
|
156
|
-
xpk-1.
|
|
157
|
-
xpk-1.
|
|
145
|
+
xpk-1.1.1.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
146
|
+
xpk-1.1.1.dist-info/METADATA,sha256=CqGGSACNDUVw7uPODTokMvMqpBMc1gDbY99AUmvQ68Q,10013
|
|
147
|
+
xpk-1.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
148
|
+
xpk-1.1.1.dist-info/entry_points.txt,sha256=mzEtiIesFkT1kmcTUVDA1o3uOhiniX6tIz2wmOlMu1M,38
|
|
149
|
+
xpk-1.1.1.dist-info/top_level.txt,sha256=aDe4N0jicmuWExx_6w0TxWQJaEuPSs9BnLU-3aF1GLo,4
|
|
150
|
+
xpk-1.1.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
xpk
|
integration/README.md
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
This folder contains integration tests.
|
|
2
|
-
|
|
3
|
-
To run them env variables are needed:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
export PROJECT_ID=...
|
|
7
|
-
export REGION=...
|
|
8
|
-
export ZONE=...
|
|
9
|
-
export AUTH_CIDR=...
|
|
10
|
-
export DEPLOYMENT_DIR=...
|
|
11
|
-
export CLUSTER_NAME=...
|
|
12
|
-
export GCLOUD_CFG_PATH=...
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
To run tests:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
pytest src/integration
|
|
19
|
-
```
|
integration/__init__.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright 2024 Google LLC
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
"""
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright 2024 Google LLC
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
import docker
|
|
18
|
-
from docker.errors import APIError
|
|
19
|
-
from xpk.core.docker_manager import DockerManager, ctk_build_ref
|
|
20
|
-
import pytest
|
|
21
|
-
import os
|
|
22
|
-
import time
|
|
23
|
-
|
|
24
|
-
test_cfg_path = '/tmp/xpk_gcloud_cfg'
|
|
25
|
-
test_deployment_dir = '/tmp/xpk_deployment'
|
|
26
|
-
test_gcluster_cmd = 'gcluster --version'
|
|
27
|
-
test_ctk_xpk_img = 'gcluster-xpk'
|
|
28
|
-
test_ctk_xpk_container = 'xpk-test-container'
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def remove_img():
|
|
32
|
-
dc = docker.from_env()
|
|
33
|
-
try:
|
|
34
|
-
dc.images.remove(test_ctk_xpk_img, force=True)
|
|
35
|
-
except APIError as _:
|
|
36
|
-
pass
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def remove_container():
|
|
40
|
-
dc = docker.from_env()
|
|
41
|
-
try:
|
|
42
|
-
container = dc.containers.get(test_ctk_xpk_container)
|
|
43
|
-
container.remove(force=True)
|
|
44
|
-
except APIError as _:
|
|
45
|
-
pass
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def create_tmp_dirs():
|
|
49
|
-
os.mkdir(test_cfg_path)
|
|
50
|
-
os.mkdir(test_deployment_dir)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def remove_tmp_dirs():
|
|
54
|
-
os.removedirs(test_cfg_path)
|
|
55
|
-
os.removedirs(test_deployment_dir)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
@pytest.fixture(name='setup_img_name')
|
|
59
|
-
def remove_test_ctk_img():
|
|
60
|
-
create_tmp_dirs()
|
|
61
|
-
remove_container()
|
|
62
|
-
remove_img()
|
|
63
|
-
yield test_ctk_xpk_img
|
|
64
|
-
remove_container()
|
|
65
|
-
remove_img()
|
|
66
|
-
remove_tmp_dirs()
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def test_docker_build_image(setup_img_name):
|
|
70
|
-
dm = DockerManager(
|
|
71
|
-
gcloud_cfg_path=test_cfg_path,
|
|
72
|
-
working_dir=test_deployment_dir,
|
|
73
|
-
img_name=setup_img_name,
|
|
74
|
-
)
|
|
75
|
-
dm.initialize()
|
|
76
|
-
|
|
77
|
-
dc = docker.from_env()
|
|
78
|
-
containers_before = dc.containers.list(all=True)
|
|
79
|
-
dc.images.get(f'{setup_img_name}:{ctk_build_ref}')
|
|
80
|
-
containers_after = dc.containers.list(all=True)
|
|
81
|
-
assert len(containers_before) == len(containers_after)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
def test_run_command(setup_img_name):
|
|
85
|
-
|
|
86
|
-
dm = DockerManager(
|
|
87
|
-
gcloud_cfg_path=test_cfg_path,
|
|
88
|
-
working_dir=test_deployment_dir,
|
|
89
|
-
img_name=setup_img_name,
|
|
90
|
-
remove_container=True,
|
|
91
|
-
)
|
|
92
|
-
dc = docker.from_env()
|
|
93
|
-
|
|
94
|
-
containers_before = dc.containers.list(all=True)
|
|
95
|
-
dm.initialize()
|
|
96
|
-
dm.run_command(test_gcluster_cmd)
|
|
97
|
-
|
|
98
|
-
time.sleep(2)
|
|
99
|
-
|
|
100
|
-
containers_after = dc.containers.list(all=True)
|
|
101
|
-
|
|
102
|
-
assert len(containers_after) - len(containers_before) == 0
|