Skip to content

Commit

Permalink
Thu Dec 21 23:19:24 PST 2017 (ray-project#1367)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericl authored and pcmoritz committed Dec 23, 2017
1 parent 22460ff commit 43e7821
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions doc/source/autoscaling.rst
Original file line number Diff line number Diff line change
@@ -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
-----------

Expand All @@ -9,11 +11,14 @@ as described in `the boto docs <http://boto3.readthedocs.io/en/latest/guide/conf

Then you're ready to go. The provided `ray/python/ray/autoscaler/aws/example.yaml <https://github.com/ray-project/ray/tree/master/python/ray/autoscaler/aws/example.yaml>`__ cluster config file will create a small cluster with a m4.large
head node (on-demand), and two m4.large `spot workers <https://aws.amazon.com/ec2/spot/>`__.
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="<node_ip>: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
Expand Down
6 changes: 6 additions & 0 deletions python/ray/autoscaler/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

0 comments on commit 43e7821

Please sign in to comment.