Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added 3.0 Beta Support #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions couchbase_centos700_30b2_64/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Flexible Couchbase Server Clustering Vagrant file
Vagrant.configure("2") do |config|

# Number of nodes to provision
num_nodes = 4

# IP Address Base for private network
ip_addr_base = "192.168.56.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_url = "https://dl.dropboxusercontent.com/s/w3lbekm7eunrskm/centos-7.0-x86_64.box"

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

end
51 changes: 51 additions & 0 deletions couchbase_centos700_30b2_64/manifests/default.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# ===
# Install and Run Couchbase Server
# ===

$version = "3.0.0-beta2"
$filename = "couchbase-server_3.0.0-beta2_x86_64_centos6.rpm"

# ===
# Speed up Name Server Resolution
# ===
exec { "echo %Qnameserver 8.8.4.4%Q >> /etc/resolv.conf":
path => "/usr/bin"
}
exec { "echo %Qnameserver 8.8.8.8%Q >> /etc/resolv.conf":
path => "/usr/bin"
}
exec { "echo %Qnameserver 127.0.0.1%Q >> /etc/resolv.conf":
path => "/usr/bin"
}

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

# ===
# Update the System -- Uncomment to have system automatically update at install
# ===
# exec { "yum -y update":
# path => "/usr/bin"
# }

# Remove Firewalld
exec { "yum -y remove firewalld":
path => "/usr/bin"
}
# Install Couchbase Server
package { "couchbase-server":
provider => rpm,
ensure => installed,
source => "/home/vagrant/$filename"
}

# Ensure the service is running
service { "couchbase-server":
ensure => "running",
require => Package["couchbase-server"]
}