You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/09/09 18:03:28 UTC
[1/2] git commit: Three changes: 1) you can now override the location
of the WAR and portal directory and 2) we now set ElasticSearch heap based on
EC2 Instance Type and 3) Tomcat now has a log4j config (again).
Repository: incubator-usergrid
Updated Branches:
refs/heads/two-dot-o dc968f921 -> cc90ffb9e
Three changes: 1) you can now override the location of the WAR and portal directory and 2) we now set ElasticSearch heap based on EC2 Instance Type and 3) Tomcat now has a log4j config (again).
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/af61bde3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/af61bde3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/af61bde3
Branch: refs/heads/two-dot-o
Commit: af61bde3e5cf0674d638ebb10b0379a08107687a
Parents: 3b73cec
Author: Dave Johnson <dm...@apigee.com>
Authored: Tue Sep 9 12:02:46 2014 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Tue Sep 9 12:02:46 2014 -0400
----------------------------------------------------------------------
stack/awscluster/assembly.xml | 4 +--
stack/awscluster/pom.xml | 2 ++
.../main/dist/init_instance/init_rest_server.sh | 8 +++---
.../dist/init_instance/install_elasticsearch.sh | 30 ++++++++++++++++++++
4 files changed, 38 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/af61bde3/stack/awscluster/assembly.xml
----------------------------------------------------------------------
diff --git a/stack/awscluster/assembly.xml b/stack/awscluster/assembly.xml
index 97466f2..aefa650 100644
--- a/stack/awscluster/assembly.xml
+++ b/stack/awscluster/assembly.xml
@@ -28,7 +28,7 @@
<file>
<outputDirectory>webapps</outputDirectory>
- <source>../rest/target/ROOT.war</source>
+ <source>${stack.war}</source>
<destName>ROOT.war</destName>
</file>
@@ -63,7 +63,7 @@
<fileSet>
<outputDirectory>./webapps/portal</outputDirectory>
- <directory>../../portal/dist/usergrid-portal</directory>
+ <directory>${portal.dir}</directory>
<includes>
<include>**</include>
</includes>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/af61bde3/stack/awscluster/pom.xml
----------------------------------------------------------------------
diff --git a/stack/awscluster/pom.xml b/stack/awscluster/pom.xml
index ad0f58e..049415d 100644
--- a/stack/awscluster/pom.xml
+++ b/stack/awscluster/pom.xml
@@ -31,6 +31,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aws.s3.release-bucket>ug-cloudformation</aws.s3.release-bucket>
+ <stack.war>../rest/target/ROOT.war</stack.war>
+ <portal.dir>../../portal/dist/usergrid-portal</portal.dir>
</properties>
<build>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/af61bde3/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 3464ea7..fdc83cd 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
@@ -87,12 +87,12 @@ case `(curl http://169.254.169.254/latest/meta-data/instance-type)` in
esac
export TOMCAT_CONNECTIONS=10000
-sudo sed -i.bak "s/Xmx128m/Xmx${TOMCAT_RAM} -Xms${TOMCAT_RAM}/g" /etc/default/tomcat7
-sudo sed -i.bak "s/<Connector/<Connector maxThreads=\"${TOMCAT_THREADS}\" acceptCount=\"${TOMCAT_THREADS}\" maxConnections=\"${TOMCAT_CONNECTIONS}\"/g" /var/lib/tomcat7/conf/server.xml
+sed -i.bak "s/Xmx128m/Xmx${TOMCAT_RAM} -Xms${TOMCAT_RAM} -Dlog4j\.configuration=file:\/usr\/share\/usergrid\/lib\/log4j\.properties/g" /etc/default/tomcat7
+sed -i.bak "s/<Connector/<Connector maxThreads=\"${TOMCAT_THREADS}\" acceptCount=\"${TOMCAT_THREADS}\" maxConnections=\"${TOMCAT_CONNECTIONS}\"/g" /var/lib/tomcat7/conf/server.xml
# set file limits
-sudo sed -i.bak "s/# \/etc\/init\.d\/tomcat7 -- startup script for the Tomcat 6 servlet engine/ulimit -n ${NOFILE}/" /etc/init.d/tomcat7
-sudo sed -i.bak "s/@student/a *\t\thard\tnofile\t\t${NOFILE}\n*\t\tsoft\tnofile\t\t${NOFILE}" /etc/security/limits.conf
+sed -i.bak "s/# \/etc\/init\.d\/tomcat7 -- startup script for the Tomcat 6 servlet engine/ulimit -n ${NOFILE}/" /etc/init.d/tomcat7
+sed -i.bak "s/@student/a *\t\thard\tnofile\t\t${NOFILE}\n*\t\tsoft\tnofile\t\t${NOFILE}" /etc/security/limits.conf
echo "$NOFILE" | sudo tee > /proc/sys/fs/nr_open
echo "$NOFILE" | sudo tee > /proc/sys/fs/file-max
cat >> /etc/pam.d/su << EOF
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/af61bde3/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 f7b5f3c..cae0eb8 100644
--- a/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
+++ b/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
@@ -42,7 +42,37 @@ cd /usr/share/usergrid/scripts
#groovy registry_register.groovy elasticsearch
#groovy wait_for_instances.groovy elasticsearch ${CASSANDRA_NUM_SERVERS}
+# use about one quarter of RAM for heap
+case `(curl http://169.254.169.254/latest/meta-data/instance-type)` in
+'m1.small' )
+ export ES_HEAP_SIZE=512M
+;;
+'m1.medium' )
+ export ES_HEAP_SIZE=1G
+;;
+'m1.large' )
+ export ES_HEAP_SIZE=2G
+;;
+'m1.xlarge' )
+ export ES_HEAP_SIZE=5G
+;;
+'m3.xlarge' )
+ export ES_HEAP_SIZE=5G
+;;
+'m3.large' )
+ export ES_HEAP_SIZE=2G
+;;
+'c3.2xlarge' )
+ export ES_HEAP_SIZE=4G
+;;
+'c3.4xlarge' )
+ export ES_HEAP_SIZE=12G
+esac
+
cat >> /etc/default/elasticsearch << EOF
+ES_HEAP_SIZE=${ES_HEAP_SIZE}
+MAX_OPEN_FILES=65535
+MAX_LOCKED_MEMORY=unlimited
JAVA_HOME=/usr/lib/jvm/jdk1.7.0
EOF
[2/2] git commit: Merge branch 'two-dot-o' of
https://git-wip-us.apache.org/repos/asf/incubator-usergrid into two-dot-o
Posted by sn...@apache.org.
Merge branch 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into two-dot-o
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/cc90ffb9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/cc90ffb9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/cc90ffb9
Branch: refs/heads/two-dot-o
Commit: cc90ffb9efdac15ae7795a68e5ba3bcd1db229b6
Parents: af61bde dc968f9
Author: Dave Johnson <dm...@apigee.com>
Authored: Tue Sep 9 12:03:16 2014 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Tue Sep 9 12:03:16 2014 -0400
----------------------------------------------------------------------
.../notifications/ApplicationQueueManager.java | 2 +-
.../notifications/NotificationBatchJob.java | 141 ----
.../services/notifications/NotificationJob.java | 76 ---
.../NotificationsQueueManager.java | 672 -------------------
.../services/notifications/QueueMessage.java | 43 --
.../notifications/apns/APNsAdapter.java | 26 +-
.../AbstractServiceNotificationIT.java | 1 +
.../apns/NotificationsServiceIT.java | 34 +-
8 files changed, 46 insertions(+), 949 deletions(-)
----------------------------------------------------------------------