Skip to content
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

Add Mongo 3 repositories #394

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

steveardis
Copy link

I'm not convinced what is in this pull request is the most ideal (i.e. hard-coding "trusty"), but it works for me.

For the yum repository, the "package_version" you have to specify is '3.0.3-1.el6'.

For Ubuntu, you can specify '3.0.3'.

CpuID added a commit to CpuID/chef-mongodb that referenced this pull request Jun 27, 2015
@afhammad
Copy link

afhammad commented Mar 8, 2016

@steveardis I forked your repo and tried

in my recipe i set the version:

node.set[:mongodb][:package_version] = "3.0.3"

but i get

STDERR: E: Version '3.0.3' for 'mongodb-org' was not found
---- End output of apt-get -q -y -o Dpkg::Options::="--force-confold" --force-yes install mongodb-org=3.0.3 ----

any help appreciated

@nabulaer
Copy link

nabulaer commented Mar 9, 2016

versions 2.6 , 3.0 , 3.2 use different repositories.
to support I added a custom receipe to run list before instal with this :

case node['platform_family']
when 'debian'
  # Adds the repo: http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
apt_repository 'mongodb-org-3.0' do
    uri "http://repo.mongodb.org/apt/ubuntu"
    distribution 'trusty/mongodb-org/3.0'
    components ['multiverse']
    keyserver 'hkp://keyserver.ubuntu.com:80'
    key '7F0CEB10'
    action :add
  end
   apt_repository 'mongodb-org-3.2' do
    uri "http://repo.mongodb.org/apt/ubuntu"
    distribution 'trusty/mongodb-org/3.2'
    components ['multiverse']
    keyserver 'hkp://keyserver.ubuntu.com:80'
    key 'EA312927'
    action :add
  end
else
  # pssst build from source
  Chef::Log.warn("Adding the #{node['platform_family']} 10gen repository is not yet not supported by this cookbook")
end

this work with ubuntu 14.04 . and allow support for specifying different versions

@afhammad
Copy link

I ended up using this: https://github.com/sunggun-yu/chef-mongodb3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants