You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/10/17 18:35:09 UTC

[22/49] git commit: more cloudformation updates

more cloudformation updates


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

Branch: refs/heads/two-dot-o
Commit: 4381884262c6e5f9ea98b2edc6980400e82cc821
Parents: 25770fe
Author: amuramoto <am...@apigee.com>
Authored: Mon Oct 13 13:56:36 2014 -0700
Committer: amuramoto <am...@apigee.com>
Committed: Mon Oct 13 13:56:36 2014 -0700

----------------------------------------------------------------------
 .../main/dist/init_instance/init_rest_server.sh  |  5 ++++-
 .../dist/init_instance/install_elasticsearch.sh  |  2 +-
 .../main/groovy/configure_elasticsearch.groovy   | 19 +++++++++++++++----
 3 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/43818842/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh b/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
index 5bb994c..96da354 100644
--- a/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
+++ b/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
@@ -123,6 +123,7 @@ EOF
 # wait for enough Cassandra nodes then delpoy and configure Usergrid 
 cd /usr/share/usergrid/scripts
 groovy wait_for_instances.groovy cassandra ${CASSANDRA_NUM_SERVERS}
+groovy wait_for_instances.groovy elasticsearch ${ES_NUM_SERVERS}
 groovy wait_for_instances.groovy graphite ${GRAPHITE_NUM_SERVERS}
 
 # link WAR and Portal into Tomcat's webapps dir
@@ -137,9 +138,11 @@ mkdir -p /usr/share/tomcat7/lib
 groovy configure_usergrid.groovy > /usr/share/tomcat7/lib/usergrid-deployment.properties 
 groovy configure_portal_new.groovy >> /var/lib/tomcat7/webapps/portal/config.js
 
+sudo sed -i '98i export CATALINA_OPTS=\"-DAWS_SECRET_KEY=${AWS_SECRET_KEY} -DAWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY} ${CATALINA_OPTS}\"' /usr/share/tomcat7/bin/catalina.sh
+
 # Go
 sh /etc/init.d/tomcat7 start
 
 # tag last so we can see in the console that the script ran to completion
 cd /usr/share/usergrid/scripts
-groovy tag_instance.groovy
+groovy tag_instance.groovy
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/43818842/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh b/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
index d6e4285..e5c6473 100644
--- a/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
+++ b/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
@@ -78,7 +78,7 @@ case `(curl http://169.254.169.254/latest/meta-data/instance-type)` in
 ;;
 'c3.4xlarge' )
     # total of 30g
-    export ES_HEAP_SIZE=15g
+    export ES_HEAP_SIZE=24g
 esac
 
 cat >> /etc/default/elasticsearch << EOF

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/43818842/stack/awscluster/src/main/groovy/configure_elasticsearch.groovy
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/groovy/configure_elasticsearch.groovy b/stack/awscluster/src/main/groovy/configure_elasticsearch.groovy
index ceddcbe..549a23b 100644
--- a/stack/awscluster/src/main/groovy/configure_elasticsearch.groovy
+++ b/stack/awscluster/src/main/groovy/configure_elasticsearch.groovy
@@ -19,9 +19,9 @@
 
 
 // 
-// configure_cassandra.groovy 
+// configure_elasticsearch.groovy 
 // 
-// Emits Cassandra config file based on environment and Cassandra node 
+// Emits Elasticsearch config file based on environment and Elasticsearch node 
 // registry in SimpleDB
 //
 
@@ -34,8 +34,7 @@ def clusterName  = (String)System.getenv().get("ES_CLUSTER_NAME")
 
 NodeRegistry registry = new NodeRegistry();
 
-// build seed list by listing all Cassandra nodes found in SimpleDB domain with our stackName
-// works because cassandra nodes are also elasticsearch nodes
+// build seed list by listing all Elasticsearch nodes found in SimpleDB domain with our stackName
 def selectResult = registry.searchNode('elasticsearch')
 def esnodes = ""
 def sep = ""
@@ -46,6 +45,7 @@ for (hostname in selectResult) {
 
 def elasticSearchConfig = """
 cluster.name: ${clusterName}
+discovery.zen.minimum_master_nodes: 4
 discovery.zen.ping.multicast.enabled: false
 discovery.zen.ping.unicast.hosts: [${esnodes}]
 node:
@@ -55,6 +55,17 @@ network:
 path:
     logs: /mnt/log/elasticsearch
     data: /mnt/data/elasticsearch
+bootstrap.mlockall: true
+threadpool.index.type: fixed
+threadpool.index.size: 160
+threadpool.index.queue_size: 401
+threadpool.bulk.type: fixed
+threadpool.bulk.size: 160
+threadpool.bulk.queue_size: 800
+
+action.auto_create_index: false
+
+action.disable_delete_all_indices: true
 """
 
 println elasticSearchConfig