usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [3/5] usergrid git commit: Update defaults to allow less property overrides in actual deployments. Default values based on known good production settings.
Date Thu, 27 Aug 2015 22:16:52 GMT
Update defaults to allow less property overrides in actual deployments.  Default values based
on known good production settings.


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

Branch: refs/heads/two-dot-o-dev
Commit: 33dd4d3472627a43e6425014c0a2b4b529d1b6ad
Parents: 7318607
Author: Michael Russo <michaelarusso@gmail.com>
Authored: Wed Aug 26 11:25:41 2015 -0700
Committer: Michael Russo <michaelarusso@gmail.com>
Committed: Wed Aug 26 11:25:41 2015 -0700

----------------------------------------------------------------------
 .../src/main/groovy/configure_usergrid.groovy   |  2 -
 .../main/resources/usergrid-default.properties  | 55 +++++++++++---------
 .../src/test/resources/usergrid-test.properties |  4 +-
 .../corepersistence/index/CoreIndexFig.java     | 13 ++++-
 .../main/resources/usergrid-core-context.xml    |  6 +--
 .../resources/usergrid-custom-test.properties   |  4 +-
 .../serialization/SerializationFig.java         |  2 +-
 .../persistence/core/astyanax/CassandraFig.java |  2 +-
 .../usergrid/persistence/index/IndexFig.java    | 13 +++--
 .../src/test/resources/usergrid-UNIT.properties |  3 +-
 .../usergrid/persistence/queue/QueueFig.java    |  4 --
 .../resources/usergrid-standalone.properties    |  2 -
 .../resources/usergrid-custom-test.properties   |  1 -
 .../management/AccountCreationProps.java        |  2 -
 .../resources/usergrid-custom-test.properties   |  1 -
 15 files changed, 63 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/awscluster/src/main/groovy/configure_usergrid.groovy
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/groovy/configure_usergrid.groovy b/stack/awscluster/src/main/groovy/configure_usergrid.groovy
index fb98368..e84aa5c 100644
--- a/stack/awscluster/src/main/groovy/configure_usergrid.groovy
+++ b/stack/awscluster/src/main/groovy/configure_usergrid.groovy
@@ -110,7 +110,6 @@ usergrid.write.cl=${writeConsistencyLevel}
 
 
 elasticsearch.cluster_name=${clusterName}
-elasticsearch.index_prefix=${stackName}
 elasticsearch.hosts=${esnodes}
 elasticsearch.port=9300
 elasticsearch.number_shards=${esShards}
@@ -190,7 +189,6 @@ usergrid.user.resetpw.url=${baseUrl}/%s/%s/users/%s/resetpw
 
 usergrid.metrics.graphite.host=${graphite}
 
-usergrid.queue.prefix=${stackName}
 usergrid.queue.region=${ec2Region}
 
 # Enable scheduler for import/export jobs

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/config/src/main/resources/usergrid-default.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties
index 33889ac..3f03958 100644
--- a/stack/config/src/main/resources/usergrid-default.properties
+++ b/stack/config/src/main/resources/usergrid-default.properties
@@ -100,7 +100,7 @@ cassandra.embedded=false
 
 # Set the maximum number of connections to Cassandra
 #
-#cassandra.connections=100
+#cassandra.connections=15
 
 # Read timeout for an individual request (in millseconds)
 #
@@ -196,6 +196,10 @@ cassandra.lock.writecl=LOCAL_QUORUM
 #cassandra.useSocketKeepalive=false
 
 
+##################### Async Threadpool Settings #####################
+
+# Set the number of threads available in the Rx Async Thread Pool
+#scheduler.io.threads=100
 
 
 #####################  Elasticsearch (Indexing/Querying)  #####################
@@ -217,9 +221,6 @@ cassandra.lock.writecl=LOCAL_QUORUM
 #
 elasticsearch.cluster_name=elasticsearch
 
-# Set the Elasticsearch index prefix
-#
-elasticsearch.index_prefix=elasticsearch
 
 # Set the Elasticsearch client node name
 #
@@ -229,16 +230,19 @@ elasticsearch.index_prefix=elasticsearch
 #
 #elasticsearch.startup=remote
 
-# Set the number of shards and replicas to use for the Elasticsearch index.
-# Depending on the use case for Usergrid, these numbers may vary.  A single running
-# instance of Usergrid will always use only 1 index, and you can choose how it's
-# sharded in Elastic search to reach optimal indexing for your dataset.  For more
+
+# Set the number of primary shards to use for an index in Elasticsearch.  Typically 2x or
3x the ES nodes.
+#
+# Depending on the use case for Usergrid, these numbers may vary. Usergrid is defaulted
+# to a higher number of shards based on typical Elasticsearch clusters being >= 6 nodes.
+# You can choose how it's sharded in Elasticsearch to reach optimal indexing for your dataset.
 For more
 # info about sharding, here is a good starting point:
-#  <https://www.elastic.co/guide/en/elasticsearch/guide/current/routing-value.html>
+# <https://www.elastic.co/guide/en/elasticsearch/guide/current/routing-value.html>
 #
-#elasticsearch.number_shards=1
-#elasticsearch.number_replicas=0
-
+#elasticsearch.number_shards=18
+#elasticsearch.number_replicas=1
+#elasticsearch.management_number_shards=18
+#elasticsearch.management_number_replicas=1
 
 # Set an alias used for this running instance of Usergrid.  This allows you to
 # configure multiple Usergrid instances pointing to the same Elasticsearch cluster,
@@ -506,12 +510,7 @@ usergrid.sysadmin.login.email=super@usergrid.com
 usergrid.sysadmin.login.password=test
 usergrid.sysadmin.login.allowed=true
 
-# Set the sysadmin permissions for approving new users and organizations
-#
-usergrid.sysadmin.approve.users=false
-usergrid.sysadmin.approve.organizations=false
-
-# Set a legacy sysadmin email configuration.
+# Set admin notification email properties
 #
 usergrid.sysadmin.email=
 
@@ -566,7 +565,7 @@ usergrid.websocket.disable=true
 
 # Set batch size for when to submit counter batches.
 #
-usergrid.counter.batch.size=1000
+usergrid.counter.batch.size=50000
 
 # Set the time interval for when to submit counter batches.
 #
@@ -591,7 +590,11 @@ usergrid.version.build=${version}
 # the test account creation is ignored.
 #
 
-usergrid.setup-test-account=true
+# Set flags to disable test features.
+#
+usergrid.setup-test-account=false
+usergrid.test=false
+
 usergrid.test-account.app=test-app
 usergrid.test-account.organization=test-organization
 usergrid.test-account.admin-user.username=test
@@ -599,9 +602,7 @@ usergrid.test-account.admin-user.name=Test User
 usergrid.test-account.admin-user.email=test@usergrid.com
 usergrid.test-account.admin-user.password=test
 
-# Set a flag to disable test features.
-#
-usergrid.test=false
+
 
 # Set some test properties
 #
@@ -622,11 +623,13 @@ usergrid.test=false
 #
 
 # Set the requirements for activiation and confirmations
-usergrid.management.admin_users_require_confirmation=false
-usergrid.management.notify_admin_of_activation=false
-usergrid.management.organizations_require_confirmation=false
+usergrid.sysadmin.approve.users=false
+usergrid.sysadmin.approve.organizations=false
 usergrid.management.notify_sysadmin_of_new_organizations=false
 usergrid.management.notify_sysadmin_of_new_admin_users=false
+usergrid.management.admin_users_require_confirmation=false
+usergrid.org.sysadmin.email=
+usergrid.admin.sysadmin.email=
 
 # Set the different activation/reset URLS
 #

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/config/src/test/resources/usergrid-test.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/test/resources/usergrid-test.properties b/stack/config/src/test/resources/usergrid-test.properties
index 072ca0b..bfa731b 100644
--- a/stack/config/src/test/resources/usergrid-test.properties
+++ b/stack/config/src/test/resources/usergrid-test.properties
@@ -65,6 +65,8 @@ elasticsearch.cluster_name=elasticsearch
 #This is just way more efficient for a single node and the number of shards we're creating
 elasticsearch.number_shards=1
 elasticsearch.number_replicas=0
+elasticsearch.management_number_shards=1
+elasticsearch.management_number_replicas=0
 
 #Properties to control the number of buckets in the index.
 usergrid.index.defaultbucketsize=20
@@ -118,8 +120,6 @@ swagger.basepath=http://localhost:8080
 AWS_ACCESS_KEY_ID=
 AWS_ACCESS_KEY_SECRET=
 
