diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 70a98e6f..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "bundler" - directory: "/" - schedule: - interval: "monthly" diff --git a/.gitignore b/.gitignore index 8b66dbfb..e2c5c15c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,9 @@ -.vagrant *.retry .venv # pre and post tasks folders (user defined) pre_tasks/ post_tasks/ -.kitchen/ -.kitchen.local.yml -.bundle # OSX github datastore **/.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a33f3db..744f876a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,53 +52,6 @@ To contribute, follow the contributing guidelines above. To test the roles provided by this project, you can follow the instructions in the manual tests [readme.md][tests]. -### Integration testing - -This project uses [Kitchen][kitchen] as an integration tests engine. To verify integration tests, install [Vagrant][vagrant] on your machine. - -Kitchen allows you to test specific recipes described in [kitchen.yml][kitchen_yml]. There is only one basic recipe on ubuntu but that should be enough to develop others or to add features in TDD. - -To list available targets, you can use the `list` command: - -```bash -bundle exec kitchen list -``` - -To test a specific target, you can run: - -```bash -bundle exec kitchen test -``` - -So for example, if you want to test the agent installation, you can run: - -```bash -bundle exec kitchen test default-ubuntu-1810 -``` - -### Development loop - -To develop some fixes or some features, the easiest way is to work on the platform and version of your choice, setting the machine up with the `create` command and applying the recipe with the `converge` command. If you want to explore the machine and try different things, you can also login into the machine with the `login` command. - -```bash -# Create the relevant vagrant virtual machine -bundle exec kitchen create default-ubuntu-1810 - -# Converge to test your recipe -bundle exec kitchen converge default-ubuntu-1810 - -# Login to your machine to check stuff -bundle exec kitchen login default-ubuntu-1810 - -# Verify the integration tests for your machine -bundle exec kitchen verify default-ubuntu-1810 - -# Clean your machine -bundle exec kitchen destroy default-ubuntu-1810 -``` - -It is advised that you work in TDD and that you write tests before making changes so that developing your feature or fix is just making tests pass. - ## Author Information brian@akins.org @@ -108,8 +61,5 @@ dustinjamesbrown@gmail.com --Forked from brian@akins.org Datadog --Forked from dustinjamesbrown@gmail.com -[kitchen]: https://kitchen.ci -[kitchen_yml]: https://github.com/DataDog/ansible-datadog/blob/master/kitchen.yml [slack]: https://datadoghq.slack.com [tests]: https://github.com/DataDog/ansible-datadog/blob/master/manual_tests/readme.md -[vagrant]: https://www.vagrantup.com diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 04bbd66b..00000000 --- a/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source 'https://rubygems.org' - -group :development do - gem 'rake' - gem 'chef', '= 14.10.9' - gem 'chefspec' - gem 'test-kitchen' - gem 'json_spec', '~> 1.1.0' - gem 'kitchen-ansible' - gem 'kitchen-vagrant' - gem 'rack', '>= 2.1.4' - gem 'serverspec' -end diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index b5df25dc..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,269 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - bcrypt_pbkdf (1.0.1) - builder (3.2.4) - chef (14.10.9) - addressable - bundler (>= 1.10) - chef-config (= 14.10.9) - chef-zero (>= 13.0) - diff-lcs (~> 1.2, >= 1.2.4) - erubis (~> 2.7) - ffi (~> 1.9, >= 1.9.25) - ffi-yajl (~> 2.2) - highline (~> 1.6, >= 1.6.9) - iniparse (~> 1.4) - mixlib-archive (>= 0.4, < 2.0) - mixlib-authentication (~> 2.1) - mixlib-cli (~> 1.7) - mixlib-log (~> 2.0, >= 2.0.3) - mixlib-shellout (~> 2.4) - net-sftp (~> 2.1, >= 2.1.2) - net-ssh (~> 4.2) - net-ssh-multi (~> 1.2, >= 1.2.1) - ohai (~> 14.0) - plist (~> 3.2) - proxifier (~> 1.0) - rspec-core (~> 3.5) - rspec-expectations (~> 3.5) - rspec-mocks (~> 3.5) - rspec_junit_formatter (~> 0.2.0) - serverspec (~> 2.7) - specinfra (~> 2.10) - syslog-logger (~> 1.6) - uuidtools (~> 2.1.5) - chef-cli (2.0.10) - addressable (>= 2.3.5, < 2.8) - chef (>= 14.0) - cookbook-omnifetch (~> 0.5) - diff-lcs (~> 1.0) - ffi-yajl (>= 1.0, < 3.0) - license-acceptance (~> 1.0, >= 1.0.11) - minitar (~> 0.6) - mixlib-cli (>= 1.7, < 3.0) - mixlib-shellout (>= 2.0, < 4.0) - paint (>= 1, < 3) - solve (> 2.0, < 5.0) - chef-config (14.10.9) - addressable - fuzzyurl - mixlib-config (>= 2.2.12, < 3.0) - mixlib-shellout (~> 2.0) - tomlrb (~> 1.2) - chef-zero (14.0.17) - ffi-yajl (~> 2.2) - hashie (>= 2.0, < 4.0) - mixlib-log (>= 2.0, < 4.0) - rack (~> 2.0, >= 2.0.6) - uuidtools (~> 2.1) - chefspec (9.2.0) - chef (>= 14) - chef-cli - fauxhai-ng (>= 7.5) - rspec (~> 3.0) - cookbook-omnifetch (0.9.1) - mixlib-archive (>= 0.4, < 2.0) - diff-lcs (1.4.4) - ed25519 (1.2.4) - equatable (0.6.1) - erubi (1.9.0) - erubis (2.7.0) - fauxhai-ng (8.2.0) - net-ssh - ffi (1.13.1) - ffi-yajl (2.3.3) - libyajl2 (~> 1.2) - fuzzyurl (0.9.0) - gssapi (1.3.0) - ffi (>= 1.0.1) - gyoku (1.3.1) - builder (>= 2.1.2) - hashie (3.6.0) - highline (1.7.10) - httpclient (2.8.3) - iniparse (1.5.0) - ipaddress (0.8.3) - json_spec (1.1.5) - multi_json (~> 1.0) - rspec (>= 2.0, < 4.0) - kitchen-ansible (0.52.0) - net-ssh (>= 3) - test-kitchen (>= 1.4) - kitchen-vagrant (1.6.1) - test-kitchen (>= 1.4, < 3) - libyajl2 (1.2.0) - license-acceptance (1.0.19) - pastel (~> 0.7) - tomlrb (~> 1.2) - tty-box (~> 0.3) - tty-prompt (~> 0.18) - little-plugger (1.1.4) - logging (2.3.0) - little-plugger (~> 1.1) - multi_json (~> 1.14) - minitar (0.9) - mixlib-archive (1.0.5) - mixlib-log - mixlib-authentication (2.1.1) - mixlib-cli (1.7.0) - mixlib-config (2.2.18) - tomlrb - mixlib-install (3.12.1) - mixlib-shellout - mixlib-versioning - thor - mixlib-log (2.0.9) - mixlib-shellout (2.4.4) - mixlib-versioning (1.2.12) - molinillo (0.6.6) - multi_json (1.14.1) - necromancer (0.5.1) - net-scp (3.0.0) - net-ssh (>= 2.6.5, < 7.0.0) - net-sftp (2.1.2) - net-ssh (>= 2.6.5) - net-ssh (4.2.0) - net-ssh-gateway (2.0.0) - net-ssh (>= 4.0.0) - net-ssh-multi (1.2.1) - net-ssh (>= 2.6.5) - net-ssh-gateway (>= 1.2.0) - net-telnet (0.1.1) - nori (2.6.0) - ohai (14.15.0) - chef-config (>= 12.8, < 15) - ffi (~> 1.9) - ffi-yajl (~> 2.2) - ipaddress - mixlib-cli (>= 1.7.0) - mixlib-config (>= 2.0, < 4.0) - mixlib-log (>= 2.0.1, < 4.0) - mixlib-shellout (>= 2.0, < 4.0) - plist (~> 3.1) - systemu (~> 2.6.4) - wmi-lite (~> 1.0) - paint (2.2.0) - pastel (0.7.4) - equatable (~> 0.6) - tty-color (~> 0.5) - plist (3.5.0) - proxifier (1.0.3) - public_suffix (4.0.5) - rack (2.2.3) - rake (13.0.1) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-its (1.3.0) - rspec-core (>= 3.0.0) - rspec-expectations (>= 3.0.0) - rspec-mocks (3.9.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.3) - rspec_junit_formatter (0.2.3) - builder (< 4) - rspec-core (>= 2, < 4, != 2.12.0) - rubyntlm (0.6.2) - rubyzip (2.3.0) - semverse (3.0.0) - serverspec (2.41.5) - multi_json - rspec (~> 3.0) - rspec-its - specinfra (~> 2.72) - sfl (2.3) - solve (4.0.3) - molinillo (~> 0.6) - semverse (>= 1.1, < 4.0) - specinfra (2.82.17) - net-scp - net-ssh (>= 2.7) - net-telnet (= 0.1.1) - sfl - strings (0.1.8) - strings-ansi (~> 0.1) - unicode-display_width (~> 1.5) - unicode_utils (~> 1.4) - strings-ansi (0.2.0) - syslog-logger (1.6.8) - systemu (2.6.5) - test-kitchen (2.5.2) - bcrypt_pbkdf (~> 1.0) - ed25519 (~> 1.2) - license-acceptance (~> 1.0, >= 1.0.11) - mixlib-install (~> 3.6) - mixlib-shellout (>= 1.2, < 4.0) - net-scp (>= 1.1, < 4.0) - net-ssh (>= 2.9, < 7.0) - net-ssh-gateway (>= 1.2, < 3.0) - thor (>= 0.19, < 2.0) - winrm (~> 2.0) - winrm-elevated (~> 1.0) - winrm-fs (~> 1.1) - thor (1.0.1) - tomlrb (1.3.0) - tty-box (0.5.0) - pastel (~> 0.7.2) - strings (~> 0.1.6) - tty-cursor (~> 0.7) - tty-color (0.5.1) - tty-cursor (0.7.1) - tty-prompt (0.21.0) - necromancer (~> 0.5.0) - pastel (~> 0.7.0) - tty-reader (~> 0.7.0) - tty-reader (0.7.0) - tty-cursor (~> 0.7) - tty-screen (~> 0.7) - wisper (~> 2.0.0) - tty-screen (0.8.0) - unicode-display_width (1.7.0) - unicode_utils (1.4.0) - uuidtools (2.1.5) - winrm (2.3.4) - builder (>= 2.1.2) - erubi (~> 1.8) - gssapi (~> 1.2) - gyoku (~> 1.0) - httpclient (~> 2.2, >= 2.2.0.2) - logging (>= 1.6.1, < 3.0) - nori (~> 2.0) - rubyntlm (~> 0.6.0, >= 0.6.1) - winrm-elevated (1.2.1) - erubi (~> 1.8) - winrm (~> 2.0) - winrm-fs (~> 1.0) - winrm-fs (1.3.4) - erubi (~> 1.8) - logging (>= 1.6.1, < 3.0) - rubyzip (~> 2.0) - winrm (~> 2.0) - wisper (2.0.1) - wmi-lite (1.0.5) - -PLATFORMS - ruby - -DEPENDENCIES - chef (= 14.10.9) - chefspec - json_spec (~> 1.1.0) - kitchen-ansible - kitchen-vagrant - rack (>= 2.1.4) - rake - serverspec - test-kitchen - -BUNDLED WITH - 2.1.4 diff --git a/chefignore b/chefignore deleted file mode 100644 index 7be3c6df..00000000 --- a/chefignore +++ /dev/null @@ -1 +0,0 @@ -.kitchen diff --git a/kitchen.yml b/kitchen.yml deleted file mode 100644 index 124a810d..00000000 --- a/kitchen.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -driver: - name: vagrant - -provisioner: - # use an ansible playbook to provision our server - name: ansible_playbook - # name of the host - hosts: test-kitchen - # list of ansible galaxy requirements from the roles meta/main.yml - # requirements_path: dependencies.yml - -platforms: - - name: ubuntu-18.10 - -suites: - # suites found at /test/integration/$test-name - - name: default \ No newline at end of file diff --git a/test/integration/default/default.yml b/test/integration/default/default.yml deleted file mode 100644 index 71e9eea9..00000000 --- a/test/integration/default/default.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: all - roles: - - { role: ansible-datadog, become: yes } \ No newline at end of file diff --git a/test/integration/default/serverspec/localhost/default_spec.rb b/test/integration/default/serverspec/localhost/default_spec.rb deleted file mode 100644 index 4d0a5dcc..00000000 --- a/test/integration/default/serverspec/localhost/default_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'spec_helper' - -describe 'ansible-datadog::default' do - describe file('/etc/datadog-agent') do - it { should be_directory } - end - - describe service('datadog-agent') do - it { should be_enabled } - it { should be_running } - end -end diff --git a/test/integration/default/serverspec/spec_helper.rb b/test/integration/default/serverspec/spec_helper.rb deleted file mode 100644 index d884c121..00000000 --- a/test/integration/default/serverspec/spec_helper.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'serverspec' - -# :backend can be either :exec or :ssh -# since we are running local we use :exec -set :backend, :exec \ No newline at end of file