chef-mongodb3 icon indicating copy to clipboard operation
chef-mongodb3 copied to clipboard

mongo 3.4?

Open jeusdi opened this issue 8 years ago • 6 comments

I've specified this line on my mongodb.rb recipe:

node.default['mongodb']['package_version'] = '3.4'

include_recipe 'mongodb3::default'

Nevertheless, a 3.2.x version is installed on ghest machine.

Do I need to specify anything more?

jeusdi avatar Feb 22 '17 10:02 jeusdi

I'm getting this message:

ERROR: yum_package[mongodb-org-server] (mongodb3::default line 26) had an error: Chef::Exceptions::Package: Version ["3.4-1.el7"] of ["mongodb-org-server"] not found. Did you specify both version and release? (version-release, e.g. 1.84-10.fc6)

jeusdi avatar Feb 23 '17 15:02 jeusdi

Should be version instead of package_version

shortdudey123 avatar May 05 '17 02:05 shortdudey123

Also see https://github.com/sunggun-yu/chef-mongodb3/pull/59/files

shortdudey123 avatar May 05 '17 02:05 shortdudey123

I was able to build a 3.4 server using the following variables. Using Ubuntu 14.04

default['mongodb3']['package']['repo']['apt']['key'] = '0C49F3730359A14518585931BC711F9BA15703C6'
default['mongodb3']['package']['repo']['apt']['components'] = ['multiverse']
default['mongodb3']['version'] = '3.4.4'

furbiesandbeans avatar Jun 16 '17 15:06 furbiesandbeans

Has anyone had any success installing 3.4 on CentOS 7? If I set ['mongodb3']['version'] = '3.4.9', the repo file /etc/yum.repos.d/mongodb-org-3.4.repo is created. However it has the wrong url: baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64. The 3.2 should be 3.4

If I try to force the correct url by setting _['mongodb3']['package']['repo']['url'] = 'https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/' it still doesn't work and I end up with the same incorrect baseurl in the mongodb-org-3.4.repo.

jabass avatar Sep 19 '17 00:09 jabass

I was upgrading an existing node from 3.2 to 3.4.

If you see 3.2 url being hardcoded, delete the existing node attributes using knife node edit <node-name> and run chef-client. The cookbook should set new attributes to node.

Chef-client is not overriding existing 3.2 url and node attribute takes precedence to cookbook parameter. So, deleting attributes should help.

These are the attributes set to node after 3.4 Changes:

"normal": {
    "tags": [

    ],
    "mongodb3": {
      "package": {
        "version": "3.4.21-1.amzn1",
        "repo": {
          "url": "https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.4/x86_64/",
          "apt": {
            "name": "3.4",
            "keyserver": null,
            "key": "EA312927",
            "components": null
          }
        }
      }
    }
  },

Hope this helps.

acsrujan avatar Jul 19 '19 11:07 acsrujan