(1) exp = EC2Experiment( |
(2) os.environ['AMAZON_EC2_REGION'], |
(3) os.environ['AMAZON_EC2_URL'], |
(4) os.environ['AMAZON_EC2_ACCESS_KEY'], |
(5) os.environ['AMAZON_EC2_SECRET_KEY']) |
(6) |
(7) |
(8) |
(9) exp.provision("ami-967edcff", instance_type="t1.micro", tags=["inst0" |
], count=1) |
(10) |
(11) # Wait for all instances to boot and become accessible. |
(12) exp.wait() |
(13) |
(14) ⋯ |
(15) |
(16) # [STACK] Deployment of wstack:JAVA_SOFT_STACK stack |
(17) |
(18) # [COMPONENT] Deployment of wstack:JAVA_SOFT_COMP component(version |
: 1.7.0_21) |
(19) |
(20) # [STEP] Execution of wstack:JAVA_DEP_STEP step |
(21) |
(22) # copy JAVA_script.sh to the instance |
(23) exp.put(["inst0"], "JAVA_script.sh", "/home/cloud-user/JAVA_script. |
sh", user="root") |
(24) |
(25) # granting execution for JAVA_script.sh |
(26) exp.run(["inst0"], "chmod755/home/cloud-user/JAVA_script.sh", user |
="root") |
(27) |
(28) # executing the JAVA_script.sh script |
(29) exp.run(["inst0"], "/home/cloud-user/JAVA_script.shJAVA_HOME/usr/ |
lib/jvm/", user="root") |
(30) |
(31) # [STACK] Deployment of wstack:REMOVESTOPWORDS_SOFT_STACK stack |
(32) |
(33) # [COMPONENT] Deployment of wstack:REMOVESTOPWORDS_SOFT_COMP |
component |
(34) |
(35) # [STEP] Execution of wstack:REMOVESTOPWORDS_DEP_STEP step |
(36) |
(37) # copy deploy_jar.sh to the instance |
(38) exp.put(["inst0"], "deploy_jar.sh", "/home/cloud-user/deploy_jar.sh" |
,user="root") |
(39) |
(40) # granting execution for deploy_jar.sh |
(41) exp.run(["inst0"], "chmod755/home/cloud-user/deploy_jar.sh", user= |
"root") |
(42) |
(43) # executing the deploy_jar.sh script |
(44) exp.run(["inst0"], "/home/cloud-user/deploy_jar.shJAR_FILEREPO: |
jar/RemoveStopWords.jarDEST_PATHDIR:", user="root") |
(45) |
(46) # [STACK] Deployment of wstack:STOPWORDS_SOFT_STACK stack |
(47) |
(48) # [COMPONENT] Deployment of wstack:STOPWORDS_SOFT_COMP component |
(49) |
(50) # [STEP] Execution of wstack:STOPWORDS_DEP_STEP step |
(51) |
(52) # copy deploy_jar.sh to the instance |
(53) exp.put(["inst0"], "deploy_jar.sh", "/home/cloud-user/deploy_jar.sh" |
,user="root") |
(54) |
(55) # granting execution for deploy_jar.sh |
(56) exp.run(["inst0"], "chmod755/home/cloud-user/deploy_jar.sh", user= |
"root") |
(57) |
(58) # executing the deploy_jar.sh script |
(59) exp.run(["inst0"], "/home/cloud-user/deploy_jar.shJAR_FILE REPO:jar |
/StopWords.jarDEST_PATHDIR:", user="root") |
(60) |
(61) ⋯ |