Comments (9)
@james-ai I currently use this cookbook in production, although it is wrapped in a wrapper cookbook for some additional configuration but it does do the job. The wrapper cookbook did require some tweaks to the install paths to get it working properly, I can pass along those changes should you get up and running before we get some of those fixes merged here.
from sc-mongodb.
Didn't see your last snippet, it will be added to supermarket we are discussing how to do that in the meta repo.
from sc-mongodb.
@zarry That would be great thanks. Any work that I can help with?
from sc-mongodb.
Here is the snippet of code from the wrapper cookbook that configures the path names properly among some other things that may or may not be necessary for you. The major issue I had was path issues between what the package installed and what the cookbook was defaulted to. This created all sorts of odd issues from not managing the service properly to empty mongo directories vs the populated mongodb directories.
I think we have PR that looks to correct some of this stuff if not I will get a ticket in and start looking at a PR.
############
## Config ##
############
node.default['mongodb']['install_method'] = 'mongodb-org'
node.default['mongodb']['config']['bind_ip'] = '0.0.0.0'
node.default['mongodb']['config']['oplogSize'] = '20480'
node.default['mongodb']['config']['rest'] = false
node.default['mongodb']['package_version'] = '2.6.7'
## Configure Paths and names correctly
node.default['mongodb']['cluster_name'] = node['chub_mongodb']['cluster_name']
node.default['mongodb']['config']['replSet'] = node['chub_mongodb']['config']['replSet']
node.default['mongodb']['auto_configure']['replicaset'] = node['chub_mongodb']['auto_configure']['replicaset']
node.default['mongodb']['dbconfig_file'] = '/etc/mongod.conf'
node.default['mongodb']['sysconfig']['DAEMON_OPTS'] = "--config #{node['mongodb']['dbconfig_file']} --httpinterface"
node.default['mongodb']['sysconfig']['CONFIGFILE'] = '/etc/mongod.conf'
node.default['mongodb']['config']['logpath'] = '/var/log/mongodb/mongod.log'
node.default['mongodb']['config']['dbpath'] = '/var/lib/mongodb'
node.default['mongodb']['sysconfig_file'] = '/etc/default/mongod'
node.default['mongodb']['default_init_name'] = 'mongod'
node.default['mongodb']['instance_name'] = 'mongod'
logrotate_app 'mongod' do
path '/var/log/mongodb/mongod.log'
options %w(missingok copytruncate notifempty compress)
frequency 'daily'
rotate 30
create '644 mongodb nogroup'
end
##################
## Deploy Mongo ##
##################
if node['chub_mongodb']['test_run']
include_recipe 'mongodb::mongodb_org_repo'
include_recipe 'mongodb::default'
else
include_recipe 'mongodb::mongodb_org_repo'
include_recipe 'mongodb::replicaset'
end
As for helping out feel free to help out wherever you see fit. If you want to start working with it and submit us some PRs as you hit things great! If you want to comb through some of the PRs out there and do some review/comment thoughts, Great! We picked this cookbook up because of the lack of updates on the previous one so any help is welcome help!
from sc-mongodb.
I can tell that this has been used in prod a lot, at least in my company for +300 instances in EC2 and in ovh for a lot of servers. Just test your requirements before go on prod, waiting for this to go on supermarket sous-chefs/meta#3
from sc-mongodb.
Top stuff. I can just spin up a test box and give it a whirl on that.
from sc-mongodb.
@luishdez
@zarry
any guide for production, for exmple, how to configure replicaset with json?
from sc-mongodb.
@chuangtim I do not have example of configuring replicaset with json, but the example I provided above does setup and manage a replicaset in our production environment. I don't believe there to be a specific guide.
from sc-mongodb.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from sc-mongodb.
Related Issues (20)
- Wrong debian repository uri HOT 3
- No candidate version available for mongodb-org HOT 4
- Third centOS node failing to converge when running 'kitchen converge' HOT 1
- sc-mongodb 2.0.0 not showing on supermarket HOT 7
- mongod.conf is missing sharding.clusterRole=configsvr for config server HOT 1
- Version of mongo packages doesn't fix for Debian platforms HOT 1
- Fix badge in README.md (travis -> circleCI) HOT 2
- Binding to 0.0.0.0 HOT 1
- LDAP configured user cannot read or write any collections in mongodb HOT 2
- Dangerfile should use failure instead of fail
- Remove .rubocop.yml with Dangerfile HOT 1
- Update Changelog HOT 2
- Run latest cookstyle HOT 1
- Update builds to be parallel HOT 1
- Changes made in Pull Request #202 have broken running Mongo on Ubuntu 16.04 HOT 1
- Chef 14.14 - undefined method `mongodb_user' for cookbook: sc-mongodb, recipe: user_management :Chef::Recipe HOT 8
- E: Version '3.6.6' for 'mongodb-org' was not found HOT 1
- Cannot config replica sets because connection test fails
- undefined method `to_yaml' HOT 1
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sc-mongodb.