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

Commit dc79c86

Browse files
committed
Support Ubuntu 15.04 and 16.04 for Monitoring and Automation Agent.
1 parent 321e488 commit dc79c86

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

recipes/mms_automation_agent.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@
2828
mms_agent_source = 'https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager-latest.x86_64.rpm'
2929
mms_agent_file = '/root/mongodb-mms-automation-agent-manager-latest.x86_64.rpm'
3030
when 'debian'
31-
mms_agent_source = 'https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_latest_amd64.deb'
32-
mms_agent_file = '/root/mongodb-mms-automation-agent-manager_latest_amd64.deb'
31+
if node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 15.04
32+
mms_agent_source = 'https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_latest_amd64.ubuntu1604.deb'
33+
mms_agent_file = '/root/mongodb-mms-automation-agent-manager_latest_amd64.ubuntu1604.deb'
34+
else
35+
mms_agent_source = 'https://cloud.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_latest_amd64.deb'
36+
mms_agent_file = '/root/mongodb-mms-automation-agent-manager_latest_amd64.deb'
37+
end
3338
end
3439

3540
# Download the mms automation agent manager latest
@@ -78,6 +83,7 @@
7883
service 'mongodb-mms-automation-agent' do
7984
# The service provider of MMS Agent for Ubuntu is upstart
8085
provider Chef::Provider::Service::Upstart if node['platform_family'] == 'debian'
86+
provider Chef::Provider::Service::Systemd if node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 15.04
8187
supports :status => true, :restart => true, :stop => true
8288
action [ :enable, :start ]
8389
end

recipes/mms_monitoring_agent.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@
2828
mms_agent_source = 'https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent-latest.x86_64.rpm'
2929
mms_agent_file = '/root/mongodb-mms-monitoring-agent-latest.x86_64.rpm'
3030
when 'debian'
31-
mms_agent_source = 'https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_latest_amd64.deb'
32-
mms_agent_file = '/root/mongodb-mms-monitoring-agent_latest_amd64.deb'
31+
if node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 15.04
32+
mms_agent_source = 'https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_latest_amd64.ubuntu1604.deb'
33+
mms_agent_file = '/root/mongodb-mms-monitoring-agent_latest_amd64.ubuntu1604.deb'
34+
else
35+
mms_agent_source = 'https://cloud.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_latest_amd64.deb'
36+
mms_agent_file = '/root/mongodb-mms-monitoring-agent_latest_amd64.deb'
37+
end
3338
end
3439

3540
# Download the mms automation agent manager latest
@@ -67,6 +72,7 @@
6772
service 'mongodb-mms-monitoring-agent' do
6873
# The service provider of MMS Agent for Ubuntu is upstart
6974
provider Chef::Provider::Service::Upstart if node['platform_family'] == 'debian'
75+
provider Chef::Provider::Service::Systemd if node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 15.04
7076
supports :status => true, :restart => true, :stop => true
7177
action [ :enable, :start ]
7278
end

0 commit comments

Comments
 (0)