diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2013-08-27 08:42:40 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2013-08-27 08:42:40 -0700 |
commit | 014baa6529975341a314ed7bcc21d1dd639daab5 (patch) | |
tree | 5a649fcee71abe2076bd717686349f7e1f2f593a /devfiles/scripts/bootstrap-cassandra.sh | |
parent | d19066bc6a22c339c753cb93ef3e9e30fec3b0db (diff) |
Adding devfiles: various scripts and data files
Diffstat (limited to 'devfiles/scripts/bootstrap-cassandra.sh')
-rwxr-xr-x | devfiles/scripts/bootstrap-cassandra.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/devfiles/scripts/bootstrap-cassandra.sh b/devfiles/scripts/bootstrap-cassandra.sh new file mode 100755 index 0000000..220bd03 --- /dev/null +++ b/devfiles/scripts/bootstrap-cassandra.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +## +## This script deletes all Cassandra data and creates and populates the +## ColumnFamilies needed to start the Growth Process. +## + +export TOOLS=`awk -F= '/jesterpm\.buildtools\.root/ { print $2 }' $HOME/.jesterpm-build-tools.properties` +export DEVFILES=$(dirname $0) + +$TOOLS/scripts/setup-cassandra.sh + +# Bootstrap keyspace +TEMPFILE=`mktemp` +cat $DEVFILES/cassandra-bootstrap.cql > $TEMPFILE + +# Fill with questions +./compile-questions.sh >> $TEMPFILE + +# Fill with videos +./compile-videos.sh >> $TEMPFILE + +# GO! +#cat $TEMPFILE | less +cassandra-cli < $TEMPFILE +rm $TEMPFILE |