diff --git a/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml b/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml deleted file mode 100644 index 50558c3d3..000000000 --- a/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Not quite ready yet - -driver: - name: digitalocean - digitalocean_access_token: <%= ENV['DIGITALOCEAN_API_TOKEN'] %> - region: <%= ENV['DIGITALOCEAN_REGION'] %> - size: 2gb - ssh_key_ids: <%= ENV['DIGITALOCEAN_SSH_KEYS'] %> - transport: - ssh_key: <%= ENV['DIGITALOCEAN_SSH_KEY_PATH'] %> - -provisioner: - name: chef_zero - product_name: chef - product_version: latest - channel: current - -platforms: -<% %w(centos-6.5 centos-7.0 - fedora-21 - debian-8.1 - ubuntu-12.04 ubuntu-14.04 ubuntu-15.10 -).each do |platform| %> - - name: #{platform} - driver_config: - image: <%= "#{platform.gsub('.', '-')}-x64" %> -<% end %> diff --git a/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml b/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml deleted file mode 100644 index ffdd6af36..000000000 --- a/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +++ /dev/null @@ -1,287 +0,0 @@ -# Not quite ready yet - -<% -def file_if_exists(path) - path = File.expand_path(path) - File.exist?(path) ? path : nil -end -%> - -driver: - name: ec2 - tags: - X-Project: chef-ci-acceptance - aws_ssh_key_id: <%= ENV['AWS_SSH_KEY_ID'] || ENV['USER'] || ENV['USERNAME'] %> - # test-specific stuff - region: us-west-2 - subnet_id: subnet-19ac017c - security_group_ids: ["sg-e401eb83", "sg-96274af3"] - instance_type: m3.large -# associate_public_ip: true # Don't enable public IP, as subnet specified is behind VPN - -transport: - ssh_key: <%= file_if_exists("~/.ssh/#{ENV['AWS_SSH_KEY_ID'] || ENV['USER'] || ENV['USERNAME']}.pem") || - file_if_exists("~/.ssh/#{ENV['AWS_SSH_KEY_ID'] || ENV['USER'] || ENV['USERNAME']}") || - file_if_exists("~/.ssh/id_rsa") %> - -provisioner: - name: chef_zero - product_name: <%= ENV["KITCHEN_CHEF_PRODUCT"] %> - product_version: <%= ENV["KITCHEN_CHEF_VERSION"] %> - channel: <%= ENV["KITCHEN_CHEF_CHANNEL"] %> - client_rb: - audit_mode: :enabled - attributes: - chef_acceptance: "true" - use_system_chef: "true" - -platforms: - # - # AIX - # - # - name: aix-6.1 - # - name: aix-7.1 - # - # Debian - # - - name: debian-8 - driver: - image_search: - name: debian-jessie-* - owner-id: "379101102735" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: admin - - name: debian-7 - driver: - image_search: - name: debian-wheezy-* - owner-id: "379101102735" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: standard - image-type: machine - transport: - username: admin - # - # Ubuntu - # - - name: ubuntu-15.10 - driver: - image_search: - name: ubuntu/images/*/ubuntu-*-15.10-amd64-server-* - owner-id: "099720109477" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: ubuntu - - name: ubuntu-14.04 - driver: - image_search: - name: ubuntu/images/*/ubuntu-*-14.04-*-server-* - owner-id: "099720109477" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: ubuntu - - name: ubuntu-12.04 - driver: - image_search: - name: ubuntu/images/*/ubuntu-*-12.04-*-server-* - owner-id: "099720109477" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: ubuntu - # - # Red Hat Enterprise Linux - # - - name: el-7 - driver: - image_search: - name: RHEL-7.* - owner-id: "309956199498" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: ec2-user - - name: el-6 - driver: - image_search: - name: RHEL-6.* - owner-id: "309956199498" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: ec2-user - - name: el-5 - driver: - image_search: - name: RHEL-5.* - owner-id: "309956199498" - architecture: x86_64 - virtualization-type: paravirtual - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: ec2-user - # - # FreeBSD - # - - name: freebsd-10 - driver: - image_search: - name: FreeBSD/EC2 10.*-RELEASE* - owner-id: "118940168514" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: ec2-user - - name: freebsd-9 - driver: - image_search: - name: FreeBSD/EC2 9.*-RELEASE* - owner-id: "118940168514" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: ec2-user - - name: freebsd-8 - driver: - image_search: - name: FreeBSD/EC2 8.*-RELEASE* - owner-id: "118940168514" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: standard - image-type: machine - transport: - username: ec2-user - # - # OS/X - # - # - name: mac_os_x-10.11 - # - name: mac_os_x-10.10 - # - name: mac_os_x-10.9 - # - name: mac_os_x-10.8 - # - # Nexus??? - # - # - name: nexus-7 - # - # Solaris - # - # - name: solaris-11 - # - name: solaris-10 - # - # Windows - # - - name: windows-2012r2 - driver: - image_search: - name: Windows_Server-2012-R2*-English-*-Base-* - owner-alias: amazon - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - user_data: | - - $logfile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Logs\\kitchen-ec2.log" - #PS Remoting and & winrm.cmd basic config - Enable-PSRemoting -Force -SkipNetworkProfileCheck - & winrm.cmd set winrm/config '@{MaxTimeoutms="1800000"}' >> $logfile - & winrm.cmd set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}' >> $logfile - & winrm.cmd set winrm/config/winrs '@{MaxShellsPerUser="50"}' >> $logfile - #Server settings - support username/password login - & winrm.cmd set winrm/config/service/auth '@{Basic="true"}' >> $logfile - & winrm.cmd set winrm/config/service '@{AllowUnencrypted="true"}' >> $logfile - & winrm.cmd set winrm/config/winrs '@{MaxMemoryPerShellMB="1024"}' >> $logfile - #Firewall Config - & netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" profile=public protocol=tcp localport=5985 remoteip=localsubnet new remoteip=any >> $logfile - #Set script execution to unrestricted - & Set-ExecutionPolicy Unrestricted -Force - - transport: - username: administrator - - - name: windows-2012r2 - provisioner: - architecture: <%= ENV["KITCHEN_CHEF_WIN_ARCHITECTURE"] %> - driver: - image_search: - name: Windows_Server-2012-RTM*-English-*-Base-* - owner-alias: amazon - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: administrator - - name: windows-2012r2 - provisioner: - architecture: <%= ENV["KITCHEN_CHEF_WIN_ARCHITECTURE"] %> - driver: - image_search: - name: Windows_Server-2008-R2*-English-*-Base-* - owner-alias: amazon - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine - transport: - username: administrator - # - # Centos - # - - name: centos-7 - driver: - image_search: - name: CentOS Linux 7 * - owner-alias: aws-marketplace - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: standard - image-type: machine - transport: - username: root - - name: centos-6 - driver: - image_search: - name: CentOS-6.5-GA-* - owner-alias: aws-marketplace - architecture: x86_64 - virtualization-type: paravirtual - block-device-mapping.volume-type: standard - image-type: machine - transport: - username: root - # - # Fedora - # - - name: fedora-21 - driver: - image_search: - name: Fedora-Cloud-Base-21-* - owner-id: "125523088429" - architecture: x86_64 - virtualization-type: hvm - block-device-mapping.volume-type: gp2 - image-type: machine diff --git a/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml b/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml deleted file mode 100644 index 4cd6b35d6..000000000 --- a/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml +++ /dev/null @@ -1,52 +0,0 @@ -driver: - name: vagrant - forward_agent: yes - customize: - cpus: 2 - memory: 1024 - -provisioner: - name: chef_zero - product_name: <%= ENV["KITCHEN_CHEF_PRODUCT"] %> - product_version: <%= ENV["KITCHEN_CHEF_VERSION"] %> - channel: <%= ENV["KITCHEN_CHEF_CHANNEL"] %> - client_rb: - audit_mode: :enabled - attributes: - chef_acceptance: "true" - use_system_chef: "true" - -platforms: -<% %w( -debian-8 -debian-7 -debian-6 -ubuntu-15.10 -ubuntu-14.04 -el-7 -el-6 -el-5 -freebsd-10 -freebsd-9 -fedora-21 -).each do |platform| %> - - name: <%= platform %> - driver: - box: opscode-<%= platform %> - box_url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_<%= platform %>_chef-provisionerless.box -<% end %> -# freebsd-8 -# ubuntu-12.04 -# centos-7 -# centos-6 - -<% %w( -2012r2 -2012 -2008r2 -).each do |version| %> - - name: windows-<%= version %> - driver: - box: chef/windows-server-<%= version %>-standard -# URL is atlas -<% end %> diff --git a/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb deleted file mode 100644 index d36909e8b..000000000 --- a/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +++ /dev/null @@ -1,51 +0,0 @@ -module KitchenAcceptance - class Kitchen < Chef::Resource - resource_name :kitchen - - property :command, String, name_property: true - property :driver, %w(ec2 vagrant), coerce: proc { |v| v.to_s }, default: lazy { ENV["KITCHEN_DRIVER"] || :ec2 } - property :instances, String, default: lazy { ENV["KITCHEN_INSTANCES"] ? ENV["KITCHEN_INSTANCES"] : "" } - property :kitchen_dir, String, default: Chef.node['chef-acceptance']['suite-dir'] - property :chef_product, String, default: lazy { - ENV["KITCHEN_CHEF_PRODUCT"] || begin - # Figure out if we're in chefdk or chef - if ::File.exist?(::File.expand_path("../../chef-dk.gemspec", node['chef-acceptance']['suite-dir'])) - "chefdk" - else - "chef" - end - end - } - property :chef_channel, String, default: lazy { - ENV["KITCHEN_CHEF_CHANNEL"] || - # Pick up current if we can't connect to artifactory - (ENV["ARTIFACTORY_USERNAME"] ? "unstable" : "current") - } - property :chef_version, String, default: lazy { - ENV["KITCHEN_CHEF_VERSION"] || - # If we're running the chef or chefdk projects in jenkins, pick up the project name. - (ENV["PROJECT_NAME"] == chef_product ? ENV["OMNIBUS_BUILD_VERSION"] : nil) || - "latest" - } - property :artifactory_username, String, default: lazy { ENV["ARTIFACTORY_USERNAME"] ? ENV["ARTIFACTORY_USERNAME"] : "" } - property :artifactory_password, String, default: lazy { ENV["ARTIFACTORY_PASSWORD"] ? ENV["ARTIFACTORY_PASSWORD"] : "" } - property :env, Hash, default: {} - property :kitchen_options, String, default: lazy { ENV["PROJECT_NAME"] ? "-c -l debug" : "-c" } - - action :run do - execute "bundle exec kitchen #{command}#{instances ? " #{instances}" : ""}#{kitchen_options ? " #{kitchen_options}" : ""}" do - cwd kitchen_dir - env({ - "KITCHEN_DRIVER" => driver, - "KITCHEN_INSTANCES" => instances, - "KITCHEN_LOCAL_YAML" => ::File.expand_path("../../.kitchen.#{driver}.yml", __FILE__), - "KITCHEN_CHEF_PRODUCT" => chef_product, - "KITCHEN_CHEF_CHANNEL" => chef_channel, - "KITCHEN_CHEF_VERSION" => chef_version, - "ARTIFACTORY_USERNAME" => artifactory_username, - "ARTIFACTORY_PASSWORD" => artifactory_password - }.merge(new_resource.env)) - end - end - end -end diff --git a/acceptance/.shared/kitchen_acceptance/metadata.rb b/acceptance/.shared/kitchen_acceptance/metadata.rb deleted file mode 100644 index 70dc342d0..000000000 --- a/acceptance/.shared/kitchen_acceptance/metadata.rb +++ /dev/null @@ -1 +0,0 @@ -name "kitchen_acceptance" diff --git a/acceptance/Gemfile b/acceptance/Gemfile deleted file mode 100644 index e13e1ea90..000000000 --- a/acceptance/Gemfile +++ /dev/null @@ -1,21 +0,0 @@ -source "https://rubygems.org" - -gem "chef-acceptance", git: "https://github.com/chef/chef-acceptance" -gem "test-kitchen" -gem "kitchen-ec2" -gem "kitchen-inspec" -gem "kitchen-vagrant" -gem "windows_chef_zero" -gem "winrm-fs" -gem "winrm-elevated" -gem "berkshelf" -gem "inspec", "~> 1.0" # until we pull 2.0 into chefDK - -# Workaround to address https://github.com/sickill/rainbow/issues/44 -gem "rainbow", ">= 2.1.0", "< 2.2" - -# TODO remove this when we update Chef to use the new api exposed in 3.5.1 -gem "rspec-core", "= 3.4.4" - -# until 2.0.0 is fixed for unstable packages -gem "mixlib-install", "1.2.3" diff --git a/acceptance/Gemfile.lock b/acceptance/Gemfile.lock deleted file mode 100644 index 1f4ee212b..000000000 --- a/acceptance/Gemfile.lock +++ /dev/null @@ -1,335 +0,0 @@ -GIT - remote: https://github.com/chef/chef-acceptance - revision: 3877c344098021ac66134e8edb5eb805d14d4643 - specs: - chef-acceptance (0.2.0) - mixlib-shellout (~> 2.0) - thor (~> 0.19) - -GEM - remote: https://rubygems.org/ - specs: - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - artifactory (2.8.2) - aws-sdk (2.11.126) - aws-sdk-resources (= 2.11.126) - aws-sdk-core (2.11.126) - aws-sigv4 (~> 1.0) - jmespath (~> 1.0) - aws-sdk-resources (2.11.126) - aws-sdk-core (= 2.11.126) - aws-sigv4 (1.0.3) - berkshelf (6.3.4) - buff-config (~> 2.0) - buff-extensions (~> 2.0) - chef (>= 12.7.2, < 14.0) - cleanroom (~> 1.0) - concurrent-ruby (~> 1.0) - faraday (~> 0.9) - httpclient (~> 2.7) - minitar (~> 0.5, >= 0.5.4) - mixlib-archive (~> 0.4) - mixlib-shellout (~> 2.0) - octokit (~> 4.0) - retryable (~> 2.0) - ridley (~> 5.0) - solve (~> 4.0) - thor (~> 0.19, < 0.19.2) - buff-config (2.0.0) - buff-extensions (~> 2.0) - varia_model (~> 0.6) - buff-extensions (2.0.0) - buff-ignore (1.2.0) - buff-ruby_engine (1.0.0) - buff-shell_out (1.1.0) - buff-ruby_engine (~> 1.0) - builder (3.2.3) - celluloid (0.16.0) - timers (~> 4.0.0) - celluloid-io (0.16.2) - celluloid (>= 0.16.0) - nio4r (>= 1.1.0) - chef (12.12.15) - bundler (>= 1.10) - chef-config (= 12.12.15) - chef-zero (~> 4.5) - diff-lcs (~> 1.2, >= 1.2.4) - erubis (~> 2.7) - ffi-yajl (~> 2.2) - highline (~> 1.6, >= 1.6.9) - iniparse (~> 1.4) - mixlib-authentication (~> 1.4) - mixlib-cli (~> 1.4) - mixlib-log (~> 1.3) - mixlib-shellout (~> 2.0) - net-sftp (~> 2.1, >= 2.1.2) - net-ssh (>= 2.9, < 4.0) - net-ssh-multi (~> 1.1) - ohai (>= 8.6.0.alpha.1, < 9) - plist (~> 3.2) - proxifier (~> 1.0) - rspec-core (~> 3.4) - rspec-expectations (~> 3.4) - rspec-mocks (~> 3.4) - rspec_junit_formatter (~> 0.2.0) - serverspec (~> 2.7) - specinfra (~> 2.10) - syslog-logger (~> 1.6) - uuidtools (~> 2.1.5) - chef-config (12.12.15) - fuzzyurl (~> 0.8.0) - mixlib-config (~> 2.0) - mixlib-shellout (~> 2.0) - chef-zero (4.9.0) - ffi-yajl (~> 2.2) - hashie (>= 2.0, < 4.0) - mixlib-log (~> 1.3) - rack (< 2) - uuidtools (~> 2.1) - cleanroom (1.0.0) - coderay (1.1.2) - concurrent-ruby (1.0.5) - diff-lcs (1.3) - docker-api (1.34.2) - excon (>= 0.47.0) - multi_json - erubis (2.7.0) - excon (0.62.0) - faraday (0.15.2) - multipart-post (>= 1.2, < 3) - ffi (1.9.25) - ffi-yajl (2.3.1) - libyajl2 (~> 1.2) - fuzzyurl (0.8.0) - gssapi (1.2.0) - ffi (>= 1.0.1) - gyoku (1.3.1) - builder (>= 2.1.2) - hashie (3.6.0) - highline (1.7.10) - hitimes (1.3.0) - htmlentities (4.3.4) - httpclient (2.8.3) - iniparse (1.4.4) - inspec (1.51.25) - addressable (~> 2.4) - faraday (>= 0.9.0) - hashie (~> 3.4) - htmlentities - json (>= 1.8, < 3.0) - method_source (~> 0.8) - mixlib-log - parallel (~> 1.9) - parslet (~> 1.5) - pry (~> 0) - rspec (~> 3) - rspec-its (~> 1.2) - rubyzip (~> 1.1) - semverse - sslshake (~> 1.2) - thor (~> 0.19) - tomlrb (~> 1.2) - train (~> 0.32) - ipaddress (0.8.3) - jmespath (1.4.0) - json (2.1.0) - kitchen-ec2 (2.2.2) - aws-sdk (~> 2) - excon - multi_json - retryable (~> 2.0) - test-kitchen (~> 1.4, >= 1.4.1) - kitchen-inspec (0.23.1) - hashie (~> 3.4) - inspec (>= 0.34.0, < 3.0.0) - test-kitchen (~> 1.6) - kitchen-vagrant (1.3.3) - test-kitchen (~> 1.4) - libyajl2 (1.2.0) - little-plugger (1.1.4) - logging (2.2.2) - little-plugger (~> 1.1) - multi_json (~> 1.10) - method_source (0.9.0) - minitar (0.6.1) - mixlib-archive (0.4.16) - mixlib-log - mixlib-authentication (1.4.2) - mixlib-cli (1.7.0) - mixlib-config (2.2.13) - tomlrb - mixlib-install (1.2.3) - artifactory - mixlib-shellout - mixlib-versioning - mixlib-log (1.7.1) - mixlib-shellout (2.4.0) - mixlib-versioning (1.2.2) - molinillo (0.6.6) - multi_json (1.13.1) - multipart-post (2.0.0) - net-scp (1.2.1) - net-ssh (>= 2.6.5) - net-sftp (2.1.2) - net-ssh (>= 2.6.5) - net-ssh (3.2.0) - net-ssh-gateway (1.3.0) - net-ssh (>= 2.6.5) - net-ssh-multi (1.2.1) - net-ssh (>= 2.6.5) - net-ssh-gateway (>= 1.2.0) - net-telnet (0.2.0) - nio4r (2.3.1) - nori (2.6.0) - octokit (4.11.0) - sawyer (~> 0.8.0, >= 0.5.3) - ohai (8.26.1) - chef-config (>= 12.5.0.alpha.1, < 14) - ffi (~> 1.9) - ffi-yajl (~> 2.2) - ipaddress - mixlib-cli - mixlib-config (~> 2.0) - mixlib-log (>= 1.7.1, < 2.0) - mixlib-shellout (~> 2.0) - plist (~> 3.1) - systemu (~> 2.6.4) - wmi-lite (~> 1.0) - parallel (1.12.1) - parslet (1.8.2) - plist (3.4.0) - proxifier (1.0.3) - pry (0.11.3) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - public_suffix (3.0.3) - rack (1.6.10) - rainbow (2.1.0) - retryable (2.0.4) - ridley (5.1.1) - addressable - buff-config (~> 2.0) - buff-extensions (~> 2.0) - buff-ignore (~> 1.2) - buff-shell_out (~> 1.0) - celluloid (~> 0.16.0) - celluloid-io (~> 0.16.1) - chef-config (>= 12.5.0) - erubis - faraday (~> 0.9) - hashie (>= 2.0.2, < 4.0.0) - httpclient (~> 2.7) - json (>= 1.7.7) - mixlib-authentication (>= 1.3.0) - retryable (~> 2.0) - semverse (~> 2.0) - varia_model (~> 0.6) - rspec (3.4.0) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-core (3.4.4) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-its (1.2.0) - rspec-core (>= 3.0.0) - rspec-expectations (>= 3.0.0) - rspec-mocks (3.4.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - rspec_junit_formatter (0.2.3) - builder (< 4) - rspec-core (>= 2, < 4, != 2.12.0) - rubyntlm (0.6.2) - rubyzip (1.2.2) - safe_yaml (1.0.4) - sawyer (0.8.1) - addressable (>= 2.3.5, < 2.6) - faraday (~> 0.8, < 1.0) - semverse (2.0.0) - serverspec (2.41.3) - multi_json - rspec (~> 3.0) - rspec-its - specinfra (~> 2.72) - sfl (2.3) - solve (4.0.0) - molinillo (~> 0.6) - semverse (>= 1.1, < 3.0) - specinfra (2.76.1) - net-scp - net-ssh (>= 2.7) - net-telnet - sfl - sslshake (1.2.0) - syslog-logger (1.6.8) - systemu (2.6.5) - test-kitchen (1.17.0) - mixlib-install (>= 1.2, < 3.0) - mixlib-shellout (>= 1.2, < 3.0) - net-scp (~> 1.1) - net-ssh (>= 2.9, < 5.0) - net-ssh-gateway (~> 1.2) - safe_yaml (~> 1.0) - thor (~> 0.19, < 0.19.2) - thor (0.19.1) - timers (4.0.4) - hitimes - tomlrb (1.2.7) - train (0.32.0) - docker-api (~> 1.26) - json (>= 1.8, < 3.0) - mixlib-shellout (~> 2.0) - net-scp (~> 1.2) - net-ssh (>= 2.9, < 5.0) - winrm (~> 2.0) - winrm-fs (~> 1.0) - uuidtools (2.1.5) - varia_model (0.6.0) - buff-extensions (~> 2.0) - hashie (>= 2.0.2, < 4.0.0) - windows_chef_zero (2.0.0) - test-kitchen (>= 1.2.1) - winrm (2.2.3) - builder (>= 2.1.2) - erubis (~> 2.7) - 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.1.0) - winrm (~> 2.0) - winrm-fs (~> 1.0) - winrm-fs (1.3.0) - erubis (~> 2.7) - logging (>= 1.6.1, < 3.0) - rubyzip (~> 1.1) - winrm (~> 2.0) - wmi-lite (1.0.0) - -PLATFORMS - ruby - -DEPENDENCIES - berkshelf - chef-acceptance! - inspec (~> 1.0) - kitchen-ec2 - kitchen-inspec - kitchen-vagrant - mixlib-install (= 1.2.3) - rainbow (>= 2.1.0, < 2.2) - rspec-core (= 3.4.4) - test-kitchen - windows_chef_zero - winrm-elevated - winrm-fs - -BUNDLED WITH - 1.16.4 diff --git a/acceptance/README.md b/acceptance/README.md deleted file mode 100644 index eb52bf5f6..000000000 --- a/acceptance/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# Acceptance Testing for Chef DK -This folder contains acceptance tests that are required for ChefDK -release readiness. - -## Getting started -The tests use the _chef-acceptance_ gem as the high level framework. -All the gems needed to run these tests can be installed with Bundler. - -### Important Note! -Before running chef-acceptance, you *MUST* do the following on your current session: - -``` -export APPBUNDLER_ALLOW_RVM=true -``` - -## Pre-requisites / One time set up - -### Set up for local VM (Vagrant) - -If you intend to run the acceptance tests on a local VM, the supported solution is to use Vagrant. -Ensure that Vagrant is installed on the machine that tests will run from, along with a -virtualization driver (E.g.: VirtualBox). - -Set up the KITCHEN_DRIVER environment variable appropriately (value should be "vagrant"). E.g.: -``` -export KITCHEN_DRIVER=vagrant -``` -Add this to your shell profile or startup script as needed. - -### Set up for cloud VM (EC2) - -If you intend to run the acceptance tests on a cloud VM, the supported solution is to use EC2. - -The steps you will need to do are: - -1. Add your AWS credentials to the machine - e.g., to the ~/.aws/credentials directory. - - The easiest way to do this is to download the aws command line (`brew install awscli` on OS/X) and run `aws configure`. -2. Create or import a SSH key to AWS. (If you already have one, you can skip the import/create) - - In the AWS console, click Key Pairs, then Create Key Pair or Import Key Pair. -3. Copy or move the private key file (USERNAME.pem) to the SSH folder (e.g. `~/.ssh/USERNAME.pem`). - - If you Created a key pair in step 2, download the private key and move it to `~/.ssh`. - - If you Importd a key pair in step 2, just ensure your private key is in `~/.ssh` and has the same name as the key pair (`~/.ssh/USERNAME` or `~/.ssh/USERNAME.pem`). -4. Set AWS_SSH_KEY_ID to the SSH key name. - - This is **optional** if your AWS SSH key name is your local username. - - You may want to set this in your shell `.profile`. - - ```shell - export AWS_SSH_KEY_ID=name-of-private-key - ``` -5. Set the private key to only be readable by root - - ```shell - chmod 0400 ~/.ssh/USERNAME.pem - ``` -6. Set up the KITCHEN_DRIVER environment variable appropriately (value should be "ec2"). (This is optional, as ec2 is the default.) E.g.: - - ```shell - export KITCHEN_DRIVER=ec2 - ``` - Add this to your shell profile or startup script as needed. -7. **Connect to Chef VPN**. The instances you create will not have public IPs! - -## Setting up and running a test suite -To get started, do a bundle install from the acceptance directory: -```shell -chef/acceptance$ bundle install --binstubs -``` - -To get some basic info and ensure chef-acceptance can be run, do: -```shell -chef/acceptance$ bin/chef-acceptance info -``` - -To run a particular test suite, do the following: -```shell -chef/acceptance$ bin/chef-acceptance test TEST_SUITE -``` - -To restrict which OS's will run, use the KITCHEN_INSTANCES environment variable: - -```shell -chef/acceptance$ export KITCHEN_INSTANCES=*-ubuntu-1404 -chef/acceptance$ bin/chef-acceptance test cookbook-git -``` - -If KITCHEN_INSTANCES is not specified, the default instances are default-ubuntu-1404 and default-windows-windows-2012r2. All selected instances will be run in *parallel* if the driver supports it (ec2 does, vagrant doesn't). - -## Optional Settings - -In addition to the environment settings above, there are a number of -key values that are available to set for changing the way the acceptance -tests are run. - -### KITCHEN_CHEF_CHANNEL - -Use this setting to specify which channel we will pull the chef build from. -The default is to use the "current" channel, unless the ARTIFACTORY_USERNAME is set -(which normally happens when running under Jenkins), in which case the default is -changed to "unstable". - -```shell -export KITCHEN_CHEF_CHANNEL=name-of-channel -``` - - -### KITCHEN_CHEF_VERSION - -Use this setting to override the version of the Chef client that is installed. The default is to get the latest version in the desired channel. - -```shell -export KITCHEN_CHEF_VERSION=version-of-chef-client -``` - -### ARTIFACTORY_USERNAME / ARTIFACTORY_PASSWORD - -If the desired channel to get the Chef client from is "unstable", the following settings need to be exported: - -```shell -export ARTIFACTORY_USERNAME=username -export ARTIFACTORY_PASSWORD=password -``` - -## Future Work - -Currently, there is no simple mechanism for chef-acceptance -to build an Omnibus package of the developers local chef -instance and run acceptance tests on it - the only packages -that can be exercised are ones that come from one of the -pipeline channels (unstable, current or stable). - -This is not an issue when adding acceptance tests for pre-existing functionality (as that functionality is presumed -to already be in a build in one of the pipeline channels). diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore b/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore deleted file mode 100644 index 041413b04..000000000 --- a/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -nodes/ -tmp/ diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb deleted file mode 100644 index 6c754560f..000000000 --- a/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb +++ /dev/null @@ -1,2 +0,0 @@ -name "acceptance-cookbook" -depends "kitchen_acceptance" diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb deleted file mode 100644 index e2d663ac2..000000000 --- a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb +++ /dev/null @@ -1 +0,0 @@ -kitchen "destroy" diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb deleted file mode 100644 index a6f148f7a..000000000 --- a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb +++ /dev/null @@ -1 +0,0 @@ -kitchen "setup" diff --git a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb b/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb deleted file mode 100644 index 05ac94ce6..000000000 --- a/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb +++ /dev/null @@ -1 +0,0 @@ -kitchen "verify" diff --git a/acceptance/trivial/.kitchen.yml b/acceptance/trivial/.kitchen.yml deleted file mode 100644 index 8424b22fa..000000000 --- a/acceptance/trivial/.kitchen.yml +++ /dev/null @@ -1,7 +0,0 @@ -verifier: - name: inspec - -suites: - - name: chefdk-current-install - includes: [ubuntu-14.04] - run_list: diff --git a/acceptance/trivial/test/integration/chefdk-current-install/inspec/chef_client_spec.rb b/acceptance/trivial/test/integration/chefdk-current-install/inspec/chef_client_spec.rb deleted file mode 100644 index 14f1a7c65..000000000 --- a/acceptance/trivial/test/integration/chefdk-current-install/inspec/chef_client_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -chef_version = ENV["KITCHEN_CHEF_VERSION"].split("+")[0] -describe command("chef -v") do - its("exit_status") { should eq 0 } - its(:stdout) { should match(/Chef Development Kit Version: #{chef_version}/) } if chef_version != "latest" -end diff --git a/chef-dk.gemspec b/chef-dk.gemspec index 8e045fc2a..56bbf69f4 100644 --- a/chef-dk.gemspec +++ b/chef-dk.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |gem| gem.files = %w{Rakefile LICENSE warning.txt} + Dir.glob("Gemfile*") + # Includes Gemfile and locks Dir.glob("*.gemspec") + - Dir.glob("{lib,spec,acceptance,tasks}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } + Dir.glob("{lib,tasks}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } gem.executables = %w{ chef } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"]