anyscale 0.26.52__py3-none-any.whl → 0.26.53__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 +26 -26
- anyscale/_private/anyscale_client/common.py +5 -5
- anyscale/_private/anyscale_client/fake_anyscale_client.py +6 -6
- anyscale/_private/docgen/__main__.py +8 -8
- anyscale/_private/docgen/generator.py +48 -10
- anyscale/_private/docgen/models.md +2 -2
- anyscale/_private/sdk/__init__.py +124 -1
- anyscale/_private/workload/workload_config.py +4 -6
- anyscale/_private/workload/workload_sdk.py +9 -11
- anyscale/client/README.md +12 -13
- anyscale/client/openapi_client/__init__.py +3 -4
- anyscale/client/openapi_client/api/default_api.py +272 -325
- anyscale/client/openapi_client/models/__init__.py +3 -4
- anyscale/client/openapi_client/models/aws_config.py +2 -2
- anyscale/client/openapi_client/models/baseimagesenum.py +76 -1
- anyscale/client/openapi_client/models/cloud_data_bucket_presigned_url_request.py +31 -3
- anyscale/client/openapi_client/models/cloud_deployment.py +37 -36
- anyscale/client/openapi_client/models/create_resource_notification.py +31 -3
- anyscale/client/openapi_client/models/{decorated_cloud_deployment.py → decorated_cloud_resource.py} +124 -96
- anyscale/client/openapi_client/models/{clouddeployment_list_response.py → decoratedcloudresource_list_response.py} +15 -15
- anyscale/client/openapi_client/models/{clouddeployment_response.py → decoratedcloudresource_response.py} +11 -11
- anyscale/client/openapi_client/models/file_storage.py +4 -4
- anyscale/client/openapi_client/models/gcp_config.py +2 -2
- anyscale/client/openapi_client/models/ha_job_error_types.py +9 -2
- anyscale/client/openapi_client/models/object_storage.py +2 -2
- anyscale/client/openapi_client/models/resource_alert_event_type.py +2 -1
- anyscale/client/openapi_client/models/resource_notification.py +29 -1
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +76 -1
- anyscale/client/openapi_client/models/workload_info.py +31 -3
- anyscale/client/openapi_client/models/workload_state_info.py +29 -1
- anyscale/cloud/models.py +39 -42
- anyscale/commands/cloud_commands.py +25 -23
- anyscale/commands/command_examples.py +10 -10
- anyscale/commands/exec_commands.py +12 -1
- anyscale/commands/list_commands.py +42 -12
- anyscale/commands/project_commands.py +23 -10
- anyscale/commands/schedule_commands.py +22 -11
- anyscale/commands/service_commands.py +11 -6
- anyscale/commands/util.py +94 -1
- anyscale/commands/workspace_commands.py +92 -38
- anyscale/compute_config/__init__.py +1 -1
- anyscale/compute_config/_private/compute_config_sdk.py +8 -11
- anyscale/compute_config/commands.py +3 -3
- anyscale/compute_config/models.py +30 -30
- anyscale/controllers/cloud_controller.py +306 -300
- anyscale/controllers/kubernetes_verifier.py +1 -1
- anyscale/job/_private/job_sdk.py +12 -12
- anyscale/job/models.py +1 -1
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +76 -1
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +76 -1
- anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
- anyscale/version.py +1 -1
- anyscale/workspace/commands.py +114 -23
- anyscale/workspace/models.py +3 -5
- {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/METADATA +1 -1
- {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/RECORD +61 -62
- anyscale/client/openapi_client/models/decoratedclouddeployment_response.py +0 -121
- {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/WHEEL +0 -0
- {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/licenses/LICENSE +0 -0
- {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/licenses/NOTICE +0 -0
- {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/top_level.txt +0 -0
@@ -38,7 +38,8 @@ class WorkloadInfo(object):
|
|
38
38
|
'workload_start_time': 'datetime',
|
39
39
|
'workload_cloud': 'str',
|
40
40
|
'workload_project': 'str',
|
41
|
-
'workload_creator': 'str'
|
41
|
+
'workload_creator': 'str',
|
42
|
+
'url': 'str'
|
42
43
|
}
|
43
44
|
|
44
45
|
attribute_map = {
|
@@ -47,10 +48,11 @@ class WorkloadInfo(object):
|
|
47
48
|
'workload_start_time': 'workload_start_time',
|
48
49
|
'workload_cloud': 'workload_cloud',
|
49
50
|
'workload_project': 'workload_project',
|
50
|
-
'workload_creator': 'workload_creator'
|
51
|
+
'workload_creator': 'workload_creator',
|
52
|
+
'url': 'url'
|
51
53
|
}
|
52
54
|
|
53
|
-
def __init__(self, workload_name=None, workload_type=None, workload_start_time=None, workload_cloud=None, workload_project='', workload_creator='', local_vars_configuration=None): # noqa: E501
|
55
|
+
def __init__(self, workload_name=None, workload_type=None, workload_start_time=None, workload_cloud=None, workload_project='', workload_creator='', url='', local_vars_configuration=None): # noqa: E501
|
54
56
|
"""WorkloadInfo - a model defined in OpenAPI""" # noqa: E501
|
55
57
|
if local_vars_configuration is None:
|
56
58
|
local_vars_configuration = Configuration()
|
@@ -62,6 +64,7 @@ class WorkloadInfo(object):
|
|
62
64
|
self._workload_cloud = None
|
63
65
|
self._workload_project = None
|
64
66
|
self._workload_creator = None
|
67
|
+
self._url = None
|
65
68
|
self.discriminator = None
|
66
69
|
|
67
70
|
self.workload_name = workload_name
|
@@ -72,6 +75,8 @@ class WorkloadInfo(object):
|
|
72
75
|
self.workload_project = workload_project
|
73
76
|
if workload_creator is not None:
|
74
77
|
self.workload_creator = workload_creator
|
78
|
+
if url is not None:
|
79
|
+
self.url = url
|
75
80
|
|
76
81
|
@property
|
77
82
|
def workload_name(self):
|
@@ -219,6 +224,29 @@ class WorkloadInfo(object):
|
|
219
224
|
|
220
225
|
self._workload_creator = workload_creator
|
221
226
|
|
227
|
+
@property
|
228
|
+
def url(self):
|
229
|
+
"""Gets the url of this WorkloadInfo. # noqa: E501
|
230
|
+
|
231
|
+
Relative URL for deeplink to workload detail page. # noqa: E501
|
232
|
+
|
233
|
+
:return: The url of this WorkloadInfo. # noqa: E501
|
234
|
+
:rtype: str
|
235
|
+
"""
|
236
|
+
return self._url
|
237
|
+
|
238
|
+
@url.setter
|
239
|
+
def url(self, url):
|
240
|
+
"""Sets the url of this WorkloadInfo.
|
241
|
+
|
242
|
+
Relative URL for deeplink to workload detail page. # noqa: E501
|
243
|
+
|
244
|
+
:param url: The url of this WorkloadInfo. # noqa: E501
|
245
|
+
:type: str
|
246
|
+
"""
|
247
|
+
|
248
|
+
self._url = url
|
249
|
+
|
222
250
|
def to_dict(self):
|
223
251
|
"""Returns the model properties as a dict"""
|
224
252
|
result = {}
|
@@ -39,6 +39,7 @@ class WorkloadStateInfo(object):
|
|
39
39
|
'workload_cloud': 'str',
|
40
40
|
'workload_project': 'str',
|
41
41
|
'workload_creator': 'str',
|
42
|
+
'url': 'str',
|
42
43
|
'workload_machine_info': 'list[WorkloadMachineInfo]'
|
43
44
|
}
|
44
45
|
|
@@ -49,10 +50,11 @@ class WorkloadStateInfo(object):
|
|
49
50
|
'workload_cloud': 'workload_cloud',
|
50
51
|
'workload_project': 'workload_project',
|
51
52
|
'workload_creator': 'workload_creator',
|
53
|
+
'url': 'url',
|
52
54
|
'workload_machine_info': 'workload_machine_info'
|
53
55
|
}
|
54
56
|
|
55
|
-
def __init__(self, workload_name=None, workload_type=None, workload_start_time=None, workload_cloud=None, workload_project='', workload_creator='', workload_machine_info=None, local_vars_configuration=None): # noqa: E501
|
57
|
+
def __init__(self, workload_name=None, workload_type=None, workload_start_time=None, workload_cloud=None, workload_project='', workload_creator='', url='', workload_machine_info=None, local_vars_configuration=None): # noqa: E501
|
56
58
|
"""WorkloadStateInfo - a model defined in OpenAPI""" # noqa: E501
|
57
59
|
if local_vars_configuration is None:
|
58
60
|
local_vars_configuration = Configuration()
|
@@ -64,6 +66,7 @@ class WorkloadStateInfo(object):
|
|
64
66
|
self._workload_cloud = None
|
65
67
|
self._workload_project = None
|
66
68
|
self._workload_creator = None
|
69
|
+
self._url = None
|
67
70
|
self._workload_machine_info = None
|
68
71
|
self.discriminator = None
|
69
72
|
|
@@ -75,6 +78,8 @@ class WorkloadStateInfo(object):
|
|
75
78
|
self.workload_project = workload_project
|
76
79
|
if workload_creator is not None:
|
77
80
|
self.workload_creator = workload_creator
|
81
|
+
if url is not None:
|
82
|
+
self.url = url
|
78
83
|
self.workload_machine_info = workload_machine_info
|
79
84
|
|
80
85
|
@property
|
@@ -223,6 +228,29 @@ class WorkloadStateInfo(object):
|
|
223
228
|
|
224
229
|
self._workload_creator = workload_creator
|
225
230
|
|
231
|
+
@property
|
232
|
+
def url(self):
|
233
|
+
"""Gets the url of this WorkloadStateInfo. # noqa: E501
|
234
|
+
|
235
|
+
Relative URL for deeplink to workload detail page. # noqa: E501
|
236
|
+
|
237
|
+
:return: The url of this WorkloadStateInfo. # noqa: E501
|
238
|
+
:rtype: str
|
239
|
+
"""
|
240
|
+
return self._url
|
241
|
+
|
242
|
+
@url.setter
|
243
|
+
def url(self, url):
|
244
|
+
"""Sets the url of this WorkloadStateInfo.
|
245
|
+
|
246
|
+
Relative URL for deeplink to workload detail page. # noqa: E501
|
247
|
+
|
248
|
+
:param url: The url of this WorkloadStateInfo. # noqa: E501
|
249
|
+
:type: str
|
250
|
+
"""
|
251
|
+
|
252
|
+
self._url = url
|
253
|
+
|
226
254
|
@property
|
227
255
|
def workload_machine_info(self):
|
228
256
|
"""Gets the workload_machine_info of this WorkloadStateInfo. # noqa: E501
|
anyscale/cloud/models.py
CHANGED
@@ -222,15 +222,6 @@ cloud = Cloud(
|
|
222
222
|
return is_aggregated_logs_enabled
|
223
223
|
|
224
224
|
|
225
|
-
################################################################################
|
226
|
-
# NOTE: The models below are copied from the OpenAPI CloudDeployment model, which
|
227
|
-
# is what is used in the CLI. They are only defined here so that they appear in
|
228
|
-
# the generated docs, to provide users with examples of the expected
|
229
|
-
# CloudDeployment YAML format. There is no SDK support for Cloud Deployments,
|
230
|
-
# nor is there SDK support for creating/updating/deleting Clouds.
|
231
|
-
################################################################################
|
232
|
-
|
233
|
-
|
234
225
|
class NetworkingMode(ModelEnum):
|
235
226
|
PUBLIC = "PUBLIC"
|
236
227
|
PRIVATE = "PRIVATE"
|
@@ -281,7 +272,7 @@ object_storage:
|
|
281
272
|
region: Optional[str] = field(
|
282
273
|
default=None,
|
283
274
|
metadata={
|
284
|
-
"docstring": "The region for the cloud storage bucket. Defaults to the region of the
|
275
|
+
"docstring": "The region for the cloud storage bucket. Defaults to the region of the cloud resource."
|
285
276
|
},
|
286
277
|
)
|
287
278
|
endpoint: Optional[str] = field(
|
@@ -321,13 +312,13 @@ file_storage:
|
|
321
312
|
persistent_volume_claim: Optional[str] = field(
|
322
313
|
default=None,
|
323
314
|
metadata={
|
324
|
-
"docstring": "For Kubernetes
|
315
|
+
"docstring": "For Kubernetes resources, the name of the persistent volume claim used to mount shared storage into pods."
|
325
316
|
},
|
326
317
|
)
|
327
318
|
csi_ephemeral_volume_driver: Optional[str] = field(
|
328
319
|
default=None,
|
329
320
|
metadata={
|
330
|
-
"docstring": "For Kubernetes
|
321
|
+
"docstring": "For Kubernetes resources, the CSI ephemeral volume driver used to mount shared storage into pods."
|
331
322
|
},
|
332
323
|
)
|
333
324
|
|
@@ -390,7 +381,7 @@ aws_config:
|
|
390
381
|
cloudformation_id: Optional[str] = field(
|
391
382
|
default=None,
|
392
383
|
metadata={
|
393
|
-
"docstring": "The CloudFormation stack ID, for
|
384
|
+
"docstring": "The CloudFormation stack ID, for Anyscale-managed resources."
|
394
385
|
},
|
395
386
|
)
|
396
387
|
|
@@ -452,7 +443,7 @@ gcp_config:
|
|
452
443
|
deployment_manager_id: Optional[str] = field(
|
453
444
|
default=None,
|
454
445
|
metadata={
|
455
|
-
"docstring": "The deployment manager deployment ID, for
|
446
|
+
"docstring": "The deployment manager deployment ID, for Anyscale-managed resources."
|
456
447
|
},
|
457
448
|
)
|
458
449
|
|
@@ -483,41 +474,48 @@ kubernetes_config:
|
|
483
474
|
)
|
484
475
|
|
485
476
|
|
477
|
+
################################################################################
|
478
|
+
# NOTE: The CloudResource model below is copied from the OpenAPI CloudDeployment
|
479
|
+
# model, which is what is actually used in the CLI. It is only defined here so
|
480
|
+
# that it appears in the generated docs, to provide users with examples of the
|
481
|
+
# expected YAML format. There is no CloudResource SDK support, so the name of
|
482
|
+
# this model should not actually matter. (There is also no Cloud SDK support.)
|
483
|
+
################################################################################
|
486
484
|
@dataclass(frozen=True)
|
487
|
-
class
|
488
|
-
"""Cloud
|
485
|
+
class CloudResource(ModelBase):
|
486
|
+
"""Cloud resource configuration."""
|
489
487
|
|
490
488
|
__skip_py_example__ = True
|
491
489
|
|
492
490
|
__doc_yaml_example__ = """\
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
memorydb_cluster_name: my-memorydb-cluster
|
491
|
+
cloud_resource_id: cldrsrc_12345678901234567890123456
|
492
|
+
name: my-cloud-resource
|
493
|
+
provider: AWS
|
494
|
+
compute_stack: VM
|
495
|
+
region: us-west-2
|
496
|
+
networking_mode: PUBLIC
|
497
|
+
object_storage:
|
498
|
+
bucket_name: s3://my-bucket
|
499
|
+
file_storage:
|
500
|
+
file_storage_id: fs-12345678901234567
|
501
|
+
aws_config:
|
502
|
+
vpc_id: vpc-12345678901234567
|
503
|
+
subnet_ids:
|
504
|
+
- subnet-11111111111111111
|
505
|
+
- subnet-22222222222222222
|
506
|
+
security_group_ids:
|
507
|
+
- sg-12345678901234567
|
508
|
+
anyscale_iam_role_id: arn:aws:iam::123456789012:role/anyscale-iam-role
|
509
|
+
cluster_iam_role_id: arn:aws:iam::123456789012:role/cluster-node-role
|
510
|
+
memorydb_cluster_name: my-memorydb-cluster
|
514
511
|
"""
|
515
512
|
|
516
|
-
|
517
|
-
default=None,
|
513
|
+
cloud_resource_id: Optional[str] = field(
|
514
|
+
default=None,
|
515
|
+
metadata={"docstring": "Unique identifier for this cloud resource."},
|
518
516
|
)
|
519
517
|
name: Optional[str] = field(
|
520
|
-
default=None, metadata={"docstring": "The name of this
|
518
|
+
default=None, metadata={"docstring": "The name of this cloud resource."},
|
521
519
|
)
|
522
520
|
provider: Union[CloudProvider, str] = field(
|
523
521
|
default=CloudProvider.UNKNOWN,
|
@@ -528,8 +526,7 @@ cloud_deployment:
|
|
528
526
|
metadata={"docstring": "The compute stack (VM or K8S)."},
|
529
527
|
)
|
530
528
|
region: Optional[str] = field(
|
531
|
-
default=None,
|
532
|
-
metadata={"docstring": "The region for the deployment (e.g., us-west-2)."},
|
529
|
+
default=None, metadata={"docstring": "The region (e.g., us-west-2)."},
|
533
530
|
)
|
534
531
|
networking_mode: Optional[NetworkingMode] = field(
|
535
532
|
default=None,
|
@@ -244,8 +244,8 @@ def list_cloud(name: Optional[str], cloud_id: Optional[str], max_items: int,) ->
|
|
244
244
|
)
|
245
245
|
|
246
246
|
|
247
|
-
@cloud_cli.group("
|
248
|
-
def
|
247
|
+
@cloud_cli.group("resource", help="Manage the configuration for a cloud resource.")
|
248
|
+
def cloud_resource_group() -> None:
|
249
249
|
pass
|
250
250
|
|
251
251
|
|
@@ -254,68 +254,68 @@ def cloud_config_group() -> None:
|
|
254
254
|
pass
|
255
255
|
|
256
256
|
|
257
|
-
@
|
257
|
+
@cloud_resource_group.command(
|
258
258
|
name="create",
|
259
|
-
help="Create a new cloud
|
259
|
+
help="Create a new cloud resource in an existing cloud.",
|
260
260
|
cls=AnyscaleCommand,
|
261
|
-
example=command_examples.
|
261
|
+
example=command_examples.CLOUD_RESOURCE_CREATE_EXAMPLE,
|
262
262
|
is_alpha=True,
|
263
263
|
)
|
264
264
|
@click.option(
|
265
265
|
"--cloud",
|
266
|
-
help="The name of the cloud to
|
266
|
+
help="The name of the cloud to add the new resource to.",
|
267
267
|
type=str,
|
268
268
|
required=True,
|
269
269
|
)
|
270
270
|
@click.option(
|
271
271
|
"--file",
|
272
272
|
"-f",
|
273
|
-
help="Path to a YAML file defining the cloud
|
273
|
+
help="Path to a YAML file defining the cloud resource. Schema: https://docs.anyscale.com/reference/cloud/#cloudresource.",
|
274
274
|
required=True,
|
275
275
|
)
|
276
276
|
@click.option(
|
277
277
|
"--skip-verification",
|
278
278
|
is_flag=True,
|
279
279
|
default=False,
|
280
|
-
help="Skip cloud
|
280
|
+
help="Skip cloud resource verification.",
|
281
281
|
)
|
282
282
|
@click.option(
|
283
283
|
"--yes", "-y", is_flag=True, default=False, help="Skip asking for confirmation."
|
284
284
|
)
|
285
|
-
def
|
285
|
+
def cloud_resource_create(
|
286
286
|
cloud: str, file: str, skip_verification: bool, yes: bool,
|
287
287
|
) -> None:
|
288
288
|
try:
|
289
|
-
CloudController().
|
289
|
+
CloudController().create_cloud_resource(cloud, file, skip_verification, yes)
|
290
290
|
except click.ClickException as e:
|
291
291
|
print(e)
|
292
292
|
|
293
293
|
|
294
|
-
@
|
294
|
+
@cloud_resource_group.command(
|
295
295
|
name="delete",
|
296
|
-
help="Remove a cloud
|
296
|
+
help="Remove a cloud resource from an existing cloud.",
|
297
297
|
cls=AnyscaleCommand,
|
298
|
-
example=command_examples.
|
298
|
+
example=command_examples.CLOUD_RESOURCE_DELETE_EXAMPLE,
|
299
299
|
is_alpha=True,
|
300
300
|
)
|
301
301
|
@click.option(
|
302
302
|
"--cloud",
|
303
|
-
help="The name of the cloud to remove the
|
303
|
+
help="The name of the cloud to remove the resource from.",
|
304
304
|
type=str,
|
305
305
|
required=True,
|
306
306
|
)
|
307
307
|
@click.option(
|
308
|
-
"--
|
309
|
-
help="The name of the
|
308
|
+
"--resource",
|
309
|
+
help="The name of the cloud resource to remove.",
|
310
310
|
type=str,
|
311
311
|
required=True,
|
312
312
|
)
|
313
313
|
@click.option(
|
314
314
|
"--yes", "-y", is_flag=True, default=False, help="Skip asking for confirmation."
|
315
315
|
)
|
316
|
-
def
|
316
|
+
def cloud_resource_delete(cloud: str, resource: str, yes: bool,) -> None:
|
317
317
|
try:
|
318
|
-
CloudController().
|
318
|
+
CloudController().remove_cloud_resource(cloud, resource, yes)
|
319
319
|
except click.ClickException as e:
|
320
320
|
print(e)
|
321
321
|
|
@@ -361,7 +361,7 @@ def cloud_deployment_delete(cloud: str, deployment: str, yes: bool,) -> None:
|
|
361
361
|
@click.option(
|
362
362
|
"--resources-file",
|
363
363
|
"-f",
|
364
|
-
help="EXPERIMENTAL: Path to a YAML file defining a list of cloud resources. Schema: https://docs.anyscale.com/reference/cloud/#
|
364
|
+
help="EXPERIMENTAL: Path to a YAML file defining a list of cloud resources. Schema: https://docs.anyscale.com/reference/cloud/#cloudresource.",
|
365
365
|
required=False,
|
366
366
|
)
|
367
367
|
@click.option(
|
@@ -387,7 +387,7 @@ def cloud_update( # noqa: PLR0913
|
|
387
387
|
"were both provided. Please only provide one of these two arguments."
|
388
388
|
)
|
389
389
|
if resources_file:
|
390
|
-
CloudController().
|
390
|
+
CloudController().update_cloud_resources(
|
391
391
|
cloud_name=cloud_name or name,
|
392
392
|
cloud_id=cloud_id,
|
393
393
|
resources_file=resources_file,
|
@@ -1337,14 +1337,16 @@ def get_cloud(
|
|
1337
1337
|
log.error("Cloud not found.")
|
1338
1338
|
return
|
1339
1339
|
|
1340
|
-
# Include all cloud
|
1341
|
-
|
1340
|
+
# Include all cloud resources for the cloud.
|
1341
|
+
cloud_resources = CloudController().get_formatted_cloud_resources(
|
1342
|
+
cloud_id=cloud.id
|
1343
|
+
)
|
1342
1344
|
result = {
|
1343
1345
|
"name": cloud.name,
|
1344
1346
|
"id": cloud.id,
|
1345
1347
|
"created_at": cloud.created_at,
|
1346
1348
|
"is_default": cloud.is_default,
|
1347
|
-
"
|
1349
|
+
"resources": cloud_resources,
|
1348
1350
|
}
|
1349
1351
|
|
1350
1352
|
if output:
|
@@ -550,12 +550,12 @@ collaborators:
|
|
550
550
|
"""
|
551
551
|
|
552
552
|
|
553
|
-
|
554
|
-
$ anyscale cloud
|
555
|
-
Successfully created cloud
|
553
|
+
CLOUD_RESOURCE_CREATE_EXAMPLE = """\
|
554
|
+
$ anyscale cloud resource create --cloud my-cloud --file new-cloud-resource.yaml
|
555
|
+
Successfully created cloud resource my-new-resource in cloud my-cloud.
|
556
556
|
|
557
|
-
$ cat new-cloud-
|
558
|
-
name: my-new-
|
557
|
+
$ cat new-cloud-resource.yaml
|
558
|
+
name: my-new-resource
|
559
559
|
provider: AWS
|
560
560
|
compute_stack: VM
|
561
561
|
region: us-west-2
|
@@ -575,11 +575,11 @@ aws_config:
|
|
575
575
|
memorydb_cluster_name: my-memorydb-cluster
|
576
576
|
"""
|
577
577
|
|
578
|
-
|
579
|
-
$ anyscale cloud
|
578
|
+
CLOUD_RESOURCE_DELETE_EXAMPLE = """\
|
579
|
+
$ anyscale cloud resource delete --cloud my-cloud --resource my-resource
|
580
580
|
Output
|
581
|
-
Please confirm that you would like to remove
|
582
|
-
(anyscale +3.5s) Successfully removed
|
581
|
+
Please confirm that you would like to remove resource my-resource from cloud my-cloud. [y/N]: y
|
582
|
+
(anyscale +3.5s) Successfully removed resource my-resource from cloud my-cloud!
|
583
583
|
"""
|
584
584
|
|
585
585
|
CLOUD_GET_CLOUD_EXAMPLE = """\
|
@@ -589,7 +589,7 @@ name: my-cloud
|
|
589
589
|
created_at: 2022-10-18 05:12:13.335803+00:00
|
590
590
|
is_default: true
|
591
591
|
deployments:
|
592
|
-
-
|
592
|
+
- cloud_resource_id: cldrsrc_123
|
593
593
|
name: vm-aws-us-west-2
|
594
594
|
provider: AWS
|
595
595
|
compute_stack: VM
|
@@ -1,14 +1,25 @@
|
|
1
1
|
import click
|
2
2
|
|
3
|
+
from anyscale.commands.util import DeprecatedAnyscaleCommand
|
4
|
+
|
3
5
|
|
4
6
|
@click.command(
|
5
7
|
name="exec",
|
6
8
|
hidden=True,
|
7
9
|
help="[DEPRECATED] Execute shell commands in interactive cluster.",
|
8
10
|
context_settings={"ignore_unknown_options": True, "allow_extra_args": True,},
|
11
|
+
cls=DeprecatedAnyscaleCommand,
|
12
|
+
removal_date="2025-10-01",
|
13
|
+
deprecation_message="`anyscale exec` has been deprecated and no longer works on Anyscale",
|
14
|
+
alternative="use `anyscale job submit` to run your script as a job in a cluster",
|
9
15
|
)
|
10
16
|
def anyscale_exec() -> None:
|
17
|
+
"""Execute shell commands in interactive cluster.
|
18
|
+
|
19
|
+
DEPRECATED: This command will be removed on 2025-10-01.
|
20
|
+
Use 'anyscale job submit' to run your script as a job in a cluster.
|
21
|
+
"""
|
11
22
|
raise click.ClickException(
|
12
|
-
"
|
23
|
+
"`anyscale exec` has been deprecated and no longer works on Anyscale. "
|
13
24
|
"Please use `anyscale job submit` to run your script as a job in a cluster."
|
14
25
|
)
|
@@ -8,6 +8,7 @@ from typing import Any, Optional
|
|
8
8
|
import click
|
9
9
|
|
10
10
|
from anyscale.cli_logger import BlockLogger
|
11
|
+
from anyscale.commands.util import DeprecatedAnyscaleCommand
|
11
12
|
from anyscale.controllers.list_controller import ListController
|
12
13
|
|
13
14
|
|
@@ -25,26 +26,40 @@ def list_cli() -> None:
|
|
25
26
|
name="clouds",
|
26
27
|
help="[DEPRECATED] List the clouds currently available in your account.",
|
27
28
|
hidden=True,
|
29
|
+
cls=DeprecatedAnyscaleCommand,
|
30
|
+
removal_date="2025-10-01",
|
31
|
+
deprecation_message="`anyscale list clouds` has been deprecated",
|
32
|
+
alternative="use `anyscale cloud list` instead",
|
28
33
|
)
|
29
34
|
@click.option("--json", "show_json", help="Return the results in json", is_flag=True)
|
30
35
|
def list_clouds(show_json: bool) -> None:
|
31
|
-
|
32
|
-
|
33
|
-
|
36
|
+
"""List the clouds currently available in your account.
|
37
|
+
|
38
|
+
DEPRECATED: This command will be removed on 2025-10-01.
|
39
|
+
Use 'anyscale cloud list' instead.
|
40
|
+
"""
|
34
41
|
list_controller = ListController()
|
35
42
|
output = list_controller.list_clouds(json_format=show_json)
|
36
43
|
print(output)
|
37
44
|
|
38
45
|
|
39
46
|
@list_cli.command(
|
40
|
-
name="projects",
|
47
|
+
name="projects",
|
48
|
+
help="[DEPRECATED] List all accessible projects.",
|
49
|
+
hidden=True,
|
50
|
+
cls=DeprecatedAnyscaleCommand,
|
51
|
+
removal_date="2025-10-01",
|
52
|
+
deprecation_message="`anyscale list projects` has been deprecated",
|
53
|
+
alternative="use `anyscale project list` instead",
|
41
54
|
)
|
42
55
|
@click.option("--json", "show_json", help="Return the results in json", is_flag=True)
|
43
56
|
@click.pass_context
|
44
57
|
def project_list(ctx: Any, show_json: bool) -> None: # noqa: ARG001
|
45
|
-
|
46
|
-
|
47
|
-
|
58
|
+
"""List all accessible projects.
|
59
|
+
|
60
|
+
DEPRECATED: This command will be removed on 2025-10-01.
|
61
|
+
Use 'anyscale project list' instead.
|
62
|
+
"""
|
48
63
|
list_controller = ListController()
|
49
64
|
output = list_controller.list_projects(json_format=show_json)
|
50
65
|
print(output)
|
@@ -54,6 +69,10 @@ def project_list(ctx: Any, show_json: bool) -> None: # noqa: ARG001
|
|
54
69
|
name="sessions",
|
55
70
|
help="[DEPRECATED] List all clusters within the current project.",
|
56
71
|
hidden=True,
|
72
|
+
cls=DeprecatedAnyscaleCommand,
|
73
|
+
removal_date="2025-10-01",
|
74
|
+
deprecation_message="`anyscale list sessions` has been deprecated",
|
75
|
+
alternative="use `anyscale cluster list` instead",
|
57
76
|
)
|
58
77
|
@click.option(
|
59
78
|
"--name",
|
@@ -65,9 +84,11 @@ def project_list(ctx: Any, show_json: bool) -> None: # noqa: ARG001
|
|
65
84
|
@click.option("--all", help="List all clusters, including inactive ones.", is_flag=True)
|
66
85
|
@click.option("--json", "show_json", help="Return the results in json", is_flag=True)
|
67
86
|
def session_list(name: Optional[str], all: bool, show_json: bool) -> None: # noqa: A002
|
68
|
-
|
69
|
-
|
70
|
-
|
87
|
+
"""List all clusters within the current project.
|
88
|
+
|
89
|
+
DEPRECATED: This command will be removed on 2025-10-01.
|
90
|
+
Use 'anyscale cluster list' instead.
|
91
|
+
"""
|
71
92
|
list_controller = ListController()
|
72
93
|
output = list_controller.list_sessions(
|
73
94
|
name=name, show_all=all, json_format=show_json
|
@@ -79,7 +100,16 @@ def session_list(name: Optional[str], all: bool, show_json: bool) -> None: # no
|
|
79
100
|
name="ips",
|
80
101
|
help="[DEPRECATED] List IP addresses of head and worker nodes.",
|
81
102
|
context_settings={"ignore_unknown_options": True, "allow_extra_args": True,},
|
103
|
+
cls=DeprecatedAnyscaleCommand,
|
104
|
+
removal_date="2025-10-01",
|
105
|
+
deprecation_message="Listing IPs is not supported on Anyscale",
|
106
|
+
alternative="use the Anyscale console to view cluster node information",
|
82
107
|
)
|
83
108
|
def list_ips() -> None:
|
84
|
-
"""List IP addresses of head and worker nodes.
|
85
|
-
|
109
|
+
"""List IP addresses of head and worker nodes.
|
110
|
+
|
111
|
+
DEPRECATED: This command will be removed on 2025-10-01.
|
112
|
+
Listing IPs is not supported on Anyscale.
|
113
|
+
Use the Anyscale console to view cluster node information.
|
114
|
+
"""
|
115
|
+
raise click.ClickException("Listing IPs is not supported on Anyscale")
|
@@ -12,7 +12,11 @@ import anyscale
|
|
12
12
|
from anyscale.cli_logger import BlockLogger
|
13
13
|
from anyscale.commands import command_examples
|
14
14
|
from anyscale.commands.list_util import display_list
|
15
|
-
from anyscale.commands.util import
|
15
|
+
from anyscale.commands.util import (
|
16
|
+
AnyscaleCommand,
|
17
|
+
DeprecatedAnyscaleCommand,
|
18
|
+
NotRequiredIf,
|
19
|
+
)
|
16
20
|
from anyscale.controllers.project_controller import ProjectController
|
17
21
|
from anyscale.project.models import (
|
18
22
|
CreateProjectCollaborator,
|
@@ -441,6 +445,10 @@ def _default_project_name() -> str:
|
|
441
445
|
"[DEPRECATED] Create a new project or attach this directory to an existing project."
|
442
446
|
),
|
443
447
|
hidden=True,
|
448
|
+
cls=DeprecatedAnyscaleCommand,
|
449
|
+
removal_date="2025-10-01",
|
450
|
+
deprecation_message="`anyscale init` has been deprecated",
|
451
|
+
alternative="use `anyscale project create` to create a new project",
|
444
452
|
)
|
445
453
|
@click.option(
|
446
454
|
"--project-id",
|
@@ -474,10 +482,11 @@ def anyscale_init(
|
|
474
482
|
config: Optional[str],
|
475
483
|
requirements: Optional[str],
|
476
484
|
) -> None:
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
485
|
+
"""Create a new project or attach this directory to an existing project.
|
486
|
+
|
487
|
+
DEPRECATED: This command will be removed on 2025-10-01.
|
488
|
+
Use 'anyscale project create' to create a new project.
|
489
|
+
"""
|
481
490
|
if (project_id and name) or not (project_id or name):
|
482
491
|
raise click.BadArgumentUsage(
|
483
492
|
"Only one of project_id and name must be provided."
|
@@ -491,6 +500,10 @@ def anyscale_init(
|
|
491
500
|
name="init",
|
492
501
|
help="[DEPRECATED] Create a new project or attach this directory to an existing project.",
|
493
502
|
hidden=True,
|
503
|
+
cls=DeprecatedAnyscaleCommand,
|
504
|
+
removal_date="2025-10-01",
|
505
|
+
deprecation_message="`anyscale project init` has been deprecated",
|
506
|
+
alternative="use `anyscale project create` to create a new project and specify a project id or name for the other Anyscale CLI commands",
|
494
507
|
)
|
495
508
|
@click.option(
|
496
509
|
"--project-id",
|
@@ -510,11 +523,11 @@ def anyscale_init(
|
|
510
523
|
default=_default_project_name(),
|
511
524
|
)
|
512
525
|
def init(project_id: Optional[str], name: Optional[str],) -> None:
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
526
|
+
"""Create a new project or attach this directory to an existing project.
|
527
|
+
|
528
|
+
DEPRECATED: This command will be removed on 2025-10-01.
|
529
|
+
Use 'anyscale project create' to create a new project.
|
530
|
+
"""
|
518
531
|
if (project_id and name) or not (project_id or name):
|
519
532
|
raise click.BadArgumentUsage(
|
520
533
|
"Only one of --project-id and --name must be provided."
|