Skip to content

Commit

Permalink
parameterize 'enterprise' and 'community' versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ronniedada committed Jul 3, 2012
1 parent dcf8e14 commit afbdcce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions gen-pack
Expand Up @@ -10,6 +10,7 @@ erb_path = ARGV[0]
num_instances = ARGV[1].to_i num_instances = ARGV[1].to_i
pkg_url = ARGV[2] || 'http://packages.couchbase.com/releases/1.8.0/couchbase-server-community_x86_1.8.0.rpm' pkg_url = ARGV[2] || 'http://packages.couchbase.com/releases/1.8.0/couchbase-server-community_x86_1.8.0.rpm'
pkg_base = pkg_url.split('/')[-1].split('-')[0] # membase or couchbase pkg_base = pkg_url.split('/')[-1].split('-')[0] # membase or couchbase
pkg_ver = pkg_url.split('/')[-1].split('-')[-1].split('_')[0] # enterprise or community
pkg_64 = pkg_url.include?('_64_') pkg_64 = pkg_url.include?('_64_')


default_instance_type = 'm1.small' default_instance_type = 'm1.small'
Expand Down
2 changes: 1 addition & 1 deletion template.erb
Expand Up @@ -127,7 +127,7 @@
"#!/bin/bash -ex","\n", "#!/bin/bash -ex","\n",
"yum -y install openssl098e","\n", "yum -y install openssl098e","\n",
"wget ", { "Ref" : "PackageURL" },"\n", "wget ", { "Ref" : "PackageURL" },"\n",
"rpm -i <%= pkg_base %>-server-community*.rpm","\n", "rpm -i <%= pkg_base %>-server-<%= pkg_ver %>*.rpm","\n",
"/bin/sh -c \"", { "Ref" : "AfterInstall" }, "\"\n", "/bin/sh -c \"", { "Ref" : "AfterInstall" }, "\"\n",
"sleep 5","\n", "sleep 5","\n",
<% if pkg_base == 'couchbase' %> <% if pkg_base == 'couchbase' %>
Expand Down

0 comments on commit afbdcce

Please sign in to comment.