Skip to content

Commit

Permalink
Added new sync gateway 1.0 vm on top of Ubuntu64bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian McCloy committed Jun 19, 2014
1 parent 6f0793c commit e0b2154
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
34 changes: 34 additions & 0 deletions syncgw_ubuntu_100_64/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Flexible Couchbase Sync Gateway Vagrant file
Vagrant.configure("2") do |config|

# Server version
version = "100"

# Number of nodes to provision
num_nodes = 1

# IP Address Base for private network
ip_addr_base = "192.168.30.10%d"

# Define Number of RAM for each node
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 1024]
end

# Provision the server itself with puppet
config.vm.provision :puppet

# Download the initial box from this url
config.vm.box = "hashicorp/precise64"

# Provision Config for each of the nodes
1.upto(num_nodes) do |num|
config.vm.define "node#{num}" do |node|
node.vm.network :private_network, :ip => ip_addr_base % num
node.vm.provider "virtualbox" do |v|
v.name = "Couchbase SyncGW #{version} Precise Node #{num}"
end
end
end

end
26 changes: 26 additions & 0 deletions syncgw_ubuntu_100_64/manifests/default.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ===
# Install Couchbase Sync Gateway
# ===

$version = "1.0.0"
$filename = "couchbase-sync-gateway-enterprise_${version}_x86_64.deb"

# Download the Sources
exec { "couchbase-server-source":
command => "/usr/bin/wget http://packages.couchbase.com/releases/couchbase-sync-gateway/${version}/${filename}",
cwd => "/home/vagrant/",
creates => "/home/vagrant/${filename}",
before => Package['couchbase-sync-gateway']
}

# Update the System
exec { "apt-get update":
path => "/usr/bin"
}

# Install Couchbase Server
package { "couchbase-sync-gateway":
provider => dpkg,
ensure => installed,
source => "/home/vagrant/${filename}",
}

0 comments on commit e0b2154

Please sign in to comment.