aboutsummaryrefslogtreecommitdiff
path: root/docs/ec2-scripts.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ec2-scripts.md')
-rw-r--r--docs/ec2-scripts.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/ec2-scripts.md b/docs/ec2-scripts.md
index ed51d0abb3..d50f445d7e 100644
--- a/docs/ec2-scripts.md
+++ b/docs/ec2-scripts.md
@@ -94,6 +94,25 @@ another.
permissions on your private key file, you can run `launch` with the
`--resume` option to restart the setup process on an existing cluster.
+# Launching a Cluster in a VPC
+
+- Run
+ `./spark-ec2 -k <keypair> -i <key-file> -s <num-slaves> --vpc-id=<vpc-id> --subnet-id=<subnet-id> launch <cluster-name>`,
+ where `<keypair>` is the name of your EC2 key pair (that you gave it
+ when you created it), `<key-file>` is the private key file for your
+ key pair, `<num-slaves>` is the number of slave nodes to launch (try
+ 1 at first), `<vpc-id>` is the name of your VPC, `<subnet-id>` is the
+ name of your subnet, and `<cluster-name>` is the name to give to your
+ cluster.
+
+ For example:
+
+ ```bash
+ export AWS_SECRET_ACCESS_KEY=AaBbCcDdEeFGgHhIiJjKkLlMmNnOoPpQqRrSsTtU
+export AWS_ACCESS_KEY_ID=ABCDEFG1234567890123
+./spark-ec2 --key-pair=awskey --identity-file=awskey.pem --region=us-west-1 --zone=us-west-1a --vpc-id=vpc-a28d24c7 --subnet-id=subnet-4eb27b39 --spark-version=1.1.0 launch my-spark-cluster
+ ```
+
# Running Applications
- Go into the `ec2` directory in the release of Spark you downloaded.