Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 24 lines (18 sloc) 0.699 kb
#!/usr/bin/env ruby
require 'erb'
# Usage:
# gen-pack some-template.erb 1
# gen-pack some-template.erb 5
#
erb_path = ARGV[0]
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_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_')
default_instance_type = 'm1.small'
default_instance_type = 'm1.large' if pkg_64
cli = 'couchbase-cli'
cli = 'membase' if pkg_base == 'membase'
print ERB.new(IO.read(erb_path)).result(binding)
print "\n"
Jump to Line
Something went wrong with that request. Please try again.