diff --git a/couchbase_centos700_30b2_64/Vagrantfile b/couchbase_centos700_30b2_64/Vagrantfile new file mode 100644 index 0000000..f78e8ca --- /dev/null +++ b/couchbase_centos700_30b2_64/Vagrantfile @@ -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 diff --git a/couchbase_centos700_30b2_64/manifests/default.pp b/couchbase_centos700_30b2_64/manifests/default.pp new file mode 100644 index 0000000..ac860b9 --- /dev/null +++ b/couchbase_centos700_30b2_64/manifests/default.pp @@ -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"] +}