Skip to content
Browse files

Generate separate 32 & 64-bit 1.7.0 packs

  • Loading branch information...
1 parent fd077b7 commit bcd9749f6738d88df46f802cfe816b9d415b6d10 @steveyen steveyen committed Jul 17, 2011
View
36 Makefile
@@ -1,14 +1,26 @@
-all: gen-membase-packs
+all: gen-membase-packs-32bit gen-membase-packs-64bit
-gen-membase-packs:
- ./gen-pack membase.erb 1 > packs/1-pack-membase
- ./gen-pack membase.erb 2 > packs/2-pack-membase
- ./gen-pack membase.erb 3 > packs/3-pack-membase
- ./gen-pack membase.erb 4 > packs/4-pack-membase
- ./gen-pack membase.erb 5 > packs/5-pack-membase
- ./gen-pack membase.erb 6 > packs/6-pack-membase
- ./gen-pack membase.erb 10 > packs/10-pack-membase
- ./gen-pack membase.erb 20 > packs/20-pack-membase
- ./gen-pack membase.erb 50 > packs/50-pack-membase
- ./gen-pack membase.erb 100 > packs/100-pack-membase
+gen-membase-packs-32bit:
+ ./gen-pack membase.erb 1 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/1-pack-membase
+ ./gen-pack membase.erb 2 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/2-pack-membase
+ ./gen-pack membase.erb 3 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/3-pack-membase
+ ./gen-pack membase.erb 4 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/4-pack-membase
+ ./gen-pack membase.erb 5 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/5-pack-membase
+ ./gen-pack membase.erb 6 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/6-pack-membase
+ ./gen-pack membase.erb 10 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/10-pack-membase
+ ./gen-pack membase.erb 20 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/20-pack-membase
+ ./gen-pack membase.erb 50 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/50-pack-membase
+ ./gen-pack membase.erb 100 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm > packs/membase-1.7.0-32bit/100-pack-membase
+
+gen-membase-packs-64bit:
+ ./gen-pack membase.erb 1 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/1-pack-membase
+ ./gen-pack membase.erb 2 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/2-pack-membase
+ ./gen-pack membase.erb 3 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/3-pack-membase
+ ./gen-pack membase.erb 4 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/4-pack-membase
+ ./gen-pack membase.erb 5 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/5-pack-membase
+ ./gen-pack membase.erb 6 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/6-pack-membase
+ ./gen-pack membase.erb 10 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/10-pack-membase
+ ./gen-pack membase.erb 20 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/20-pack-membase
+ ./gen-pack membase.erb 50 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/50-pack-membase
+ ./gen-pack membase.erb 100 http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm > packs/membase-1.7.0-64bit/100-pack-membase
View
4 gen-pack
@@ -9,6 +9,10 @@ require 'erb'
erb_path = ARGV[0]
num_instances = ARGV[1].to_i
pkg_url = ARGV[2] || 'http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_1.7.0.rpm'
+pkg_64 = pkg_url.include?('_64_')
+
+default_instance_type = 'm1.small'
+default_instance_type = 'm1.large' if pkg_64
print ERB.new(IO.read(erb_path)).result(binding)
print "\n"
View
23 membase.erb
@@ -7,7 +7,7 @@
"Type" : "String"
},
"InstanceType": {
- "Default": "m1.small",
+ "Default": "<%= default_instance_type %>",
"Description": "Type of EC2 instances for the Membase servers",
"Type": "String"
},
@@ -47,15 +47,18 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+ <% if pkg_64 %>
+ "m1.large" : { "Arch" : "64" },
+ "m1.xlarge" : { "Arch" : "64" },
+ "m2.xlarge" : { "Arch" : "64" },
+ "m2.2xlarge" : { "Arch" : "64" },
+ "m2.4xlarge" : { "Arch" : "64" },
+ "c1.xlarge" : { "Arch" : "64" },
+ "cc1.4xlarge" : { "Arch" : "64" }
+ <% else %>
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+ <% end %>
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/1-pack-membase → packs/membase-1.7.0-32bit/1-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/10-pack-membase → packs/membase-1.7.0-32bit/10-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/100-pack-membase → packs/membase-1.7.0-32bit/100-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/2-pack-membase → packs/membase-1.7.0-32bit/2-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/20-pack-membase → packs/membase-1.7.0-32bit/20-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/3-pack-membase → packs/membase-1.7.0-32bit/3-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/4-pack-membase → packs/membase-1.7.0-32bit/4-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/5-pack-membase → packs/membase-1.7.0-32bit/5-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/50-pack-membase → packs/membase-1.7.0-32bit/50-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
13 packs/6-pack-membase → packs/membase-1.7.0-32bit/6-pack-membase
@@ -47,15 +47,10 @@
"Mappings" : {
"AWSInstanceType2Arch" : {
- "m1.small" : { "Arch" : "32" },
- "m1.large" : { "Arch" : "64" },
- "m1.xlarge" : { "Arch" : "64" },
- "m2.xlarge" : { "Arch" : "64" },
- "m2.2xlarge" : { "Arch" : "64" },
- "m2.4xlarge" : { "Arch" : "64" },
- "c1.medium" : { "Arch" : "32" },
- "c1.xlarge" : { "Arch" : "64" },
- "cc1.4xlarge" : { "Arch" : "64" }
+
+ "m1.small" : { "Arch" : "32" },
+ "c1.medium" : { "Arch" : "32" }
+
},
"AWSRegionArch2AMI" : {
"us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
View
209 packs/membase-1.7.0-64bit/1-pack-membase
@@ -0,0 +1,209 @@
+{
+ "AWSTemplateFormatVersion" : "2010-09-09",
+ "Description" : "Template for Membase Server on EC2",
+ "Parameters" : {
+ "KeyName" : {
+ "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
+ "Type" : "String"
+ },
+ "InstanceType": {
+ "Default": "m1.large",
+ "Description": "Type of EC2 instances for the Membase servers",
+ "Type": "String"
+ },
+ "MembasePackageURL" : {
+ "Description" : "URL to Membase software package",
+ "Type" : "String",
+ "Default" : "http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm"
+ },
+ "RESTPassword" : {
+ "NoEcho": "true",
+ "Description" : "Password for REST Administrator API and web-console interface",
+ "Type" : "String"
+ },
+ "RAMPerServer" : {
+ "Description" : "RAM quota in MB for each node in the cluster",
+ "Type" : "Number",
+ "Default" : "500",
+ "MinValue" : "200"
+ },
+ "RAMForDefaultBucket" : {
+ "Description" : "RAM quota in MB for each node for the default bucket. Should be <= RAMPerServer",
+ "Type" : "Number",
+ "Default" : "500",
+ "MinValue" : "0"
+ },
+ "ExistingClusterHostPort" : {
+ "Description" : "Optional 'host:port', if you want to join new node(s) to an existing cluster node. Leave as 'host:port' to not join to an existing cluster",
+ "Type" : "String",
+ "Default" : "host:port"
+ },
+ "UserTag" : {
+ "Description" : "Optional tag value, to help track your launched EC2 instances",
+ "Type" : "String",
+ "Default" : "none"
+ }
+ },
+
+ "Mappings" : {
+ "AWSInstanceType2Arch" : {
+
+ "m1.large" : { "Arch" : "64" },
+ "m1.xlarge" : { "Arch" : "64" },
+ "m2.xlarge" : { "Arch" : "64" },
+ "m2.2xlarge" : { "Arch" : "64" },
+ "m2.4xlarge" : { "Arch" : "64" },
+ "c1.xlarge" : { "Arch" : "64" },
+ "cc1.4xlarge" : { "Arch" : "64" }
+
+ },
+ "AWSRegionArch2AMI" : {
+ "us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
+ "us-west-1" : { "32" : "ami-3bc9997e", "64" : "ami-c7c99982" },
+ "eu-west-1" : { "32" : "ami-47cefa33", "64" : "ami-45cefa31" },
+ "ap-southeast-1" : { "32" : "ami-6af08e38", "64" : "ami-6ef08e3c" },
+ "ap-northeast-1" : { "32" : "ami-300ca731", "64" : "ami-2e0ca72f" }
+ }
+ },
+
+ "Resources" : {
+
+ "Membase0" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-0" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase cluster-init -c 127.0.0.1",
+ " --cluster-init-username=Administrator",
+ " --cluster-init-password=", { "Ref" : "RESTPassword" },
+ " --cluster-init-ramsize=", { "Ref" : "RAMPerServer" },"\n",
+ " /opt/membase/bin/membase bucket-create -c 127.0.0.1",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " --bucket=default",
+ " --bucket-type=membase",
+ " --bucket-password=",
+ " --bucket-ramsize=", { "Ref" : "RAMForDefaultBucket" },
+ " --bucket-replica=1","\n",
+
+ "fi","\n"
+
+ ,
+ "curl -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\",",
+ "\"Reason\" : \"Membase0 node is ready\",",
+ "\"UniqueId\" : \"membase\",",
+ "\"Data\" : \"Done\"}' ",
+ "\"", {"Ref" : "WaitForMembase0WaitHandle"}, "\"\n"
+
+ ]]}}
+ }
+
+ },
+
+
+ "InstanceSecurityGroup" : {
+ "Type" : "AWS::EC2::SecurityGroup",
+ "Properties" : {
+ "GroupDescription" :
+ "Enable SSH access via port 22, web access to 8091, membase/memcached protocol access to 11211 and 11210, and erlang access",
+ "SecurityGroupIngress" : [ {
+ "IpProtocol" : "tcp",
+ "FromPort" : "22",
+ "ToPort" : "22",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "8091",
+ "ToPort" : "8091",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "11211",
+ "ToPort" : "11211",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "11210",
+ "ToPort" : "11210",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "4369",
+ "ToPort" : "4369",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "21100",
+ "ToPort" : "21299",
+ "CidrIp" : "0.0.0.0/0"
+ } ]
+ }
+ },
+
+ "WaitForMembase0WaitHandle" : {
+ "Type" : "AWS::CloudFormation::WaitConditionHandle",
+ "Properties" : {
+ }
+ },
+
+ "WaitForMembase0" : {
+ "Type" : "AWS::CloudFormation::WaitCondition",
+ "DependsOn" : "Membase0",
+ "Properties" : {
+ "Handle" : {"Ref" : "WaitForMembase0WaitHandle"},
+ "Timeout" : "1200"
+ }
+ }
+ },
+
+ "Outputs" : {
+ "RESTWebConsoleURL" : {
+ "Description" : "The URL for the newly created Membase node(s)",
+ "Value" : { "Fn::Join" : ["", [ "http://", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] }, ":8091" ]]}
+ }
+ }
+}
+
View
785 packs/membase-1.7.0-64bit/10-pack-membase
@@ -0,0 +1,785 @@
+{
+ "AWSTemplateFormatVersion" : "2010-09-09",
+ "Description" : "Template for Membase Server on EC2",
+ "Parameters" : {
+ "KeyName" : {
+ "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
+ "Type" : "String"
+ },
+ "InstanceType": {
+ "Default": "m1.large",
+ "Description": "Type of EC2 instances for the Membase servers",
+ "Type": "String"
+ },
+ "MembasePackageURL" : {
+ "Description" : "URL to Membase software package",
+ "Type" : "String",
+ "Default" : "http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm"
+ },
+ "RESTPassword" : {
+ "NoEcho": "true",
+ "Description" : "Password for REST Administrator API and web-console interface",
+ "Type" : "String"
+ },
+ "RAMPerServer" : {
+ "Description" : "RAM quota in MB for each node in the cluster",
+ "Type" : "Number",
+ "Default" : "500",
+ "MinValue" : "200"
+ },
+ "RAMForDefaultBucket" : {
+ "Description" : "RAM quota in MB for each node for the default bucket. Should be <= RAMPerServer",
+ "Type" : "Number",
+ "Default" : "500",
+ "MinValue" : "0"
+ },
+ "ExistingClusterHostPort" : {
+ "Description" : "Optional 'host:port', if you want to join new node(s) to an existing cluster node. Leave as 'host:port' to not join to an existing cluster",
+ "Type" : "String",
+ "Default" : "host:port"
+ },
+ "UserTag" : {
+ "Description" : "Optional tag value, to help track your launched EC2 instances",
+ "Type" : "String",
+ "Default" : "none"
+ }
+ },
+
+ "Mappings" : {
+ "AWSInstanceType2Arch" : {
+
+ "m1.large" : { "Arch" : "64" },
+ "m1.xlarge" : { "Arch" : "64" },
+ "m2.xlarge" : { "Arch" : "64" },
+ "m2.2xlarge" : { "Arch" : "64" },
+ "m2.4xlarge" : { "Arch" : "64" },
+ "c1.xlarge" : { "Arch" : "64" },
+ "cc1.4xlarge" : { "Arch" : "64" }
+
+ },
+ "AWSRegionArch2AMI" : {
+ "us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
+ "us-west-1" : { "32" : "ami-3bc9997e", "64" : "ami-c7c99982" },
+ "eu-west-1" : { "32" : "ami-47cefa33", "64" : "ami-45cefa31" },
+ "ap-southeast-1" : { "32" : "ami-6af08e38", "64" : "ami-6ef08e3c" },
+ "ap-northeast-1" : { "32" : "ami-300ca731", "64" : "ami-2e0ca72f" }
+ }
+ },
+
+ "Resources" : {
+
+ "Membase0" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-0" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase cluster-init -c 127.0.0.1",
+ " --cluster-init-username=Administrator",
+ " --cluster-init-password=", { "Ref" : "RESTPassword" },
+ " --cluster-init-ramsize=", { "Ref" : "RAMPerServer" },"\n",
+ " /opt/membase/bin/membase bucket-create -c 127.0.0.1",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " --bucket=default",
+ " --bucket-type=membase",
+ " --bucket-password=",
+ " --bucket-ramsize=", { "Ref" : "RAMForDefaultBucket" },
+ " --bucket-replica=1","\n",
+
+ "fi","\n"
+
+ ,
+ "curl -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\",",
+ "\"Reason\" : \"Membase0 node is ready\",",
+ "\"UniqueId\" : \"membase\",",
+ "\"Data\" : \"Done\"}' ",
+ "\"", {"Ref" : "WaitForMembase0WaitHandle"}, "\"\n"
+
+ ]]}}
+ }
+
+ },
+
+ "Membase1" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-1" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase2" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-2" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase3" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-3" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase4" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-4" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase5" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-5" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase6" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-6" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase7" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-7" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase8" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-8" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase9" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-9" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+
+ "InstanceSecurityGroup" : {
+ "Type" : "AWS::EC2::SecurityGroup",
+ "Properties" : {
+ "GroupDescription" :
+ "Enable SSH access via port 22, web access to 8091, membase/memcached protocol access to 11211 and 11210, and erlang access",
+ "SecurityGroupIngress" : [ {
+ "IpProtocol" : "tcp",
+ "FromPort" : "22",
+ "ToPort" : "22",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "8091",
+ "ToPort" : "8091",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "11211",
+ "ToPort" : "11211",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "11210",
+ "ToPort" : "11210",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "4369",
+ "ToPort" : "4369",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "21100",
+ "ToPort" : "21299",
+ "CidrIp" : "0.0.0.0/0"
+ } ]
+ }
+ },
+
+ "WaitForMembase0WaitHandle" : {
+ "Type" : "AWS::CloudFormation::WaitConditionHandle",
+ "Properties" : {
+ }
+ },
+
+ "WaitForMembase0" : {
+ "Type" : "AWS::CloudFormation::WaitCondition",
+ "DependsOn" : "Membase0",
+ "Properties" : {
+ "Handle" : {"Ref" : "WaitForMembase0WaitHandle"},
+ "Timeout" : "1200"
+ }
+ }
+ },
+
+ "Outputs" : {
+ "RESTWebConsoleURL" : {
+ "Description" : "The URL for the newly created Membase node(s)",
+ "Value" : { "Fn::Join" : ["", [ "http://", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] }, ":8091" ]]}
+ }
+ }
+}
+
View
6,545 packs/membase-1.7.0-64bit/100-pack-membase
6,545 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
273 packs/membase-1.7.0-64bit/2-pack-membase
@@ -0,0 +1,273 @@
+{
+ "AWSTemplateFormatVersion" : "2010-09-09",
+ "Description" : "Template for Membase Server on EC2",
+ "Parameters" : {
+ "KeyName" : {
+ "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
+ "Type" : "String"
+ },
+ "InstanceType": {
+ "Default": "m1.large",
+ "Description": "Type of EC2 instances for the Membase servers",
+ "Type": "String"
+ },
+ "MembasePackageURL" : {
+ "Description" : "URL to Membase software package",
+ "Type" : "String",
+ "Default" : "http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm"
+ },
+ "RESTPassword" : {
+ "NoEcho": "true",
+ "Description" : "Password for REST Administrator API and web-console interface",
+ "Type" : "String"
+ },
+ "RAMPerServer" : {
+ "Description" : "RAM quota in MB for each node in the cluster",
+ "Type" : "Number",
+ "Default" : "500",
+ "MinValue" : "200"
+ },
+ "RAMForDefaultBucket" : {
+ "Description" : "RAM quota in MB for each node for the default bucket. Should be <= RAMPerServer",
+ "Type" : "Number",
+ "Default" : "500",
+ "MinValue" : "0"
+ },
+ "ExistingClusterHostPort" : {
+ "Description" : "Optional 'host:port', if you want to join new node(s) to an existing cluster node. Leave as 'host:port' to not join to an existing cluster",
+ "Type" : "String",
+ "Default" : "host:port"
+ },
+ "UserTag" : {
+ "Description" : "Optional tag value, to help track your launched EC2 instances",
+ "Type" : "String",
+ "Default" : "none"
+ }
+ },
+
+ "Mappings" : {
+ "AWSInstanceType2Arch" : {
+
+ "m1.large" : { "Arch" : "64" },
+ "m1.xlarge" : { "Arch" : "64" },
+ "m2.xlarge" : { "Arch" : "64" },
+ "m2.2xlarge" : { "Arch" : "64" },
+ "m2.4xlarge" : { "Arch" : "64" },
+ "c1.xlarge" : { "Arch" : "64" },
+ "cc1.4xlarge" : { "Arch" : "64" }
+
+ },
+ "AWSRegionArch2AMI" : {
+ "us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
+ "us-west-1" : { "32" : "ami-3bc9997e", "64" : "ami-c7c99982" },
+ "eu-west-1" : { "32" : "ami-47cefa33", "64" : "ami-45cefa31" },
+ "ap-southeast-1" : { "32" : "ami-6af08e38", "64" : "ami-6ef08e3c" },
+ "ap-northeast-1" : { "32" : "ami-300ca731", "64" : "ami-2e0ca72f" }
+ }
+ },
+
+ "Resources" : {
+
+ "Membase0" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-0" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase cluster-init -c 127.0.0.1",
+ " --cluster-init-username=Administrator",
+ " --cluster-init-password=", { "Ref" : "RESTPassword" },
+ " --cluster-init-ramsize=", { "Ref" : "RAMPerServer" },"\n",
+ " /opt/membase/bin/membase bucket-create -c 127.0.0.1",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " --bucket=default",
+ " --bucket-type=membase",
+ " --bucket-password=",
+ " --bucket-ramsize=", { "Ref" : "RAMForDefaultBucket" },
+ " --bucket-replica=1","\n",
+
+ "fi","\n"
+
+ ,
+ "curl -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\",",
+ "\"Reason\" : \"Membase0 node is ready\",",
+ "\"UniqueId\" : \"membase\",",
+ "\"Data\" : \"Done\"}' ",
+ "\"", {"Ref" : "WaitForMembase0WaitHandle"}, "\"\n"
+
+ ]]}}
+ }
+
+ },
+
+ "Membase1" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-1" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+
+ "InstanceSecurityGroup" : {
+ "Type" : "AWS::EC2::SecurityGroup",
+ "Properties" : {
+ "GroupDescription" :
+ "Enable SSH access via port 22, web access to 8091, membase/memcached protocol access to 11211 and 11210, and erlang access",
+ "SecurityGroupIngress" : [ {
+ "IpProtocol" : "tcp",
+ "FromPort" : "22",
+ "ToPort" : "22",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "8091",
+ "ToPort" : "8091",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "11211",
+ "ToPort" : "11211",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "11210",
+ "ToPort" : "11210",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "4369",
+ "ToPort" : "4369",
+ "CidrIp" : "0.0.0.0/0"
+ }, {
+ "IpProtocol" : "tcp",
+ "FromPort" : "21100",
+ "ToPort" : "21299",
+ "CidrIp" : "0.0.0.0/0"
+ } ]
+ }
+ },
+
+ "WaitForMembase0WaitHandle" : {
+ "Type" : "AWS::CloudFormation::WaitConditionHandle",
+ "Properties" : {
+ }
+ },
+
+ "WaitForMembase0" : {
+ "Type" : "AWS::CloudFormation::WaitCondition",
+ "DependsOn" : "Membase0",
+ "Properties" : {
+ "Handle" : {"Ref" : "WaitForMembase0WaitHandle"},
+ "Timeout" : "1200"
+ }
+ }
+ },
+
+ "Outputs" : {
+ "RESTWebConsoleURL" : {
+ "Description" : "The URL for the newly created Membase node(s)",
+ "Value" : { "Fn::Join" : ["", [ "http://", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] }, ":8091" ]]}
+ }
+ }
+}
+
View
1,425 packs/membase-1.7.0-64bit/20-pack-membase
@@ -0,0 +1,1425 @@
+{
+ "AWSTemplateFormatVersion" : "2010-09-09",
+ "Description" : "Template for Membase Server on EC2",
+ "Parameters" : {
+ "KeyName" : {
+ "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
+ "Type" : "String"
+ },
+ "InstanceType": {
+ "Default": "m1.large",
+ "Description": "Type of EC2 instances for the Membase servers",
+ "Type": "String"
+ },
+ "MembasePackageURL" : {
+ "Description" : "URL to Membase software package",
+ "Type" : "String",
+ "Default" : "http://packages.couchbase.com/releases/1.7.0/membase-server-community_x86_64_1.7.0.rpm"
+ },
+ "RESTPassword" : {
+ "NoEcho": "true",
+ "Description" : "Password for REST Administrator API and web-console interface",
+ "Type" : "String"
+ },
+ "RAMPerServer" : {
+ "Description" : "RAM quota in MB for each node in the cluster",
+ "Type" : "Number",
+ "Default" : "500",
+ "MinValue" : "200"
+ },
+ "RAMForDefaultBucket" : {
+ "Description" : "RAM quota in MB for each node for the default bucket. Should be <= RAMPerServer",
+ "Type" : "Number",
+ "Default" : "500",
+ "MinValue" : "0"
+ },
+ "ExistingClusterHostPort" : {
+ "Description" : "Optional 'host:port', if you want to join new node(s) to an existing cluster node. Leave as 'host:port' to not join to an existing cluster",
+ "Type" : "String",
+ "Default" : "host:port"
+ },
+ "UserTag" : {
+ "Description" : "Optional tag value, to help track your launched EC2 instances",
+ "Type" : "String",
+ "Default" : "none"
+ }
+ },
+
+ "Mappings" : {
+ "AWSInstanceType2Arch" : {
+
+ "m1.large" : { "Arch" : "64" },
+ "m1.xlarge" : { "Arch" : "64" },
+ "m2.xlarge" : { "Arch" : "64" },
+ "m2.2xlarge" : { "Arch" : "64" },
+ "m2.4xlarge" : { "Arch" : "64" },
+ "c1.xlarge" : { "Arch" : "64" },
+ "cc1.4xlarge" : { "Arch" : "64" }
+
+ },
+ "AWSRegionArch2AMI" : {
+ "us-east-1" : { "32" : "ami-8c1fece5", "64" : "ami-8e1fece7" },
+ "us-west-1" : { "32" : "ami-3bc9997e", "64" : "ami-c7c99982" },
+ "eu-west-1" : { "32" : "ami-47cefa33", "64" : "ami-45cefa31" },
+ "ap-southeast-1" : { "32" : "ami-6af08e38", "64" : "ami-6ef08e3c" },
+ "ap-northeast-1" : { "32" : "ami-300ca731", "64" : "ami-2e0ca72f" }
+ }
+ },
+
+ "Resources" : {
+
+ "Membase0" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-0" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase cluster-init -c 127.0.0.1",
+ " --cluster-init-username=Administrator",
+ " --cluster-init-password=", { "Ref" : "RESTPassword" },
+ " --cluster-init-ramsize=", { "Ref" : "RAMPerServer" },"\n",
+ " /opt/membase/bin/membase bucket-create -c 127.0.0.1",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " --bucket=default",
+ " --bucket-type=membase",
+ " --bucket-password=",
+ " --bucket-ramsize=", { "Ref" : "RAMForDefaultBucket" },
+ " --bucket-replica=1","\n",
+
+ "fi","\n"
+
+ ,
+ "curl -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\",",
+ "\"Reason\" : \"Membase0 node is ready\",",
+ "\"UniqueId\" : \"membase\",",
+ "\"Data\" : \"Done\"}' ",
+ "\"", {"Ref" : "WaitForMembase0WaitHandle"}, "\"\n"
+
+ ]]}}
+ }
+
+ },
+
+ "Membase1" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-1" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase2" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-2" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase3" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-3" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase4" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-4" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase5" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-5" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase6" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-6" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase7" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-7" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase8" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-8" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase9" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-9" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase10" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-10" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase11" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-11" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase12" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-12" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",
+ "if [ \"host:port\" != \"", { "Ref" : "ExistingClusterHostPort" }, "\" ]; then","\n",
+ " echo Existing membase cluster...","\n",
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Ref" : "ExistingClusterHostPort" },
+ " --server-add=`hostname -i`:8091","\n",
+ "else","\n",
+ " echo New membase cluster...","\n",
+
+ " /opt/membase/bin/membase server-add",
+ " -u Administrator -p ", { "Ref" : "RESTPassword" },
+ " -c ", { "Fn::GetAtt" : [ "Membase0", "PublicIp" ] },
+ " --server-add=`hostname -i`:8091","\n",
+
+ "fi","\n"
+
+ ]]}}
+ }
+
+ ,
+ "DependsOn" : "WaitForMembase0"
+
+ },
+
+ "Membase13" : {
+ "Type" : "AWS::EC2::Instance",
+ "Properties" : {
+ "KeyName" : { "Ref" : "KeyName" },
+ "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
+ "ImageId": {
+ "Fn::FindInMap": [
+ "AWSRegionArch2AMI",
+ {
+ "Ref": "AWS::Region"
+ },
+ {
+ "Fn::FindInMap": [
+ "AWSInstanceType2Arch",
+ {
+ "Ref": "InstanceType"
+ },
+ "Arch"
+ ]
+ }
+ ]
+ },
+ "InstanceType" : { "Ref" : "InstanceType" },
+ "Tags" : [ {
+ "Key" : "Name",
+ "Value" : { "Fn::Join" : ["", [ { "Ref" : "AWS::StackName" }, "-13" ]]}
+ }, {
+ "Key" : "MembasePackageURL",
+ "Value" : { "Ref" : "MembasePackageURL" }
+ }, {
+ "Key" : "UserTag",
+ "Value" : { "Ref" : "UserTag" }
+ }
+ ],
+ "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
+ "#!/bin/bash -ex","\n",
+ "yum -y install openssl098e","\n",
+ "wget ", { "Ref" : "MembasePackageURL" },"\n",
+ "rpm -i membase-server-community*.rpm","\n",
+ "sleep 5","\n",