usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [23/50] git commit: Updated apt-get config path to be absolute
Date Thu, 06 Nov 2014 00:15:09 GMT
Updated apt-get config path to be absolute

Updated instance size for opscenter to always be a compute instance with 2 ephemeral disks


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

Branch: refs/heads/two-dot-o
Commit: 90849f43645f943647c19876fa2aad914472ee08
Parents: d94ea8f
Author: Todd Nine <tnine@apigee.com>
Authored: Mon Nov 3 09:41:29 2014 -0700
Committer: Todd Nine <tnine@apigee.com>
Committed: Mon Nov 3 09:41:29 2014 -0700

----------------------------------------------------------------------
 .../dist/init_instance/init_opscenter_server.sh | 33 ++++++++++++++------
 .../dist/init_instance/install_cassandra.sh     | 10 +++---
 stack/awscluster/ugcluster-cf.json              | 26 +++++++++------
 3 files changed, 44 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/90849f43/stack/awscluster/src/main/dist/init_instance/init_opscenter_server.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/init_opscenter_server.sh b/stack/awscluster/src/main/dist/init_instance/init_opscenter_server.sh
index d453940..728cb6d 100644
--- a/stack/awscluster/src/main/dist/init_instance/init_opscenter_server.sh
+++ b/stack/awscluster/src/main/dist/init_instance/init_opscenter_server.sh
@@ -53,14 +53,20 @@ ln -s /home/ubuntu/.groovy /root/.groovy
 cd /usr/share/usergrid/scripts
 groovy tag_instance.groovy -BUILD-IN-PROGRESS
 
-cd /usr/share/usergrid/init_instance
-./install_oraclejdk.sh 
 
-# Install and stop Cassandra
+#Create the raid0 array for cassandra storage
+pushd /usr/share/usergrid/init_instance
+./create_raid0.sh
+#Install the oracle jdd
+./install_oraclejdk.sh
+popd
+
+#Install cassandra
 
+# Install and stop Cassandra
 curl -L http://debian.datastax.com/debian/repo_key | apt-key add -
 
-sudo cat >> cassandra.sources.list << EOF
+sudo cat >> /etc/apt/sources.list.d/cassandra.sources.list << EOF
 deb http://debian.datastax.com/community stable main
 EOF
 
@@ -71,14 +77,21 @@ apt-get -y --force-yes install libcap2 cassandra=1.2.19
 mkdir -p /mnt/data/cassandra
 chown cassandra /mnt/data/cassandra
 
-# Wait for other instances to start up
-cd /usr/share/usergrid/scripts
+
+# Register ourselves
+pushd /usr/share/usergrid/scripts
 groovy registry_register.groovy opscenter
+popd
 
-cd /usr/share/usergrid/scripts
+pushd /usr/share/usergrid/scripts
 groovy configure_opscenter_cassandra.groovy > /etc/cassandra/cassandra.yaml
+popd
+
 /etc/init.d/cassandra start
 
+#create our keyspace
+
+
 
 #Install the opscenter service
 # Install opscenter
@@ -90,13 +103,15 @@ apt-get  --force-yes -y install opscenter
 sudo service opscenterd stop
 
 #Configure the usergrid cluster to store data locally, not on the target cluster and auto
boostrap it
-cd /usr/share/usergrid/scripts
+pushd /usr/share/usergrid/scripts
 groovy wait_for_instances.groovy cassandra 1
 mkdir -p /etc/opscenter/clusters
 groovy configure_opscenter_usergrid.groovy > /etc/opscenter/clusters/$CASSANDRA_CLUSTER_NAME.conf
+popd
 
 sudo service opscenterd start
 
 # tag last so we can see in the console that the script ran to completion
-cd /usr/share/usergrid/scripts
+pushd /usr/share/usergrid/scripts
 groovy tag_instance.groovy
+popd

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/90849f43/stack/awscluster/src/main/dist/init_instance/install_cassandra.sh
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/dist/init_instance/install_cassandra.sh b/stack/awscluster/src/main/dist/init_instance/install_cassandra.sh
index 7a58b97..480eacf 100644
--- a/stack/awscluster/src/main/dist/init_instance/install_cassandra.sh
+++ b/stack/awscluster/src/main/dist/init_instance/install_cassandra.sh
@@ -20,11 +20,9 @@
 
 
 # Install and stop Cassandra
-pushd /etc/apt/sources.list.d
-
 curl -L http://debian.datastax.com/debian/repo_key | apt-key add -
 
-sudo cat >> cassandra.sources.list << EOF
+sudo cat >> /etc/apt/sources.list.d/cassandra.sources.list << EOF
 deb http://debian.datastax.com/community stable main
 EOF
 
@@ -44,10 +42,10 @@ groovy wait_for_instances.groovy cassandra ${CASSANDRA_NUM_SERVERS}
 #Set or min/max heap to 8GB
 sed -i.bak s/calculate_heap_sizes\(\)/MAX_HEAP_SIZE=\"8G\"\\nHEAP_NEWSIZE=\"1200M\"\\n\\ncalculate_heap_sizes\(\)/g
/etc/cassandra/cassandra-env.sh
 
-cd /usr/share/usergrid/scripts
+pushd /usr/share/usergrid/scripts
 groovy configure_cassandra.groovy > /etc/cassandra/cassandra.yaml
-/etc/init.d/cassandra start
+popd
 
+/etc/init.d/cassandra start
 
-popd
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/90849f43/stack/awscluster/ugcluster-cf.json
----------------------------------------------------------------------
diff --git a/stack/awscluster/ugcluster-cf.json b/stack/awscluster/ugcluster-cf.json
index 430c9fe..78d575f 100644
--- a/stack/awscluster/ugcluster-cf.json
+++ b/stack/awscluster/ugcluster-cf.json
@@ -152,16 +152,11 @@
         "OpsCenterInstanceType": {
                    "Description": "Instance type for Opscenter server",
                    "Type": "String",
-                   "Default": "m3.large",
+                   "Default": "c3.xlarge",
                    "AllowedValues": [
-                       "t1.micro",
-                       "m1.small",
-                       "m1.medium",
-                       "m1.large",
-                       "m3.large",
-                       "m1.xlarge",
-                       "m3.xlarge",
-                       "m3.2xlarge",
+                       "c3.large",
+                       "c3.xlarge",
+                       "c3.2xlarge",
                        "c3.4xlarge"
                    ],
                    "ConstraintDescription": "must be valid instance type."
@@ -564,7 +559,18 @@
                                         {
                                            "Ref":"OpsCenterSecurityGroup"
                                         }
-                                     ]
+                                     ],
+
+                         "BlockDeviceMappings": [
+                             {
+                                 "DeviceName": "/dev/sdb",
+                                 "VirtualName": "ephemeral0"
+                             },
+                             {
+                                 "DeviceName": "/dev/sdc",
+                                 "VirtualName": "ephemeral1"
+                              }
+                            ]
 
                      }
                   },


Mime
View raw message