higanworks-cookbooks / mongodb-10gen Goto Github PK
View Code? Open in Web Editor NEWAdd ppa repository and install mongodb-10gen.
License: MIT License
Add ppa repository and install mongodb-10gen.
License: MIT License
Hi!
I have tried to install a cookbook with librarian-chef and got the following error:
$ librarian-chef install
Could not resolve the dependencies.
As far as I understood the reason is that metadata.rb
specifies dependency on itself:
name "mongodb-10gen"
...
depends "mongodb-10gen" # workaround for TravisCI
I commented this line and it started to work.
hi
this is veeru, when i try to install mongodb using your mongodb-10gen cookbook it is good to working bit it has no journaling support it is 32bt mongodb can you change to support 64 bit with journaling option,
sorry for my poor english
thanq
When I try to override node['mongodb']['base_dir'] = "/my/custom/base/"
I get an error:
Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
Parent directory /my/custom/base/etc does not exist.
Resource Declaration:
---------------------
# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mongodb-10gen/recipes/single.rb
37: template File.join(node['mongodb']['etc_dir'], "#{node['mongodb']['nodename']}.conf") do
38: source "mongodb.conf.erb"
39: owner "mongodb"
40: group "mongodb"
41: mode 00600
42: variables({
43: :nodename => node['mongodb']['nodename'],
44: :port => node['mongodb']['port'],
45: :replSet => node['mongodb']['replSet']
46: })
47: notifies :restart, "service[#{node['mongodb']['nodename']}]"
48: end
49:
Compiled Resource:
------------------
# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/mongodb-10gen/recipes/single.rb:37:in `from_file'
template("/my/custom/base/etc/mongodb.conf") do
provider Chef::Provider::Template
action "create"
retries 0
retry_delay 2
path "/my/custom/base/etc/mongodb.conf"
backup 5
atomic_update true
source "mongodb.conf.erb"
variables {:nodename=>"mongodb", :port=>27017, :replSet=>"replica"}
cookbook_name :"mongodb-10gen"
recipe_name "single"
owner "mongodb"
group "mongodb"
mode 384
end
But, when I vagrant ssh
on the VM, I have a complete /data/mongodb:
vagrant@lucid64:~$ tree /data/mongodb/
/data/mongodb/
├── db
│ ├── delete.me
│ └── mongodb [error opening dir]
├── etc
│ ├── delete.me
│ └── mongodb.conf
├── log
│ ├── delete.me
│ └── mongodb.log
└── misc
└── delete.me
So, I dig in the cookbook and find that the node['mongodb']['base_dir']
isn't used in the default recipe.
What i suggest is to use the base_dir instead of /data/mongodb in default.rb.
Pull request to follow
Thank you !
I see you've added code recently to do replica set configuration, but there isn't any documentation on how its done. Is that feature complete? If so, how do I specify config for it?
Thanks!
Hi,
I'm using chef-solo
$ chef-solo --version
Chef: 11.4.4
I'm unable to use mongo-10gen::single recipe because it fails with the default recipe, here are the logs :
* remote_directory[/data/mongodb] action create
================================================================================
Error executing action `create` on resource 'remote_directory[/data/mongodb]'
================================================================================
Chef::Exceptions::FileNotFound
------------------------------
cookbook mongodb-10gen has no directory files/default/mongodb
Resource Declaration:
---------------------
# In /tmp/chef-solo/site-cookbooks/mongodb-10gen/recipes/default.rb
76: remote_directory "/data/mongodb" do
77: source "mongodb"
78: recursive true
79: files_group "mongodb"
80: files_owner "mongodb"
81: files_mode 00644
82: owner "mongodb"
83: group "mongodb"
84: mode 00755
85: end
86:
Compiled Resource:
------------------
# Declared in /tmp/chef-solo/site-cookbooks/mongodb-10gen/recipes/default.rb:76:in `from_file'
remote_directory("/data/mongodb") do
provider Chef::Provider::RemoteDirectory
action :create
retries 0
retry_delay 2
path "/data/mongodb"
recursive true
source "mongodb"
files_backup 5
files_owner "mongodb"
files_group "mongodb"
files_mode 420
overwrite true
cookbook_name :"mongodb-10gen"
recipe_name "default"
owner "mongodb"
group "mongodb"
mode "0755"
end
[2013-06-18T12:41:10+00:00] ERROR: Running exception handlers
[2013-06-18T12:41:10+00:00] ERROR: Exception handlers complete
Chef Client failed. 4 resources updated
[2013-06-18T12:41:10+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
[2013-06-18T12:41:10+00:00] FATAL: Chef::Exceptions::FileNotFound: remote_directory[/data/mongodb] (mongodb-10gen::default line 76) had an error: Chef::Exceptions::FileNotFound: cookbook mongodb-10gen has no directory files/default/mongodb
ERROR: RuntimeError: chef-solo failed. See output above.
Whereas the files are correctly on the server :
/tmp/chef-solo/site-cookbooks/mongodb-10gen/files/default/mongodb# ls -la
total 24
drwxr-xr-x 6 root root 4096 Jun 18 12:06 .
drwxr-xr-x 3 root root 4096 Jun 18 12:06 ..
drwxr-xr-x 2 root root 4096 Jun 18 12:06 db
drwxr-xr-x 2 root root 4096 Jun 18 12:06 etc
drwxr-xr-x 2 root root 4096 Jun 18 12:06 log
drwxr-xr-x 2 root root 4096 Jun 18 12:06 misc
This cookbook doesn't work with ubuntu 14.04 and mongodb 2.6.x.
The config format changed a bit:
ubuntu@ip-192-168-97-100:/var/log$ sudo start-stop-daemon --start --quiet --chuid mongodb -m --pidfile /tmp/m.pid --exec /usr/bin/mongod -- --config /data/mongodb/etc/mongodb.conf
2015-03-06T17:16:48.609+0000 SEVERE: Failed global initialization: BadValue The "verbose" option string cannot contain any characters other than "v"
Furthemore the pid (pidfilepath=/var/run/mongodb.pid) is only writeable by root:
ubuntu@ip-192-168-97-100:/var/log$ ls -la /run/
total 60
drwxr-xr-x 22 root root 780 Mar 6 17:21 .
drwxr-xr-x 24 root root 4096 Mar 6 15:56 ..
-rw-r--r-- 1 root root 5 Mar 6 15:42 acpid.pid
srw-rw-rw- 1 root root 0 Mar 6 15:42 acpid.socket
-rw-r--r-- 1 root root 5 Mar 6 15:42 atd.pid
drwxr-xr-x 2 root root 60 Mar 6 15:56 chef
drwxr-xr-x 2 root root 80 Mar 6 15:42 cloud-init
-rw-r--r-- 1 root root 5 Mar 6 15:42 crond.pid
---------- 1 root root 0 Mar 6 15:42 crond.reboot
drwxr-xr-x 2 messagebus messagebus 80 Mar 6 15:42 dbus
-rw-r--r-- 1 root root 4 Mar 6 15:42 dhclient.eth0.pid
drwxr-xr-x 2 root root 40 Mar 6 15:43 grub
drwxr-xr-x 2 root root 60 Mar 6 15:42 initramfs
drwxrwxrwt 2 root root 60 Mar 6 15:57 lock
drwxr-xr-x 2 root root 80 Mar 6 15:56 mdadm
-rw-r--r-- 1 root root 647 Mar 6 17:13 motd.dynamic
drwxr-xr-x 2 root root 60 Mar 6 15:42 mount
drwxr-xr-x 3 root root 140 Mar 6 15:42 network
-rw-r--r-- 1 root root 0 Mar 6 15:42 network-interface-security
drwxr-xr-x 2 root root 40 Mar 6 15:42 plymouth
drwxr-xr-x 2 root root 40 Mar 6 15:42 pppconfig
-rw-r--r-- 1 root root 32 Mar 6 15:43 reboot-required
-rw-r--r-- 1 root root 41 Mar 6 15:43 reboot-required.pkgs
drwxr-xr-x 3 root root 100 Mar 6 15:42 resolvconf
-rw-r--r-- 1 root root 4 Mar 6 15:42 rsyslogd.pid
drwxrwxr-x 2 root utmp 40 Mar 6 15:42 screen
drwxr-xr-x 2 root root 40 Mar 6 15:42 sendsigs.omit.d
drwxr-xr-x 2 sensu root 60 Mar 6 15:57 sensu
drwxrwxrwt 2 root root 40 Mar 6 15:42 shm
drwxr-xr-x 2 root root 40 Mar 6 15:42 sshd
-rw-r--r-- 1 root root 5 Mar 6 15:42 sshd.pid
drwxr-xr-x 5 root root 100 Mar 6 15:42 systemd
drwxr-xr-x 5 root root 140 Mar 6 15:57 udev
-rw-r--r-- 1 root root 4 Mar 6 15:42 upstart-file-bridge.pid
-rw-r--r-- 1 root root 4 Mar 6 15:42 upstart-socket-bridge.pid
-rw-r--r-- 1 root root 4 Mar 6 15:42 upstart-udev-bridge.pid
drwxr-xr-x 3 root root 60 Mar 6 15:55 user
-rw-rw-r-- 1 root utmp 3840 Mar 6 17:13 utmp
And there seems to be a problem with an already running daemon using /etc/mongodb.conf.
The new 2.6.x package is called mongodb-org.
It would be great to support MongoDB 3.0.
The cookbook change should be simple there is a new 3.0 repo:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/?_ga=1.79060884.1816312249.1405582608
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.