Skip to content

Instantly share code, notes, and snippets.

@aortmannm
Last active December 14, 2015 18:19
Show Gist options
  • Save aortmannm/5128826 to your computer and use it in GitHub Desktop.
Save aortmannm/5128826 to your computer and use it in GitHub Desktop.
npmjs repository
## install couchdb package
package 'couchdb' do
version '1.2.0'
action :install
end
## download local.ini
cookbook_file '/opt/local/etc/couchdb/local.ini' do
source 'local.ini'
owner 'root'
group 'root'
mode '0755'
end
## download default.ini
cookbook_file '/opt/local/etc/couchdb/default.ini' do
source 'default.ini'
owner 'root'
group 'root'
mode '0755'
end
## enable epmd service
service 'epmd' do
action [ :enable ]
end
## enable couchdb
service 'couchdb' do
action [ :enable ]
end
## start replication job
execute 'run_npm_replication' do
command "curl -X POST http://127.0.0.1:5984/_replicate -d '{\"source\":\"http://isaacs.iriscouch.com/registry/\", \"target\":\"registry\", \"continuous\":true, \"create_target\":true}' -H \"Content-Type: application/json\""
action :run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment