Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# Author:: Matt Ray <matt@chef.io>
# Cookbook Name:: dcos
# Cookbook:: dcos
#
# Copyright 2016 Chef Software, Inc
# Copyright 2017-2018 Chris Gianelloni
# Copyright:: 2016 Chef Software, Inc
# Copyright:: 2017-2018 Chris Gianelloni
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def dcos_base_url
return 'https://downloads.dcos.io/dcos/EarlyAccess' if v.downcase == 'earlyaccess'
if v.to_f >= 1.10
return "https://downloads.mesosphere.com/dcos-enterprise/stable/#{v}" if dcos_enterprise?
return "https://downloads.dcos.io/dcos/stable/#{v}"
"https://downloads.dcos.io/dcos/stable/#{v}"
else # stable or older releases
return 'https://downloads.mesosphere.com/dcos-enterprise/stable/1.12.2' if dcos_enterprise?
'https://downloads.dcos.io/dcos/stable'
Expand All @@ -39,5 +39,5 @@ def dcos_base_url
end
end

Chef::Recipe.send(:include, Dcos::Helpers)
Chef::DSL::Recipe.send(:include, Dcos::Helpers)
Chef::Resource.send(:include, Dcos::Helpers)
10 changes: 3 additions & 7 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
maintainer_email 'partnereng@chef.io'
license 'Apache-2.0'
description 'Installs/Configures Mesosphere DC/OS'
long_description 'Installs/Configures Mesosphere DC/OS'
version '3.0.1'

source_url 'https://github.com/chef-partners/dcos-cookbook' if
respond_to?(:source_url)
issues_url 'https://github.com/chef-partners/dcos-cookbook/issues' if
respond_to?(:issues_url)
chef_version '>= 12.10' if
respond_to?(:chef_version)
source_url 'https://github.com/chef-partners/dcos-cookbook'
issues_url 'https://github.com/chef-partners/dcos-cookbook/issues'
chef_version '>= 12.10'

%w(
centos
Expand Down
4 changes: 2 additions & 2 deletions recipes/_ip-detect.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Cookbook Name:: dcos
# Cookbook:: dcos
# Recipe:: _ip-detect
#
# Copyright 2016, Chef Software, Inc.
# Copyright:: 2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions recipes/cli.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Cookbook Name:: dcos
# Cookbook:: dcos
# Recipe:: cli
#
# Copyright 2018 Chris Gianelloni
# Copyright:: 2018 Chris Gianelloni
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# Cookbook Name:: dcos
# Cookbook:: dcos
# Recipe:: default
#
# Copyright 2016, Chef Software, Inc.
# Copyright 2017-2018 Chris Gianelloni
# Copyright:: 2016, Chef Software, Inc.
# Copyright:: 2017-2018 Chris Gianelloni
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 4 additions & 4 deletions resources/dcos_user.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# Cookbook Name:: dcos
# Cookbook:: dcos
# Recipe:: default
#
# Copyright 2018, Chef Software, Inc.
# Copyright:: 2018, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,10 +18,10 @@
#

resource_name :dcos_user
provides :dcos_user
unified_mode true

property :zk_host, String,
default: 'zk-1.zk:2181,zk-2.zk:2181,zk-3.zk:2181,zk-4.zk:2181,'\
'zk-5.zk:2181',
required: true
property :email, String, required: false

Expand Down
2 changes: 0 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@
config.formatter = :documentation
config.color = true
end

at_exit { ChefSpec::Coverage.report! }
4 changes: 2 additions & 2 deletions spec/unit/recipes/cli_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Cookbook Name:: dcos
# Cookbook:: dcos
# Spec:: cli
#

Expand All @@ -8,7 +8,7 @@
describe 'dcos::cli' do
context 'Default behavior' do
let(:chef_run) do
ChefSpec::SoloRunner.new(platform: 'centos', version: '7.3.1611').converge(described_recipe)
ChefSpec::SoloRunner.new(platform: 'centos', version: '7').converge(described_recipe)
end

it 'creates remote_file[/usr/local/bin/dcos]' do
Expand Down
6 changes: 3 additions & 3 deletions spec/unit/recipes/default_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Cookbook Name:: dcos
# Cookbook:: dcos
# Spec:: default
#

Expand All @@ -8,7 +8,7 @@
describe 'dcos::default' do
context 'Default behavior, assume eth0' do
let(:chef_run) do
ChefSpec::SoloRunner.new(platform: 'centos', version: '7.3.1611') do |node|
ChefSpec::SoloRunner.new(platform: 'centos', version: '7') do |node|
node.override['network']['interfaces']['eth0']['addresses'] =
{
'1.2.3.4' =>
Expand Down Expand Up @@ -104,7 +104,7 @@

context 'DC/OS Enterprise 1.11' do
let(:chef_run) do
ChefSpec::SoloRunner.new(platform: 'centos', version: '7.3.1611') do |node|
ChefSpec::SoloRunner.new(platform: 'centos', version: '7') do |node|
node.override['dcos']['dcos_enterprise'] = true
node.override['dcos']['dcos_version'] = '1.11.1'
node.override['dcos']['dcos_license_text'] = 'STUB'
Expand Down
2 changes: 1 addition & 1 deletion test/integration/default/controls/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
end

describe yaml('/etc/rexray/config.yml') do
its(['rexray', 'modules', 'default-docker', 'disabled']) { should eq true }
its(%w(rexray modules default-docker disabled)) { should eq true }
end

# IPv4 (TCP + UDP)
Expand Down