Skip to content

Commit

Permalink
[Docs][GCP] Configuring ServiceAccounts for worker (ray-project#27915)
Browse files Browse the repository at this point in the history
Enables better usage with GCP.

The default behavior is that the head runs with the ray-autoscaler-sa-v1 service Account, but workers do not. Workers can run with this service account by copying & uncommenting L114->L117 from example-full


Signed-off-by: Ian <[email protected]>
Co-authored-by: Richard Liaw <[email protected]>
  • Loading branch information
ijrsvt and richardliaw authored Aug 16, 2022
1 parent c5a4605 commit 24508db
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doc/source/cluster/vms/user-guides/launching-clusters/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ In various scenarios, worker nodes may need write access to an S3 bucket, e.g.,
If you see errors like “Unable to locate credentials”, make sure that the correct `IamInstanceProfile` is configured for worker nodes in your cluster config file. This may look like:

```yaml
worker_nodes:
InstanceType: m5.xlarge
ImageId: latest_dlami
IamInstanceProfile:
available_node_types:
ray.worker.default:
node_config:
...
IamInstanceProfile:
Arn: arn:aws:iam::YOUR_AWS_ACCOUNT:YOUR_INSTANCE_PROFILE
```

Expand Down
17 changes: 17 additions & 0 deletions doc/source/cluster/vms/user-guides/launching-clusters/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,20 @@ ray down example-full.yaml

Congrats, you have started a Ray cluster on GCP!

## GCP Configurations


### Running workers with Service Accounts

By default, only the head node runs with a Service Account (`ray-autoscaler-sa-v1@<project-id>.iam.gserviceaccount.com`). To enable workers to run with this same Service Account (to access Google Cloud Storage, or GCR), add the following configuration to the worker_node configuration:

```yaml
available_node_types:
ray.worker.default:
node_config:
...
serviceAccounts:
- email: ray-autoscaler-sa-v1@<YOUR_PROJECT_ID>.iam.gserviceaccount.com
scopes:
- https://www.googleapis.com/auth/cloud-platform
```

0 comments on commit 24508db

Please sign in to comment.