diff --git a/cookbooks/datadog/test/integration/datadog_apache/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_apache/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_apache/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_apache/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_apache/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_apache/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_cacti/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_cacti/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_cacti/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_cacti/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_cacti/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_cacti/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_cassandra/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_cassandra/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_cassandra/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_cassandra/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_cassandra/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_cassandra/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_cassandra_greater_22/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_cassandra_greater_22/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_cassandra_greater_22/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_cassandra_greater_22/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_cassandra_greater_22/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_cassandra_greater_22/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_consul/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_consul/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_consul/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_consul/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_consul/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_consul/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_couchdb/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_couchdb/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_couchdb/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_couchdb/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_couchdb/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_couchdb/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_docker/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_docker/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_docker/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_docker/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_docker/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_docker/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_elasticsearch/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_elasticsearch/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_elasticsearch/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_elasticsearch/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_elasticsearch/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_elasticsearch/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_fluentd/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_fluentd/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_fluentd/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_fluentd/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_fluentd/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_fluentd/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_haproxy/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_haproxy/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_haproxy/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_haproxy/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_haproxy/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_haproxy/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_http_check/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_http_check/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_http_check/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_http_check/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_http_check/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_http_check/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_integrations/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_integrations/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_integrations/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_integrations/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_integrations/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_integrations/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_jmx/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_jmx/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_jmx/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_jmx/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_jmx/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_jmx/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_kafka/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_kafka/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_kafka/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_kafka/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_kafka/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_kafka/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_mesos_master/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_mesos_master/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_mesos_master/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_mesos_master/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_mesos_master/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_mesos_master/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_mysql/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_mysql/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_mysql/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_mysql/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_mysql/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_mysql/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_ntp/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_ntp/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_ntp/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_ntp/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_ntp/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_ntp/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_pgbouncer/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_pgbouncer/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_pgbouncer/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_pgbouncer/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_pgbouncer/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_pgbouncer/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_postfix/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_postfix/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_postfix/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_postfix/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_postfix/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_postfix/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_process/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_process/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_process/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_process/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_process/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_process/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_ssh_check/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_ssh_check/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_ssh_check/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_ssh_check/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_ssh_check/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_ssh_check/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_supervisord/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_supervisord/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_supervisord/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_supervisord/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_supervisord/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_supervisord/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_tcp_check/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_tcp_check/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_tcp_check/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_tcp_check/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_tcp_check/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_tcp_check/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/datadog_vault/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_vault/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/datadog_vault/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/datadog_vault/serverspec/Gemfile b/cookbooks/datadog/test/integration/datadog_vault/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/datadog_vault/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-agent_spec.rb b/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-agent_spec.rb deleted file mode 120000 index ef9035c2..00000000 --- a/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-agent_spec.rb +++ /dev/null @@ -1 +0,0 @@ -../../dd-agent/serverspec/dd-agent_spec.rb \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-agent_spec.rb b/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-agent_spec.rb new file mode 100644 index 00000000..dbaf20f5 --- /dev/null +++ b/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-agent_spec.rb @@ -0,0 +1,33 @@ +require 'spec_helper' + +describe package(@agent_package_name) do + it { should be_installed } +end + +describe service(@agent_service_name) do + it { should be_running } +end + +describe command('/opt/datadog-agent/bin/agent/agent status | grep -v "Instance ID"'), :if => os[:family] != 'windows' do + its(:exit_status) { should eq 0 } + its(:stdout) { should contain '[OK]' } + its(:stdout) { should_not contain 'ERROR' } +end + +# The new APT keys are imported +describe command('apt-key list'), :if => ['debian', 'ubuntu'].include?(os[:family]) do + its(:exit_status) { should eq 0 } + its(:stdout) { should contain '382E94DE' } + its(:stdout) { should contain 'F14F620E' } +end + +# The new RPM keys are imported +describe command('rpm -q gpg-pubkey-e09422b3'), :if => os[:family] == 'redhat' do + its(:exit_status) { should eq 0 } + its(:stdout) { should contain 'gpg-pubkey-e09422b3' } +end + +describe command('rpm -q gpg-pubkey-fd4bf915'), :if => os[:family] == 'redhat' do + its(:exit_status) { should eq 0 } + its(:stdout) { should contain 'gpg-pubkey-fd4bf915' } +end diff --git a/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-handler_spec.rb b/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-handler_spec.rb deleted file mode 120000 index 631ae922..00000000 --- a/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-handler_spec.rb +++ /dev/null @@ -1 +0,0 @@ -../../dd-handler/serverspec/dd-handler_spec.rb \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-handler_spec.rb b/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-handler_spec.rb new file mode 100644 index 00000000..5c2e34ea --- /dev/null +++ b/cookbooks/datadog/test/integration/dd-agent-handler/serverspec/dd-handler_spec.rb @@ -0,0 +1,6 @@ +require 'spec_helper' + +# the be_installed.by('gem') check is not implemented for Windows as of v2.24 of Serverspec +describe package('chef-handler-datadog'), :if => os[:family] != 'windows' do + it { should be_installed.by('gem') } +end diff --git a/cookbooks/datadog/test/integration/dd_integration_resource/serverspec/Gemfile b/cookbooks/datadog/test/integration/dd_integration_resource/serverspec/Gemfile deleted file mode 120000 index 74f9789f..00000000 --- a/cookbooks/datadog/test/integration/dd_integration_resource/serverspec/Gemfile +++ /dev/null @@ -1 +0,0 @@ -../../helpers/serverspec/Gemfile \ No newline at end of file diff --git a/cookbooks/datadog/test/integration/dd_integration_resource/serverspec/Gemfile b/cookbooks/datadog/test/integration/dd_integration_resource/serverspec/Gemfile new file mode 100644 index 00000000..96cef5d3 --- /dev/null +++ b/cookbooks/datadog/test/integration/dd_integration_resource/serverspec/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gem 'json_spec', '~> 1.1.0' diff --git a/cookbooks/lvm/attributes/default.rb b/cookbooks/lvm/attributes/default.rb index bb8c99ca..29939972 100644 --- a/cookbooks/lvm/attributes/default.rb +++ b/cookbooks/lvm/attributes/default.rb @@ -18,5 +18,5 @@ # default['lvm']['chef-ruby-lvm']['version'] = '0.4.0' -default['lvm']['chef-ruby-lvm-attrib']['version'] = '0.3.9' +default['lvm']['chef-ruby-lvm-attrib']['version'] = '0.3.11' default['lvm']['rubysource'] = Chef::Config['rubygems_url'] diff --git a/cookbooks/mariadb/libraries/helpers.rb b/cookbooks/mariadb/libraries/helpers.rb index 0b14305c..5fb15998 100644 --- a/cookbooks/mariadb/libraries/helpers.rb +++ b/cookbooks/mariadb/libraries/helpers.rb @@ -215,13 +215,13 @@ def mariadbbackup_pkg_name if platform_family?('rhel', 'fedora', 'amazon') 'MariaDB-backup' else - new_resource.version == '10.3' ? 'mariadb-backup' : "mariadb-backup-#{new_resource.version}" + new_resource.version == '11.0.2' ? 'mariadb-backup' : "mariadb-backup-#{new_resource.version}" end end # determine the platform specific server package name def server_pkg_name - platform_family?('debian') ? "mariadb-server-#{new_resource.version}" : 'MariaDB-server' + platform_family?('debian') ? "mariadb-server" : 'MariaDB-server' end # given the base URL build the complete URL string for a yum repo diff --git a/cookbooks/mariadb/metadata.rb b/cookbooks/mariadb/metadata.rb index f6bf4a0f..65d59e24 100644 --- a/cookbooks/mariadb/metadata.rb +++ b/cookbooks/mariadb/metadata.rb @@ -12,4 +12,4 @@ supports 'debian', '>= 9.0' supports 'centos', '>= 7.0' -depends 'selinux', '>= 6.0' +#depends 'selinux', '>= 6.0' diff --git a/cookbooks/mariadb/resources/client_install.rb b/cookbooks/mariadb/resources/client_install.rb index e3fc652b..094f8572 100644 --- a/cookbooks/mariadb/resources/client_install.rb +++ b/cookbooks/mariadb/resources/client_install.rb @@ -18,18 +18,18 @@ provides :mariadb_client_install unified_mode true -property :version, String, default: '10.3' +property :version, String, default: '11.0.2' property :setup_repo, [true, false], default: true action :install do mariadb_repository 'Add mariadb.org repository' do - version new_resource.version + version '11.0.2' only_if { new_resource.setup_repo } end case node['platform_family'] when 'debian' - package "mariadb-client-#{new_resource.version}" + package "mariadb-client" when 'rhel', 'fedora', 'amazon' package 'MariaDB-client' end diff --git a/cookbooks/mariadb/resources/galera_configuration.rb b/cookbooks/mariadb/resources/galera_configuration.rb index ced65773..55c02ee4 100644 --- a/cookbooks/mariadb/resources/galera_configuration.rb +++ b/cookbooks/mariadb/resources/galera_configuration.rb @@ -28,7 +28,7 @@ property :innodb_flush_log_at_trx_commit, Integer, default: 2 property :options, Hash, default: {} property :server_id, Integer, default: 100 -property :version, String, default: '10.3' +property :version, String, default: '11.0.2' property :wsrep_node_address_interface, [String, nil] property :wsrep_node_incoming_address_interface, String property :wsrep_node_port, [Integer, nil], default: nil diff --git a/cookbooks/mariadb/resources/replication.rb b/cookbooks/mariadb/resources/replication.rb index 2cd427de..3cc7cea8 100644 --- a/cookbooks/mariadb/resources/replication.rb +++ b/cookbooks/mariadb/resources/replication.rb @@ -20,7 +20,7 @@ include MariaDBCookbook::Helpers property :connection_name, String, name_property: true -property :version, String, default: '10.3' +property :version, String, default: '11.0.2' property :host, [String, nil], default: 'localhost', desired_state: false property :port, [Integer, nil], default: 3306, desired_state: false property :user, [String, nil], default: 'root', desired_state: false diff --git a/cookbooks/mariadb/resources/repository.rb b/cookbooks/mariadb/resources/repository.rb index f0a1c572..54d4a89c 100644 --- a/cookbooks/mariadb/resources/repository.rb +++ b/cookbooks/mariadb/resources/repository.rb @@ -18,7 +18,7 @@ provides :mariadb_repository unified_mode true -property :version, String, default: '10.3' +property :version, String, default: '11.0.2' property :enable_mariadb_org, [true, false], default: true property :yum_gpg_key_uri, String, default: 'https://yum.mariadb.org/RPM-GPG-KEY-MariaDB' property :apt_gpg_keyserver, String, default: 'keyserver.ubuntu.com' @@ -65,7 +65,7 @@ package 'dirmngr' if (platform?('ubuntu') && node['platform_version'].to_i >= 9) || (platform?('ubuntu') && node['platform_version'].to_i >= 18) apt_repository 'mariadb_org_repository' do - uri "#{new_resource.apt_repository_uri}/#{new_resource.version}/#{node['platform']}" + uri "#{new_resource.apt_repository_uri}/11.0.2/#{node['platform']}" components ['main'] keyserver new_resource.apt_gpg_keyserver key new_resource.apt_gpg_key diff --git a/cookbooks/mariadb/resources/server_configuration.rb b/cookbooks/mariadb/resources/server_configuration.rb index a9ddca5c..3adc15b9 100644 --- a/cookbooks/mariadb/resources/server_configuration.rb +++ b/cookbooks/mariadb/resources/server_configuration.rb @@ -20,7 +20,7 @@ include MariaDBCookbook::Helpers -property :version, String, default: '10.3' +property :version, String, default: '11.0.2' property :cookbook, String, default: 'mariadb' property :mycnf_file, String, default: lazy { "#{conf_dir}/my.cnf" } property :extra_configuration_directory, String, default: lazy { ext_conf_dir } diff --git a/cookbooks/mariadb/resources/server_install.rb b/cookbooks/mariadb/resources/server_install.rb index 8306a8a8..13c516bc 100644 --- a/cookbooks/mariadb/resources/server_install.rb +++ b/cookbooks/mariadb/resources/server_install.rb @@ -20,7 +20,7 @@ include MariaDBCookbook::Helpers -property :version, String, default: '10.3' +property :version, String, default: '11.0.2' property :setup_repo, [true, false], default: true property :mycnf_file, String, default: lazy { "#{conf_dir}/my.cnf" } property :extconf_directory, String, default: lazy { ext_conf_dir } @@ -36,13 +36,13 @@ node.run_state['mariadb']['version'] = new_resource.version mariadb_client_install 'Install MariaDB Client' do - version new_resource.version + version '11.0.2' setup_repo new_resource.setup_repo end package server_pkg_name - selinux_install 'mariadb' if selinux_enabled? + #selinux_install 'mariadb' if selinux_enabled? %w(mariadb-server mariadb).each do |m| selinux_module m do diff --git a/cookbooks/memcached/attributes/default.rb b/cookbooks/memcached/attributes/default.rb index f6fc3d5d..deaa0d5b 100644 --- a/cookbooks/memcached/attributes/default.rb +++ b/cookbooks/memcached/attributes/default.rb @@ -24,7 +24,7 @@ default['memcached']['memory'] = 64 default['memcached']['port'] = 11_211 default['memcached']['udp_port'] = 11_211 -default['memcached']['listen'] = '0.0.0.0' +default['memcached']['listen'] = '127.0.0.1' default['memcached']['maxconn'] = 1024 default['memcached']['max_object_size'] = '1m' default['memcached']['experimental_options'] = [] diff --git a/cookbooks/openstack-common/metadata.rb b/cookbooks/openstack-common/metadata.rb index bdeff8ca..cd250c36 100644 --- a/cookbooks/openstack-common/metadata.rb +++ b/cookbooks/openstack-common/metadata.rb @@ -12,7 +12,7 @@ depends 'etcd', '>= 7.0' depends 'mariadb', '>= 5.0' depends 'memcached', '>= 7.0' -depends 'selinux' +#depends 'selinux' #depends 'yum-centos', '>= 3.2.0' depends 'yum-epel' diff --git a/cookbooks/openstack-ops-database/attributes/mysql.rb b/cookbooks/openstack-ops-database/attributes/mysql.rb index ad07f7e8..12a3492a 100644 --- a/cookbooks/openstack-ops-database/attributes/mysql.rb +++ b/cookbooks/openstack-ops-database/attributes/mysql.rb @@ -18,7 +18,7 @@ # MySQL attributes that we select defaults for: # MariaDB version -default['openstack']['mariadb']['version'] = '10.3' +default['openstack']['mariadb']['version'] = '11.0.2' # Whether to set up mariadb repo default['openstack']['mariadb']['setup_repo'] = true # Storage engine, base OpenStack requires the InnoDB flavor diff --git a/cookbooks/openstack-ops-database/recipes/mariadb-client.rb b/cookbooks/openstack-ops-database/recipes/mariadb-client.rb index c3fd96ff..4d5ca810 100644 --- a/cookbooks/openstack-ops-database/recipes/mariadb-client.rb +++ b/cookbooks/openstack-ops-database/recipes/mariadb-client.rb @@ -15,7 +15,7 @@ # limitations under the License. # mariadb_client_install 'default' do - version node['openstack']['mariadb']['version'] + version '11.0.2' setup_repo node['openstack']['mariadb']['setup_repo'] end diff --git a/cookbooks/openstack-ops-database/recipes/mariadb-server.rb b/cookbooks/openstack-ops-database/recipes/mariadb-server.rb index 74396390..300c63be 100644 --- a/cookbooks/openstack-ops-database/recipes/mariadb-server.rb +++ b/cookbooks/openstack-ops-database/recipes/mariadb-server.rb @@ -33,7 +33,7 @@ class ::Chef::Recipe include_recipe 'openstack-ops-database::mariadb-client' mariadb_server_install 'default' do - version node['openstack']['mariadb']['version'] + version '11.0.2' password super_password setup_repo node['openstack']['mariadb']['setup_repo'] action [:install, :create] diff --git a/cookbooks/openstack-ops-database/spec/mariadb-cluster-server_spec.rb b/cookbooks/openstack-ops-database/spec/mariadb-cluster-server_spec.rb index 76a32732..2fbaaee7 100644 --- a/cookbooks/openstack-ops-database/spec/mariadb-cluster-server_spec.rb +++ b/cookbooks/openstack-ops-database/spec/mariadb-cluster-server_spec.rb @@ -16,7 +16,7 @@ it do expect(chef_run).to create_mariadb_galera_configuration('MariaDB Galera Configuration').with( - version: '10.3', + version: '11.0.2', cluster_name: 'openstack', gcomm_address: 'gcomm://', wsrep_provider_options: { 'gcache.size': '512M', 'gmcast.listen_addr': 'tcp://127.0.0.1:4567' }, diff --git a/cookbooks/selinux/resources/boolean.rb b/cookbooks/selinux/resources/boolean.rb index 0ed7444a..4f6d5dfb 100644 --- a/cookbooks/selinux/resources/boolean.rb +++ b/cookbooks/selinux/resources/boolean.rb @@ -36,9 +36,9 @@ value shell_out!("getsebool #{new_resource.boolean}").stdout.split('-->').map(&:strip).last end -action_class do - include SELinux::Cookbook::StateHelpers -end +#action_class do + # include SELinux::Cookbook::StateHelpers +#end action :set do if selinux_disabled? diff --git a/cookbooks/selinux/resources/fcontext.rb b/cookbooks/selinux/resources/fcontext.rb index ac2b4d60..94c57e52 100644 --- a/cookbooks/selinux/resources/fcontext.rb +++ b/cookbooks/selinux/resources/fcontext.rb @@ -30,51 +30,50 @@ equal_to: %w(a f d c b s l p), description: 'The type of the file being labeled' -action_class do - include SELinux::Cookbook::StateHelpers - - def current_file_context - file_hash = { - 'a' => 'all files', - 'f' => 'regular file', - 'd' => 'directory', - 'c' => 'character device', - 'b' => 'block device', - 's' => 'socket', - 'l' => 'symbolic link', - 'p' => 'named pipe', - } - - contexts = shell_out!('semanage fcontext -l').stdout.split("\n") +#action_class do + # include SELinux::Cookbook::StateHelpers + +# def current_file_context + # file_hash = { + # 'a' => 'all files', + # 'f' => 'regular file', + # 'd' => 'directory', + # 'c' => 'character device', + # 'b' => 'block device', + # 's' => 'socket', + # 'l' => 'symbolic link', + # 'p' => 'named pipe', + # } + + #contexts = shell_out!('semanage fcontext -l').stdout.split("\n") # pull out file label from user:role:type:level context string - contexts.grep(/^#{Regexp.escape(new_resource.file_spec)}\s+#{file_hash[new_resource.file_type]}/) do |c| - c.match(/.+ (?.+):(?.+):(?.+):(?.+)$/)[:type] + #contexts.grep(/^#{Regexp.escape(new_resource.file_spec)}\s+#{file_hash[new_resource.file_type]}/) do |c| + # c.match(/.+ (?.+):(?.+):(?.+):(?.+)$/)[:type] # match returns ['foo'] or [], shift converts that to 'foo' or nil - end.shift - end + # end.shift + #end # Run restorecon to fix label # https://github.com/sous-chefs/selinux_policy/pull/72#issuecomment-338718721 - def relabel_files - spec = new_resource.file_spec - escaped = Regexp.escape spec + #def relabel_files + # spec = new_resource.file_spec + # escaped = Regexp.escape spec # find common path between regex and string - common = if spec == escaped - spec - else - index = spec.size.times { |i| break i if spec[i] != escaped[i] } - ::File.dirname spec[0...index] - end - + # common = if spec == escaped + # spec + # else + # index = spec.size.times { |i| break i if spec[i] != escaped[i] } + # ::File.dirname spec[0...index] + # end # if path is not absolute, ignore it and search everything - common = '/' if common[0] != '/' + #common = '/' if common[0] != '/' - if ::File.exist? common - shell_out!("find #{common.shellescape} -ignore_readdir_race -regextype posix-egrep -regex #{spec.shellescape} -prune -print0 | xargs -0 restorecon -iRv") - end - end -end + #if ::File.exist? common + # shell_out!("find #{common.shellescape} -ignore_readdir_race -regextype posix-egrep -regex #{spec.shellescape} -prune -print0 | xargs -0 restorecon -iRv") + # end + # end +#end action :manage do run_action(:add)