Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Installing CouchDB on a VirtualBox instance with Chef and Vagrant

DZone's Guide to

Installing CouchDB on a VirtualBox instance with Chef and Vagrant

· DevOps Zone
Free Resource

Download “The DevOps Journey - From Waterfall to Continuous Delivery” to learn learn about the importance of integrating automated testing into the DevOps workflow, brought to you in partnership with Sauce Labs.

This assumes you’ve already installed Virtualbox and configured a base VM.

mkdir cookbooks
cd cookbooks
git clone https://github.com/opscode-cookbooks/apt
git clone https://github.com/opscode-cookbooks/erlang.git
git clone https://github.com/opscode-cookbooks/couchdb.git
cd ..
mkdir vm
cd vm
vagrant init
vi Vagrantfile

Insert the following lines before the last line “end”, like so:

 config.vm.provision :chef_solo do |chef|
     chef.cookbooks_path = "../cookbooks"
     chef.add_recipe("apt")
     chef.add_recipe("couchdb")
 end

Exit vi (:q) and run the following:

vagrant up

After several minutes your virtual environment will be built. Once this is done, you can SSH into the machine (password is vagrant):

ssh vagrant@localhost -p 2222

Then see that the couchdb service is installed:

ls /etc/init.d/couch*

The reason you need apt is to force “apt-update” prior to running the later commands. Erlang is a pre-requisite for couchdb, but Chef will just pick that up and install it. If you run into any errors, you may need to change or download the base box.



Discover how to optimize your DevOps workflows with our cloud-based automated testing infrastructure, brought to you in partnership with Sauce Labs

Topics:

Published at DZone with permission of Gary Sieling, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}