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

Multiplatform and moxi support #3

Open
wants to merge 9 commits 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.chef
.rvmrc
Gemfile.lock
.kitchen
61 changes: 38 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,68 @@ Installs and configures Couchbase.
REQUIREMENTS
============

Platform
--------
Chef 0.10.10 and Ohai 0.6.12 are required due to the use of platform_family.

Tested on Ubuntu 12.04.
Platforms
---------

* Debian family (Debian, Ubuntu etc)
* Red Hat family (Redhat, CentOS, Oracle etc)
* Microsoft Windows

Note that Couchbase Server does not support Windows 8 or Server 2012: see http://www.couchbase.com/issues/browse/MB-7016.

ATTRIBUTES
==========

couchbase-server
----------------

* `node['couchbase']['server']['edition']` - The edition of couchbase-server to install, "community" or "enterprise"
* `node['couchbase']['server']['version']` - The version of couchbase-server to install
* `node['couchbase']['server']['package_file]` - The couchbase-server package file to download and install
* `node['couchbase']['server']['package_base_url]` - The url path to download the couchbase-server package file from
* `node['couchbase']['server']['package_full_url]` - The full url to the couchbase-server package file to download and install
* `node['couchbase']['server']['database_path']` - The directory Couchbase should persist data to
* `node['couchbase']['server']['log_dir']` - The directory Couchbase should log to
* `node['couchbase']['server']['memory_quota_mb']` - The per server RAM quota for the entire cluster in megabytes
defaults to Couchbase's maximum allowed value
* `node['couchbase']['server']['username']` - The cluster's username for the REST API and Admin UI
* `node['couchbase']['server']['password']` - The cluster's password for the REST API and Admin UI
* `node['couchbase']['server']['edition']` - The edition of couchbase-server to install, "community" or "enterprise"
* `node['couchbase']['server']['version']` - The version of couchbase-server to install
* `node['couchbase']['server']['package_file']` - The couchbase-server package file to download and install
* `node['couchbase']['server']['package_base_url']` - The url path to download the couchbase-server package file from
* `node['couchbase']['server']['package_full_url']` - The full url to the couchbase-server package file to download and install
* `node['couchbase']['server']['database_path']` - The directory Couchbase should persist data to
* `node['couchbase']['server']['log_dir']` - The directory Couchbase should log to
* `node['couchbase']['server']['memory_quota_mb']` - The per server RAM quota for the entire cluster in megabytes
defaults to Couchbase's maximum allowed value
* `node['couchbase']['server']['username']` - The cluster's username for the REST API and Admin UI
* `node['couchbase']['server']['password']` - The cluster's password for the REST API and Admin UI

libcouchbase
------------
client
------

* `node['couchbase']['libcouchbase']['version']` - The version of libcouchbase to install
* `node['couchbase']['libcouchbase']['package_base_url]` - The url path to download the libcouchbase packages files from
* `node['couchbase']['client']['version']` - The version of libcouchbase to install

libvbucket
----------
moxi
----

* `node['couchbase']['libvbucket']['version']` - The version of libvbucket to install
* `node['couchbase']['libvbucket']['package_base_url]` - The url path to download the libvbucket packages files from
* `node['couchbase']['moxi']['version']` - The version of moxi to install
* `node['couchbase']['moxi']['package_file']` - The package file to download
* `node['couchbase']['moxi']['package_base_url']` - The base URL where the packages are located
* `node['couchbase']['moxi']['package_full_url']` - The full URL to the moxi package
* `node['couchbase']['moxi']['cluster_server']` - The bootstrap server for moxi to contact for the node list
* `node['couchbase']['moxi']['cluster_rest_url']` - The bootstrap server's full REST URL for retrieving the initial node list

RECIPES
=======

client
------

Installs the libvbucket and libcouchbase packages.
Installs the libcouchbase2 and devel packages.

server
------

Installs the couchbase-server package and starts the couchbase-server service.

moxi
----

Installs the moxi-server package and starts the moxi-server service.

RESOURCES/PROVIDERS
===================

Expand Down Expand Up @@ -177,6 +191,7 @@ LICENSE AND AUTHOR

Author:: Chris Griego (<[email protected]>)
Author:: Morgan Nelson (<[email protected]>)
Author:: Julian Dunn (<[email protected]>)

Copyright 2012, getaroom

Expand Down
8 changes: 1 addition & 7 deletions attributes/client.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
codename = %w(oneiric lucid).include?(node['lsb']['codename']) ? node['lsb']['codename'] : "oneiric"

default['couchbase']['libcouchbase']['version'] = "1.0.4-1"
default['couchbase']['libvbucket']['version'] = "1.8.0.4-1"

