usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject git commit: Added missing files for setup
Date Mon, 28 Jul 2014 15:59:07 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o f2b6d25b6 -> adfac04ee


Added missing files  for setup


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/adfac04e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/adfac04e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/adfac04e

Branch: refs/heads/two-dot-o
Commit: adfac04ee66ea376f52af260655e435f20d12581
Parents: f2b6d25
Author: Todd Nine <toddnine@apache.org>
Authored: Mon Jul 28 09:58:55 2014 -0600
Committer: Todd Nine <toddnine@apache.org>
Committed: Mon Jul 28 09:58:55 2014 -0600

----------------------------------------------------------------------
 stack/awscluster/src/main/cql/create_locks.cql  |  27 ++
 .../awscluster/src/main/cql/create_usergrid.cql |  79 ++++
 .../main/cql/create_usergrid_applications.cql   | 391 +++++++++++++++++++
 .../main/dist/init_instance/create_keyspaces.sh |  41 ++
 .../src/main/dist/init_instance/init_cass.sh    |  52 +++
 .../dist/init_instance/init_graphite_server.sh  |  63 +++
 .../main/dist/init_instance/install_yourkit.sh  |  25 ++
 .../src/main/groovy/NodeRegistry.groovy         | 106 +++++
 .../src/main/groovy/get_first_instance.groovy   |  46 +++
 9 files changed, 830 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/cql/create_locks.cql
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/cql/create_locks.cql b/stack/awscluster/src/main/cql/create_locks.cql
new file mode 100644
index 0000000..8f0afe4
--- /dev/null
+++ b/stack/awscluster/src/main/cql/create_locks.cql
@@ -0,0 +1,27 @@
+
+drop keyspace Locks;
+
+create keyspace Locks
+  with placement_strategy = 'NetworkTopologyStrategy'
+  and strategy_options = {us-east : 3}
+  and durable_writes = false;
+
+use Locks;
+
+create column family HLocks
+  with column_type = 'Standard'
+  and comparator = 'UTF8Type'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'UTF8Type'
+  and read_repair_chance = 0.0
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 60
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'ALL'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/cql/create_usergrid.cql
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/cql/create_usergrid.cql b/stack/awscluster/src/main/cql/create_usergrid.cql
new file mode 100644
index 0000000..249767f
--- /dev/null
+++ b/stack/awscluster/src/main/cql/create_usergrid.cql
@@ -0,0 +1,79 @@
+
+create keyspace Usergrid
+  with placement_strategy = 'NetworkTopologyStrategy'
+  and strategy_options = {us-east : 3}
+  and durable_writes = true;
+
+use Usergrid;
+
+create column family Applications
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family PrincipalTokens
+  with column_type = 'Standard'
+  and comparator = 'UUIDType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Properties
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Tokens
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'ALL'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/cql/create_usergrid_applications.cql
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/cql/create_usergrid_applications.cql b/stack/awscluster/src/main/cql/create_usergrid_applications.cql
new file mode 100644
index 0000000..44ed104
--- /dev/null
+++ b/stack/awscluster/src/main/cql/create_usergrid_applications.cql
@@ -0,0 +1,391 @@
+
+create keyspace Usergrid_Applications
+  with placement_strategy = 'NetworkTopologyStrategy'
+  and strategy_options = {us-east : 3}
+  and durable_writes = true;
+
+use Usergrid_Applications;
+
+create column family Application_Aggregate_Counters
+  with column_type = 'Standard'
+  and comparator = 'LongType'
+  and default_validation_class = 'CounterColumnType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Application_Roles
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Applications
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Consumer_Queue_Messages_Properties
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Composite_Dictionaries
+  with column_type = 'Standard'
+  and comparator = 'DynamicCompositeType(b=>org.apache.cassandra.db.marshal.BytesType,A=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.AsciiType),B=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.BytesType),a=>org.apache.cassandra.db.marshal.AsciiType,L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType,I=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.IntegerType),i=>org.apache.cassandra.db.marshal.IntegerType,U=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UUIDType),T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),u=>org.apache.cassandra.db.marshal.UUIDType,t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),
 X=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LexicalUUIDType),x=>org.apache.cassandra.db.marshal.LexicalUUIDType)'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Counters
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'CounterColumnType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Dictionaries
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Id_Sets
+  with column_type = 'Standard'
+  and comparator = 'UUIDType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Index
+  with column_type = 'Standard'
+  and comparator = 'DynamicCompositeType(b=>org.apache.cassandra.db.marshal.BytesType,A=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.AsciiType),B=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.BytesType),a=>org.apache.cassandra.db.marshal.AsciiType,L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType,I=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.IntegerType),i=>org.apache.cassandra.db.marshal.IntegerType,U=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UUIDType),T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),u=>org.apache.cassandra.db.marshal.UUIDType,t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),
 X=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LexicalUUIDType),x=>org.apache.cassandra.db.marshal.LexicalUUIDType)'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Index_Entries
