|
40 | 40 | from boto import ec2
|
41 | 41 |
|
42 | 42 | DEFAULT_SPARK_VERSION = "1.1.0"
|
| 43 | +SPARK_EC2_DIR = os.path.dirname(os.path.realpath(__file__)) |
43 | 44 |
|
44 | 45 | MESOS_SPARK_EC2_BRANCH = "v4"
|
45 | 46 | # A URL prefix from which to fetch AMI information
|
@@ -593,7 +594,14 @@ def setup_cluster(conn, master_nodes, slave_nodes, opts, deploy_ssh_key):
|
593 | 594 | )
|
594 | 595 |
|
595 | 596 | print "Deploying files to master..."
|
596 |
| - deploy_files(conn, "deploy.generic", opts, master_nodes, slave_nodes, modules) |
| 597 | + deploy_files( |
| 598 | + conn=conn, |
| 599 | + root_dir=SPARK_EC2_DIR + "/" + "deploy.generic", |
| 600 | + opts=opts, |
| 601 | + master_nodes=master_nodes, |
| 602 | + slave_nodes=slave_nodes, |
| 603 | + modules=modules |
| 604 | + ) |
597 | 605 |
|
598 | 606 | print "Running setup on master..."
|
599 | 607 | setup_spark_cluster(master, opts)
|
@@ -730,6 +738,8 @@ def get_num_disks(instance_type):
|
730 | 738 | # cluster (e.g. lists of masters and slaves). Files are only deployed to
|
731 | 739 | # the first master instance in the cluster, and we expect the setup
|
732 | 740 | # script to be run on that instance to copy them to other nodes.
|
| 741 | +# |
| 742 | +# root_dir should be an absolute path to the directory with the files we want to deploy. |
733 | 743 | def deploy_files(conn, root_dir, opts, master_nodes, slave_nodes, modules):
|
734 | 744 | active_master = master_nodes[0].public_dns_name
|
735 | 745 |
|
|
0 commit comments