Configure multiple resources for an Anyscale cloud
This page provides an overview of adding multiple resource configurations to an Anyscale cloud. You configure multiple resource configurations so that Anyscale jobs can fallback to using resources in another region or cloud provider when resources in your primary configuration aren't available for your Anyscale clusters.
This feature is in beta release.
You can only configure fallback across multiple resources for Anyscale jobs. There is no support for fallback for workspaces or services.
Add a cloud resource configuration to an Anyscale cloud
You can add additional cloud resource configurations to any self-hosted Anyscale cloud.
Anyscale serverless clouds (also called Anyscale-hosted clouds) are the only clouds that don't support multiple resource configurations.
You must be an owner on an existing Anyscale cloud to add a new resource configuration. Complete the following steps:
-
Define your cloud resource configuration in a YAML file on your local machine, such as the following example saved to
/path/to/cloud-config.yaml
:name: new-cloud-resource-name
provider: AWS
compute_stack: VM
region: us-west-2
networking_mode: PUBLIC
object_storage:
bucket_name: s3://my-bucket
file_storage:
file_storage_id: fs-123
aws_config:
vpc_id: vpc-123
subnet_ids:
- subnet-123
security_group_ids:
- sg-123
anyscale_iam_role_id: arn:aws:iam::123456789012:role/anyscale-role-123
cluster_iam_role_id: arn:aws:iam::123456789012:role/cluster-role-123
memorydb_cluster_name: my-memorydb-clusterFor cloud resource config parameters, see
CloudResource
. -
Run the following command to use this YAML config file to create a cloud resource configuration in your existing cloud:
anyscale cloud resource create --cloud <cloud-name> --file /path/to/cloud-config.yaml
Update multiple resources for a cloud
You can use the CLI to update the configurations for multiple resources for an Anyscale cloud. You can only modify existing resources this way.
Complete the following steps to update resources for a cloud:
-
Save the current cloud configuration as a YAML file using the following CLI command:
anyscale cloud get --name <cloud-name> --output /path/to/cloud-config.yaml
-
Open the file in your preferred text editor or IDE.
- You must format your file to match the structure of a cloud resources YAML. Modify the output of
anyscale cloud get
to remove everything except the items underresources:
. - Edit settings for one or more of your resources.
- Save the file.
- You must format your file to match the structure of a cloud resources YAML. Modify the output of
-
Run the following CLI command to apply your saved configuration:
anyscale cloud update --name <cloud-name> --resources-file /path/to/cloud-config.yaml
Remove a cloud resource configuration from an Anyscale cloud
Run the following code to remove a cloud resource configuration from a multi-cloud setup:
anyscale cloud resource delete --cloud <cloud-name> --resource new-cloud-resource-name