+  with column_type = 'Standard'
+  and comparator = 'DynamicCompositeType(b=>org.apache.cassandra.db.marshal.BytesType,A=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.AsciiType),B=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.BytesType),a=>org.apache.cassandra.db.marshal.AsciiType,L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType,I=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.IntegerType),i=>org.apache.cassandra.db.marshal.IntegerType,U=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UUIDType),T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),u=>org.apache.cassandra.db.marshal.UUIDType,t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),
 X=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LexicalUUIDType),x=>org.apache.cassandra.db.marshal.LexicalUUIDType)'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Metadata
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Properties
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Entity_Unique
+  with column_type = 'Standard'
+  and comparator = 'UUIDType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and bloom_filter_fp_chance = 0.1
+  and compaction_strategy_options = {'sstable_size_in_mb' : '512'}
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family MQ_Consumers
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family MQ_Consumers_Timeout
+  with column_type = 'Standard'
+  and comparator = 'UUIDType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family MQ_Counters
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'CounterColumnType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family MQ_Property_Index
+  with column_type = 'Standard'
+  and comparator = 'DynamicCompositeType(b=>org.apache.cassandra.db.marshal.BytesType,A=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.AsciiType),B=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.BytesType),a=>org.apache.cassandra.db.marshal.AsciiType,L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType,I=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.IntegerType),i=>org.apache.cassandra.db.marshal.IntegerType,U=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UUIDType),T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),u=>org.apache.cassandra.db.marshal.UUIDType,t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),
 X=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LexicalUUIDType),x=>org.apache.cassandra.db.marshal.LexicalUUIDType)'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family MQ_Property_Index_Entries
