|
| 1 | +This folder contains a script, `sampleclean-ec2`, for launching SampleClean |
| 2 | +instances on Amazon EC2. |
| 3 | + |
| 4 | +The script calls the spark-ec2 script (documented at |
| 5 | +http://spark.apache.org/docs/latest/ec2-scripts.html), and can be called as |
| 6 | +either: |
| 7 | + |
| 8 | +```shell |
| 9 | +./sampleclean-ec2 CREDENTIALS_DIRECTORY SPARK-EC2-ARG [SPARK-EC2-ARG ...] |
| 10 | +``` |
| 11 | + |
| 12 | +or: |
| 13 | + |
| 14 | +```shell |
| 15 | +./sampleclean-ec2 SPARK-EC2-ARG [SPARK-EC2-ARG ...] |
| 16 | +``` |
| 17 | + |
| 18 | +In the latter case, `CREDENTIALS_DIRECTORY` will be set to the value of the |
| 19 | +environment variable `$AWS_CREDENTIALS_DIR` if it exists, or the default value |
| 20 | +`$HOME/.ssh/aws/sampleclean`. |
| 21 | + |
| 22 | +Either way, `CREDENTIALS_DIRECTORY` must be a path to a directory containing AWS |
| 23 | +credentials needed for using AWS and EC2: |
| 24 | + |
| 25 | +* A `*.csv` file containing IAM credentials for accessing AWS on your behalf. |
| 26 | +* A `KEYNAME.pem` file containing the EC2 keypair corresponding to `KEYNAME`. |
| 27 | + |
| 28 | +For help with `SPARK-EC2-ARGs`, run `./sampleclean-ec2 --help`. |
| 29 | + |
| 30 | +For example, to launch a cluster with 8 slaves, then run the crowd server: |
| 31 | +```shell |
| 32 | +# Alternatively, use a pre-saved ami with --master-ami AMI_ID |
| 33 | +./sampleclean-ec2 ~/.ssh/aws/sampleclean/ -s 8 -t x1.large launch sampleclean |
| 34 | +# ... lots of output ... |
| 35 | +./sampleclean-ec2 ~/.ssh/aws/sampleclean/ get-master sampleclean |
| 36 | +# ... get the master's hostname ... |
| 37 | +./sampleclean-ec2 ~/.ssh/aws/sampleclean/ login sampleclean |
| 38 | +> workon sampleclean |
| 39 | +> cd $PROJECT_HOME |
| 40 | +> ./run.sh -d |
| 41 | +# ... and the crowd server should be available at the master's hostname on port 8000 ... # |
| 42 | +``` |
0 commit comments