usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [6/6] git commit: Merge branch 'two-dot-o' of https://github.com/apache/incubator-usergrid into two-dot-o
Date Fri, 25 Jul 2014 17:40:44 GMT
Merge branch 'two-dot-o' of https://github.com/apache/incubator-usergrid into two-dot-o

Conflicts:
	stack/awscluster/assembly.xml
	stack/awscluster/src/main/dist/init_instance/init_db_server.sh
	stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
	stack/awscluster/src/main/dist/init_instance/install_cassandra.sh
	stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
	stack/awscluster/src/main/groovy/configure_elasticsearch.groovy
	stack/awscluster/src/main/groovy/configure_usergrid.groovy
	stack/awscluster/src/main/groovy/wait_for_instances.groovy
	stack/awscluster/ugcluster-cf.json


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

Branch: refs/heads/two-dot-o
Commit: f2b6d25b6b1305be822a15004d8395701794c409
Parents: 825438a b1e41a0
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Fri Jul 25 13:33:45 2014 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Fri Jul 25 13:33:45 2014 -0400

----------------------------------------------------------------------
 chop/example/src/main/resources/runner.sh       |  48 +++++++++
 chop/example/src/main/resources/stack.json      |   1 +
 .../usergrid/chop/stack/BasicInstanceSpec.java  |  12 +++
 .../usergrid/chop/stack/InstanceSpec.java       |   8 ++
 chop/webapp/chop-webapp                         | 104 +++++++++++++++++++
 chop/webapp/pom.xml                             |  26 +++--
 .../webapp/coordinator/CoordinatorUtils.java    |  59 ++++++++++-
 stack/awscluster/assembly.xml                   |   9 ++
 .../main/dist/init_instance/init_db_server.sh   |  12 ++-
 .../main/dist/init_instance/init_rest_server.sh |  14 ++-
 .../dist/init_instance/install_cassandra.sh     |   6 +-
 .../dist/init_instance/install_elasticsearch.sh |   6 +-
 .../init_instance/install_opscenter_agent.sh    |  37 +++++++
 .../dist/init_instance/install_oraclejdk.sh     |   7 +-
 .../src/main/groovy/configure_cassandra.groovy  |  29 ++----
 .../main/groovy/configure_elasticsearch.groovy  |  24 ++---
 .../groovy/configure_opscenter_agent.groovy     |  50 +++++++++
 .../src/main/groovy/configure_usergrid.groovy   |  38 ++++---
 .../src/main/groovy/registry_clear.groovy       |  39 -------
 .../src/main/groovy/registry_list.groovy        |  21 ++--
 .../src/main/groovy/registry_register.groovy    |  34 ++----
 .../src/main/groovy/wait_for_instances.groovy   |  53 +++++-----
 22 files changed, 460 insertions(+), 177 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2b6d25b/stack/awscluster/assembly.xml
----------------------------------------------------------------------
diff --cc stack/awscluster/assembly.xml
index 65c9e37,a185ca0..b6a25a3
--- a/stack/awscluster/assembly.xml
+++ b/stack/awscluster/assembly.xml
@@@ -43,8 -43,11 +43,9 @@@
              <includes>
                  <include>**</include>
              </includes>
 -
 -
          </fileSet>
  
+ 
          <fileSet>
              <outputDirectory>./scripts</outputDirectory>
              <directory>./src/main/groovy</directory>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2b6d25b/stack/awscluster/src/main/dist/init_instance/init_db_server.sh
----------------------------------------------------------------------
diff --cc stack/awscluster/src/main/dist/init_instance/init_db_server.sh
index defc87e,068dfe5..197dd57
--- a/stack/awscluster/src/main/dist/init_instance/init_db_server.sh
+++ b/stack/awscluster/src/main/dist/init_instance/init_db_server.sh
@@@ -59,6 -65,11 +65,8 @@@ cd /usr/share/usergrid/init_instanc
  # Install and start ElasticSearch
  cd /usr/share/usergrid/init_instance
  ./install_elasticsearch.sh
 -/etc/init.d/elasticsearch start
  
- cd /usr/share/usergrid/scripts
- groovy tag_instance.groovy
 -
 -#Use the CQL to crate the keyspaces
++# Use the CQL to crate the keyspaces
+ cd /usr/share/usergrid/init_instance
+ ./create_keyspaces.sh
+ 
 -

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2b6d25b/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
----------------------------------------------------------------------
diff --cc stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
index 80bad42,b1fe8f9..6ace352
--- a/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
+++ b/stack/awscluster/src/main/dist/init_instance/init_rest_server.sh
@@@ -57,10 -52,12 +57,11 @@@ cd /usr/share/usergrid/init_instanc
  
  # Wait for enough Cassandra nodes then deploy and restart Tomcat 
  cd /usr/share/usergrid/scripts