+  with column_type = 'Standard'
+  and comparator = 'DynamicCompositeType(b=>org.apache.cassandra.db.marshal.BytesType,A=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.AsciiType),B=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.BytesType),a=>org.apache.cassandra.db.marshal.AsciiType,L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType,I=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.IntegerType),i=>org.apache.cassandra.db.marshal.IntegerType,U=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UUIDType),T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),u=>org.apache.cassandra.db.marshal.UUIDType,t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),
 X=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LexicalUUIDType),x=>org.apache.cassandra.db.marshal.LexicalUUIDType)'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Queue_Dictionaries
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Queue_Inbox
+  with column_type = 'Standard'
+  and comparator = 'UUIDType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Queue_Properties
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Queue_Subscribers
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
+
+create column family Queue_Subscriptions
+  with column_type = 'Standard'
+  and comparator = 'BytesType'
+  and default_validation_class = 'BytesType'
+  and key_validation_class = 'BytesType'
+  and read_repair_chance = 0.1
+  and dclocal_read_repair_chance = 0.0
+  and populate_io_cache_on_flush = false
+  and gc_grace = 864000
+  and min_compaction_threshold = 4
+  and max_compaction_threshold = 32
+  and replicate_on_write = true
+  and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
+  and caching = 'KEYS_ONLY'
+  and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/dist/init_instance/create_keyspaces.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/create_keyspaces.sh b/stack/awscluster/src/main/dist/init_instance/create_keyspaces.sh
new file mode 100644
index 0000000..9aa1fe7
--- /dev/null
+++ b/stack/awscluster/src/main/dist/init_instance/create_keyspaces.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  The ASF licenses this file to You
+#  under the Apache License, Version 2.0 (the "License"); you may not
+#  use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.  For additional information regarding
+#  copyright in this work, please see the NOTICE file in the top level
+#  directory of this distribution.
+#
+
+#Install keyspaces
+pushd /etc/apt/sources.list.d
+
+
+
+#Run the cassandra cql to create the keyspaces.  Note this only works for the us-east region
for the replication factor
+#on the keyspaces
+
+cd /usr/share/usergrid/scripts
+FIRSTHOST="$(groovy get_first_instance.groovy cassandra)"
+
+if [ "$FIRSTHOST"=="$PUBLIC_HOSTNAME" ]; then
+
+cd /usr/share/usergrid/cql
+
+/usr/bin/cassandra-cli -f  create_locks.cql
+/usr/bin/cassandra-cli -f  create_usergrid.cql
+/usr/bin/cassandra-cli -f  create_usergrid_applications.cql
+
+fi
+
+popd

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/dist/init_instance/init_cass.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/init_cass.sh b/stack/awscluster/src/main/dist/init_instance/init_cass.sh
new file mode 100644
index 0000000..a5be49c
--- /dev/null
+++ b/stack/awscluster/src/main/dist/init_instance/init_cass.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+echo "${HOSTNAME}" > /etc/hostname
+echo "127.0.0.1 ${HOSTNAME}" >> /etc/hosts
+hostname `cat /etc/hostname`
+
+echo "US/Eastern" > /etc/timezone
+dpkg-reconfigure -f noninteractive tzdata
+
+PKGS="openjdk-7-jdk s3cmd ntp unzip groovy"
+apt-get update
+apt-get -y install ${PKGS}
+
+# Install AWS Java SDK and get it into the Groovy classpath
+curl http://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip > /tmp/aws-sdk-java.zip
+cd /usr/share/
+unzip /tmp/aws-sdk-java.zip 
+mkdir -p /home/ubuntu/.groovy/lib
+cp /usr/share/aws-java-sdk-*/third-party/*/*.jar /home/ubuntu/.groovy/lib
+cp /usr/share/aws-java-sdk-*/lib/* /home/ubuntu/.groovy/lib 
+# except for evil stax
+rm /home/ubuntu/.groovy/lib/stax*
+ln -s /home/ubuntu/.groovy /root/.groovy
+
+# Build environment for Groovy scripts
+. /etc/profile.d/aws-credentials.sh
+. /etc/profile.d/usergrid-env.sh
+
+
+
+# Register as a Cassandra node and wait for enough other servers to join
+cd /usr/share/usergrid/scripts
+
+groovy registry_register.groovy
+groovy wait_for_cassandra.groovy
+
+# Install and stop Cassandra so we can configure it
+cd /etc/apt/sources.list.d
+cat >> cassandra.sources.list << EOF
+deb http://www.apache.org/dist/cassandra/debian 12x main
+EOF
+sudo apt-get update
+sudo apt-get -y install libcap2
+sudo apt-get --force-yes -y install cassandra
+/etc/init.d/cassandra stop
+
+cd /usr/share/usergrid/init_instance
+cd /usr/share/usergrid/scripts
+groovy configure_cassandra.groovy > /etc/cassandra/cassandra.yaml
+
+# Go
+/etc/init.d/cassandra start
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/dist/init_instance/init_graphite_server.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/init_graphite_server.sh b/stack/awscluster/src/main/dist/init_instance/init_graphite_server.sh
new file mode 100644
index 0000000..91b1601
--- /dev/null
+++ b/stack/awscluster/src/main/dist/init_instance/init_graphite_server.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+# 
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  The ASF licenses this file to You
+#  under the Apache License, Version 2.0 (the "License"); you may not
+#  use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.  For additional information regarding
+#  copyright in this work, please see the NOTICE file in the top level
+#  directory of this distribution.
+#
+
+echo "${HOSTNAME}" > /etc/hostname
+echo "127.0.0.1 ${HOSTNAME}" >> /etc/hosts
+hostname `cat /etc/hostname`
+
+echo "US/Eastern" > /etc/timezone
+dpkg-reconfigure -f noninteractive tzdata
+
+# Build environment for scripts
+. /etc/profile.d/aws-credentials.sh
+. /etc/profile.d/usergrid-env.sh
+
+cd /usr/share/usergrid/init_instance
+./create_raid0.sh
+
+# Install the easy stuff
+PKGS="ntp unzip groovy tomcat7 curl"
+apt-get update
+apt-get -y --force-yes install ${PKGS}
+/etc/init.d/tomcat7 stop
+
+# Install AWS Java SDK and get it into the Groovy classpath
+curl http://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip > /tmp/aws-sdk-java.zip
+cd /usr/share/
+unzip /tmp/aws-sdk-java.zip
+mkdir -p /home/ubuntu/.groovy/lib
+cp /usr/share/aws-java-sdk-*/third-party/*/*.jar /home/ubuntu/.groovy/lib
+cp /usr/share/aws-java-sdk-*/lib/* /home/ubuntu/.groovy/lib
+# except for evil stax
+rm /home/ubuntu/.groovy/lib/stax*
+ln -s /home/ubuntu/.groovy /root/.groovy
+
+cd /usr/share/usergrid/scripts
+groovy tag_instance.groovy
+
+cd /usr/share/usergrid/init_instance
+./install_oraclejdk.sh
+
+
+cd /usr/share/usergrid/scripts
+groovy registry_register.groovy graphite
+
+
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/dist/init_instance/install_yourkit.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/install_yourkit.sh b/stack/awscluster/src/main/dist/init_instance/install_yourkit.sh
new file mode 100644
index 0000000..37936cd
--- /dev/null
+++ b/stack/awscluster/src/main/dist/init_instance/install_yourkit.sh
@@ -0,0 +1,25 @@
+
+#####
+# Optional, install yourkit remote profiler
+#####
+
+if [ $YOURKIT = "true" ]; then
+
+mkdir -p /tmp/yourkit
+cd /tmp/yourkit
+s3cmd --config=/etc/s3cfg get s3://${RELEASE_BUCKET}/yjp-2013-build-13088.zip
+unzip /tmp/yourkit/yjp-2013-build-13088.zip
+
+mkdir -p /tmp/yourkitreports
+
+chown -R tomcat7.tomcat7 /tmp/yourkitreports
+
+cat >> /etc/default/tomcat7 << EOF
+JAVA_OPTS="${JAVA_OPTS} -agentpath:/tmp/yourkit/yjp-2013-build-13088/bin/linux-x86-64/libyjpagent.so=port=10001,logdir=/tmp/yourkitreports,onexit=snapshot"
+EOF
+
+fi
+
+######
+# End yourkit installation
+######

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/groovy/NodeRegistry.groovy
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/groovy/NodeRegistry.groovy b/stack/awscluster/src/main/groovy/NodeRegistry.groovy
new file mode 100644
index 0000000..38c44be
--- /dev/null
+++ b/stack/awscluster/src/main/groovy/NodeRegistry.groovy
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
+/**
+ * A utility class that search simple db for the node type provided and returns a list of
hostnames as a string array
+ */
+import com.amazonaws.auth.BasicAWSCredentials
+import com.amazonaws.services.simpledb.AmazonSimpleDBClient
+import com.amazonaws.services.simpledb.model.*
+
+class NodeRegistry {
+
+    private String accessKey = (String) System.getenv().get("AWS_ACCESS_KEY")
+    private String secretKey = (String) System.getenv().get("AWS_SECRET_KEY")
+    private String stackName = (String) System.getenv().get("STACK_NAME")
+    private hostName = (String) System.getenv().get("PUBLIC_HOSTNAME")
+    private String domain = stackName
+
+    private def creds;
+    private def sdbClient;
+
+
+    NodeRegistry() {
+        // creates domain or no-op if it already exists
+        creds = new BasicAWSCredentials(accessKey, secretKey)
+        sdbClient = new AmazonSimpleDBClient(creds)
+
+        sdbClient.createDomain(new CreateDomainRequest(domain))
+    }
+
+    /**
+     * Search for the node type, return a string array of hostnames that match it within
the running domain
+     * @param defNodeType
+     */
+    def searchNode(def nodeType) {
+        def selectResult = sdbClient.select(new SelectRequest((String) "select * from `${domain}`
where itemName() is not null and nodetype = '${nodeType}'  order by itemName()"))
+        def result = []
+
+        for (item in selectResult.getItems()) {
+            def hostname = item.getName()
+            result.add(hostname)
+        }
+
+        return result
+
+    }
+
+    /**
+     * Get the entire database back in raw form
+     * @return
+     */
+    def selectAll() {
+        def selectResult = sdbClient.select(new SelectRequest((String) "select * from `${domain}`")).getItems()
+
+        return selectResult;
+    }
+
+    /**
+     * Add the node to the database if it doesn't exist
+     */
+    def addNode(def nodeType) {
+        def gar = new GetAttributesRequest(domain, hostName);
+        def response = sdbClient.getAttributes(gar);
+        if (response.getAttributes().size() == 1) {
+            println "Already registered"
+            def attrs = response.getAttributes()
+            for (att in attrs) {
+                println("${hostName} -> ${att.getName()} : ${att.getValue()}")
+            }
+
+            return false;
+
+        } else {
+            println "Registering..."
+            def stackAtt = new ReplaceableAttribute("nodetype", nodeType, true)
+            def attrs = new ArrayList()
+            attrs.add(stackAtt)
+            def par = new PutAttributesRequest(domain, hostName, attrs)
+            sdbClient.putAttributes(par);
+            println "Registraition done."
+            return true;
+        }
+
+
+    }
+
+    def deleteRegistry(){
+        sdbClient.deleteDomain(new DeleteDomainRequest(domain))
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/adfac04e/stack/awscluster/src/main/groovy/get_first_instance.groovy
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/groovy/get_first_instance.groovy b/stack/awscluster/src/main/groovy/get_first_instance.groovy
new file mode 100644
index 0000000..5330718
--- /dev/null
+++ b/stack/awscluster/src/main/groovy/get_first_instance.groovy
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
+
+//
+// wait_for_instances.groovy
+//
+// Wait for enough Cassandra servers are up before proceding,
+// Enough means count greater than or equal to replication factor.
+//
+import com.amazonaws.auth.*
+import com.amazonaws.services.simpledb.*
+import com.amazonaws.services.simpledb.model.*
+
+
+if (args.size() !=1  )  {
+  println "this script expects one argument.  get_first_instance.groovy nodetype "
+  // You can even print the usage here.
+  return 1;
+}
+
+String nodetype = args[0]
+
+
+NodeRegistry registry = new NodeRegistry();
+
+
+def selectResult = registry.searchNode(nodetype)
+
+
+println "${selectResult[0]}"


Mime
View raw message