default['couchbase']['libcouchbase']['package_base_url'] = "http://packages.couchbase.com/ubuntu/pool/#{codename}/main/libc/libcouchbase"
default['couchbase']['libvbucket']['package_base_url'] = "http://packages.couchbase.com/ubuntu/pool/#{codename}/main/libv/libvbucket"
default['couchbase']['client']['version'] = '2.0.3-1'
18 changes: 18 additions & 0 deletions attributes/moxi.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package_machine = node['kernel']['machine'] == "x86_64" ? "x86_64" : "x86"

default['couchbase']['moxi']['version'] = "1.8.1"

case platform
when "ubuntu", "debian"
default['couchbase']['moxi']['package_file'] = "moxi-server_#{package_machine}_#{node['couchbase']['moxi']['version']}.deb"
when "redhat", "centos", "scientific", "amazon", "fedora"
default['couchbase']['moxi']['package_file'] = "moxi-server_#{package_machine}_#{node['couchbase']['moxi']['version']}.rpm"
else
Chef::Log.error("Moxi Server is not supported on #{platform}")
end

default['couchbase']['moxi']['package_base_url'] = "http://packages.couchbase.com/releases/#{node['couchbase']['moxi']['version']}"
default['couchbase']['moxi']['package_full_url'] = "#{node['couchbase']['moxi']['package_base_url']}/#{node['couchbase']['moxi']['package_file']}"

default['couchbase']['moxi']['cluster_server'] = 'couchbase01'
default['couchbase']['moxi']['cluster_rest_url'] = "http://#{node['couchbase']['moxi']['cluster_server']}:8091/pools/default/bucketsStreaming/default"
30 changes: 26 additions & 4 deletions attributes/server.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
package_machine = node['kernel']['machine'] == "x86_64" ? "x86_64" : "x86"

default['couchbase']['server']['edition'] = "community"
default['couchbase']['server']['version'] = "1.8.0"
default['couchbase']['server']['version'] = "2.0.0"

case node['platform_family']
when "debian"
default['couchbase']['server']['package_file'] = "couchbase-server-#{node['couchbase']['server']['edition']}_#{package_machine}_#{node['couchbase']['server']['version']}.deb"
when "rhel"
default['couchbase']['server']['package_file'] = "couchbase-server-#{node['couchbase']['server']['edition']}_#{package_machine}_#{node['couchbase']['server']['version']}.rpm"
when "windows"
if node['kernel']['machine'] != 'x86_64'
Chef::Log.error("Couchbase Server on Windows must be installed on a 64-bit machine")
else
default['couchbase']['server']['package_file'] = "couchbase-server-#{node['couchbase']['server']['edition']}_#{package_machine}_#{node['couchbase']['server']['version']}.setup.exe"
end
else
Chef::Log.error("Couchbase Server is not supported on #{platform_family}")
end

default['couchbase']['server']['package_file'] = "couchbase-server-#{node['couchbase']['server']['edition']}_#{package_machine}_#{node['couchbase']['server']['version']}.deb"
default['couchbase']['server']['package_base_url'] = "http://packages.couchbase.com/releases/#{node['couchbase']['server']['version']}"
default['couchbase']['server']['package_full_url'] = "#{node['couchbase']['server']['package_base_url']}/#{node['couchbase']['server']['package_file']}"

default['couchbase']['server']['database_path'] = "/opt/couchbase/var/lib/couchbase/data"
default['couchbase']['server']['log_dir'] = "/opt/couchbase/var/lib/couchbase/logs"
case node['platform_family']
when "windows"
default['couchbase']['server']['install_dir'] = "C:\Program Files\Couchbase\Server\"
default['couchbase']['server']['database_path'] = "#{node['couchbase']['server']['install_dir']}\var\lib\couchbase\data"
default['couchbase']['server']['log_dir'] = "#{node['couchbase']['server']['install_dir']}\var\lib\couchbase\logs"
else
default['couchbase']['server']['install_dir'] = "/opt/couchbase"
default['couchbase']['server']['database_path'] = "#{node['couchbase']['server']['install_dir']}/var/lib/couchbase/data"
default['couchbase']['server']['log_dir'] = "#{node['couchbase']['server']['install_dir']}/var/lib/couchbase/logs"
end

default['couchbase']['server']['username'] = "Administrator"
default['couchbase']['server']['password'] = ""
Expand Down
19 changes: 0 additions & 19 deletions chef-repo/.chef/knife.rb

This file was deleted.

12 changes: 0 additions & 12 deletions chef-repo/cookbooks/chef_handler/CHANGELOG.md

This file was deleted.

29 changes: 0 additions & 29 deletions chef-repo/cookbooks/chef_handler/CONTRIBUTING

This file was deleted.

Loading