- groovy wait_for_instances.groovy
+ groovy wait_for_instances.groovy cassandra ${CASSANDRA_NUM_SERVERS}
+ groovy wait_for_instances.groovy graphite ${GRAPHITE_NUM_SERVERS}
  
  mkdir -p /usr/share/tomcat7/lib 
 -groovy configure_usergrid.groovy > /usr/share/tomcat7/lib/usergrid-deployment.properties
 -
 +groovy configure_usergrid.groovy > /usr/share/tomcat7/lib/usergrid-custom.properties

  
  rm -rf /var/lib/tomcat7/webapps/*
  cp -r /usr/share/usergrid/webapps/* /var/lib/tomcat7/webapps

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2b6d25b/stack/awscluster/src/main/dist/init_instance/install_cassandra.sh
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2b6d25b/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
----------------------------------------------------------------------
diff --cc stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
index 2b911d5,7a6ad27..460588c
--- a/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
+++ b/stack/awscluster/src/main/dist/init_instance/install_elasticsearch.sh
@@@ -19,11 -19,13 +19,13 @@@
  #
  
  
 -# Install and stop ElasticSearch
  pushd /etc/apt/sources.list.d
  
 -groovy ./registry_register.groovy elasticsarch
++groovy ./registry_register.groovy elasticsearch
+ 
 +# Install and stop ElasticSearch
  cat >> elasticsearch.sources.list << EOF
 -deb http://packages.elasticsearch.org/elasticsearch/1.0/debian stable main
 +deb http://packages.elasticsearch.org/elasticsearch/1.2/debian stable main
  EOF
  apt-get update
  apt-get --force-yes -y install elasticsearch
@@@ -35,16 -37,11 +37,18 @@@ chown elasticsearch /mnt/data/elasticse
  mkdir -p /mnt/log/elasticsearch
  chown elasticsearch /mnt/log/elasticsearch
  
 -# Configure and restart ElasticSearch
 +# Configure ElasticSearch
 +cat >> /etc/default/elasticsearch << EOF
 +JAVA_HOME=/usr/lib/jvm/jdk1.7.0
 +EOF
 +
  update-rc.d elasticsearch defaults 95 10
  cd /usr/share/usergrid/scripts
+ 
+ 
  groovy ./configure_elasticsearch.groovy > /etc/elasticsearch/elasticsearch.yml
  
 +# Go!
 +/etc/init.d/elasticsearch start
 +
- popd
+ popd

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2b6d25b/stack/awscluster/src/main/groovy/configure_elasticsearch.groovy
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f2b6d25b/stack/awscluster/src/main/groovy/configure_usergrid.groovy
----------------------------------------------------------------------
diff --cc stack/awscluster/src/main/groovy/configure_usergrid.groovy
index a28ab5a,7f559df..124a323
--- a/stack/awscluster/src/main/groovy/configure_usergrid.groovy
+++ b/stack/awscluster/src/main/groovy/configure_usergrid.groovy
@@@ -40,30 -40,30 +40,40 @@@ def clusterName  = System.getenv().get(
  def superUserEmail     = System.getenv().get("SUPER_USER_EMAIL")
  def testAdminUserEmail = System.getenv().get("TEST_ADMIN_USER_EMAIL")
  
+ 
+ NodeRegistry registry = new NodeRegistry();
+ 
+ def selectResult = registry.searchNode('cassandra')
+ 
  // build seed list by listing all Cassandra nodes found in SimpleDB domain with our stackName
- def creds = new BasicAWSCredentials(accessKey, secretKey)
- def sdbClient = new AmazonSimpleDBClient(creds)
- def selectResult = sdbClient.select(new SelectRequest((String)"select * from `${domain}`"))
- def seeds = ""
+ def cassandras = ""
  def sep = ""
- for (item in selectResult.getItems()) {
-     def att = item.getAttributes().get(0)
-     if (att.getValue().equals(stackName)) {
-         seeds = "${seeds}${sep}${item.getName()}:9160"
-         sep = ","
-     }
+ for (item in selectResult) {
+     cassandras = "${cassandras}${sep}${item}:9160"
+     sep = ","
+ 
+ }
+ 
+ //TODO T.N Make this the graphite url
+ selectResult = registry.searchNode('graphite')
+ def graphite = ""
+ sep = ""
+ for (item in selectResult) {
+     graphite = "${graphite}${sep}${item}"
+     sep = ","
+ 
  }
  
 +def esnodes = ""
 +sep = ""
 +for (item in selectResult.getItems()) {
 +    def att = item.getAttributes().get(0)
 +    if (att.getValue().equals(stackName)) {
 +        esnodes = "${esnodes}${sep}${item.getName()}"
 +        sep = ","
 +    }
 +}
 +
  def usergridConfig = """
  ######################################################
  # Minimal Usergrid configuration properties for local Tomcat and Cassandra 


Mime
View raw message