You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/03/19 23:20:16 UTC
[26/50] [abbrv] incubator-usergrid git commit: Fixes incorrect system
initialization order
Fixes incorrect system initialization order
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/494f8aed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/494f8aed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/494f8aed
Branch: refs/heads/USERGRID-493
Commit: 494f8aed2ad970cae9ff64433e5229b0b67d965a
Parents: 2e77c63
Author: Todd Nine <tn...@apigee.com>
Authored: Wed Mar 4 22:32:07 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Wed Mar 4 22:32:07 2015 -0700
----------------------------------------------------------------------
.../main/dist/init_instance/init_rest_server.sh | 24 +++++++++++---------
1 file changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/494f8aed/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 3860cd4..0b920fd 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
@@ -1,14 +1,14 @@
#!/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.
@@ -35,10 +35,10 @@ apt-get -y --force-yes 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
+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
+cp /usr/share/aws-java-sdk-*/lib/* /home/ubuntu/.groovy/lib
ln -s /home/ubuntu/.groovy /root/.groovy
# Build environment for Groovy scripts
@@ -55,7 +55,7 @@ groovy tag_instance.groovy -BUILD-IN-PROGRESS
chmod +x /usr/share/usergrid/update.sh
cd /usr/share/usergrid/init_instance
-./install_oraclejdk.sh
+./install_oraclejdk.sh
cd /usr/share/usergrid/init_instance
./install_yourkit.sh
@@ -171,7 +171,7 @@ kernel.shmall = 4294967296
######
EOF
-# wait for enough Cassandra nodes then delpoy and configure Usergrid
+# 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}
@@ -185,8 +185,8 @@ chown -R tomcat7 /usr/share/usergrid/webapps
chown -R tomcat7 /var/lib/tomcat7/webapps
# configure usergrid
-mkdir -p /usr/share/tomcat7/lib
-groovy configure_usergrid.groovy > /usr/share/tomcat7/lib/usergrid-deployment.properties
+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
@@ -222,6 +222,10 @@ GRAPHITE_SERVER="$(groovy get_first_instance.groovy graphite )"
#First host run the migration and setup
if [ "$FIRSTHOST"=="$PUBLIC_HOSTNAME" ]; then
+#Run the system database setup since migration is a no-op
+curl -X GET http://localhost:8080/system/database/setup -u superuser:test
+
+
#Run the migration
curl -X PUT http://localhost:8080/system/migrate/run -u superuser:test
@@ -229,8 +233,6 @@ curl -X PUT http://localhost:8080/system/migrate/run -u superuser:test
#Running setup
sleep 10
-#Run the system database setup since migration is a no-op
-curl -X GET http://localhost:8080/system/database/setup -u superuser:test
cd /usr/share/usergrid/init_instance
./update_keyspaces.sh