diff --git a/doc/source/autoscaling.rst b/doc/source/autoscaling.rst index 6db309848..570aabe32 100644 --- a/doc/source/autoscaling.rst +++ b/doc/source/autoscaling.rst @@ -1,6 +1,8 @@ Cluster setup and auto-scaling (Experimental) ============================================= +The Ray ``create_or_update`` command starts an AWS Ray cluster from your personal computer. Once the cluster is up, you can then SSH into it to run Ray programs. + Quick start ----------- @@ -9,11 +11,14 @@ as described in `the boto docs `__ cluster config file will create a small cluster with a m4.large head node (on-demand), and two m4.large `spot workers `__. -Try it out with these commands: + +Try it out by running these commands from your personal computer. Once the cluster is started, you can then +SSH into the head node to run Ray programs with ``ray.init(redis_address=":6379")``. .. code-block:: bash - # Create or update the cluster + # Create or update the cluster. When the command finishes, it will print + # out the command that can be used to SSH into the cluster head node. $ ray create_or_update ray/python/ray/autoscaler/aws/example.yaml # Resize the cluster without interrupting running jobs diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py index 66f3340f0..d0a1d5bf2 100644 --- a/python/ray/autoscaler/commands.py +++ b/python/ray/autoscaler/commands.py @@ -144,3 +144,9 @@ def get_or_create_head_node(config): config["auth"]["ssh_private_key"], config["auth"]["ssh_user"], provider.external_ip(head_node))) + print( + "To login to the cluster, run:\n\n" + " ssh -i {} {}@{}\n".format( + config["auth"]["ssh_private_key"], + config["auth"]["ssh_user"], + provider.external_ip(head_node)))