{"id":420,"date":"2012-08-17T01:29:50","date_gmt":"2012-08-17T01:29:50","guid":{"rendered":"http:\/\/garysieling.com\/blog\/?p=420"},"modified":"2012-08-17T01:29:50","modified_gmt":"2012-08-17T01:29:50","slug":"installing-couchdb-on-a-virtualbox-instance-with-chef-and-vagrant","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/installing-couchdb-on-a-virtualbox-instance-with-chef-and-vagrant\/","title":{"rendered":"Installing CouchDB on a VirtualBox instance with Chef and Vagrant"},"content":{"rendered":"<p>This assumes you&#8217;ve already installed Virtualbox and configured a base VM.<\/p>\n<pre>\nmkdir cookbooks\ncd cookbooks\ngit clone https:\/\/github.com\/opscode-cookbooks\/apt\ngit clone https:\/\/github.com\/opscode-cookbooks\/erlang.git\ngit clone https:\/\/github.com\/opscode-cookbooks\/couchdb.git\n\ncd ..\nmkdir vm\ncd vm\nvagrant init\nvi Vagrantfile\n<\/pre>\n<p>Insert the following lines before the last line &#8220;end&#8221;, like so:<\/p>\n<pre>\n config.vm.provision :chef_solo do |chef|\n     chef.cookbooks_path = \"..\/cookbooks\"\n     chef.add_recipe(\"apt\")\n     chef.add_recipe(\"couchdb\")\n end\n<\/pre>\n<p>Exit vi (:q) and run the following:<\/p>\n<pre>\nvagrant up\n<\/pre>\n<p>After several minutes your virtual environment will be built. Once this is done, you can SSH into the machine (password is vagrant):<\/p>\n<pre>\nssh vagrant@localhost -p 2222\n<\/pre>\n<p>Then see that the couchdb service is installed:<\/p>\n<pre>\nls \/etc\/init.d\/couch*\n<\/pre>\n<p>The reason you need apt is to force &#8220;apt-update&#8221; 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 <a href=\"http:\/\/garysieling.com\/blog\/fixing-the-box-base-could-not-be-found-vagrant\">change or download the base box<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This assumes you&#8217;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 &#8220;end&#8221;, like so: config.vm.provision :chef_solo do |chef| chef.cookbooks_path = &#8220;..\/cookbooks&#8221; chef.add_recipe(&#8220;apt&#8221;) chef.add_recipe(&#8220;couchdb&#8221;) end &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/installing-couchdb-on-a-virtualbox-instance-with-chef-and-vagrant\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Installing CouchDB on a VirtualBox instance with Chef and Vagrant&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4,32],"tags":[59,85,106,125,195,559,566,571,572],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/420"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=420"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/420\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}