-
-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poor experience for replicaset configuration with opsworks #139
Comments
I am currently in the middle of rewriting the cookbook for a better experience. However, we aren't supporting < 3.0 anymore due to 2.6 being EOL Oct 31, 2016 However, we should be able to support opsworks. (Though i personally am not familiar with it and its differences.) It looks like |
@shortdudey123 the rs_nodes object that is passed to configure_replicaset is empty and the code reaches the line |
So it looks like calling What if you disable |
@shortdudey123 you know better than I if that would work, I guess that's a nice way to use the cookbook without modifications, for anyone else reading this thread. As far as I'm concerned though, my workaround fulfills my use case so I'll keep it like that. This is just a short term setup while we phase out mongo. |
Gotcha, since opsworks doesn't actually provide a chef server, its a bit harder to deal with |
Thank for this thread @jonapich, almost have my configure recipe set up. I turned off auto configure as suggested. |
Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs. |
Hi,
I have struggled to use this cookbook in order to setup a mongo 2.6 server in AWS Opsworks and thought I'd share what I did to make it work.
First of all, the doc still mentions the 10gen recipe. The recipe doesn't exist and
mongodb_org_repo
must be used instead.mongodb-org
must be specified as the package name in the node attributes if you want anything higher than mongo 2.4.A ton of default paths don't work and create various issues. edelight/chef-mongodb#262 has a workaround which worked for me.
In Opsworks, I had to separate the recipes in different lifecycles. For instance, you cannot play the mongodb_org_repo recipe and then install, it will trigger an apt error. The mongodb_org_repo recipe didn't work when put in the Setup lifecycle, not sure if it conflicts with some other recipes (either aws's builtin recipes or my own). This is not something I ever encountered with cookbooks, so I prefer to mention it. I was able to make it work if I put the repo recipe in "deploy" and the replicaset recipe in "configure".
Finally, I had to modify the recipe to make it work in Opsworks since it doesn't provide the same databag (chef zero?) and the search() command to find replicaset members yield no results.
This is very specific to my use case, but here's the patch anyway (please excuse my n00b ruby skills). The replicaset is created using all of the instances that belong to the same layer as the node being configured. If an instance belongs to multiple layers, all those instances are considered (which may or may not fit one's scenario...)
The text was updated successfully, but these errors were encountered: