Tsunami alert system on 100 Go on S3, AWS, Spark Scala, Python, Cassandra cluster, Redis (Scholar project, 2015)
#### 1. Create the right security group http://datastax.com/documentation/datastax_enterprise/4.6/datastax_enterprise/install/installAMIsecurity.html
- in "Advanced Details", write :
--clustername tsunami
--totalnodes 6
--version enterprise
--username <YourUsername>
--password <YourPassword>
--analyticsnodes 6
--cfsreplicationfactor 2
--opscenter Yes
- select your security group (see step one)
- create your key-pair and save it
- launch instances
- get hosts list from EC2 dashboard (the master is the instance with "AMI launch index" equals 0)
$ chmod 400 <YourKeyPair>.pem
$ ssh -i <myKeyPair>.pem ubuntu@<ip_master>
$ cd /tsunami_alert/deploy/
$ ./aws_partition_redirect.sh
$ <myKeyPair>.pem \
$ <ip_master> \
$ <ip_host1> \
$ <ip_host2> \
$ <ip_host3> \
$ <ip_host4> \
$ <ip_host5>
$ setsid dse spark \
--conf spark.executor.memory=15g \
--conf spark.core.connection.ack.wait.timeout=600 \
--conf spark.akka.frameSize=512 \
--conf spark.cassandra.output.batch.size.bytes=131072 \
-i /home/ubuntu/tsunami_alert/src/preprocessing/csv_2_cassandra.scala
**optional :** - check datastax enterprise dashboard on your browser :
http://ec2[YourMaster].amazonaws.com:8888/opscenter/index.html - check spark's state directly on [Spark UI](http://localhost:4040/) - check cassandra data after the insert task :
``` $ cqlsh ```
``` $ cqlsh> select * from tsunami_project.tsunami_table limit 10; ```
``` $ cqlsh> exit ```
### TSUNAMI : Alert system
#### 1. from the master, trigger a Tsunami : ``` $ cd /home/ubuntu/tsunami_alert/src/alert_system/ $ python sms_alert.py ```
Note :
- Tsunami will kill the closest instance to the tsunami impact.
- To visualize it, use the /dataset/res_x.csv (x is the number of tsunami replicate) : [here with CartoDB](http://cdb.io/1KB1tmL)