anyscale 0.26.68__py3-none-any.whl → 0.26.70__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.
- anyscale/_private/anyscale_client/anyscale_client.py +67 -1
- anyscale/_private/anyscale_client/common.py +20 -1
- anyscale/_private/anyscale_client/fake_anyscale_client.py +77 -10
- anyscale/client/README.md +16 -4
- anyscale/client/openapi_client/__init__.py +12 -4
- anyscale/client/openapi_client/api/default_api.py +588 -23
- anyscale/client/openapi_client/models/__init__.py +12 -4
- anyscale/client/openapi_client/models/api_key_info.py +29 -3
- anyscale/client/openapi_client/models/apply_autoscaling_config_update_model.py +350 -0
- anyscale/client/openapi_client/models/apply_production_service_multi_version_v2_model.py +207 -0
- anyscale/client/openapi_client/models/apply_production_service_v2_model.py +31 -3
- anyscale/client/openapi_client/models/baseimagesenum.py +70 -1
- anyscale/client/openapi_client/models/cloud_data_bucket_file_type.py +2 -1
- anyscale/client/openapi_client/models/{oauthconnectionresponse_response.py → clouddeployment_response.py} +11 -11
- anyscale/client/openapi_client/models/clusterdashboardnode_response.py +121 -0
- anyscale/client/openapi_client/models/create_experimental_workspace.py +29 -1
- anyscale/client/openapi_client/models/create_workspace_from_template.py +29 -1
- anyscale/client/openapi_client/models/create_workspace_template_version.py +31 -3
- anyscale/client/openapi_client/models/decorated_list_service_api_model.py +58 -1
- anyscale/client/openapi_client/models/decorated_production_service_v2_api_model.py +60 -3
- anyscale/client/openapi_client/models/decorated_service_event_api_model.py +3 -3
- anyscale/client/openapi_client/models/describe_machine_pool_machines_filters.py +33 -5
- anyscale/client/openapi_client/models/describe_machine_pool_workloads_filters.py +33 -5
- anyscale/client/openapi_client/models/{service_event_level.py → entity_type.py} +9 -9
- anyscale/client/openapi_client/models/event_level.py +2 -1
- anyscale/client/openapi_client/models/job_event_fields.py +206 -0
- anyscale/client/openapi_client/models/lineage_graph_node.py +70 -42
- anyscale/client/openapi_client/models/lineage_workload.py +31 -3
- anyscale/client/openapi_client/models/machine_type_partition_filter.py +152 -0
- anyscale/client/openapi_client/models/partition_info.py +30 -1
- anyscale/client/openapi_client/models/production_job_event.py +3 -3
- anyscale/client/openapi_client/models/rollout_strategy.py +2 -1
- anyscale/client/openapi_client/models/service_event_fields.py +318 -0
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +70 -1
- anyscale/client/openapi_client/models/task_summary_config.py +29 -3
- anyscale/client/openapi_client/models/task_table_config.py +29 -3
- anyscale/client/openapi_client/models/unified_event.py +377 -0
- anyscale/client/openapi_client/models/{ha_job_event_level.py → unified_origin_filter.py} +21 -9
- anyscale/client/openapi_client/models/unifiedevent_list_response.py +147 -0
- anyscale/client/openapi_client/models/workspace_event_fields.py +122 -0
- anyscale/client/openapi_client/models/workspace_template_version.py +30 -1
- anyscale/client/openapi_client/models/workspace_template_version_data_object.py +30 -1
- anyscale/cloud/models.py +2 -2
- anyscale/commands/cloud_commands.py +148 -11
- anyscale/commands/command_examples.py +53 -0
- anyscale/commands/job_commands.py +1 -1
- anyscale/commands/service_commands.py +130 -67
- anyscale/commands/setup_k8s.py +615 -49
- anyscale/controllers/cloud_controller.py +19 -5
- anyscale/controllers/kubernetes_verifier.py +80 -66
- anyscale/job/_private/job_sdk.py +47 -1
- anyscale/job/commands.py +3 -0
- anyscale/sdk/anyscale_client/models/apply_production_service_v2_model.py +31 -3
- anyscale/sdk/anyscale_client/models/apply_service_model.py +31 -3
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +70 -1
- anyscale/sdk/anyscale_client/models/rollout_strategy.py +2 -1
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +70 -1
- anyscale/service/__init__.py +11 -3
- anyscale/service/_private/service_sdk.py +361 -35
- anyscale/service/commands.py +15 -3
- anyscale/service/models.py +12 -0
- anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
- anyscale/version.py +1 -1
- {anyscale-0.26.68.dist-info → anyscale-0.26.70.dist-info}/METADATA +1 -1
- {anyscale-0.26.68.dist-info → anyscale-0.26.70.dist-info}/RECORD +70 -62
- anyscale/client/openapi_client/models/o_auth_connection_response.py +0 -229
- {anyscale-0.26.68.dist-info → anyscale-0.26.70.dist-info}/WHEEL +0 -0
- {anyscale-0.26.68.dist-info → anyscale-0.26.70.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.68.dist-info → anyscale-0.26.70.dist-info}/licenses/LICENSE +0 -0
- {anyscale-0.26.68.dist-info → anyscale-0.26.70.dist-info}/licenses/NOTICE +0 -0
- {anyscale-0.26.68.dist-info → anyscale-0.26.70.dist-info}/top_level.txt +0 -0
|
@@ -40,6 +40,7 @@ class WorkspaceTemplateVersion(object):
|
|
|
40
40
|
'id': 'str',
|
|
41
41
|
'version': 'int',
|
|
42
42
|
'creator_id': 'str',
|
|
43
|
+
'creator_email': 'str',
|
|
43
44
|
'created_at': 'datetime'
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -51,10 +52,11 @@ class WorkspaceTemplateVersion(object):
|
|
|
51
52
|
'id': 'id',
|
|
52
53
|
'version': 'version',
|
|
53
54
|
'creator_id': 'creator_id',
|
|
55
|
+
'creator_email': 'creator_email',
|
|
54
56
|
'created_at': 'created_at'
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
def __init__(self, template_id=None, image_uri=None, compute_configs=None, artifacts=None, id=None, version=None, creator_id=None, created_at=None, local_vars_configuration=None): # noqa: E501
|
|
59
|
+
def __init__(self, template_id=None, image_uri=None, compute_configs=None, artifacts=None, id=None, version=None, creator_id=None, creator_email=None, created_at=None, local_vars_configuration=None): # noqa: E501
|
|
58
60
|
"""WorkspaceTemplateVersion - a model defined in OpenAPI""" # noqa: E501
|
|
59
61
|
if local_vars_configuration is None:
|
|
60
62
|
local_vars_configuration = Configuration()
|
|
@@ -67,6 +69,7 @@ class WorkspaceTemplateVersion(object):
|
|
|
67
69
|
self._id = None
|
|
68
70
|
self._version = None
|
|
69
71
|
self._creator_id = None
|
|
72
|
+
self._creator_email = None
|
|
70
73
|
self._created_at = None
|
|
71
74
|
self.discriminator = None
|
|
72
75
|
|
|
@@ -80,6 +83,7 @@ class WorkspaceTemplateVersion(object):
|
|
|
80
83
|
self.id = id
|
|
81
84
|
self.version = version
|
|
82
85
|
self.creator_id = creator_id
|
|
86
|
+
self.creator_email = creator_email
|
|
83
87
|
self.created_at = created_at
|
|
84
88
|
|
|
85
89
|
@property
|
|
@@ -251,6 +255,31 @@ class WorkspaceTemplateVersion(object):
|
|
|
251
255
|
|
|
252
256
|
self._creator_id = creator_id
|
|
253
257
|
|
|
258
|
+
@property
|
|
259
|
+
def creator_email(self):
|
|
260
|
+
"""Gets the creator_email of this WorkspaceTemplateVersion. # noqa: E501
|
|
261
|
+
|
|
262
|
+
Email of the creator # noqa: E501
|
|
263
|
+
|
|
264
|
+
:return: The creator_email of this WorkspaceTemplateVersion. # noqa: E501
|
|
265
|
+
:rtype: str
|
|
266
|
+
"""
|
|
267
|
+
return self._creator_email
|
|
268
|
+
|
|
269
|
+
@creator_email.setter
|
|
270
|
+
def creator_email(self, creator_email):
|
|
271
|
+
"""Sets the creator_email of this WorkspaceTemplateVersion.
|
|
272
|
+
|
|
273
|
+
Email of the creator # noqa: E501
|
|
274
|
+
|
|
275
|
+
:param creator_email: The creator_email of this WorkspaceTemplateVersion. # noqa: E501
|
|
276
|
+
:type: str
|
|
277
|
+
"""
|
|
278
|
+
if self.local_vars_configuration.client_side_validation and creator_email is None: # noqa: E501
|
|
279
|
+
raise ValueError("Invalid value for `creator_email`, must not be `None`") # noqa: E501
|
|
280
|
+
|
|
281
|
+
self._creator_email = creator_email
|
|
282
|
+
|
|
254
283
|
@property
|
|
255
284
|
def created_at(self):
|
|
256
285
|
"""Gets the created_at of this WorkspaceTemplateVersion. # noqa: E501
|
|
@@ -40,6 +40,7 @@ class WorkspaceTemplateVersionDataObject(object):
|
|
|
40
40
|
'id': 'str',
|
|
41
41
|
'version': 'int',
|
|
42
42
|
'creator_id': 'str',
|
|
43
|
+
'creator_email': 'str',
|
|
43
44
|
'created_at': 'datetime'
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -51,10 +52,11 @@ class WorkspaceTemplateVersionDataObject(object):
|
|
|
51
52
|
'id': 'id',
|
|
52
53
|
'version': 'version',
|
|
53
54
|
'creator_id': 'creator_id',
|
|
55
|
+
'creator_email': 'creator_email',
|
|
54
56
|
'created_at': 'created_at'
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
def __init__(self, template_id=None, image_uri=None, compute_configs=None, artifacts=None, id=None, version=None, creator_id=None, created_at=None, local_vars_configuration=None): # noqa: E501
|
|
59
|
+
def __init__(self, template_id=None, image_uri=None, compute_configs=None, artifacts=None, id=None, version=None, creator_id=None, creator_email=None, created_at=None, local_vars_configuration=None): # noqa: E501
|
|
58
60
|
"""WorkspaceTemplateVersionDataObject - a model defined in OpenAPI""" # noqa: E501
|
|
59
61
|
if local_vars_configuration is None:
|
|
60
62
|
local_vars_configuration = Configuration()
|
|
@@ -67,6 +69,7 @@ class WorkspaceTemplateVersionDataObject(object):
|
|
|
67
69
|
self._id = None
|
|
68
70
|
self._version = None
|
|
69
71
|
self._creator_id = None
|
|
72
|
+
self._creator_email = None
|
|
70
73
|
self._created_at = None
|
|
71
74
|
self.discriminator = None
|
|
72
75
|
|
|
@@ -80,6 +83,7 @@ class WorkspaceTemplateVersionDataObject(object):
|
|
|
80
83
|
self.id = id
|
|
81
84
|
self.version = version
|
|
82
85
|
self.creator_id = creator_id
|
|
86
|
+
self.creator_email = creator_email
|
|
83
87
|
self.created_at = created_at
|
|
84
88
|
|
|
85
89
|
@property
|
|
@@ -251,6 +255,31 @@ class WorkspaceTemplateVersionDataObject(object):
|
|
|
251
255
|
|
|
252
256
|
self._creator_id = creator_id
|
|
253
257
|
|
|
258
|
+
@property
|
|
259
|
+
def creator_email(self):
|
|
260
|
+
"""Gets the creator_email of this WorkspaceTemplateVersionDataObject. # noqa: E501
|
|
261
|
+
|
|
262
|
+
Email of the creator # noqa: E501
|
|
263
|
+
|
|
264
|
+
:return: The creator_email of this WorkspaceTemplateVersionDataObject. # noqa: E501
|
|
265
|
+
:rtype: str
|
|
266
|
+
"""
|
|
267
|
+
return self._creator_email
|
|
268
|
+
|
|
269
|
+
@creator_email.setter
|
|
270
|
+
def creator_email(self, creator_email):
|
|
271
|
+
"""Sets the creator_email of this WorkspaceTemplateVersionDataObject.
|
|
272
|
+
|
|
273
|
+
Email of the creator # noqa: E501
|
|
274
|
+
|
|
275
|
+
:param creator_email: The creator_email of this WorkspaceTemplateVersionDataObject. # noqa: E501
|
|
276
|
+
:type: str
|
|
277
|
+
"""
|
|
278
|
+
if self.local_vars_configuration.client_side_validation and creator_email is None: # noqa: E501
|
|
279
|
+
raise ValueError("Invalid value for `creator_email`, must not be `None`") # noqa: E501
|
|
280
|
+
|
|
281
|
+
self._creator_email = creator_email
|
|
282
|
+
|
|
254
283
|
@property
|
|
255
284
|
def created_at(self):
|
|
256
285
|
"""Gets the created_at of this WorkspaceTemplateVersionDataObject. # noqa: E501
|
anyscale/cloud/models.py
CHANGED
|
@@ -497,9 +497,9 @@ compute_stack: VM
|
|
|
497
497
|
region: us-west-2
|
|
498
498
|
networking_mode: PUBLIC
|
|
499
499
|
object_storage:
|
|
500
|
-
bucket_name: s3://my-bucket
|
|
500
|
+
bucket_name: s3://my-bucket
|
|
501
501
|
file_storage:
|
|
502
|
-
file_storage_id: fs-12345678901234567
|
|
502
|
+
file_storage_id: fs-12345678901234567
|
|
503
503
|
aws_config:
|
|
504
504
|
vpc_id: vpc-12345678901234567
|
|
505
505
|
subnet_ids:
|
|
@@ -23,7 +23,10 @@ from anyscale.client.openapi_client.models import (
|
|
|
23
23
|
from anyscale.client.openapi_client.models.compute_stack import ComputeStack
|
|
24
24
|
from anyscale.cloud.models import CreateCloudCollaborator, CreateCloudCollaborators
|
|
25
25
|
from anyscale.commands import command_examples
|
|
26
|
-
from anyscale.commands.setup_k8s import
|
|
26
|
+
from anyscale.commands.setup_k8s import (
|
|
27
|
+
setup_kubernetes_cloud,
|
|
28
|
+
setup_kubernetes_cloud_resource,
|
|
29
|
+
)
|
|
27
30
|
from anyscale.commands.util import AnyscaleCommand, OptionPromptNull
|
|
28
31
|
from anyscale.controllers.cloud_controller import CloudController
|
|
29
32
|
from anyscale.util import (
|
|
@@ -137,14 +140,11 @@ def default_region(provider: str) -> str:
|
|
|
137
140
|
show_default=True,
|
|
138
141
|
)
|
|
139
142
|
@click.option(
|
|
140
|
-
"--cluster-name",
|
|
141
|
-
help="Kubernetes cluster name (required for k8s stack).",
|
|
142
|
-
required=False,
|
|
143
|
-
type=str,
|
|
143
|
+
"--cluster-name", help="Kubernetes cluster name. (K8s)", required=False, type=str,
|
|
144
144
|
)
|
|
145
145
|
@click.option(
|
|
146
146
|
"--namespace",
|
|
147
|
-
help="Kubernetes namespace for Anyscale operator (
|
|
147
|
+
help="Kubernetes namespace for Anyscale operator. (K8s)",
|
|
148
148
|
required=False,
|
|
149
149
|
type=str,
|
|
150
150
|
default="anyscale-operator",
|
|
@@ -166,13 +166,13 @@ def default_region(provider: str) -> str:
|
|
|
166
166
|
"--anyscale-managed",
|
|
167
167
|
is_flag=True,
|
|
168
168
|
default=False,
|
|
169
|
-
help="Let anyscale create all the resources.",
|
|
169
|
+
help="Let anyscale create all the resources. (VM)",
|
|
170
170
|
)
|
|
171
171
|
@click.option(
|
|
172
172
|
"--enable-head-node-fault-tolerance",
|
|
173
173
|
is_flag=True,
|
|
174
174
|
default=False,
|
|
175
|
-
help="Whether to enable head node fault tolerance for services.",
|
|
175
|
+
help="Whether to enable head node fault tolerance for services. (VM)",
|
|
176
176
|
)
|
|
177
177
|
@click.option(
|
|
178
178
|
"--yes", "-y", is_flag=True, default=False, help="Skip asking for confirmation."
|
|
@@ -193,17 +193,24 @@ def default_region(provider: str) -> str:
|
|
|
193
193
|
type=click.Choice([e.value for e in SharedStorageType], case_sensitive=False),
|
|
194
194
|
default=SharedStorageType.OBJECT_STORAGE.value,
|
|
195
195
|
show_default=True,
|
|
196
|
-
help="The type of shared storage to use for the cloud. Use 'object-storage' for cloud bucket-based storage (e.g., S3, GCS), or 'nfs' for network file systems.",
|
|
196
|
+
help="The type of shared storage to use for the cloud. Use 'object-storage' for cloud bucket-based storage (e.g., S3, GCS), or 'nfs' for network file systems. (VM)",
|
|
197
197
|
)
|
|
198
198
|
@click.option(
|
|
199
199
|
"--values-file",
|
|
200
|
-
help="Path to save the generated Helm values file (for k8s stack, default: auto-generated with timestamp).",
|
|
200
|
+
help="Path to save the generated Helm values file (for k8s stack, default: auto-generated with timestamp). (K8s)",
|
|
201
201
|
required=False,
|
|
202
202
|
type=str,
|
|
203
203
|
)
|
|
204
204
|
@click.option(
|
|
205
205
|
"--debug", is_flag=True, default=False, help="Enable debug logging.",
|
|
206
206
|
)
|
|
207
|
+
@click.option(
|
|
208
|
+
"--operator-chart",
|
|
209
|
+
help="Path to operator chart (skips helm repo add/update). (K8s)",
|
|
210
|
+
required=False,
|
|
211
|
+
type=str,
|
|
212
|
+
hidden=True,
|
|
213
|
+
)
|
|
207
214
|
def setup_cloud( # noqa: PLR0913
|
|
208
215
|
provider: str,
|
|
209
216
|
region: str,
|
|
@@ -220,6 +227,7 @@ def setup_cloud( # noqa: PLR0913
|
|
|
220
227
|
shared_storage: str,
|
|
221
228
|
values_file: Optional[str],
|
|
222
229
|
debug: bool,
|
|
230
|
+
operator_chart: Optional[str],
|
|
223
231
|
) -> None:
|
|
224
232
|
# TODO (congding): remove `anyscale_managed` in the future, now keeping it for compatibility
|
|
225
233
|
|
|
@@ -241,6 +249,7 @@ def setup_cloud( # noqa: PLR0913
|
|
|
241
249
|
yes=yes,
|
|
242
250
|
values_file=values_file,
|
|
243
251
|
debug=debug,
|
|
252
|
+
operator_chart=operator_chart,
|
|
244
253
|
)
|
|
245
254
|
return
|
|
246
255
|
|
|
@@ -375,6 +384,134 @@ def cloud_resource_create(
|
|
|
375
384
|
print(e)
|
|
376
385
|
|
|
377
386
|
|
|
387
|
+
@cloud_resource_group.command(
|
|
388
|
+
name="setup",
|
|
389
|
+
help="Set up cloud resources for an existing cloud on a Kubernetes cluster.",
|
|
390
|
+
cls=AnyscaleCommand,
|
|
391
|
+
is_alpha=True,
|
|
392
|
+
)
|
|
393
|
+
@click.option(
|
|
394
|
+
"--provider",
|
|
395
|
+
help="The cloud provider type.",
|
|
396
|
+
required=True,
|
|
397
|
+
type=click.Choice(["aws", "gcp"], case_sensitive=False),
|
|
398
|
+
)
|
|
399
|
+
@click.option(
|
|
400
|
+
"--region", help="Region to set up the resources in.", required=True,
|
|
401
|
+
)
|
|
402
|
+
@click.option(
|
|
403
|
+
"--stack",
|
|
404
|
+
help="The compute stack to use (only k8s is supported for this command).",
|
|
405
|
+
required=False,
|
|
406
|
+
type=click.Choice(["k8s"], case_sensitive=False),
|
|
407
|
+
default="k8s",
|
|
408
|
+
show_default=True,
|
|
409
|
+
)
|
|
410
|
+
@click.option(
|
|
411
|
+
"--cloud",
|
|
412
|
+
help="The name of the existing cloud to add resources to. Either this or --cloud-id is required.",
|
|
413
|
+
type=str,
|
|
414
|
+
required=False,
|
|
415
|
+
)
|
|
416
|
+
@click.option(
|
|
417
|
+
"--cloud-id",
|
|
418
|
+
help="The ID of the existing cloud to add resources to. Either this or --cloud is required.",
|
|
419
|
+
type=str,
|
|
420
|
+
required=False,
|
|
421
|
+
)
|
|
422
|
+
@click.option(
|
|
423
|
+
"--cluster-name", help="Kubernetes cluster name.", required=True, type=str,
|
|
424
|
+
)
|
|
425
|
+
@click.option(
|
|
426
|
+
"--namespace",
|
|
427
|
+
help="Kubernetes namespace for Anyscale operator.",
|
|
428
|
+
required=False,
|
|
429
|
+
type=str,
|
|
430
|
+
default="anyscale-operator",
|
|
431
|
+
)
|
|
432
|
+
@click.option(
|
|
433
|
+
"--project-id",
|
|
434
|
+
help="Globally Unique project ID for GCP clouds (e.g., my-project-abc123)",
|
|
435
|
+
required=False,
|
|
436
|
+
type=str,
|
|
437
|
+
)
|
|
438
|
+
@click.option(
|
|
439
|
+
"--functional-verify",
|
|
440
|
+
help="Verify the cloud is functional. This will check that the cloud can launch workspace/service.",
|
|
441
|
+
required=False,
|
|
442
|
+
is_flag=False,
|
|
443
|
+
flag_value="workspace",
|
|
444
|
+
)
|
|
445
|
+
@click.option(
|
|
446
|
+
"--yes", "-y", is_flag=True, default=False, help="Skip asking for confirmation."
|
|
447
|
+
)
|
|
448
|
+
@click.option(
|
|
449
|
+
"--values-file",
|
|
450
|
+
help="Path to save the generated Helm values file (default: auto-generated with timestamp).",
|
|
451
|
+
required=False,
|
|
452
|
+
type=str,
|
|
453
|
+
)
|
|
454
|
+
@click.option(
|
|
455
|
+
"--debug", is_flag=True, default=False, help="Enable debug logging.",
|
|
456
|
+
)
|
|
457
|
+
@click.option(
|
|
458
|
+
"--operator-chart",
|
|
459
|
+
help="Path to operator chart (skips helm repo add/update).",
|
|
460
|
+
required=False,
|
|
461
|
+
type=str,
|
|
462
|
+
hidden=True,
|
|
463
|
+
)
|
|
464
|
+
@click.option(
|
|
465
|
+
"--resource-name",
|
|
466
|
+
help="Name for the cloud resource (optional, will be auto-generated if not provided)",
|
|
467
|
+
required=False,
|
|
468
|
+
type=str,
|
|
469
|
+
default=None,
|
|
470
|
+
)
|
|
471
|
+
def cloud_resource_setup( # noqa: PLR0913
|
|
472
|
+
provider: str,
|
|
473
|
+
region: str,
|
|
474
|
+
stack: str,
|
|
475
|
+
cloud: Optional[str],
|
|
476
|
+
cloud_id: Optional[str],
|
|
477
|
+
cluster_name: str,
|
|
478
|
+
namespace: str,
|
|
479
|
+
project_id: Optional[str],
|
|
480
|
+
functional_verify: Optional[str],
|
|
481
|
+
yes: bool,
|
|
482
|
+
values_file: Optional[str],
|
|
483
|
+
debug: bool,
|
|
484
|
+
operator_chart: Optional[str],
|
|
485
|
+
resource_name: Optional[str],
|
|
486
|
+
) -> None:
|
|
487
|
+
"""
|
|
488
|
+
Set up cloud resources for an existing Anyscale cloud on a Kubernetes cluster.
|
|
489
|
+
|
|
490
|
+
This command sets up infrastructure (S3/GCS buckets, IAM roles, etc.) and installs
|
|
491
|
+
the Anyscale operator on your Kubernetes cluster, then creates a cloud resource in
|
|
492
|
+
an existing cloud instead of registering a new cloud.
|
|
493
|
+
"""
|
|
494
|
+
# Validate stack
|
|
495
|
+
if stack != "k8s":
|
|
496
|
+
raise click.ClickException("Only --stack=k8s is supported for this command.")
|
|
497
|
+
|
|
498
|
+
setup_kubernetes_cloud_resource(
|
|
499
|
+
provider=provider,
|
|
500
|
+
region=region,
|
|
501
|
+
cloud_name=cloud,
|
|
502
|
+
cloud_id=cloud_id,
|
|
503
|
+
cluster_name=cluster_name,
|
|
504
|
+
namespace=namespace,
|
|
505
|
+
project_id=project_id,
|
|
506
|
+
functional_verify=bool(functional_verify),
|
|
507
|
+
yes=yes,
|
|
508
|
+
values_file=values_file,
|
|
509
|
+
debug=debug,
|
|
510
|
+
operator_chart=operator_chart,
|
|
511
|
+
resource_name=resource_name,
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
|
|
378
515
|
@cloud_resource_group.command(
|
|
379
516
|
name="delete",
|
|
380
517
|
help="Remove a cloud resource from an existing cloud.",
|
|
@@ -445,7 +582,7 @@ def cloud_resource_delete(cloud: str, resource: str, yes: bool,) -> None:
|
|
|
445
582
|
@click.option(
|
|
446
583
|
"--resources-file",
|
|
447
584
|
"-f",
|
|
448
|
-
help="EXPERIMENTAL: Path to a YAML file defining a list of cloud resources. Schema: https://docs.anyscale.com/reference/cloud/#cloudresource.",
|
|
585
|
+
help="EXPERIMENTAL: Path to a YAML file defining a single cloud resource or a list of cloud resources. Schema: https://docs.anyscale.com/reference/cloud/#cloudresource.",
|
|
449
586
|
required=False,
|
|
450
587
|
)
|
|
451
588
|
@click.option(
|
|
@@ -538,6 +538,59 @@ $ anyscale project get-default --cloud my-cloud-id --json
|
|
|
538
538
|
"""
|
|
539
539
|
|
|
540
540
|
|
|
541
|
+
CLOUD_SETUP_K8S_AWS_EXAMPLE = """\
|
|
542
|
+
# Set up a Kubernetes cloud on AWS EKS
|
|
543
|
+
$ anyscale cloud setup --provider aws --region us-west-2 --name my-k8s-cloud \\
|
|
544
|
+
--stack k8s --cluster-name my-eks-cluster --namespace anyscale-operator \\
|
|
545
|
+
--debug --yes
|
|
546
|
+
Output
|
|
547
|
+
(anyscale +1.0s) Setting up Kubernetes cloud 'my-k8s-cloud' on AWS
|
|
548
|
+
(anyscale +1.5s) Required CLI tools are installed (kubectl, helm, aws)
|
|
549
|
+
(anyscale +2.3s) Using namespace: anyscale-operator
|
|
550
|
+
(anyscale +5.2s) Cluster discovered: arn:aws:eks:us-west-2:123456789012:cluster/my-eks-cluster
|
|
551
|
+
(anyscale +8.4s) Setting up AWS infrastructure...
|
|
552
|
+
(anyscale +1m12.3s) CloudFormation stack created
|
|
553
|
+
(anyscale +1m15.7s) Cloud registered with ID: cld_abc123
|
|
554
|
+
(anyscale +1m18.2s) Adding Anyscale Helm repository...
|
|
555
|
+
(anyscale +1m20.5s) Installing Anyscale operator...
|
|
556
|
+
(anyscale +1m25.8s) Generated Helm values file: anyscale-helm-values-aws-anyscale-operator-20241015_175602.yaml
|
|
557
|
+
(anyscale +2m45.3s) Helm installation completed successfully
|
|
558
|
+
(anyscale +2m45.4s) Kubernetes cloud 'my-k8s-cloud' setup completed successfully!
|
|
559
|
+
"""
|
|
560
|
+
|
|
561
|
+
CLOUD_SETUP_K8S_GCP_EXAMPLE = """\
|
|
562
|
+
# Set up a Kubernetes cloud on GCP GKE
|
|
563
|
+
$ anyscale cloud setup --provider gcp --region us-central1 --name my-gke-cloud \\
|
|
564
|
+
--stack k8s --cluster-name my-gke-cluster --namespace anyscale-operator \\
|
|
565
|
+
--project-id my-project-123 --yes
|
|
566
|
+
Output
|
|
567
|
+
(anyscale +1.0s) Setting up Kubernetes cloud 'my-gke-cloud' on GCP
|
|
568
|
+
(anyscale +1.5s) Required CLI tools are installed (kubectl, helm, gcloud, gsutil)
|
|
569
|
+
(anyscale +2.3s) Using namespace: anyscale-operator
|
|
570
|
+
(anyscale +5.8s) Cluster discovered: gke_my-project-123_us-central1_my-gke-cluster
|
|
571
|
+
(anyscale +9.2s) Setting up GCP infrastructure...
|
|
572
|
+
(anyscale +15.4s) Created GCS bucket: anyscale-k8s-my-gke-cloud-a1b2c3d4
|
|
573
|
+
(anyscale +18.7s) Created service account: anyscale-operator-e5f6g7h8@my-project-123.iam.gserviceaccount.com
|
|
574
|
+
(anyscale +25.3s) GCP resources created successfully
|
|
575
|
+
(anyscale +28.1s) Cloud registered with ID: cld_xyz789
|
|
576
|
+
(anyscale +30.5s) Installing Anyscale operator...
|
|
577
|
+
(anyscale +35.8s) Generated Helm values file: anyscale-helm-values-gcp-anyscale-operator-20241015_180215.yaml
|
|
578
|
+
(anyscale +1m55.2s) Helm installation completed successfully
|
|
579
|
+
(anyscale +1m55.3s) Kubernetes cloud 'my-gke-cloud' setup completed successfully!
|
|
580
|
+
"""
|
|
581
|
+
|
|
582
|
+
CLOUD_SETUP_K8S_CUSTOM_VALUES_EXAMPLE = """\
|
|
583
|
+
# Set up a Kubernetes cloud with a custom Helm values file path
|
|
584
|
+
$ anyscale cloud setup --provider aws --region us-west-2 --name my-k8s-cloud \\
|
|
585
|
+
--stack k8s --cluster-name my-eks-cluster \\
|
|
586
|
+
--values-file /path/to/custom-values.yaml --yes
|
|
587
|
+
Output
|
|
588
|
+
(anyscale +1.0s) Setting up Kubernetes cloud 'my-k8s-cloud' on AWS
|
|
589
|
+
...
|
|
590
|
+
(anyscale +1m25.8s) Generated Helm values file: /path/to/custom-values.yaml
|
|
591
|
+
...
|
|
592
|
+
"""
|
|
593
|
+
|
|
541
594
|
CLOUD_ADD_COLLABORATORS_EXAMPLE = """\
|
|
542
595
|
$ anyscale cloud add-collaborators --cloud cloud_name --users-file collaborators.yaml
|
|
543
596
|
(anyscale +1.3s) Successfully added 2 collaborators to cloud cloud_name.
|
|
@@ -347,7 +347,7 @@ and override the entrypoint with `python main.py`.
|
|
|
347
347
|
log.info("Use `--wait` to wait for the job to run and stream logs.")
|
|
348
348
|
|
|
349
349
|
if wait:
|
|
350
|
-
anyscale.job.wait(id=job_id)
|
|
350
|
+
anyscale.job.wait(id=job_id, follow=True)
|
|
351
351
|
|
|
352
352
|
|
|
353
353
|
# TODO(mowen): Add cloud support for this when we refactor to new SDK method
|