-usergrid.test.sample_data_url=
-
 # Disable Mongo API Server
 usergrid.mongo.disable=false
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CoreIndexFig.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CoreIndexFig.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CoreIndexFig.java
index bf795cb..d5524ef 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CoreIndexFig.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CoreIndexFig.java
@@ -34,7 +34,18 @@ public interface CoreIndexFig extends GuicyFig {
 
     String ELASTICSEARCH_MANAGEMENT_NUMBER_OF_REPLICAS = "elasticsearch.management_number_replicas";
 
-    @Default( "6" )
+
+    /**
+     * The number of primary shards to use for an index in Elasticsearch.  Typically 2x or
3x the ES nodes.
+     *
+     * Depending on the use case for Usergrid, these numbers may vary. Usergrid is defaulted
+     * to a higher number of shards based on typical Elasticsearch clusters being >= 6
nodes.
+     * You can choose how it's sharded in Elasticsearch to reach optimal indexing for your
dataset.  For more
+     * info about sharding, here is a good starting point:
+     *  <https://www.elastic.co/guide/en/elasticsearch/guide/current/routing-value.html>
+     *
+     */
+    @Default( "18" )
     @Key( ELASTICSEARCH_MANAGEMENT_NUMBER_OF_SHARDS )
     int getManagementNumberOfShards();
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/core/src/main/resources/usergrid-core-context.xml
----------------------------------------------------------------------
diff --git a/stack/core/src/main/resources/usergrid-core-context.xml b/stack/core/src/main/resources/usergrid-core-context.xml
index 4ac0261..57d4de7 100644
--- a/stack/core/src/main/resources/usergrid-core-context.xml
+++ b/stack/core/src/main/resources/usergrid-core-context.xml
@@ -53,8 +53,8 @@
 	<bean id="cassandraHostConfigurator" class="me.prettyprint.cassandra.service.CassandraHostConfigurator">
 		<constructor-arg value="${cassandra.url}" />
         <!-- set the pool size if it's available.  If not go with 50 -->
-        <property name="maxActive" value="${cassandra.connections:20}"/>
-        <property name="cassandraThriftSocketTimeout" value="${cassandra.thriftSocketTimeout:0}"
/>
+        <property name="maxActive" value="${cassandra.connections:15}"/>
+        <property name="cassandraThriftSocketTimeout" value="${cassandra.thriftSocketTimeout:5000}"
/>
         <property name="useSocketKeepalive" value="${cassandra.useSocketKeepalive:false}"
/>
         <!-- Fails on Java 8: <property name="clockResolution" ref="microsecondsTimeResolution"
/>-->
         <property name="opTimer" ref="taggedOpTimer"/>
@@ -166,7 +166,7 @@
     </bean>
 
     <bean id="mailUtils" class="org.apache.usergrid.utils.MailUtils" />
-    
+
     <!-- ============================================================== -->
     <!-- Scheduler Settings from removed Scheduler Module's app context -->
     <!-- ============================================================== -->

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/core/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/core/src/test/resources/usergrid-custom-test.properties b/stack/core/src/test/resources/usergrid-custom-test.properties
index 74e0fdd..5997d62 100644
--- a/stack/core/src/test/resources/usergrid-custom-test.properties
+++ b/stack/core/src/test/resources/usergrid-custom-test.properties
@@ -22,7 +22,9 @@ cassandra.connections=1000
 #This is just way more efficient for a single node and the number of shards we're creating
 elasticsearch.number_shards=1
 elasticsearch.number_replicas=0
-elasticsearch.index_prefix=core_tests
+elasticsearch.management_number_shards=1
+elasticsearch.management_number_replicas=0
+
 elasticsearch.managment_index=usergrid_core_management
 #cassandra.keyspace.application=core_tests_schema
 elasticsearch.queue_impl.resolution=true

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/SerializationFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/SerializationFig.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/SerializationFig.java
index 6591781..ca9cd99 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/SerializationFig.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/SerializationFig.java
@@ -51,7 +51,7 @@ public interface SerializationFig extends GuicyFig {
      * (15mb thrift buffer * .9) / 100 (default max load size)
      */
     @Key( COLLECTION_MAX_ENTITY_SIZE )
-    @Default( "141557" )
+    @Default( "5000000" )
     int getMaxEntitySize();
 
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
index 0702185..79c198f 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraFig.java
@@ -67,7 +67,7 @@ public interface CassandraFig extends GuicyFig {
     String getLocalDataCenter();
 
     @Key( "cassandra.connections" )
-    @Default( "100" )
+    @Default( "15" )
     int getConnections();
 
     @Key( "cassandra.timeout" )

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
index aa9cad4..5997029 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java
@@ -122,9 +122,16 @@ public interface IndexFig extends GuicyFig {
     String getNodeName();
 
     /**
-     * The number of primary shards to use for the index in Elasticsearch.
-     */
-    @Default( "6" )
+     * The number of primary shards to use for an index in Elasticsearch.  Typically 2x or
3x the ES nodes.
+     *
+     * Depending on the use case for Usergrid, these numbers may vary. Usergrid is defaulted
+     * to a higher number of shards based on typical Elasticsearch clusters being >= 6
nodes.
+     * You can choose how it's sharded in Elasticsearch to reach optimal indexing for your
dataset.  For more
+     * info about sharding, here is a good starting point:
+     *  <https://www.elastic.co/guide/en/elasticsearch/guide/current/routing-value.html>
+     *
+     */
+    @Default( "18" )
     @Key( ELASTICSEARCH_NUMBER_OF_SHARDS )
     int getNumberOfShards();
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
b/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
index ba163fa..fcecac1 100644
--- a/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
+++ b/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
@@ -15,7 +15,6 @@ collection.stage.transient.timeout=6
 
 elasticsearch.startup=external
 elasticsearch.cluster_name=elasticsearch
-elasticsearch.index_prefix=usergrid
 elasticsearch.hosts=127.0.0.1
 elasticsearch.port=9300
 
@@ -26,6 +25,8 @@ index.query.limit.default=1000
 #This is just way more efficient for a single node and the number of shards we're creating
 elasticsearch.number_shards=1
 elasticsearch.number_replicas=0
+elasticsearch.management_number_shards=1
+elasticsearch.management_number_replicas=0
 
 #Set our timeout to 10 minutes for testing
 elasticsearch.cursor_timeout.minutes=10

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
index 980163b..2a9f321 100644
--- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
+++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/QueueFig.java
@@ -39,10 +39,6 @@ public interface QueueFig extends GuicyFig {
     public String getRegionList();
 
 
-    @Key( "usergrid.queue.prefix" )
-    @Default("usergrid")
-    public String getPrefix();
-
     /**
      * Set the amount of time (in minutes) to retain messages in a queue.
      * 1209600 = 14 days (maximum retention period)

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/launcher/src/main/resources/usergrid-standalone.properties
----------------------------------------------------------------------
diff --git a/stack/launcher/src/main/resources/usergrid-standalone.properties b/stack/launcher/src/main/resources/usergrid-standalone.properties
index 03f1f8a..8e189d9 100644
--- a/stack/launcher/src/main/resources/usergrid-standalone.properties
+++ b/stack/launcher/src/main/resources/usergrid-standalone.properties
@@ -107,8 +107,6 @@ zookeeper.maxAttempts = 3
 #AWS_ACCESS_KEY_SECRET=
 #usergrid.binary.bucketname=usergrid-test-binary
 
-usergrid.test.sample_data_url=
-
 # Disable Mongo API Server
 usergrid.mongo.disable=false
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/rest/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/resources/usergrid-custom-test.properties b/stack/rest/src/test/resources/usergrid-custom-test.properties
index a55ca8b..8d8154c 100644
--- a/stack/rest/src/test/resources/usergrid-custom-test.properties
+++ b/stack/rest/src/test/resources/usergrid-custom-test.properties
@@ -41,7 +41,6 @@ usergrid.sysadmin.login.name=superuser
 usergrid.sysadmin.login.email=superuser@usergrid.com
 usergrid.sysadmin.login.password=superpassword
 usergrid.sysadmin.login.allowed=true
-elasticsearch.index_prefix=rest_tests
 usergrid.use.default.queue=true
 
 elasticsearch.managment_index=usergrid_rest_management

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
b/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
index c68cd5d..98f3998 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
@@ -71,10 +71,8 @@ public interface AccountCreationProps {
 
     public static final String PROPERTIES_SYSADMIN_APPROVES_ADMIN_USERS =
             "usergrid.sysadmin.approve.users";
-            //"usergrid.management.admin_users_require_activation";
     public static final String PROPERTIES_SYSADMIN_APPROVES_ORGANIZATIONS =
             "usergrid.sysadmin.approve.organizations";
-            //"usergrid.management.organizations_require_activation";
     public static final String PROPERTIES_NOTIFY_SYSADMIN_OF_NEW_ORGANIZATIONS =
             "usergrid.management.notify_sysadmin_of_new_organizations";
     public static final String PROPERTIES_NOTIFY_SYSADMIN_OF_NEW_ADMIN_USERS =

http://git-wip-us.apache.org/repos/asf/usergrid/blob/33dd4d34/stack/services/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/services/src/test/resources/usergrid-custom-test.properties b/stack/services/src/test/resources/usergrid-custom-test.properties
index b52880d..5ce2e4a 100644
--- a/stack/services/src/test/resources/usergrid-custom-test.properties
+++ b/stack/services/src/test/resources/usergrid-custom-test.properties
@@ -29,7 +29,6 @@ hystrix.threadpool.graph_async.coreSize=50
 usergrid.scheduler.job.timeout=300000
 
 usergrid.notifications.listener.run=false
-elasticsearch.index_prefix=services_tests
 elasticsearch.managment_index=usergrid_services_management
 #cassandra.keyspace.application=service_tests_schema
 


Mime
View raw message