Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

What's the right way to set MongoDB version to 3.0.7 #23

Closed
dblock opened this issue Jan 14, 2016 · 7 comments
Closed

What's the right way to set MongoDB version to 3.0.7 #23

dblock opened this issue Jan 14, 2016 · 7 comments

Comments

@dblock
Copy link
Contributor

dblock commented Jan 14, 2016

I tried this in an attributes file where we set other things and it had no effect.

set[:mongodb3][:version] = '3.0.7'
@sunggun-yu
Copy link
Owner

could you please try with this in your wrapper?

node.set['mongodb3']['version'] = '3.0.7'

@dblock
Copy link
Contributor Author

dblock commented Jan 15, 2016

It's the same thing, node is implied and :mongodb3 is equivalent to ['mongodb3'], these are Mashes. We set a bunch of other stuff, which all works.

@shortdudey123
Copy link

@dblock try this:
node.override[:mongodb3][:version] = '3.0.7'

set is an alias for normal attributes. I have discovered that sometimes you have to go up to override even though normal should take precedence over default.

@shortdudey123
Copy link

you should use 3.0.8 anyway unless you have to have 3.0.7
see http://blog.mongodb.org/post/135337099353/mongodb-308-is-released

@sunggun-yu
Copy link
Owner

@dblock
Hi, here is temporary solution for installing 3.0.x
https://github.com/sunggun-yu/chef-mongodb3/blob/6a55907ef96cdf6003316aa0cab272180d38adbd/test/cookbooks/mongodb3-test/recipes/default-30x.rb

there are bunch of attribute setter in default attribute file. and it is bothering installing 3.0.x. I think, I need to move those attribute into recipe to support installing 3.0.x

@dblock
Copy link
Contributor Author

dblock commented Jan 27, 2016

Thanks! Looking forward to a fix so we can just declare it in one place.

@sunggun-yu
Copy link
Owner

@dblock I would recommend to use role instead of wrapper. setting up version working perfectly.
here is some example of mine.

{
  "name": "mongodb_rs_0",
  "description": "Role for MongoDB Replica set rs-0",
  "json_class": "Chef::Role",
  "default_attributes": {
    "mongodb3" : {
      "version" : "3.0.6",
      "config" : {
        "mongod" : {
          "storage" : {
            "dbPath" : "/var/lib/mongodb/rs-0",
            "engine" : "wiredTiger",
            "wiredTiger" : {
              "engineConfig" : {
                "cacheSizeGB" : 15,
                "statisticsLogDelaySecs" : 60,
                "journalCompressor" : "snappy",
                "directoryForIndexes" : false
              },
              "collectionConfig" : {
                "blockCompressor" : "snappy"
              },
              "indexConfig" : {
                "prefixCompression" : true
              }
            }
          },
          "replication" : {
            "replSetName" : "rs-0"
          }
        }
      }
    }
  },
  "override_attributes": {
  },
  "chef_type": "role",
  "run_list": [
    "recipe[mongodb3::default]"
  ],
  "env_run_lists": {
  }
}

@sunggun-yu sunggun-yu mentioned this issue Feb 10, 2016
sunggun-yu added a commit that referenced this issue Feb 10, 2016
* Fixed Chef::Mixin::Template::TemplateError: Node attributes are read-only when you do not specify which precedence level to set with Chef 11.10 - Daniel Doubrovkine([@dblock](https://github.com/dblock)) #21.
* Adding test for chef client 11.18.12 as 11.x : testing for #21
* Adding kitchen test for ubuntu 14.04 : #13
* Using `/var/run/mongodb/mongod.pid` for centos7 : #25
* Moving attribute setter to recipe in order to support install 3.0.x in wrapper cookbook. : #23
* Adding the mongodb 3.0.x version testing in test wrapper cookbook : #23
* Adding key file directory creation
* Fixing for yum and apt repo name
* Update default version as 3.2.1 : #24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants