From e70fcd9efb6020e3ada5729e7d4c2b57f64842bd Mon Sep 17 00:00:00 2001 From: Franklin Hanson Date: Tue, 5 Dec 2017 16:58:50 -0500 Subject: [PATCH 01/17] PAAS-10840 major overhaul for chef 13 Update the cookbook to recent standards and move to jenkins file pipeline. Deprecates OS other than centos --- .kitchen.ec2.yml | 14 +- .kitchen.yml | 10 +- .rubocop.yml | 7 +- .travis.yml | 10 - CHANGELOG.md | 4 + Gemfile | 263 ++++++++++++++++-- Jenkinsfile | 91 ++++++ LICENSE | 201 ------------- NOTICE.txt | 2 - README.md | 3 +- Rakefile | 3 +- TESTING.md | 25 -- ZPL.txt | 59 ---- attributes/default.rb | 47 +--- chefignore | 7 +- metadata.rb | 20 +- providers/pip.rb | 16 +- providers/virtualenv.rb | 1 - recipes/custom-package.rb | 10 +- recipes/package.rb | 22 +- recipes/source.rb | 4 +- resources/pip.rb | 8 +- resources/virtualenv.rb | 8 +- spec/custom_package_spec.rb | 39 --- spec/default_spec.rb | 29 -- spec/package_spec.rb | 25 -- spec/pip_spec.rb | 36 --- spec/spec_helper.rb | 4 - spec/unit/recipes/custom_package_spec.rb | 26 ++ spec/unit/recipes/default_spec.rb | 26 ++ spec/unit/recipes/package_spec.rb | 22 ++ spec/unit/recipes/pip_spec.rb | 35 +++ spec/unit/recipes/virtualenv_spec.rb | 24 ++ spec/virtualenv_spec.rb | 27 -- .../default/serverspec/custom-package_spec.rb | 16 -- .../integration/helpers/serverspec/helpers.rb | 28 ++ .../helpers/serverspec/spec_helper.rb | 16 ++ .../package/serverspec/pip_spec.rb | 9 +- .../package/serverspec/virtualenv_spec.rb | 9 +- 39 files changed, 569 insertions(+), 637 deletions(-) delete mode 100644 .travis.yml create mode 100644 Jenkinsfile delete mode 100644 LICENSE delete mode 100644 NOTICE.txt delete mode 100644 TESTING.md delete mode 100644 ZPL.txt delete mode 100644 spec/custom_package_spec.rb delete mode 100644 spec/default_spec.rb delete mode 100644 spec/package_spec.rb delete mode 100644 spec/pip_spec.rb create mode 100644 spec/unit/recipes/custom_package_spec.rb create mode 100644 spec/unit/recipes/default_spec.rb create mode 100644 spec/unit/recipes/package_spec.rb create mode 100644 spec/unit/recipes/pip_spec.rb create mode 100644 spec/unit/recipes/virtualenv_spec.rb delete mode 100644 spec/virtualenv_spec.rb create mode 100644 test/integration/helpers/serverspec/helpers.rb create mode 100644 test/integration/helpers/serverspec/spec_helper.rb diff --git a/.kitchen.ec2.yml b/.kitchen.ec2.yml index a3c76c4..0de5520 100644 --- a/.kitchen.ec2.yml +++ b/.kitchen.ec2.yml @@ -6,25 +6,29 @@ driver: availability_zone: <%= ENV['AWS_AVAILABILITY_ZONE'] %> require_chef_omnibus: true subnet_id: <%= ENV['AWS_SUBNET'] %> - instance_type: <%= ENV['INSTANCE_SIZE'] %> associate_public_ip: false interface: private - user_data: <%= ENV['USER_DATA_PATH'] %> tags: OWNER: <%= ENV['AWS_OWNER_TAG'] %> Name: <%= ENV['AWS_NAME_TAG'] %> + ENVIRONMENT: <%= ENV['AWS_ENVIRONMENT_TAG'] %> + provisioner: name: chef_zero + log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %> transport: - username: cloud-user ssh_key: ~/.ssh/<%= ENV['AWS_SSH_KEY'] %>.pem platforms: - - name: centos-6.7-python-integration-tests + - name: gci-centos7 driver: - image_id: <%= ENV['AWS_AMI_ID'] %> + image_id: <%= ENV['AWS_GCI_CENTOS7_AMI_ID'] %> + instance_type: <%= ENV['LINUX_INSTANCE_SIZE'] %> + user_data: <%= ENV['LINUX_USER_DATA_PATH'] %> + transport: + username: <%= ENV['AWS_CENTOS7_USERNAME'] %> suites: - name: default diff --git a/.kitchen.yml b/.kitchen.yml index c0c5b33..8f230af 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -1,18 +1,14 @@ --- driver: name: vagrant - customize: - memory: 2048 + pre_create_command: "cd {{vagrant_root}}/ && vagrant box update" provisioner: name: chef_zero - chef_zero_port: 9010 + log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %> platforms: -- name: gdp-centos-6.7 - driver: - box: centos-67 - box_url: https://deploy.gmti.gbahn.net/Images/CentOS6/vagrant/centos67-cloud-1.0.0.box + - name: gannett/gci-centos7 suites: - name: default diff --git a/.rubocop.yml b/.rubocop.yml index 286c90d..858a8ff 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,15 +3,14 @@ AllCops: Exclude: + - 'test/**/*' - 'spec/**/*' # ignore spec tests for now - 'vendor/**/*' # ignore non-local files - - 'test/**/**/**/*' # ignore serverspec tests - - 'providers/pip.rb' #ignore pip provider for now, requires refactor - Guardfile # We like longer lines Metrics/LineLength: - Max: 132 + Max: 160 # TODO: add encoding headers Style/Encoding: @@ -34,7 +33,7 @@ Style/SignalException: Enabled: false # We enjoy parameters lining up for visual comprehension -Style/SingleSpaceBeforeFirstArg: +Layout/SpaceBeforeFirstArg: Enabled: false # Only enforce a wordlist for 5 or longer lists. diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c40abd3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: ruby -rvm: - - 1.9.3 - - 2.0.0 -bundler_args: --deployment --binstubs -before_script: - - ./bin/berks install -script: - - ./bin/foodcritic -f any . - - ./bin/rake diff --git a/CHANGELOG.md b/CHANGELOG.md index 82333b4..f2307f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ python Cookbook CHANGELOG ========================= This file is used to list changes made in each version of the python cookbook. +v2.0.0 +------ +- Franklin Hanson - updated cookbook for chef client 13 and deprecate OS that we no longer support on platform (PAAS-10840) + v1.6.0 ------ - Jason Neves - updated cookbook to be able to pin pip version installed, diff --git a/Gemfile b/Gemfile index fda89b6..9d1e073 100644 --- a/Gemfile +++ b/Gemfile @@ -1,26 +1,243 @@ -# -*- encoding: utf-8 -*- source 'https://rubygems.org' -gem 'berkshelf' -gem 'coveralls', require: false -gem 'rubocop' -gem 'webmock' +# custom gems and versions +gem 'chef-handler-profiler', '= 0.0.2' -group :test do - gem 'rubocop-checkstyle_formatter', require: false - gem 'chefspec', '~> 4.2' - gem 'foodcritic', '~> 4.0.0' - gem 'rake', '>= 10.2' -end - -group :integration do - gem 'guard', '>= 2.6' - gem 'guard-foodcritic', '~> 1.0.3' - gem 'guard-kitchen' - gem 'guard-rspec' - gem 'guard-rubocop', '>= 1.1' - gem 'kitchen-vagrant' - gem 'kitchen-ec2' - gem 'test-kitchen', '~> 1.2.0' - gem 'travis-lint' -end +# chef-dk version: 2.4.15 +# https://github.com/chef/chef-dk/blob/e989052399f5ef82b0f6be024b345b528c681d1e/Gemfile.lock +gem 'activesupport', '= 5.1.4' +gem 'addressable', '= 2.5.2' +gem 'app_conf', '= 0.4.2' +gem 'appbundler', '= 0.10.0' +gem 'artifactory', '= 2.8.2' +gem 'ast', '= 2.3.0' +gem 'aws-sdk', '= 2.10.86' +gem 'aws-sdk-core', '= 2.10.86' +gem 'aws-sdk-resources', '= 2.10.86' +gem 'aws-sigv4', '= 1.0.2' +gem 'axiom-types', '= 0.1.1' +gem 'backports', '= 3.10.3' +gem 'berkshelf', '= 6.3.1' +gem 'binding_of_caller', '= 0.7.3' +gem 'buff-config', '= 2.0.0' +gem 'buff-extensions', '= 2.0.0' +gem 'buff-ignore', '= 1.2.0' +gem 'buff-ruby_engine', '= 1.0.0' +gem 'buff-shell_out', '= 1.1.0' +gem 'builder', '= 3.2.3' +gem 'byebug', '= 9.1.0' +gem 'celluloid', '= 0.16.0' +gem 'celluloid-io', '= 0.16.2' +gem 'chef', '= 13.6.4' +gem 'chef-api', '= 0.7.1' +gem 'chef-config', '= 13.6.4' +gem 'chef-dk', '= 2.4.15' +gem 'chef-provisioning', '= 2.6.0' +gem 'chef-provisioning-aws', '= 3.0.0' +gem 'chef-provisioning-azure', '= 0.6.0' +gem 'chef-provisioning-fog', '= 0.26.0' +gem 'chef-sugar', '= 3.6.0' +gem 'chef-vault', '= 3.3.0' +gem 'chef-zero', '= 13.1.0' +gem 'cheffish', '= 13.1.0' +gem 'chefspec', '= 7.1.0' +gem 'chefstyle', '= 0.6.0' +gem 'cleanroom', '= 1.0.0' +gem 'coderay', '= 1.1.2' +gem 'coercible', '= 1.0.0' +gem 'concurrent-ruby', '= 1.0.5' +gem 'cookbook-omnifetch', '= 0.8.0' +gem 'cookstyle', '= 2.1.0' +gem 'cucumber', '= 3.0.2' +gem 'cucumber-core', '= 3.0.0' +gem 'cucumber-expressions', '= 4.0.4' +gem 'cucumber-tag_expressions', '= 1.0.1' +gem 'cucumber-wire', '= 0.0.1' +gem 'dco', '= 1.0.1' +gem 'debug_inspector', '= 0.0.3' +gem 'dep-selector-libgecode', '= 1.3.1' +gem 'dep_selector', '= 1.0.6' +gem 'descendants_tracker', '= 0.0.4' +gem 'diff-lcs', '= 1.3' +gem 'diffy', '= 3.2.0' +gem 'docker-api', '= 1.34.0' +gem 'droplet_kit', '= 2.2.1' +gem 'equalizer', '= 0.0.11' +gem 'erubis', '= 2.7.0' +gem 'excon', '= 0.59.0' +gem 'faraday', '= 0.13.1' +gem 'fauxhai', '= 5.5.0' +gem 'ffi', '= 1.9.18' +gem 'ffi-rzmq', '= 2.0.5' +gem 'ffi-rzmq-core', '= 1.0.6' +gem 'ffi-yajl', '= 2.3.1' +gem 'fog-aws', '= 1.4.1' +gem 'fog-core', '= 1.45.0' +gem 'fog-digitalocean', '= 0.3.0' +gem 'fog-joyent', '= 0.0.1' +gem 'fog-json', '= 1.0.2' +gem 'fog-openstack', '= 0.1.22' +gem 'fog-rackspace', '= 0.1.5' +gem 'fog-scaleway', '= 0.3.0' +gem 'fog-softlayer', '= 1.1.4' +gem 'fog-xenserver', '= 0.3.0' +gem 'fog-xml', '= 0.1.3' +gem 'foodcritic', '= 12.2.1' +gem 'formatador', '= 0.2.5' +gem 'fuzzyurl', '= 0.9.0' +gem 'gcewinpass', '= 1.0.0' +gem 'gherkin', '= 4.1.3' +gem 'git', '= 1.3.0' +gem 'google-api-client', '= 0.9.28' +gem 'googleauth', '= 0.6.2' +gem 'gssapi', '= 1.2.0' +gem 'guard', '= 2.14.1' +gem 'gyoku', '= 1.3.1' +gem 'hashie', '= 3.5.6' +gem 'highline', '= 1.7.8' +gem 'hitimes', '= 1.2.6' +gem 'htmlentities', '= 4.3.4' +gem 'httpclient', '= 2.8.3' +gem 'hurley', '= 0.2' +gem 'i18n', '= 0.9.1' +gem 'ice_nine', '= 0.11.2' +gem 'inifile', '= 3.0.0' +gem 'iniparse', '= 1.4.4' +gem 'inspec', '= 1.45.9' +gem 'ipaddress', '= 0.8.3' +gem 'iso8601', '= 0.9.1' +gem 'jmespath', '= 1.3.1' +gem 'json', '= 1.8.6' +gem 'jwt', '= 2.1.0' +gem 'kartograph', '= 0.2.4' +gem 'kitchen-digitalocean', '= 0.9.8' +gem 'kitchen-dokken', '= 2.6.5' +gem 'kitchen-ec2', '= 1.3.2' +gem 'kitchen-google', '= 1.4.0' +gem 'kitchen-hyperv', '= 0.5.1' +gem 'kitchen-inspec', '= 0.20.0' +gem 'kitchen-vagrant', '= 1.2.1' +gem 'knife-cloud', '= 1.2.1' +gem 'knife-ec2', '= 0.16.0' +gem 'knife-google', '= 3.2.0' +gem 'knife-opc', '= 0.3.2' +gem 'knife-push', '= 1.0.3' +gem 'knife-spork', '= 1.7.1' +gem 'knife-windows', '= 1.9.0' +gem 'libyajl2', '= 1.2.0' +gem 'listen', '= 3.1.5' +gem 'little-plugger', '= 1.1.4' +gem 'lockfile', '= 2.1.3' +gem 'logging', '= 2.2.2' +gem 'logify', '= 0.2.0' +gem 'lumberjack', '= 1.0.12' +gem 'macaddr', '= 1.7.1' +gem 'memoist', '= 0.16.0' +gem 'method_source', '= 0.9.0' +gem 'mime-types', '= 3.1' +gem 'mime-types-data', '= 3.2016.0521' +gem 'mini_portile2', '= 2.3.0' +gem 'minitar', '= 0.5.4' +gem 'minitest', '= 5.10.3' +gem 'mixlib-archive', '= 0.4.1' +gem 'mixlib-authentication', '= 1.4.2' +gem 'mixlib-cli', '= 1.7.0' +gem 'mixlib-config', '= 2.2.4' +gem 'mixlib-install', '= 3.8.0' +gem 'mixlib-log', '= 1.7.1' +gem 'mixlib-shellout', '= 2.3.2' +gem 'mixlib-versioning', '= 1.2.2' +gem 'molinillo', '= 0.6.4' +gem 'multi_json', '= 1.12.2' +gem 'multi_test', '= 0.1.2' +gem 'multipart-post', '= 2.0.0' +gem 'nenv', '= 0.3.0' +gem 'net-scp', '= 1.2.1' +gem 'net-sftp', '= 2.1.2' +gem 'net-ssh', '= 4.1.0' +gem 'net-ssh-gateway', '= 1.3.0' +gem 'net-ssh-multi', '= 1.2.1' +gem 'net-telnet', '= 0.1.1' +gem 'nio4r', '= 2.1.0' +gem 'nokogiri', '= 1.8.1' +gem 'nori', '= 2.6.0' +gem 'notiffany', '= 0.1.1' +gem 'octokit', '= 4.7.0' +gem 'ohai', '= 13.6.0' +gem 'opscode-pushy-client', '= 2.3.0' +gem 'os', '= 0.9.6' +gem 'paint', '= 1.0.1' +gem 'parallel', '= 1.12.0' +gem 'parser', '= 2.4.0.2' +gem 'parslet', '= 1.8.1' +gem 'plist', '= 3.3.0' +gem 'polyglot', '= 0.3.5' +gem 'powerpack', '= 0.1.1' +gem 'proxifier', '= 1.0.3' +gem 'pry', '= 0.11.3' +gem 'pry-byebug', '= 3.5.0' +gem 'pry-remote', '= 0.1.8' +gem 'pry-stack_explorer', '= 0.4.9.2' +gem 'public_suffix', '= 3.0.1' +gem 'rack', '= 2.0.3' +gem 'rainbow', '= 2.2.2' +gem 'rake', '= 12.3.0' +gem 'rb-fsevent', '= 0.10.2' +gem 'rb-inotify', '= 0.9.10' +gem 'rb-readline', '= 0.5.5' +gem 'rdoc', '= 5.1.0' +gem 'representable', '= 2.3.0' +gem 'resource_kit', '= 0.1.7' +gem 'retriable', '= 2.1.0' +gem 'retryable', '= 2.0.4' +gem 'ridley', '= 5.1.1' +gem 'rspec', '= 3.7.0' +gem 'rspec-core', '= 3.7.0' +gem 'rspec-expectations', '= 3.7.0' +gem 'rspec-its', '= 1.2.0' +gem 'rspec-mocks', '= 3.7.0' +gem 'rspec-support', '= 3.7.0' +gem 'rspec_junit_formatter', '= 0.2.3' +gem 'rubocop', '= 0.49.1' +gem 'ruby-prof', '= 0.16.2' +gem 'ruby-progressbar', '= 1.9.0' +gem 'ruby-shadow', '= 2.5.0' +gem 'ruby_dep', '= 1.5.0' +gem 'rubyntlm', '= 0.6.2' +gem 'rubyzip', '= 1.2.1' +gem 'rufus-lru', '= 1.1.0' +gem 'safe_yaml', '= 1.0.4' +gem 'sawyer', '= 0.8.1' +gem 'semverse', '= 2.0.0' +gem 'serverspec', '= 2.41.3' +gem 'sfl', '= 2.3' +gem 'shellany', '= 0.0.1' +gem 'signet', '= 0.8.1' +gem 'slop', '= 3.6.0' +gem 'solve', '= 4.0.0' +gem 'specinfra', '= 2.72.1' +gem 'sslshake', '= 1.2.0' +gem 'stove', '= 6.0.0' +gem 'stuartpreston-azure-sdk-for-ruby', '= 0.7.2' +gem 'syslog-logger', '= 1.6.8' +gem 'systemu', '= 2.6.5' +gem 'test-kitchen', '= 1.19.1' +gem 'thor', '= 0.19.1' +gem 'thread_safe', '= 0.3.6' +gem 'timers', '= 4.0.4' +gem 'tomlrb', '= 1.2.6' +gem 'train', '= 0.29.1' +gem 'treetop', '= 1.6.8' +gem 'tzinfo', '= 1.2.4' +gem 'uber', '= 0.0.15' +gem 'ubuntu_ami', '= 0.4.1' +gem 'unicode-display_width', '= 1.3.0' +gem 'uuid', '= 2.3.8' +gem 'uuidtools', '= 2.1.5' +gem 'varia_model', '= 0.6.0' +gem 'virtus', '= 1.0.5' +gem 'winrm', '= 2.2.3' +gem 'winrm-elevated', '= 1.1.0' +gem 'winrm-fs', '= 1.0.2' +gem 'wmi-lite', '= 1.0.0' +gem 'yard', '= 0.9.10' diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..0d4d9db --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,91 @@ + +node('chef13') { + dest = '' + env.COOKBOOK_REPO = 'GannettDigital/chef-python' + env.COOKBOOK_NAME = 'python' + // If you need to change the instance size for your testing + // update it in your kitchen.ec2.yml file + try { + stage 'Github checkout' + deleteDir() + checkout scm + v = version() + sh "echo -n `git rev-parse HEAD` > .git/commit-id" + env.BRANCH_COMMIT = readFile('.git/commit-id') + echo "Testing ${env.COOKBOOK_NAME} ${v}\nBRANCH: ${env.BRANCH_NAME}\nCOMMIT: ${env.BRANCH_COMMIT}" + if (env.BRANCH_NAME != 'master') { + dest = 'test' + stage 'check PR script' + // run our basic pr version check tests + sh 'bash ${JENKINS_HOME}/dev-ops/ci/check_pr_versions.sh' + } else { + dest = 'chef-server' + } + stage 'GD foodcritic' + // Run our foodcritic tests + sh 'foodcritic -f "any" -t "~FC071" -t "~FC078" -t "~FC104" -X "spec/**/*" -X "test/**/*" -I $FC_RULES_LOCATION .' + stage 'EC2 integration tests' + // this is the "chef exec bundle exec rake ec2 job" + sh 'chef exec bundle install && chef exec bundle exec rake ec2' + if (env.BRANCH_NAME == 'master') { + stage 'supermarket upload' + build job: 'supermarket_upload_sub', parameters: [string(name: 'COOKBOOK_BRANCH', value: "${env.BRANCH_COMMIT}"), + string(name: 'COOKBOOK_REPO', value: "${env.COOKBOOK_REPO}"), + string(name: 'COOKBOOK_NAME', value: "${env.COOKBOOK_NAME}")] + try { + stage 'chef server upload' + build job: 'chef_upload_sub', parameters: [string(name: 'COOKBOOK_BRANCH', value: "${env.BRANCH_COMMIT}"), + string(name: 'COOKBOOK_REPO', value: "${env.COOKBOOK_REPO}"), + string(name: 'COOKBOOK_NAME', value: "${env.COOKBOOK_NAME}")] + currentBuild.result = "SUCCESS" + } + catch (err) { + stage 'supermarket rollback' + build job: 'supermarket_rollback_sub', parameters: [string(name: 'COOKBOOK_BRANCH', value: "${env.BRANCH_COMMIT}"), + string(name: 'COOKBOOK_REPO', value: "${env.COOKBOOK_REPO}"), + string(name: 'COOKBOOK_NAME', value: "${env.COOKBOOK_NAME}")] + currentBuild.result = "FAILURE" + } + } + stage 'notify or tag' + // we could notify slack directly with a plugin + echo 'call pipeline-alerting' + if (env.BRANCH_NAME != 'master') { + // if you got here and you're not master then you're golden + currentBuild.result = "SUCCESS" + } + build job: 'pipeline-alerting', parameters: [string(name: 'TRIGGERING_JOB_NAME', value: "${env.COOKBOOK_NAME}"), + string(name: 'TRIGGERING_BUILD_NUMBER', value: "${env.BUILD_NUMBER}"), + string(name: 'TRIGGERING_ENVIRONMENT', value: 'tools'), + string(name: 'TRIGGERING_BUILD_URL', value: "${env.BUILD_URL}"), + string(name: 'TRIGGERING_GIT_URL', value: "https://github.com/${env.COOKBOOK_REPO}/"), + string(name: 'TRIGGERING_GIT_COMMIT', value: "${env.BRANCH_COMMIT}"), + string(name: 'APP_NAME', value: "${env.COOKBOOK_NAME}"), + string(name: 'EVENT_TYPE', value: 'deploy'), + string(name: 'TEST_TYPE', value: 'none'), + string(name: 'PUBLISH_DESTINATION', value: "${dest}"), + string(name: 'TEAM', value: 'paas-delivery'), + string(name: 'BUILD_STATUS', value: "${currentBuild.result}")] + } + catch (err) { + // if anything broke early on before the master logic + currentBuild.result = "FAILURE" + stage 'notify or tag' + build job: 'pipeline-alerting', parameters: [string(name: 'TRIGGERING_JOB_NAME', value: "${env.COOKBOOK_NAME}"), + string(name: 'TRIGGERING_BUILD_NUMBER', value: "${env.BUILD_NUMBER}"), + string(name: 'TRIGGERING_ENVIRONMENT', value: 'tools'), + string(name: 'TRIGGERING_BUILD_URL', value: "${env.BUILD_URL}"), + string(name: 'TRIGGERING_GIT_URL', value: "https://github.com/${env.COOKBOOK_REPO}/"), + string(name: 'TRIGGERING_GIT_COMMIT', value: "${env.BRANCH_COMMIT}"), + string(name: 'APP_NAME', value: "${env.COOKBOOK_NAME}"), + string(name: 'EVENT_TYPE', value: 'deploy'), + string(name: 'TEST_TYPE', value: 'none'), + string(name: 'PUBLISH_DESTINATION', value: "${dest}"), + string(name: 'TEAM', value: 'paas-delivery'), + string(name: 'BUILD_STATUS', value: "${currentBuild.result}")] + } +} +def version() { + def matcher = readFile('metadata.rb') =~ /version\s+['"](\d+\.\d+\.\d+)['"]/ + matcher ? matcher[0][1] : null +} diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/NOTICE.txt b/NOTICE.txt deleted file mode 100644 index 7f4a2b9..0000000 --- a/NOTICE.txt +++ /dev/null @@ -1,2 +0,0 @@ -The script located at files/default/ez_setup.py is licensed under the -Zope Public License, found at the root of this cookbook at ZPL.txt. diff --git a/README.md b/README.md index c2513ff..fba76c8 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,7 @@ Installs and configures Python. Also includes LWRPs for managing python package Requirements ------------ ### Platforms -- Debian, Ubuntu -- CentOS, Red Hat, Fedora +- CentOS ### Cookbooks - build-essential diff --git a/Rakefile b/Rakefile index 05d2f3d..7f8373f 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ require 'rspec/core/rake_task' +require 'cookstyle' require 'rubocop/rake_task' require 'foodcritic' require 'kitchen/cli' @@ -12,7 +13,7 @@ namespace :style do FoodCritic::Rake::LintTask.new(:chef) do |t| t.options = { fail_tags: ['any'], - tags: ['~FC005'] + tags: ['~FC005', '~FC071', '~FC078', '~FC085', '~FC104'], } end end diff --git a/TESTING.md b/TESTING.md deleted file mode 100644 index e29ff7c..0000000 --- a/TESTING.md +++ /dev/null @@ -1,25 +0,0 @@ -This cookbook includes support for running tests via Test Kitchen (1.0). This has some requirements. - -1. You must be using the Git repository, rather than the downloaded cookbook from the Chef Community Site. -2. You must have Vagrant 1.1 installed. -3. You must have a "sane" Ruby 1.9.3 environment. - -Once the above requirements are met, install the additional requirements: - -Install the berkshelf plugin for vagrant, and berkshelf to your local Ruby environment. - - vagrant plugin install vagrant-berkshelf - gem install berkshelf - -Install Test Kitchen 1.0 (unreleased yet, use the alpha / prerelease version). - - gem install test-kitchen --pre - -Install the Vagrant driver for Test Kitchen. - - gem install kitchen-vagrant - -Once the above are installed, you should be able to run Test Kitchen: - - kitchen list - kitchen test diff --git a/ZPL.txt b/ZPL.txt deleted file mode 100644 index 44e0648..0000000 --- a/ZPL.txt +++ /dev/null @@ -1,59 +0,0 @@ -Zope Public License (ZPL) Version 2.0 ------------------------------------------------ - -This software is Copyright (c) Zope Corporation (tm) and -Contributors. All rights reserved. - -This license has been certified as open source. It has also -been designated as GPL compatible by the Free Software -Foundation (FSF). - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions in source code must retain the above - copyright notice, this list of conditions, and the following - disclaimer. - -2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions, and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - -3. The name Zope Corporation (tm) must not be used to - endorse or promote products derived from this software - without prior written permission from Zope Corporation. - -4. The right to distribute this software or to use it for - any purpose does not give you the right to use Servicemarks - (sm) or Trademarks (tm) of Zope Corporation. Use of them is - covered in a separate agreement (see - http://www.zope.com/Marks). - -5. If any files are modified, you must cause the modified - files to carry prominent notices stating that you changed - the files and the date of any change. - -Disclaimer - - THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS'' - AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. - - -This software consists of contributions made by Zope -Corporation and many individuals on behalf of Zope -Corporation. Specific attributions are listed in the -accompanying credits file. diff --git a/attributes/default.rb b/attributes/default.rb index b492683..d3cf8ec 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -20,51 +20,22 @@ default['python']['install_method'] = 'custom-package' -if node['python']['install_method'] == 'package' - default['python']['prefix_dir'] = case platform - when 'smartos' - '/opt/local' - else - '/usr' - end -else - default['python']['prefix_dir'] = '/usr/local' -end - +default['python']['prefix_dir'] = if node['python']['install_method'] == 'package' + '/usr' + else + '/usr/local' + end default['python']['binary'] = "#{node['python']['prefix_dir']}/bin/python" if node['python']['install_method'] == 'custom-package' - default['python']['custom_package_name'] = case platform - when 'amazon' - 'python27alt' - else - 'python27' - end + default['python']['custom_package_name'] = 'python27' end case node['python']['install_method'] when 'custom-package' - case platform - when 'amazon' - default['python']['version'] = '2.7.9-1.amzn1.gd' - when 'centos', 'redhat' - default['python']['version'] = if node['platform_version'].to_f >= 7 - '2.7.9-1.el7.centos.gd' - else - '2.7.9-1.el6.gd' - end - end + default['python']['version'] = '2.7.9-1.el7.centos.gd' when 'package' - case platform - when 'centos', 'redhat' - default['python']['version'] = if node['platform_version'].to_f >= 7 - '2.7.5-18.el7_1.1' - else - '2.6.6-64.el6' - end - else - default['python']['version'] = '2.6.6-64.el6' - end + default['python']['version'] = '2.7.5-58.el7' when 'source' default['python']['version'] = '2.7.9' end @@ -72,7 +43,7 @@ default['python']['custom_binary'] = "#{node['python']['prefix_dir']}/bin/python2.7" default['python']['url'] = 'http://www.python.org/ftp/python' default['python']['checksum'] = 'c8bba33e66ac3201dabdc556f0ea7cfe6ac11946ec32d357c4c6f9b018c12c5b' -default['python']['configure_options'] = %W(--prefix=#{python['prefix_dir']}) +default['python']['configure_options'] = %W(--prefix=#{node['python']['prefix_dir']}) default['python']['make_options'] = %w(install) default['python']['pip_location'] = "#{node['python']['prefix_dir']}/bin/pip" diff --git a/chefignore b/chefignore index a6de142..b31977b 100644 --- a/chefignore +++ b/chefignore @@ -51,8 +51,12 @@ spec/* spec/fixtures/* test/* features/* +examples/* Guardfile Procfile +.kitchen* +.rubocop.yml +Jenkinsfile # SCM # ####### @@ -76,8 +80,9 @@ tmp # Cookbooks # ############# -CONTRIBUTING +CONTRIBUTING* CHANGELOG* +TESTING* # Strainer # ############ diff --git a/metadata.rb b/metadata.rb index 93d31c8..b465350 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,23 +1,19 @@ name 'python' -maintainer 'Noah Kantrowitz' -maintainer_email 'noah@coderanger.net' -license 'Apache 2.0' +maintainer 'PAAS' +maintainer_email 'paas-integration@gannett.com' +license ' Copyright (c) 2017 Gannett Co., Inc, All Rights Reserved.' description 'Installs Python, pip and virtualenv. \ Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' -version '1.6.0' +version '2.0.0' +chef_version '>= 12.11.18' depends 'build-essential' depends 'yum-epel' depends 'yum-gd' -depends 'apt' -recipe 'python', 'Installs python, pip, and virtualenv' -recipe 'python::package', 'Installs python using packages.' -recipe 'python::custom-package', 'Installs python using an alternative package.' -recipe 'python::source', 'Installs python from source.' -recipe 'python::pip', 'Installs pip from source.' -recipe 'python::virtualenv', 'Installs virtualenv using the python_pip resource.' +source_url 'https://github.com/GannettDigital/chef-python' +issues_url 'https://github.com/GannettDigital/chef-python/issues' -%w( debian ubuntu centos redhat fedora freebsd smartos ).each do |os| +%w(centos redhat).each do |os| supports os end diff --git a/providers/pip.rb b/providers/pip.rb index 5f38dbc..eef8ccf 100644 --- a/providers/pip.rb +++ b/providers/pip.rb @@ -33,7 +33,7 @@ def whyrun_supported? action :install do # If we specified a version, and it's not the current version, move to the specified version - if !new_resource.version.nil? && new_resource.version != current_resource.version + if !new_resource.version.nil? && new_resource.version != current_resource.version install_version = new_resource.version # If it's not installed at all, install it elsif current_resource.version.nil? @@ -104,7 +104,7 @@ def load_current_resource def current_installed_version @current_installed_version ||= begin out = nil - package_name = new_resource.package_name.gsub('_', '-') + package_name = new_resource.package_name.tr('_', '-') pattern = Regexp.new("^#{Regexp.escape(package_name)} \\(([^)]+)\\)$", true) shell_out("#{which_pip(new_resource)} list").stdout.lines.find do |line| out = pattern.match(line) @@ -125,12 +125,12 @@ def candidate_version def install_package(version) # if a version isn't specified (latest), is a source archive (ex. http://my.package.repo/SomePackage-1.0.4.zip), # or from a VCS (ex. git+https://git.repo/some_pkg.git) then do not append a version as this will break the source link - if version == 'latest' || new_resource.package_name.downcase.start_with?('http:', 'https:') \ - || ['git', 'hg', 'svn'].include?(new_resource.package_name.downcase.split('+')[0]) - version = '' - else - version = "==#{version}" - end + version = if version == 'latest' || new_resource.package_name.downcase.start_with?('http:', 'https:') \ + || ['git', 'hg', 'svn'].include?(new_resource.package_name.downcase.split('+')[0]) + '' + else + "==#{version}" + end pip_cmd('install', version) end diff --git a/providers/virtualenv.rb b/providers/virtualenv.rb index 167c1cc..ec72e3f 100644 --- a/providers/virtualenv.rb +++ b/providers/virtualenv.rb @@ -40,7 +40,6 @@ def whyrun_supported? group new_resource.group if new_resource.group environment('HOME' => ::Dir.home(new_resource.owner)) if new_resource.owner end - new_resource.updated_by_last_action(true) end end diff --git a/recipes/custom-package.rb b/recipes/custom-package.rb index 9f3a921..a4db16e 100644 --- a/recipes/custom-package.rb +++ b/recipes/custom-package.rb @@ -23,15 +23,7 @@ include_recipe 'yum-gd' -python_pkgs = value_for_platform_family( - 'debian' => [node['python']['custom_package_name'], "#{node['python']['custom_package_name']}-dev"], - 'rhel' => [node['python']['custom_package_name'], "#{node['python']['custom_package_name']}-devel"], - 'centos' => [node['python']['custom_package_name'], "#{node['python']['custom_package_name']}-devel"], - 'fedora' => [node['python']['custom_package_name'], "#{node['python']['custom_package_name']}-devel"], - 'freebsd' => [node['python']['custom_package_name']], - 'smartos' => [node['python']['custom_package_name']], - 'default' => [node['python']['custom_package_name'], "#{node['python']['custom_package_name']}-dev"] -) +python_pkgs = [node['python']['custom_package_name'], "#{node['python']['custom_package_name']}-devel"] python_pkgs.each do |pkg| package pkg do diff --git a/recipes/package.rb b/recipes/package.rb index 1a8a4d3..5529e74 100644 --- a/recipes/package.rb +++ b/recipes/package.rb @@ -17,27 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -major_version = node['platform_version'].split('.').first.to_i - -# COOK-1016 Handle RHEL/CentOS namings of python packages, by installing EPEL -# repo & package -if platform_family?('rhel') && major_version < 6 - include_recipe 'yum-epel' - python_pkgs = ['python26', 'python26-devel'] - node.default['python']['binary'] = '/usr/bin/python26' - -else - python_pkgs = value_for_platform_family( - 'debian' => ['python', 'python-dev'], - 'rhel' => ['python', 'python-devel'], - 'centos' => ['python', 'python-devel'], - 'fedora' => ['python', 'python-devel'], - 'freebsd' => ['python'], - 'smartos' => ['python27'], - 'default' => ['python', 'python-dev'] - ) -end +python_pkgs = ['python', 'python-devel'] python_pkgs.each do |pkg| package pkg do diff --git a/recipes/source.rb b/recipes/source.rb index 21d0439..c88b603 100644 --- a/recipes/source.rb +++ b/recipes/source.rb @@ -31,7 +31,7 @@ 'db4-devel', 'sqlite-devel', 'ncurses-devel', - 'readline-devel' + 'readline-devel', ], 'default' => ['libssl-dev', 'libbz2-dev', @@ -43,7 +43,7 @@ 'libncurses5-dev', 'libreadline-dev', 'libsasl2-dev', - 'libgdbm-dev' + 'libgdbm-dev', ] ) # diff --git a/resources/pip.rb b/resources/pip.rb index 1475b3a..4db1032 100644 --- a/resources/pip.rb +++ b/resources/pip.rb @@ -19,13 +19,7 @@ # actions :install, :upgrade, :remove, :purge -default_action :install if defined?(default_action) # Chef > 10.8 - -# Default action for Chef <= 10.8 -def initialize(*args) - super - @action = :install -end +default_action :install if defined?(default_action) attribute :package_name, :kind_of => String, :name_attribute => true attribute :version, :default => nil diff --git a/resources/virtualenv.rb b/resources/virtualenv.rb index e9f7327..9af1eae 100644 --- a/resources/virtualenv.rb +++ b/resources/virtualenv.rb @@ -19,13 +19,7 @@ # actions :create, :delete -default_action :create if defined?(default_action) # Chef > 10.8 - -# Default action for Chef <= 10.8 -def initialize(*args) - super - @action = :create -end +default_action :create if defined?(default_action) attribute :path, :kind_of => String, :name_attribute => true attribute :interpreter, :kind_of => String diff --git a/spec/custom_package_spec.rb b/spec/custom_package_spec.rb deleted file mode 100644 index f55ac03..0000000 --- a/spec/custom_package_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -# encoding: utf-8 -require 'chefspec' -require 'spec_helper' -require 'fauxhai' - -describe 'python::custom-package' do - let(:chef_run) { ChefSpec::SoloRunner.new } - - before do - chef_run.node.set['python']['install_method'] = 'custom-package' - end - - it 'includes yum-gd' do - chef_run.converge(described_recipe) - expect(chef_run).to include_recipe('yum-gd') - end - - it 'installs python27' do - chef_run.converge(described_recipe) - expect(chef_run).to install_package('python27') - end - - it 'installs python-devel' do - chef_run.converge(described_recipe) - expect(chef_run).to install_package('python27-devel') - end - - it 'installs python27alt' do - chef_run.node.set['platform'] = 'amazon' - chef_run.converge(described_recipe) - expect(chef_run).to install_package('python27') - end - - it 'installs pythonalt-devel' do - chef_run.node.set['platform'] = 'amazon' - chef_run.converge(described_recipe) - expect(chef_run).to install_package('python27-devel') - end -end diff --git a/spec/default_spec.rb b/spec/default_spec.rb deleted file mode 100644 index 2789d37..0000000 --- a/spec/default_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -# encoding: utf-8 -require 'chefspec' -require 'spec_helper' -require 'fauxhai' - -describe 'python::default' do - let :chef_run do - ChefSpec::SoloRunner.new(file_cache_path: '/var/chef/cache').converge(described_recipe) - end - - before do - stub_command("/usr/bin/python -c 'import setuptools'").and_return(true) - end - - it 'includes python::custom-package by default' do - chef_run.converge(described_recipe) - expect(chef_run).to include_recipe('python::custom-package') - end - - it 'includes python::pip' do - chef_run.converge(described_recipe) - expect(chef_run).to include_recipe('python::pip') - end - - it 'includes python::virtualenv' do - chef_run.converge(described_recipe) - expect(chef_run).to include_recipe('python::virtualenv') - end -end diff --git a/spec/package_spec.rb b/spec/package_spec.rb deleted file mode 100644 index 904eef2..0000000 --- a/spec/package_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -# encoding: utf-8 -require 'chefspec' -require 'spec_helper' -require 'fauxhai' - -describe 'python::package' do - let :chef_run do - ChefSpec::SoloRunner.converge(described_recipe) - end - - before do - stub_command("/usr/bin/python -c 'import setuptools'").and_return(true) - end - - it 'installs python' do - chef_run.converge(described_recipe) - expect(chef_run).to install_package('python') - end - - it 'installs python-devel' do - chef_run.converge(described_recipe) - expect(chef_run).to install_package('python-devel') - end - -end diff --git a/spec/pip_spec.rb b/spec/pip_spec.rb deleted file mode 100644 index a62e8b6..0000000 --- a/spec/pip_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -# encoding: utf-8 -require 'chefspec' -require 'spec_helper' -require 'fauxhai' - -describe 'python::pip' do - let :chef_run do - ChefSpec::SoloRunner.new(file_cache_path: '/var/chef/cache').converge(described_recipe) - end - - before do - stub_command("/usr/bin/python -c 'import setuptools'").and_return(true) - stub_command("/usr/bin/python get-pip-py").and_return(true) - stub_command("/usr/local/bin/python2.7 get-pip-py").and_return(true) - end - - it 'creates get-pip.py in the Chef file_cache_path with mode 644' do - chef_run.converge(described_recipe) - expect(chef_run).to create_cookbook_file(File.join(Chef::Config[:file_cache_path], 'get-pip.py')).with( - :mode => '0644' - ) - end - - it 'executes get-pip.py to install pip' do - chef_run.converge(described_recipe) - node_python_attributes = chef_run.node['python'] - expect(chef_run).to run_execute("install-pip") - # expect(chef_run).to run_execute("#{node_python_attributes['binary']} get-pip.py") - end - - it 'installs setuptools' do - chef_run.converge(described_recipe) - expect(chef_run).to upgrade_python_pip('setuptools') - end - -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5596b68..21c8e0e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1,6 @@ -require 'coveralls' require 'chefspec' require 'chefspec/berkshelf' require 'support/matchers' -require 'webmock/rspec' - -WebMock.allow_net_connect! RSpec.configure do |config| # run all specs when using a filter, but no spec match diff --git a/spec/unit/recipes/custom_package_spec.rb b/spec/unit/recipes/custom_package_spec.rb new file mode 100644 index 0000000..20c2bd5 --- /dev/null +++ b/spec/unit/recipes/custom_package_spec.rb @@ -0,0 +1,26 @@ +# encoding: utf-8 +require 'chefspec' +require 'spec_helper' +require 'fauxhai' + +describe 'python::custom-package' do + context 'When all attributes are default, on CentOS 7.4' do + let(:chef_run) do + ChefSpec::SoloRunner.new(platform: 'centos', version: '7.4.1708') do |node| + node.set['python']['install_method'] = 'custom-package' + end.converge(described_recipe) + end + + it 'includes yum-gd' do + expect(chef_run).to include_recipe('yum-gd') + end + + it 'installs python27' do + expect(chef_run).to install_package('python27') + end + + it 'installs python-devel' do + expect(chef_run).to install_package('python27-devel') + end + end +end diff --git a/spec/unit/recipes/default_spec.rb b/spec/unit/recipes/default_spec.rb new file mode 100644 index 0000000..156708f --- /dev/null +++ b/spec/unit/recipes/default_spec.rb @@ -0,0 +1,26 @@ +# encoding: utf-8 +require 'chefspec' +require 'spec_helper' +require 'fauxhai' + +describe 'python::default' do + context 'When all attributes are default, on CentOS 7.4' do + let(:chef_run) do + ChefSpec::SoloRunner.new(platform: 'centos', version: '7.4.1708') do |node| + stub_command("/usr/bin/python -c 'import setuptools'").and_return(true) + end.converge(described_recipe) + end + + it 'includes python::custom-package by default' do + expect(chef_run).to include_recipe('python::custom-package') + end + + it 'includes python::pip' do + expect(chef_run).to include_recipe('python::pip') + end + + it 'includes python::virtualenv' do + expect(chef_run).to include_recipe('python::virtualenv') + end + end +end diff --git a/spec/unit/recipes/package_spec.rb b/spec/unit/recipes/package_spec.rb new file mode 100644 index 0000000..90dfe82 --- /dev/null +++ b/spec/unit/recipes/package_spec.rb @@ -0,0 +1,22 @@ +# encoding: utf-8 +require 'chefspec' +require 'spec_helper' +require 'fauxhai' + +describe 'python::package' do + context 'When all attributes are default, on CentOS 7.4' do + let(:chef_run) do + ChefSpec::SoloRunner.new(platform: 'centos', version: '7.4.1708') do |node| + stub_command("/usr/bin/python -c 'import setuptools'").and_return(true) + end.converge(described_recipe) + end + + it 'installs python' do + expect(chef_run).to install_package('python') + end + + it 'installs python-devel' do + expect(chef_run).to install_package('python-devel') + end + end +end diff --git a/spec/unit/recipes/pip_spec.rb b/spec/unit/recipes/pip_spec.rb new file mode 100644 index 0000000..e5de095 --- /dev/null +++ b/spec/unit/recipes/pip_spec.rb @@ -0,0 +1,35 @@ +# encoding: utf-8 +require 'chefspec' +require 'spec_helper' +require 'fauxhai' + +describe 'python::pip' do + context 'When all attributes are default, on CentOS 7.4' do + let(:chef_run) do + ChefSpec::SoloRunner.new(platform: 'centos', version: '7.4.1708') do |node| + stub_command("/usr/bin/python -c 'import setuptools'").and_return(true) + stub_command("/usr/bin/python get-pip-py").and_return(true) + stub_command("/usr/local/bin/python2.7 get-pip-py").and_return(true) + Chef::Config[:file_cache_path] = '/var/chef/cache' + end.converge(described_recipe) + end + + it 'creates get-pip.py in the Chef file_cache_path with mode 644' do + expect(chef_run).to create_cookbook_file(File.join(Chef::Config[:file_cache_path], 'get-pip.py')).with( + :mode => '0644' + ) + end + + it 'executes get-pip.py to install pip' do + expect(chef_run).to run_execute("install-pip") + end + + it 'installs setuptools' do + expect(chef_run).to upgrade_python_pip('setuptools') + end + end +end + + + + diff --git a/spec/unit/recipes/virtualenv_spec.rb b/spec/unit/recipes/virtualenv_spec.rb new file mode 100644 index 0000000..5d2336a --- /dev/null +++ b/spec/unit/recipes/virtualenv_spec.rb @@ -0,0 +1,24 @@ +# encoding: utf-8 +require 'chefspec' +require 'spec_helper' +require 'fauxhai' + +describe 'python::virtualenv' do + context 'When all attributes are default, on CentOS 7.4' do + let(:chef_run) do + ChefSpec::SoloRunner.new(platform: 'centos', version: '7.4.1708') do |node| + stub_command("/usr/bin/python -c 'import setuptools'").and_return(true) + stub_command("/usr/bin/python get-pip-py").and_return(true) + stub_command("/usr/local/bin/python2.7 get-pip-py").and_return(true) + end.converge(described_recipe) + end + + it 'includes python::pip' do + expect(chef_run).to include_recipe('python::pip') + end + + it 'installs virtualenv' do + expect(chef_run).to upgrade_python_pip('virtualenv') + end + end +end diff --git a/spec/virtualenv_spec.rb b/spec/virtualenv_spec.rb deleted file mode 100644 index 8fa692e..0000000 --- a/spec/virtualenv_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -# encoding: utf-8 -require 'chefspec' -require 'spec_helper' -require 'fauxhai' - -describe 'python::virtualenv' do - let :chef_run do - ChefSpec::SoloRunner.new(file_cache_path: '/var/chef/cache').converge(described_recipe) - end - - before do - stub_command("/usr/bin/python -c 'import setuptools'").and_return(true) - stub_command("/usr/bin/python get-pip-py").and_return(true) - stub_command("/usr/local/bin/python2.7 get-pip-py").and_return(true) - end - - it 'includes python::pip' do - chef_run.converge(described_recipe) - expect(chef_run).to include_recipe('python::pip') - end - - it 'installs virtualenv' do - chef_run.converge(described_recipe) - expect(chef_run).to upgrade_python_pip('virtualenv') - end - -end diff --git a/test/integration/default/serverspec/custom-package_spec.rb b/test/integration/default/serverspec/custom-package_spec.rb index 086c21d..5ccdba1 100644 --- a/test/integration/default/serverspec/custom-package_spec.rb +++ b/test/integration/default/serverspec/custom-package_spec.rb @@ -1,26 +1,10 @@ require_relative 'spec_helper' #Should include yum-gd recipe -describe file('/etc/yum.repos.d/datadog.repo') do - it { should be_file } -end - describe file('/etc/yum.repos.d/gdcustom.repo') do it { should be_file } end -describe file('/etc/yum.repos.d/opsmatic.repo') do - it { should be_file } -end - -describe file('/etc/yum.repos.d/s3tools.repo') do - it { should be_file } -end - -describe file('/etc/yum.repos.d/scalr.repo') do - it { should be_file } -end - #Should install dependant packages describe package('python27') do it { should be_installed } diff --git a/test/integration/helpers/serverspec/helpers.rb b/test/integration/helpers/serverspec/helpers.rb new file mode 100644 index 0000000..9a8762b --- /dev/null +++ b/test/integration/helpers/serverspec/helpers.rb @@ -0,0 +1,28 @@ +# helpers +def redhat? + os[:family] == 'redhat' +end + +def windows? + os[:family] == 'windows' +end + +def release?(test_version) + os[:release] == test_version +end + +def debian? + %w(debian).include?(os[:family]) +end + +def ubuntu? + %w(ubuntu).include?(os[:family]) +end + +def firewalld? + redhat? && os[:release].to_f >= 7.0 +end + +def iptables? + redhat? && os[:release].to_f < 7.0 +end diff --git a/test/integration/helpers/serverspec/spec_helper.rb b/test/integration/helpers/serverspec/spec_helper.rb new file mode 100644 index 0000000..ce128c2 --- /dev/null +++ b/test/integration/helpers/serverspec/spec_helper.rb @@ -0,0 +1,16 @@ +require 'serverspec' +require 'helpers' +require 'pathname' +require 'json' + +if ENV['OS'] == 'Windows_NT' + set :backend, :cmd + # On Windows, set the target host's OS explicitly + set :os, :family => 'windows' + $node = ::JSON.parse(File.read('c:\windows\temp\serverspec\node.json')) +else + set :backend, :exec + $node = ::JSON.parse(File.read('/tmp/serverspec/node.json')) +end + +set :path, '/sbin:/usr/local/sbin:/usr/sbin:$PATH' unless os[:family] == 'windows' diff --git a/test/integration/package/serverspec/pip_spec.rb b/test/integration/package/serverspec/pip_spec.rb index ba21cc2..e14a55e 100644 --- a/test/integration/package/serverspec/pip_spec.rb +++ b/test/integration/package/serverspec/pip_spec.rb @@ -1,12 +1,6 @@ require_relative 'spec_helper' -if ['rhel', 'fedora', 'redhat'].include?(os[:family]) - pip_binary = '/usr/bin/pip' -elsif os[:family] == 'smartos' - pip_binary = '/opt/local/bin/pip' -else - pip_binary = '/usr/local/bin/pip' -end +pip_binary = '/usr/bin/pip' describe file("#{pip_binary}") do it { should be_file } @@ -15,7 +9,6 @@ describe command("#{pip_binary} show setuptools") do its(:stdout) { should contain('Name: setuptools') } - its(:stdout) { should contain('Version: 18.0.1') } end describe command("#{pip_binary} show pip") do diff --git a/test/integration/package/serverspec/virtualenv_spec.rb b/test/integration/package/serverspec/virtualenv_spec.rb index bc7a027..c9f8292 100644 --- a/test/integration/package/serverspec/virtualenv_spec.rb +++ b/test/integration/package/serverspec/virtualenv_spec.rb @@ -1,14 +1,7 @@ require_relative 'spec_helper' -if ['rhel', 'fedora', 'redhat'].include?(os[:family]) - pip_binary = '/usr/bin/pip' -elsif os[:family] == 'smartos' - pip_binary = '/opt/local/bin/pip' -else - pip_binary = '/usr/local/bin/pip' -end +pip_binary = '/usr/bin/pip' describe command("#{pip_binary} show virtualenv") do its(:stdout) { should contain('Name: virtualenv') } - its(:stdout) { should contain('Version: 13.1.0') } end \ No newline at end of file From 5293280794d10be747524a023f85662e79a95872 Mon Sep 17 00:00:00 2001 From: Franklin Hanson Date: Tue, 5 Dec 2017 17:04:38 -0500 Subject: [PATCH 02/17] PAAS-10840 remove db4 devel dep --- test/integration/source/serverspec/source_spec.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/integration/source/serverspec/source_spec.rb b/test/integration/source/serverspec/source_spec.rb index de192a8..8711bef 100644 --- a/test/integration/source/serverspec/source_spec.rb +++ b/test/integration/source/serverspec/source_spec.rb @@ -17,10 +17,6 @@ it { should be_installed } end - describe package('db4-devel') do - it { should be_installed } - end - describe package('sqlite-devel') do it { should be_installed } end From 7cb261fa9c3ac8c825008c0c0f8a33b5939c51b4 Mon Sep 17 00:00:00 2001 From: Franklin Hanson Date: Tue, 5 Dec 2017 17:13:59 -0500 Subject: [PATCH 03/17] ignoring FC085 for now --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0d4d9db..ebfbb06 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,7 +23,7 @@ node('chef13') { } stage 'GD foodcritic' // Run our foodcritic tests - sh 'foodcritic -f "any" -t "~FC071" -t "~FC078" -t "~FC104" -X "spec/**/*" -X "test/**/*" -I $FC_RULES_LOCATION .' + sh 'foodcritic -f "any" -t "~FC071" -t "~FC078" -t "~FC085" -t "~FC104" -X "spec/**/*" -X "test/**/*" -I $FC_RULES_LOCATION .' stage 'EC2 integration tests' // this is the "chef exec bundle exec rake ec2 job" sh 'chef exec bundle install && chef exec bundle exec rake ec2' From b315b75e58bc3c0ec74cffbd52e937bef9f8693c Mon Sep 17 00:00:00 2001 From: Dane Thorsen Date: Mon, 19 Mar 2018 15:06:59 -0500 Subject: [PATCH 04/17] PENG-1428 - Update provider to work with chef13 --- .gitignore | 15 +- .kitchen.ec2.yml | 10 + .kitchen.gce.yml | 79 +++++ .kitchen.yml | 10 + CHANGELOG.md | 5 + Gemfile | 3 - Gemfile.lock | 898 +++++++++++++++++++++++++++++++++++++++++++++++ Jenkinsfile | 4 +- Rakefile | 7 +- metadata.rb | 2 +- providers/pip.rb | 2 +- 11 files changed, 1022 insertions(+), 13 deletions(-) create mode 100644 .kitchen.gce.yml create mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index 285ea1e..f617a5e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,24 @@ .vagrant +Berksfile.lock *~ *# .#* \#*# .*.sw[a-z] *.un~ -/cookbooks -*.DS_Store +*.iso +*.pem # Bundler bin/* .bundle/* + .kitchen/ .kitchen.local.yml -Berksfile.lock -Gemfile.lock -coverage/ +# OS +.DS_Store +Icon? +nohup.out +ehthumbs.db +Thumbs.db diff --git a/.kitchen.ec2.yml b/.kitchen.ec2.yml index 0de5520..2a14d75 100644 --- a/.kitchen.ec2.yml +++ b/.kitchen.ec2.yml @@ -39,6 +39,16 @@ suites: python: setuptools_version: 18.0.1 virtualenv_version: 13.1.0 +- name: chef13-default + provisioner: + require_chef_omnibus: 13.8.5 + run_list: + - recipe[yum-gd] + - recipe[python] + attributes: + python: + setuptools_version: 18.0.1 + virtualenv_version: 13.1.0 - name: package run_list: - recipe[yum-gd] diff --git a/.kitchen.gce.yml b/.kitchen.gce.yml new file mode 100644 index 0000000..5cedff0 --- /dev/null +++ b/.kitchen.gce.yml @@ -0,0 +1,79 @@ +--- +driver: + name: gce + preemptible: true + project: <%= ENV['GCE_PROJECT'] %> + zone: <%= ENV['GCE_ZONE'] %> + subnet_project: <%= ENV['GCE_SUBNET_PROJECT'] %> + subnet: <%= ENV['GCE_SUBNET'] %> + service_account_name: <%= ENV['GCE_SERVICE_ACCOUNT_NAME'] %> + service_account_scopes: <%= ENV['GCE_SERVICE_ACCOUNT_SCOPES'] %> + use_private_ip: true + image_project: <%= ENV['GCE_IMAGE_PROJECT'] %> + require_chef_omnibus: true + refresh_rate: 2 + wait_time: 120 + tags: [office-ssh, tools-ssh, private] + metadata: + ssh-keys: <%= ENV['GCE_SSH_KEY_META'] %> + +provisioner: + name: chef_zero + log_level: <%= ENV['CHEF_LOG_LEVEL'] || 'auto' %> + +transport: + username: <%= ENV['GCE_USER'] %> + ssh_key: <%= ENV['GCE_SSH_KEY'] %> + +platforms: + - name: gci-centos7 + driver: + image_name: <%= ENV['GCE_GCI_CENTOS7_IMAGE'] %> + machine_type: <%= ENV['GCE_MACHINE_TYPE'] %> + +suites: +- name: default + run_list: + - recipe[yum-gd] + - recipe[python] + attributes: + python: + setuptools_version: 18.0.1 + virtualenv_version: 13.1.0 +- name: chef13-default + provisioner: + require_chef_omnibus: 13.8.5 + run_list: + - recipe[yum-gd] + - recipe[python] + attributes: + python: + setuptools_version: 18.0.1 + virtualenv_version: 13.1.0 +- name: package + run_list: + - recipe[yum-gd] + - recipe[python] + attributes: + python: + install_method: "package" + setuptools_version: 18.0.1 + virtualenv_version: 13.1.0 +- name: custom-package + run_list: + - recipe[yum-gd] + - recipe[python] + attributes: + python: + install_method: "custom-package" + setuptools_version: 18.0.1 + virtualenv_version: 13.1.0 +- name: source + run_list: + - recipe[yum-gd] + - recipe[python] + attributes: + python: + install_method: "source" + setuptools_version: 18.0.1 + virtualenv_version: 13.1.0 diff --git a/.kitchen.yml b/.kitchen.yml index 8f230af..4167bd0 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -19,6 +19,16 @@ suites: python: setuptools_version: 18.0.1 virtualenv_version: 13.1.0 +- name: chef13-default + provisioner: + require_chef_omnibus: 13.8.5 + run_list: + - recipe[yum-gd] + - recipe[python] + attributes: + python: + setuptools_version: 18.0.1 + virtualenv_version: 13.1.0 - name: package run_list: - recipe[yum-gd] diff --git a/CHANGELOG.md b/CHANGELOG.md index f2307f8..9197023 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ python Cookbook CHANGELOG ========================= This file is used to list changes made in each version of the python cookbook. +v2.0.1 +------ +- Dane Thorsen - Updated to work with chef 13 ResourceResolver (PENG-1428) +- Dane Thorsen - Add Google Cloud testing (PENG-1428) + v2.0.0 ------ - Franklin Hanson - updated cookbook for chef client 13 and deprecate OS that we no longer support on platform (PAAS-10840) diff --git a/Gemfile b/Gemfile index 9d1e073..3a6aee9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,5 @@ source 'https://rubygems.org' -# custom gems and versions -gem 'chef-handler-profiler', '= 0.0.2' - # chef-dk version: 2.4.15 # https://github.com/chef/chef-dk/blob/e989052399f5ef82b0f6be024b345b528c681d1e/Gemfile.lock gem 'activesupport', '= 5.1.4' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..3f436f1 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,898 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (5.1.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (~> 0.7) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + app_conf (0.4.2) + appbundler (0.10.0) + mixlib-cli (~> 1.4) + mixlib-shellout (~> 2.0) + artifactory (2.8.2) + ast (2.3.0) + aws-sdk (2.10.86) + aws-sdk-resources (= 2.10.86) + aws-sdk-core (2.10.86) + aws-sigv4 (~> 1.0) + jmespath (~> 1.0) + aws-sdk-resources (2.10.86) + aws-sdk-core (= 2.10.86) + aws-sigv4 (1.0.2) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) + backports (3.10.3) + berkshelf (6.3.1) + buff-config (~> 2.0) + buff-extensions (~> 2.0) + chef (>= 12.7.2) + 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) + binding_of_caller (0.7.3) + debug_inspector (>= 0.0.1) + 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) + byebug (9.1.0) + celluloid (0.16.0) + timers (~> 4.0.0) + celluloid-io (0.16.2) + celluloid (>= 0.16.0) + nio4r (>= 1.1.0) + chef (13.6.4) + addressable + bundler (>= 1.10) + chef-config (= 13.6.4) + chef-zero (>= 13.0) + diff-lcs (~> 1.2, >= 1.2.4) + erubis (~> 2.7) + ffi-yajl (~> 2.2) + highline (~> 1.6, >= 1.6.9) + iniparse (~> 1.4) + iso8601 (~> 0.9.1) + mixlib-archive (~> 0.4) + mixlib-authentication (~> 1.4) + mixlib-cli (~> 1.7) + mixlib-log (~> 1.3) + mixlib-shellout (~> 2.0) + net-sftp (~> 2.1, >= 2.1.2) + net-ssh (>= 2.9, < 5.0) + net-ssh-multi (~> 1.2, >= 1.2.1) + ohai (~> 13.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-api (0.7.1) + logify (~> 0.1) + mime-types + chef-config (13.6.4) + addressable + fuzzyurl + mixlib-config (~> 2.0) + mixlib-shellout (~> 2.0) + chef-dk (2.4.15) + addressable (>= 2.3.5, < 2.6) + chef (~> 13.0) + chef-provisioning (~> 2.0) + cookbook-omnifetch (~> 0.5) + diff-lcs (~> 1.0) + ffi-yajl (>= 1.0, < 3.0) + minitar (~> 0.5.4) + mixlib-cli (~> 1.7) + mixlib-shellout (~> 2.0) + paint (~> 1.0) + solve (> 2.0, < 5.0) + chef-provisioning (2.6.0) + cheffish (>= 4.0, < 14.0) + inifile (>= 2.0.2) + mixlib-install (>= 1.0) + net-scp (~> 1.0) + net-ssh (>= 2.9, < 5.0) + net-ssh-gateway (> 1.2, < 3.0) + winrm (~> 2.0) + winrm-elevated (~> 1.0) + winrm-fs (~> 1.0) + chef-provisioning-aws (3.0.0) + aws-sdk (>= 2.2.18, < 3.0) + chef-provisioning (>= 1.0, < 3.0) + retryable (~> 2.0, >= 2.0.1) + ubuntu_ami (~> 0.4, >= 0.4.1) + chef-provisioning-azure (0.6.0) + chef-provisioning (>= 1.0, < 3.0) + stuartpreston-azure-sdk-for-ruby (~> 0.7) + chef-provisioning-fog (0.26.0) + chef-provisioning (>= 1.0, < 3.0) + cheffish (>= 13.1.0, < 14.0) + fog-digitalocean + fog-joyent + fog-openstack + fog-rackspace + fog-scaleway + fog-softlayer + fog-xenserver + retryable + winrm-elevated + chef-sugar (3.6.0) + chef-vault (3.3.0) + chef-zero (13.1.0) + ffi-yajl (~> 2.2) + hashie (>= 2.0, < 4.0) + mixlib-log (~> 1.3) + rack (~> 2.0) + uuidtools (~> 2.1) + cheffish (13.1.0) + chef-zero (~> 13.0) + net-ssh + chefspec (7.1.0) + chef (>= 12.14.89) + fauxhai (>= 4, < 6) + rspec (~> 3.0) + chefstyle (0.6.0) + rubocop (= 0.49.1) + cleanroom (1.0.0) + coderay (1.1.2) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + concurrent-ruby (1.0.5) + cookbook-omnifetch (0.8.0) + mixlib-archive (~> 0.4) + cookstyle (2.1.0) + rubocop (= 0.49.1) + cucumber (3.0.2) + builder (>= 2.1.2) + cucumber-core (~> 3.0.0) + cucumber-expressions (~> 4.0.3) + cucumber-wire (~> 0.0.1) + diff-lcs (~> 1.3) + gherkin (~> 4.0) + multi_json (>= 1.7.5, < 2.0) + multi_test (>= 0.1.2) + cucumber-core (3.0.0) + backports (>= 3.8.0) + cucumber-tag_expressions (>= 1.0.1) + gherkin (>= 4.1.3) + cucumber-expressions (4.0.4) + cucumber-tag_expressions (1.0.1) + cucumber-wire (0.0.1) + dco (1.0.1) + git (~> 1.3) + thor (~> 0.19) + debug_inspector (0.0.3) + dep-selector-libgecode (1.3.1) + dep_selector (1.0.6) + dep-selector-libgecode (~> 1.0) + ffi (~> 1.9) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) + diff-lcs (1.3) + diffy (3.2.0) + docker-api (1.34.0) + excon (>= 0.47.0) + multi_json + droplet_kit (2.2.1) + activesupport (> 3.0, < 6) + faraday (~> 0.9) + kartograph (~> 0.2.3) + resource_kit (~> 0.1.5) + virtus (~> 1.0.3) + equalizer (0.0.11) + erubis (2.7.0) + excon (0.59.0) + faraday (0.13.1) + multipart-post (>= 1.2, < 3) + fauxhai (5.5.0) + net-ssh + ffi (1.9.18) + ffi-rzmq (2.0.5) + ffi-rzmq-core (>= 1.0.6) + ffi-rzmq-core (1.0.6) + ffi + ffi-yajl (2.3.1) + libyajl2 (~> 1.2) + fog-aws (1.4.1) + fog-core (~> 1.38) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-core (1.45.0) + builder + excon (~> 0.58) + formatador (~> 0.2) + fog-digitalocean (0.3.0) + fog-core (~> 1.42) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.5) + fog-joyent (0.0.1) + fog-core (~> 1.42) + fog-json (>= 1.0) + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-openstack (0.1.22) + fog-core (>= 1.40) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-rackspace (0.1.5) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-scaleway (0.3.0) + fog-core (~> 1.42) + fog-json (~> 1.0) + fog-softlayer (1.1.4) + fog-core + fog-json + fog-xenserver (0.3.0) + fog-core + fog-xml + fog-xml (0.1.3) + fog-core + nokogiri (>= 1.5.11, < 2.0.0) + foodcritic (12.2.1) + cucumber-core (>= 1.3) + erubis + ffi-yajl (~> 2.0) + nokogiri (>= 1.5, < 2.0) + rake + rufus-lru (~> 1.0) + treetop (~> 1.4) + formatador (0.2.5) + fuzzyurl (0.9.0) + gcewinpass (1.0.0) + google-api-client (~> 0.9.0) + gherkin (4.1.3) + git (1.3.0) + google-api-client (0.9.28) + addressable (~> 2.3) + googleauth (~> 0.5) + httpclient (~> 2.7) + hurley (~> 0.1) + memoist (~> 0.11) + mime-types (>= 1.6) + representable (~> 2.3.0) + retriable (~> 2.0) + googleauth (0.6.2) + faraday (~> 0.12) + jwt (>= 1.4, < 3.0) + logging (~> 2.0) + memoist (~> 0.12) + multi_json (~> 1.11) + os (~> 0.9) + signet (~> 0.7) + gssapi (1.2.0) + ffi (>= 1.0.1) + guard (2.14.1) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.9.12) + shellany (~> 0.0) + thor (>= 0.18.1) + gyoku (1.3.1) + builder (>= 2.1.2) + hashie (3.5.6) + highline (1.7.8) + hitimes (1.2.6) + htmlentities (4.3.4) + httpclient (2.8.3) + hurley (0.2) + i18n (0.9.1) + concurrent-ruby (~> 1.0) + ice_nine (0.11.2) + inifile (3.0.0) + iniparse (1.4.4) + inspec (1.45.9) + 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) + rainbow (~> 2) + rspec (~> 3) + rspec-its (~> 1.2) + rubyzip (~> 1.1) + semverse + sslshake (~> 1.2) + thor (~> 0.19) + tomlrb (~> 1.2) + train (~> 0.29, >= 0.29.1) + ipaddress (0.8.3) + iso8601 (0.9.1) + jmespath (1.3.1) + json (1.8.6) + jwt (2.1.0) + kartograph (0.2.4) + kitchen-digitalocean (0.9.8) + droplet_kit (~> 2.2) + test-kitchen (~> 1.17) + kitchen-dokken (2.6.5) + docker-api (~> 1.33) + lockfile (~> 2.1) + test-kitchen (~> 1.15) + kitchen-ec2 (1.3.2) + aws-sdk (~> 2) + excon + multi_json + retryable (~> 2.0) + test-kitchen (~> 1.4, >= 1.4.1) + kitchen-google (1.4.0) + gcewinpass (~> 1.0) + google-api-client (~> 0.9.0) + test-kitchen + kitchen-hyperv (0.5.1) + test-kitchen (~> 1.4) + kitchen-inspec (0.20.0) + hashie (~> 3.4) + inspec (>= 0.34.0, < 2.0.0) + test-kitchen (~> 1.6) + kitchen-vagrant (1.2.1) + test-kitchen (~> 1.4) + knife-cloud (1.2.1) + chef (>= 0.10.10) + knife-windows (>= 0.5.14) + mixlib-shellout + knife-ec2 (0.16.0) + fog-aws (~> 1.0) + knife-windows (~> 1.0) + mime-types + knife-google (3.2.0) + chef (>= 12.0) + gcewinpass (~> 1.0) + google-api-client (~> 0.9.0) + knife-cloud (~> 1.2.0) + knife-opc (0.3.2) + knife-push (1.0.3) + chef (>= 12.7.2) + knife-spork (1.7.1) + app_conf (>= 0.4.0) + chef (>= 11.0.0) + diffy (>= 3.0.1) + git (>= 1.2.5) + knife-windows (1.9.0) + winrm (~> 2.1) + winrm-elevated (~> 1.0) + libyajl2 (1.2.0) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + little-plugger (1.1.4) + lockfile (2.1.3) + logging (2.2.2) + little-plugger (~> 1.1) + multi_json (~> 1.10) + logify (0.2.0) + lumberjack (1.0.12) + macaddr (1.7.1) + systemu (~> 2.6.2) + memoist (0.16.0) + method_source (0.9.0) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_portile2 (2.3.0) + minitar (0.5.4) + minitest (5.10.3) + mixlib-archive (0.4.1) + mixlib-log + mixlib-authentication (1.4.2) + mixlib-cli (1.7.0) + mixlib-config (2.2.4) + mixlib-install (3.8.0) + mixlib-shellout + mixlib-versioning + thor + mixlib-log (1.7.1) + mixlib-shellout (2.3.2) + mixlib-versioning (1.2.2) + molinillo (0.6.4) + multi_json (1.12.2) + multi_test (0.1.2) + multipart-post (2.0.0) + nenv (0.3.0) + net-scp (1.2.1) + net-ssh (>= 2.6.5) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) + net-ssh (4.1.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.1.1) + nio4r (2.1.0) + nokogiri (1.8.1) + mini_portile2 (~> 2.3.0) + nori (2.6.0) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) + octokit (4.7.0) + sawyer (~> 0.8.0, >= 0.5.3) + ohai (13.6.0) + 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) + opscode-pushy-client (2.3.0) + chef (>= 12.19, < 14.0) + ffi-rzmq + ohai (>= 8.23, < 14.0) + uuidtools + os (0.9.6) + paint (1.0.1) + parallel (1.12.0) + parser (2.4.0.2) + ast (~> 2.3) + parslet (1.8.1) + plist (3.3.0) + polyglot (0.3.5) + powerpack (0.1.1) + proxifier (1.0.3) + pry (0.11.3) + coderay (~> 1.1.0) + method_source (~> 0.9.0) + pry-byebug (3.5.0) + byebug (~> 9.1) + pry (~> 0.10) + pry-remote (0.1.8) + pry (~> 0.9) + slop (~> 3.0) + pry-stack_explorer (0.4.9.2) + binding_of_caller (>= 0.7) + pry (>= 0.9.11) + public_suffix (3.0.1) + rack (2.0.3) + rainbow (2.2.2) + rake + rake (12.3.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rb-readline (0.5.5) + rdoc (5.1.0) + representable (2.3.0) + uber (~> 0.0.7) + resource_kit (0.1.7) + addressable (>= 2.3.6, < 3.0.0) + retriable (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.7.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-core (3.7.0) + rspec-support (~> 3.7.0) + rspec-expectations (3.7.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.7.0) + rspec-its (1.2.0) + rspec-core (>= 3.0.0) + rspec-expectations (>= 3.0.0) + rspec-mocks (3.7.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.7.0) + rspec-support (3.7.0) + rspec_junit_formatter (0.2.3) + builder (< 4) + rspec-core (>= 2, < 4, != 2.12.0) + rubocop (0.49.1) + parallel (~> 1.10) + parser (>= 2.3.3.1, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + ruby-prof (0.16.2) + ruby-progressbar (1.9.0) + ruby-shadow (2.5.0) + ruby_dep (1.5.0) + rubyntlm (0.6.2) + rubyzip (1.2.1) + rufus-lru (1.1.0) + 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) + shellany (0.0.1) + signet (0.8.1) + addressable (~> 2.3) + faraday (~> 0.9) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + slop (3.6.0) + solve (4.0.0) + molinillo (~> 0.6) + semverse (>= 1.1, < 3.0) + specinfra (2.72.1) + net-scp + net-ssh (>= 2.7, < 5.0) + net-telnet + sfl + sslshake (1.2.0) + stove (6.0.0) + chef-api (~> 0.5) + logify (~> 0.2) + stuartpreston-azure-sdk-for-ruby (0.7.2) + json (~> 1.8) + mime-types (> 1, < 4) + nokogiri (~> 1.5) + systemu (~> 2.6) + uuid (~> 2.0) + syslog-logger (1.6.8) + systemu (2.6.5) + test-kitchen (1.19.1) + mixlib-install (~> 3.6) + 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) + winrm (~> 2.0) + winrm-elevated (~> 1.0) + winrm-fs (~> 1.0.2) + thor (0.19.1) + thread_safe (0.3.6) + timers (4.0.4) + hitimes + tomlrb (1.2.6) + train (0.29.1) + 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) + treetop (1.6.8) + polyglot (~> 0.3) + tzinfo (1.2.4) + thread_safe (~> 0.1) + uber (0.0.15) + ubuntu_ami (0.4.1) + unicode-display_width (1.3.0) + uuid (2.3.8) + macaddr (~> 1.0) + uuidtools (2.1.5) + varia_model (0.6.0) + buff-extensions (~> 2.0) + hashie (>= 2.0.2, < 4.0.0) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) + 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.0.2) + erubis (~> 2.7) + logging (>= 1.6.1, < 3.0) + rubyzip (~> 1.1) + winrm (~> 2.0) + wmi-lite (1.0.0) + yard (0.9.10) + +PLATFORMS + ruby + +DEPENDENCIES + activesupport (= 5.1.4) + addressable (= 2.5.2) + app_conf (= 0.4.2) + appbundler (= 0.10.0) + artifactory (= 2.8.2) + ast (= 2.3.0) + aws-sdk (= 2.10.86) + aws-sdk-core (= 2.10.86) + aws-sdk-resources (= 2.10.86) + aws-sigv4 (= 1.0.2) + axiom-types (= 0.1.1) + backports (= 3.10.3) + berkshelf (= 6.3.1) + binding_of_caller (= 0.7.3) + buff-config (= 2.0.0) + buff-extensions (= 2.0.0) + buff-ignore (= 1.2.0) + buff-ruby_engine (= 1.0.0) + buff-shell_out (= 1.1.0) + builder (= 3.2.3) + byebug (= 9.1.0) + celluloid (= 0.16.0) + celluloid-io (= 0.16.2) + chef (= 13.6.4) + chef-api (= 0.7.1) + chef-config (= 13.6.4) + chef-dk (= 2.4.15) + chef-provisioning (= 2.6.0) + chef-provisioning-aws (= 3.0.0) + chef-provisioning-azure (= 0.6.0) + chef-provisioning-fog (= 0.26.0) + chef-sugar (= 3.6.0) + chef-vault (= 3.3.0) + chef-zero (= 13.1.0) + cheffish (= 13.1.0) + chefspec (= 7.1.0) + chefstyle (= 0.6.0) + cleanroom (= 1.0.0) + coderay (= 1.1.2) + coercible (= 1.0.0) + concurrent-ruby (= 1.0.5) + cookbook-omnifetch (= 0.8.0) + cookstyle (= 2.1.0) + cucumber (= 3.0.2) + cucumber-core (= 3.0.0) + cucumber-expressions (= 4.0.4) + cucumber-tag_expressions (= 1.0.1) + cucumber-wire (= 0.0.1) + dco (= 1.0.1) + debug_inspector (= 0.0.3) + dep-selector-libgecode (= 1.3.1) + dep_selector (= 1.0.6) + descendants_tracker (= 0.0.4) + diff-lcs (= 1.3) + diffy (= 3.2.0) + docker-api (= 1.34.0) + droplet_kit (= 2.2.1) + equalizer (= 0.0.11) + erubis (= 2.7.0) + excon (= 0.59.0) + faraday (= 0.13.1) + fauxhai (= 5.5.0) + ffi (= 1.9.18) + ffi-rzmq (= 2.0.5) + ffi-rzmq-core (= 1.0.6) + ffi-yajl (= 2.3.1) + fog-aws (= 1.4.1) + fog-core (= 1.45.0) + fog-digitalocean (= 0.3.0) + fog-joyent (= 0.0.1) + fog-json (= 1.0.2) + fog-openstack (= 0.1.22) + fog-rackspace (= 0.1.5) + fog-scaleway (= 0.3.0) + fog-softlayer (= 1.1.4) + fog-xenserver (= 0.3.0) + fog-xml (= 0.1.3) + foodcritic (= 12.2.1) + formatador (= 0.2.5) + fuzzyurl (= 0.9.0) + gcewinpass (= 1.0.0) + gherkin (= 4.1.3) + git (= 1.3.0) + google-api-client (= 0.9.28) + googleauth (= 0.6.2) + gssapi (= 1.2.0) + guard (= 2.14.1) + gyoku (= 1.3.1) + hashie (= 3.5.6) + highline (= 1.7.8) + hitimes (= 1.2.6) + htmlentities (= 4.3.4) + httpclient (= 2.8.3) + hurley (= 0.2) + i18n (= 0.9.1) + ice_nine (= 0.11.2) + inifile (= 3.0.0) + iniparse (= 1.4.4) + inspec (= 1.45.9) + ipaddress (= 0.8.3) + iso8601 (= 0.9.1) + jmespath (= 1.3.1) + json (= 1.8.6) + jwt (= 2.1.0) + kartograph (= 0.2.4) + kitchen-digitalocean (= 0.9.8) + kitchen-dokken (= 2.6.5) + kitchen-ec2 (= 1.3.2) + kitchen-google (= 1.4.0) + kitchen-hyperv (= 0.5.1) + kitchen-inspec (= 0.20.0) + kitchen-vagrant (= 1.2.1) + knife-cloud (= 1.2.1) + knife-ec2 (= 0.16.0) + knife-google (= 3.2.0) + knife-opc (= 0.3.2) + knife-push (= 1.0.3) + knife-spork (= 1.7.1) + knife-windows (= 1.9.0) + libyajl2 (= 1.2.0) + listen (= 3.1.5) + little-plugger (= 1.1.4) + lockfile (= 2.1.3) + logging (= 2.2.2) + logify (= 0.2.0) + lumberjack (= 1.0.12) + macaddr (= 1.7.1) + memoist (= 0.16.0) + method_source (= 0.9.0) + mime-types (= 3.1) + mime-types-data (= 3.2016.0521) + mini_portile2 (= 2.3.0) + minitar (= 0.5.4) + minitest (= 5.10.3) + mixlib-archive (= 0.4.1) + mixlib-authentication (= 1.4.2) + mixlib-cli (= 1.7.0) + mixlib-config (= 2.2.4) + mixlib-install (= 3.8.0) + mixlib-log (= 1.7.1) + mixlib-shellout (= 2.3.2) + mixlib-versioning (= 1.2.2) + molinillo (= 0.6.4) + multi_json (= 1.12.2) + multi_test (= 0.1.2) + multipart-post (= 2.0.0) + nenv (= 0.3.0) + net-scp (= 1.2.1) + net-sftp (= 2.1.2) + net-ssh (= 4.1.0) + net-ssh-gateway (= 1.3.0) + net-ssh-multi (= 1.2.1) + net-telnet (= 0.1.1) + nio4r (= 2.1.0) + nokogiri (= 1.8.1) + nori (= 2.6.0) + notiffany (= 0.1.1) + octokit (= 4.7.0) + ohai (= 13.6.0) + opscode-pushy-client (= 2.3.0) + os (= 0.9.6) + paint (= 1.0.1) + parallel (= 1.12.0) + parser (= 2.4.0.2) + parslet (= 1.8.1) + plist (= 3.3.0) + polyglot (= 0.3.5) + powerpack (= 0.1.1) + proxifier (= 1.0.3) + pry (= 0.11.3) + pry-byebug (= 3.5.0) + pry-remote (= 0.1.8) + pry-stack_explorer (= 0.4.9.2) + public_suffix (= 3.0.1) + rack (= 2.0.3) + rainbow (= 2.2.2) + rake (= 12.3.0) + rb-fsevent (= 0.10.2) + rb-inotify (= 0.9.10) + rb-readline (= 0.5.5) + rdoc (= 5.1.0) + representable (= 2.3.0) + resource_kit (= 0.1.7) + retriable (= 2.1.0) + retryable (= 2.0.4) + ridley (= 5.1.1) + rspec (= 3.7.0) + rspec-core (= 3.7.0) + rspec-expectations (= 3.7.0) + rspec-its (= 1.2.0) + rspec-mocks (= 3.7.0) + rspec-support (= 3.7.0) + rspec_junit_formatter (= 0.2.3) + rubocop (= 0.49.1) + ruby-prof (= 0.16.2) + ruby-progressbar (= 1.9.0) + ruby-shadow (= 2.5.0) + ruby_dep (= 1.5.0) + rubyntlm (= 0.6.2) + rubyzip (= 1.2.1) + rufus-lru (= 1.1.0) + safe_yaml (= 1.0.4) + sawyer (= 0.8.1) + semverse (= 2.0.0) + serverspec (= 2.41.3) + sfl (= 2.3) + shellany (= 0.0.1) + signet (= 0.8.1) + slop (= 3.6.0) + solve (= 4.0.0) + specinfra (= 2.72.1) + sslshake (= 1.2.0) + stove (= 6.0.0) + stuartpreston-azure-sdk-for-ruby (= 0.7.2) + syslog-logger (= 1.6.8) + systemu (= 2.6.5) + test-kitchen (= 1.19.1) + thor (= 0.19.1) + thread_safe (= 0.3.6) + timers (= 4.0.4) + tomlrb (= 1.2.6) + train (= 0.29.1) + treetop (= 1.6.8) + tzinfo (= 1.2.4) + uber (= 0.0.15) + ubuntu_ami (= 0.4.1) + unicode-display_width (= 1.3.0) + uuid (= 2.3.8) + uuidtools (= 2.1.5) + varia_model (= 0.6.0) + virtus (= 1.0.5) + winrm (= 2.2.3) + winrm-elevated (= 1.1.0) + winrm-fs (= 1.0.2) + wmi-lite (= 1.0.0) + yard (= 0.9.10) + +BUNDLED WITH + 1.15.4 diff --git a/Jenkinsfile b/Jenkinsfile index ebfbb06..585ecfa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,10 +23,10 @@ node('chef13') { } stage 'GD foodcritic' // Run our foodcritic tests - sh 'foodcritic -f "any" -t "~FC071" -t "~FC078" -t "~FC085" -t "~FC104" -X "spec/**/*" -X "test/**/*" -I $FC_RULES_LOCATION .' + sh 'foodcritic -f "any" -t "~FC071" -t "~FC078" -t "~FC104" -t "~FC005" -X "spec/**/*" -X "test/**/*" -I $FC_RULES_LOCATION .' stage 'EC2 integration tests' // this is the "chef exec bundle exec rake ec2 job" - sh 'chef exec bundle install && chef exec bundle exec rake ec2' + sh 'chef exec bundle install && chef exec bundle exec rake ci' if (env.BRANCH_NAME == 'master') { stage 'supermarket upload' build job: 'supermarket_upload_sub', parameters: [string(name: 'COOKBOOK_BRANCH', value: "${env.BRANCH_COMMIT}"), diff --git a/Rakefile b/Rakefile index 7f8373f..e89e896 100644 --- a/Rakefile +++ b/Rakefile @@ -13,7 +13,7 @@ namespace :style do FoodCritic::Rake::LintTask.new(:chef) do |t| t.options = { fail_tags: ['any'], - tags: ['~FC005', '~FC071', '~FC078', '~FC085', '~FC104'], + tags: ['~FC071', '~FC078', '~FC104'], } end end @@ -42,10 +42,15 @@ namespace :integration do ENV['KITCHEN_YAML'] = './.kitchen.ec2.yml' Kitchen::CLI.new([], destroy: 'always').test end + task :gce do + ENV['KITCHEN_YAML'] = './.kitchen.gce.yml' + Kitchen::CLI.new([], concurrency: 5, destroy: 'always').test + end end # Default task default: ['style', 'spec', 'integration:vagrant'] +task ci: ['style', 'spec', 'integration:ec2', 'integration:gce'] task ec2: ['style', 'spec', 'integration:ec2'] task ec2_singlethread: ['style', 'spec', 'integration:ec2_singlethread'] task test: ['style', 'spec'] diff --git a/metadata.rb b/metadata.rb index b465350..d90d098 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license ' Copyright (c) 2017 Gannett Co., Inc, All Rights Reserved.' description 'Installs Python, pip and virtualenv. \ Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' -version '2.0.0' +version '2.0.1' chef_version '>= 12.11.18' depends 'build-essential' diff --git a/providers/pip.rb b/providers/pip.rb index eef8ccf..d5bb6d2 100644 --- a/providers/pip.rb +++ b/providers/pip.rb @@ -90,7 +90,7 @@ def removing_package? # so refactoring into core Chef should be easy def load_current_resource - @current_resource = Chef::Resource::PythonPip.new(new_resource.name) + @current_resource = Chef::ResourceResolver.resolve(:python_pip).new(new_resource.name) @current_resource.package_name(new_resource.package_name) @current_resource.version(nil) From 2e192c9df9d761c1caa241572b78985286d5a6ee Mon Sep 17 00:00:00 2001 From: Dane Thorsen Date: Mon, 19 Mar 2018 17:08:44 -0500 Subject: [PATCH 05/17] PENG-1428 - Test this please From 3770dc5de70164322851ab2281952e5c5821bbe0 Mon Sep 17 00:00:00 2001 From: Dane Thorsen Date: Mon, 19 Mar 2018 18:16:22 -0500 Subject: [PATCH 06/17] PENG-1428 - Fix FC085 and add virtualenv resource testing --- .kitchen.ec2.yml | 5 +++++ .kitchen.gce.yml | 5 +++++ .kitchen.yml | 5 +++++ Berksfile | 4 ++++ providers/pip.rb | 9 ++++----- providers/virtualenv.rb | 4 +++- test/fixtures/virtualenv-test/metadata.rb | 2 ++ test/fixtures/virtualenv-test/recipes/default.rb | 3 +++ .../serverspec/custom-package_spec.rb | 15 +++++++++++++++ .../chef13-default/serverspec/pip_spec.rb | 16 ++++++++++++++++ .../chef13-default/serverspec/spec_helper.rb | 5 +++++ .../chef13-default/serverspec/virtualenv_spec.rb | 15 +++++++++++++++ .../default/serverspec/virtualenv_spec.rb | 11 ++++++++++- 13 files changed, 92 insertions(+), 7 deletions(-) create mode 100644 test/fixtures/virtualenv-test/metadata.rb create mode 100644 test/fixtures/virtualenv-test/recipes/default.rb create mode 100644 test/integration/chef13-default/serverspec/custom-package_spec.rb create mode 100644 test/integration/chef13-default/serverspec/pip_spec.rb create mode 100644 test/integration/chef13-default/serverspec/spec_helper.rb create mode 100644 test/integration/chef13-default/serverspec/virtualenv_spec.rb diff --git a/.kitchen.ec2.yml b/.kitchen.ec2.yml index 2a14d75..095d93f 100644 --- a/.kitchen.ec2.yml +++ b/.kitchen.ec2.yml @@ -35,6 +35,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: setuptools_version: 18.0.1 @@ -45,6 +46,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: setuptools_version: 18.0.1 @@ -53,6 +55,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "package" @@ -62,6 +65,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "custom-package" @@ -71,6 +75,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "source" diff --git a/.kitchen.gce.yml b/.kitchen.gce.yml index 5cedff0..025b7b7 100644 --- a/.kitchen.gce.yml +++ b/.kitchen.gce.yml @@ -36,6 +36,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: setuptools_version: 18.0.1 @@ -46,6 +47,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: setuptools_version: 18.0.1 @@ -54,6 +56,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "package" @@ -63,6 +66,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "custom-package" @@ -72,6 +76,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "source" diff --git a/.kitchen.yml b/.kitchen.yml index 4167bd0..2522131 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -15,6 +15,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: setuptools_version: 18.0.1 @@ -25,6 +26,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: setuptools_version: 18.0.1 @@ -33,6 +35,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "package" @@ -42,6 +45,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "custom-package" @@ -51,6 +55,7 @@ suites: run_list: - recipe[yum-gd] - recipe[python] + - recipe[virtualenv-test] attributes: python: install_method: "source" diff --git a/Berksfile b/Berksfile index 26269c9..6344662 100644 --- a/Berksfile +++ b/Berksfile @@ -1,3 +1,7 @@ source 'https://gdp-chef-supermarket.gannettdigital.com' +group :integration do + cookbook 'virtualenv-test', path: 'test/fixtures/virtualenv-test' +end + metadata diff --git a/providers/pip.rb b/providers/pip.rb index d5bb6d2..cb6c545 100644 --- a/providers/pip.rb +++ b/providers/pip.rb @@ -27,6 +27,8 @@ def whyrun_supported? true end +use_inline_resources + # the logic in all action methods mirror that of # the Chef::Provider::Package which will make # refactoring into core chef easy @@ -44,8 +46,7 @@ def whyrun_supported? description = "install package #{new_resource} version #{install_version}" converge_by(description) do Chef::Log.info("Installing #{new_resource} version #{install_version}") - status = install_package(install_version) - new_resource.updated_by_last_action(true) if status + install_package(install_version) end end end @@ -56,8 +57,7 @@ def whyrun_supported? description = "upgrade #{current_resource} version from #{current_resource.version} to #{candidate_version}" converge_by(description) do Chef::Log.info("Upgrading #{new_resource} version from #{orig_version} to #{candidate_version}") - status = upgrade_package(candidate_version) - new_resource.updated_by_last_action(true) if status + upgrade_package(candidate_version) end end end @@ -68,7 +68,6 @@ def whyrun_supported? converge_by(description) do Chef::Log.info("Removing #{new_resource}") remove_package(new_resource.version) - new_resource.updated_by_last_action(true) end end end diff --git a/providers/virtualenv.rb b/providers/virtualenv.rb index ec72e3f..cf88a6d 100644 --- a/providers/virtualenv.rb +++ b/providers/virtualenv.rb @@ -27,6 +27,8 @@ def whyrun_supported? true end +use_inline_resources + action :create do unless exists? directory new_resource.path do @@ -54,7 +56,7 @@ def whyrun_supported? end def load_current_resource - @current_resource = Chef::Resource::PythonVirtualenv.new(new_resource.name) + @current_resource = Chef::ResourceResolver.resolve(:python_virtualenv).new(new_resource.name) @current_resource.path(new_resource.path) if exists? diff --git a/test/fixtures/virtualenv-test/metadata.rb b/test/fixtures/virtualenv-test/metadata.rb new file mode 100644 index 0000000..29bbfc5 --- /dev/null +++ b/test/fixtures/virtualenv-test/metadata.rb @@ -0,0 +1,2 @@ +name 'virtualenv-test' +version '0.1.0' diff --git a/test/fixtures/virtualenv-test/recipes/default.rb b/test/fixtures/virtualenv-test/recipes/default.rb new file mode 100644 index 0000000..759c057 --- /dev/null +++ b/test/fixtures/virtualenv-test/recipes/default.rb @@ -0,0 +1,3 @@ +python_virtualenv 'testenv' do + path '/tmp/testenv' +end diff --git a/test/integration/chef13-default/serverspec/custom-package_spec.rb b/test/integration/chef13-default/serverspec/custom-package_spec.rb new file mode 100644 index 0000000..5ccdba1 --- /dev/null +++ b/test/integration/chef13-default/serverspec/custom-package_spec.rb @@ -0,0 +1,15 @@ +require_relative 'spec_helper' + +#Should include yum-gd recipe +describe file('/etc/yum.repos.d/gdcustom.repo') do + it { should be_file } +end + +#Should install dependant packages +describe package('python27') do + it { should be_installed } +end + +describe package('python27-devel') do + it { should be_installed } +end \ No newline at end of file diff --git a/test/integration/chef13-default/serverspec/pip_spec.rb b/test/integration/chef13-default/serverspec/pip_spec.rb new file mode 100644 index 0000000..93d706d --- /dev/null +++ b/test/integration/chef13-default/serverspec/pip_spec.rb @@ -0,0 +1,16 @@ +require_relative 'spec_helper' + +describe file('/usr/local/bin/pip') do + it { should be_file } + it { should be_executable } +end + +describe command('/usr/local/bin/pip show setuptools') do + its(:stdout) { should contain('Name: setuptools') } + its(:stdout) { should contain('Version: 18.0.1') } +end + +describe command('/usr/local/bin/pip show pip') do + its(:stdout) { should contain('Name: pip') } + its(:stdout) { should contain('Version: 7.1.2') } +end diff --git a/test/integration/chef13-default/serverspec/spec_helper.rb b/test/integration/chef13-default/serverspec/spec_helper.rb new file mode 100644 index 0000000..393d781 --- /dev/null +++ b/test/integration/chef13-default/serverspec/spec_helper.rb @@ -0,0 +1,5 @@ +require 'serverspec' + +set :backend, :exec + +set :path, '/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:$PATH' diff --git a/test/integration/chef13-default/serverspec/virtualenv_spec.rb b/test/integration/chef13-default/serverspec/virtualenv_spec.rb new file mode 100644 index 0000000..fd5cd35 --- /dev/null +++ b/test/integration/chef13-default/serverspec/virtualenv_spec.rb @@ -0,0 +1,15 @@ +require_relative 'spec_helper' + +describe command('/usr/local/bin/pip show virtualenv') do + its(:stdout) { should contain('Name: virtualenv') } + its(:stdout) { should contain('Version: 13.1.0') } +end + +describe file('/tmp/testenv') do + it { should be_directory } +end + +describe file('/tmp/testenv/bin/activate') do + it { should be_file } + its(:content) { should match(/PYTHONHOME/) } +end diff --git a/test/integration/default/serverspec/virtualenv_spec.rb b/test/integration/default/serverspec/virtualenv_spec.rb index 94138a9..fd5cd35 100644 --- a/test/integration/default/serverspec/virtualenv_spec.rb +++ b/test/integration/default/serverspec/virtualenv_spec.rb @@ -3,4 +3,13 @@ describe command('/usr/local/bin/pip show virtualenv') do its(:stdout) { should contain('Name: virtualenv') } its(:stdout) { should contain('Version: 13.1.0') } -end \ No newline at end of file +end + +describe file('/tmp/testenv') do + it { should be_directory } +end + +describe file('/tmp/testenv/bin/activate') do + it { should be_file } + its(:content) { should match(/PYTHONHOME/) } +end From 13d3302f1fd967a40c2e6c1d094642e24d589790 Mon Sep 17 00:00:00 2001 From: brianlieberman Date: Thu, 26 Apr 2018 13:15:47 -0400 Subject: [PATCH 07/17] PENG-1975 remove deprecated mixin for chef-14 --- .kitchen.ec2.yml | 5 +++-- .kitchen.gce.yml | 5 +++-- .kitchen.yml | 4 ++-- CHANGELOG.md | 4 ++++ metadata.rb | 2 +- providers/pip.rb | 1 - providers/virtualenv.rb | 1 - 7 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.kitchen.ec2.yml b/.kitchen.ec2.yml index 095d93f..c83c13b 100644 --- a/.kitchen.ec2.yml +++ b/.kitchen.ec2.yml @@ -40,9 +40,9 @@ suites: python: setuptools_version: 18.0.1 virtualenv_version: 13.1.0 -- name: chef13-default +- name: chef14-default provisioner: - require_chef_omnibus: 13.8.5 + require_chef_omnibus: 14.0.202 run_list: - recipe[yum-gd] - recipe[python] @@ -81,3 +81,4 @@ suites: install_method: "source" setuptools_version: 18.0.1 virtualenv_version: 13.1.0 + diff --git a/.kitchen.gce.yml b/.kitchen.gce.yml index 025b7b7..bca0f16 100644 --- a/.kitchen.gce.yml +++ b/.kitchen.gce.yml @@ -41,9 +41,9 @@ suites: python: setuptools_version: 18.0.1 virtualenv_version: 13.1.0 -- name: chef13-default +- name: chef14-default provisioner: - require_chef_omnibus: 13.8.5 + require_chef_omnibus: 14.0.202 run_list: - recipe[yum-gd] - recipe[python] @@ -82,3 +82,4 @@ suites: install_method: "source" setuptools_version: 18.0.1 virtualenv_version: 13.1.0 + diff --git a/.kitchen.yml b/.kitchen.yml index 2522131..7e0d449 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -20,9 +20,9 @@ suites: python: setuptools_version: 18.0.1 virtualenv_version: 13.1.0 -- name: chef13-default +- name: chef14-default provisioner: - require_chef_omnibus: 13.8.5 + require_chef_omnibus: 14.0.202 run_list: - recipe[yum-gd] - recipe[python] diff --git a/CHANGELOG.md b/CHANGELOG.md index 9197023..d6f86b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ python Cookbook CHANGELOG ========================= This file is used to list changes made in each version of the python cookbook. +v2.0.2 +------ +- Brian Lieberman - remove unused & deprecated mixin for chef-14 support (PENG-1975) + v2.0.1 ------ - Dane Thorsen - Updated to work with chef 13 ResourceResolver (PENG-1428) diff --git a/metadata.rb b/metadata.rb index d90d098..0194b76 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license ' Copyright (c) 2017 Gannett Co., Inc, All Rights Reserved.' description 'Installs Python, pip and virtualenv. \ Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' -version '2.0.1' +version '2.0.2' chef_version '>= 12.11.18' depends 'build-essential' diff --git a/providers/pip.rb b/providers/pip.rb index cb6c545..d573fda 100644 --- a/providers/pip.rb +++ b/providers/pip.rb @@ -20,7 +20,6 @@ use_inline_resources require 'chef/mixin/shell_out' -require 'chef/mixin/language' include Chef::Mixin::ShellOut def whyrun_supported? diff --git a/providers/virtualenv.rb b/providers/virtualenv.rb index cf88a6d..fc0c18d 100644 --- a/providers/virtualenv.rb +++ b/providers/virtualenv.rb @@ -20,7 +20,6 @@ use_inline_resources require 'chef/mixin/shell_out' -require 'chef/mixin/language' include Chef::Mixin::ShellOut def whyrun_supported? From 05cbc8836c74c4482b861dbaaf2927de24c8baa8 Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Tue, 21 Jan 2020 16:57:35 -0500 Subject: [PATCH 08/17] PENG-14437 - Setuptools fix. --- CHANGELOG.md | 4 ++++ attributes/default.rb | 1 + metadata.rb | 2 +- recipes/pip.rb | 4 ++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6f86b5..db8e2c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ python Cookbook CHANGELOG ========================= This file is used to list changes made in each version of the python cookbook. +v2.0.3 +------ +- Joseph Kregloh - Fix for Python setuptools version (PENG-14437) + v2.0.2 ------ - Brian Lieberman - remove unused & deprecated mixin for chef-14 support (PENG-1975) diff --git a/attributes/default.rb b/attributes/default.rb index d3cf8ec..19e35be 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -51,3 +51,4 @@ default['python']['setuptools_version'] = nil # defaults to latest default['python']['virtualenv_version'] = nil default['python']['pip']['version'] = '7.1.2' +default['python']['setuptools_version'] = '44.0.0' diff --git a/metadata.rb b/metadata.rb index 0194b76..ef88ca4 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license ' Copyright (c) 2017 Gannett Co., Inc, All Rights Reserved.' description 'Installs Python, pip and virtualenv. \ Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' -version '2.0.2' +version '2.0.3' chef_version '>= 12.11.18' depends 'build-essential' diff --git a/recipes/pip.rb b/recipes/pip.rb index b2d0067..abe9559 100644 --- a/recipes/pip.rb +++ b/recipes/pip.rb @@ -43,11 +43,11 @@ cwd Chef::Config[:file_cache_path] if node['python']['install_method'] == 'custom-package' command <<-EOF - #{node['python']['custom_binary']} get-pip.py pip==#{node['python']['pip']['version']} + #{node['python']['custom_binary']} get-pip.py --no-setuptools pip==#{node['python']['pip']['version']} EOF else command <<-EOF - #{node['python']['binary']} get-pip.py pip==#{node['python']['pip']['version']} + #{node['python']['binary']} get-pip.py --no-setuptools pip==#{node['python']['pip']['version']} EOF end not_if { ::File.exist?(pip_binary) } From 7b10ac4bd2cd5d93d365a59c47048fed60fee3b1 Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Tue, 21 Jan 2020 17:07:57 -0500 Subject: [PATCH 09/17] PENG-14437 - Update metadata. --- metadata.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index ef88ca4..6f03e4e 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,10 @@ license ' Copyright (c) 2017 Gannett Co., Inc, All Rights Reserved.' description 'Installs Python, pip and virtualenv. \ Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) + version '2.0.3' + chef_version '>= 12.11.18' depends 'build-essential' @@ -14,6 +17,6 @@ source_url 'https://github.com/GannettDigital/chef-python' issues_url 'https://github.com/GannettDigital/chef-python/issues' -%w(centos redhat).each do |os| +%w(centos).each do |os| supports os end From 985a7a943e46a033dde3d247c5a7344d6a878549 Mon Sep 17 00:00:00 2001 From: Dane Thorsen Date: Tue, 21 Jan 2020 16:30:57 -0600 Subject: [PATCH 10/17] PENG-14437 - Modify charset on changelog for pipeline --- CHANGELOG.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db8e2c6..57530c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -65,13 +65,13 @@ v1.4.10 v1.4.6 ------ -- **[#61](https://github.com/poise/python/pull/61)** – Python packages specified for Fedora platform. -- **[#62](https://github.com/poise/python/pull/62)** – Use tgz archive instead of tbz2 as new releases no longer offer tb2 -- **[#72](https://github.com/poise/python/pull/72)** – Set $HOME in virtualenv provider -- **[#74](https://github.com/poise/python/pull/74)** – Allow setting of virtualenv version -- **[#78](https://github.com/poise/python/pull/78)** – AFix the pip version_check_cmd to use the virtualenv pip when applicable -- **[#79](https://github.com/poise/python/pull/79)** – Add ability in pip lwrp to send custom env vars -- **[#80](https://github.com/poise/python/pull/80)** – Update to yum3 yum-epel cookbook +- **[#61](https://github.com/poise/python/pull/61)** ? Python packages specified for Fedora platform. +- **[#62](https://github.com/poise/python/pull/62)** ? Use tgz archive instead of tbz2 as new releases no longer offer tb2 +- **[#72](https://github.com/poise/python/pull/72)** ? Set $HOME in virtualenv provider +- **[#74](https://github.com/poise/python/pull/74)** ? Allow setting of virtualenv version +- **[#78](https://github.com/poise/python/pull/78)** ? AFix the pip version_check_cmd to use the virtualenv pip when applicable +- **[#79](https://github.com/poise/python/pull/79)** ? Add ability in pip lwrp to send custom env vars +- **[#80](https://github.com/poise/python/pull/80)** ? Update to yum3 yum-epel cookbook - Remove ez_setup.py usage and upgrade get-pip.py to 1.5.2. v1.4.4 From 36a05e0d48e1b540c1d6af071fb3dfec900dc27d Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Tue, 21 Jan 2020 17:38:08 -0500 Subject: [PATCH 11/17] PENG-14437 - A few Chef 13 updates. --- Gemfile | 240 -------------- Gemfile.lock | 898 --------------------------------------------------- Jenkinsfile | 2 +- 3 files changed, 1 insertion(+), 1139 deletions(-) delete mode 100644 Gemfile delete mode 100644 Gemfile.lock diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 3a6aee9..0000000 --- a/Gemfile +++ /dev/null @@ -1,240 +0,0 @@ -source 'https://rubygems.org' - -# chef-dk version: 2.4.15 -# https://github.com/chef/chef-dk/blob/e989052399f5ef82b0f6be024b345b528c681d1e/Gemfile.lock -gem 'activesupport', '= 5.1.4' -gem 'addressable', '= 2.5.2' -gem 'app_conf', '= 0.4.2' -gem 'appbundler', '= 0.10.0' -gem 'artifactory', '= 2.8.2' -gem 'ast', '= 2.3.0' -gem 'aws-sdk', '= 2.10.86' -gem 'aws-sdk-core', '= 2.10.86' -gem 'aws-sdk-resources', '= 2.10.86' -gem 'aws-sigv4', '= 1.0.2' -gem 'axiom-types', '= 0.1.1' -gem 'backports', '= 3.10.3' -gem 'berkshelf', '= 6.3.1' -gem 'binding_of_caller', '= 0.7.3' -gem 'buff-config', '= 2.0.0' -gem 'buff-extensions', '= 2.0.0' -gem 'buff-ignore', '= 1.2.0' -gem 'buff-ruby_engine', '= 1.0.0' -gem 'buff-shell_out', '= 1.1.0' -gem 'builder', '= 3.2.3' -gem 'byebug', '= 9.1.0' -gem 'celluloid', '= 0.16.0' -gem 'celluloid-io', '= 0.16.2' -gem 'chef', '= 13.6.4' -gem 'chef-api', '= 0.7.1' -gem 'chef-config', '= 13.6.4' -gem 'chef-dk', '= 2.4.15' -gem 'chef-provisioning', '= 2.6.0' -gem 'chef-provisioning-aws', '= 3.0.0' -gem 'chef-provisioning-azure', '= 0.6.0' -gem 'chef-provisioning-fog', '= 0.26.0' -gem 'chef-sugar', '= 3.6.0' -gem 'chef-vault', '= 3.3.0' -gem 'chef-zero', '= 13.1.0' -gem 'cheffish', '= 13.1.0' -gem 'chefspec', '= 7.1.0' -gem 'chefstyle', '= 0.6.0' -gem 'cleanroom', '= 1.0.0' -gem 'coderay', '= 1.1.2' -gem 'coercible', '= 1.0.0' -gem 'concurrent-ruby', '= 1.0.5' -gem 'cookbook-omnifetch', '= 0.8.0' -gem 'cookstyle', '= 2.1.0' -gem 'cucumber', '= 3.0.2' -gem 'cucumber-core', '= 3.0.0' -gem 'cucumber-expressions', '= 4.0.4' -gem 'cucumber-tag_expressions', '= 1.0.1' -gem 'cucumber-wire', '= 0.0.1' -gem 'dco', '= 1.0.1' -gem 'debug_inspector', '= 0.0.3' -gem 'dep-selector-libgecode', '= 1.3.1' -gem 'dep_selector', '= 1.0.6' -gem 'descendants_tracker', '= 0.0.4' -gem 'diff-lcs', '= 1.3' -gem 'diffy', '= 3.2.0' -gem 'docker-api', '= 1.34.0' -gem 'droplet_kit', '= 2.2.1' -gem 'equalizer', '= 0.0.11' -gem 'erubis', '= 2.7.0' -gem 'excon', '= 0.59.0' -gem 'faraday', '= 0.13.1' -gem 'fauxhai', '= 5.5.0' -gem 'ffi', '= 1.9.18' -gem 'ffi-rzmq', '= 2.0.5' -gem 'ffi-rzmq-core', '= 1.0.6' -gem 'ffi-yajl', '= 2.3.1' -gem 'fog-aws', '= 1.4.1' -gem 'fog-core', '= 1.45.0' -gem 'fog-digitalocean', '= 0.3.0' -gem 'fog-joyent', '= 0.0.1' -gem 'fog-json', '= 1.0.2' -gem 'fog-openstack', '= 0.1.22' -gem 'fog-rackspace', '= 0.1.5' -gem 'fog-scaleway', '= 0.3.0' -gem 'fog-softlayer', '= 1.1.4' -gem 'fog-xenserver', '= 0.3.0' -gem 'fog-xml', '= 0.1.3' -gem 'foodcritic', '= 12.2.1' -gem 'formatador', '= 0.2.5' -gem 'fuzzyurl', '= 0.9.0' -gem 'gcewinpass', '= 1.0.0' -gem 'gherkin', '= 4.1.3' -gem 'git', '= 1.3.0' -gem 'google-api-client', '= 0.9.28' -gem 'googleauth', '= 0.6.2' -gem 'gssapi', '= 1.2.0' -gem 'guard', '= 2.14.1' -gem 'gyoku', '= 1.3.1' -gem 'hashie', '= 3.5.6' -gem 'highline', '= 1.7.8' -gem 'hitimes', '= 1.2.6' -gem 'htmlentities', '= 4.3.4' -gem 'httpclient', '= 2.8.3' -gem 'hurley', '= 0.2' -gem 'i18n', '= 0.9.1' -gem 'ice_nine', '= 0.11.2' -gem 'inifile', '= 3.0.0' -gem 'iniparse', '= 1.4.4' -gem 'inspec', '= 1.45.9' -gem 'ipaddress', '= 0.8.3' -gem 'iso8601', '= 0.9.1' -gem 'jmespath', '= 1.3.1' -gem 'json', '= 1.8.6' -gem 'jwt', '= 2.1.0' -gem 'kartograph', '= 0.2.4' -gem 'kitchen-digitalocean', '= 0.9.8' -gem 'kitchen-dokken', '= 2.6.5' -gem 'kitchen-ec2', '= 1.3.2' -gem 'kitchen-google', '= 1.4.0' -gem 'kitchen-hyperv', '= 0.5.1' -gem 'kitchen-inspec', '= 0.20.0' -gem 'kitchen-vagrant', '= 1.2.1' -gem 'knife-cloud', '= 1.2.1' -gem 'knife-ec2', '= 0.16.0' -gem 'knife-google', '= 3.2.0' -gem 'knife-opc', '= 0.3.2' -gem 'knife-push', '= 1.0.3' -gem 'knife-spork', '= 1.7.1' -gem 'knife-windows', '= 1.9.0' -gem 'libyajl2', '= 1.2.0' -gem 'listen', '= 3.1.5' -gem 'little-plugger', '= 1.1.4' -gem 'lockfile', '= 2.1.3' -gem 'logging', '= 2.2.2' -gem 'logify', '= 0.2.0' -gem 'lumberjack', '= 1.0.12' -gem 'macaddr', '= 1.7.1' -gem 'memoist', '= 0.16.0' -gem 'method_source', '= 0.9.0' -gem 'mime-types', '= 3.1' -gem 'mime-types-data', '= 3.2016.0521' -gem 'mini_portile2', '= 2.3.0' -gem 'minitar', '= 0.5.4' -gem 'minitest', '= 5.10.3' -gem 'mixlib-archive', '= 0.4.1' -gem 'mixlib-authentication', '= 1.4.2' -gem 'mixlib-cli', '= 1.7.0' -gem 'mixlib-config', '= 2.2.4' -gem 'mixlib-install', '= 3.8.0' -gem 'mixlib-log', '= 1.7.1' -gem 'mixlib-shellout', '= 2.3.2' -gem 'mixlib-versioning', '= 1.2.2' -gem 'molinillo', '= 0.6.4' -gem 'multi_json', '= 1.12.2' -gem 'multi_test', '= 0.1.2' -gem 'multipart-post', '= 2.0.0' -gem 'nenv', '= 0.3.0' -gem 'net-scp', '= 1.2.1' -gem 'net-sftp', '= 2.1.2' -gem 'net-ssh', '= 4.1.0' -gem 'net-ssh-gateway', '= 1.3.0' -gem 'net-ssh-multi', '= 1.2.1' -gem 'net-telnet', '= 0.1.1' -gem 'nio4r', '= 2.1.0' -gem 'nokogiri', '= 1.8.1' -gem 'nori', '= 2.6.0' -gem 'notiffany', '= 0.1.1' -gem 'octokit', '= 4.7.0' -gem 'ohai', '= 13.6.0' -gem 'opscode-pushy-client', '= 2.3.0' -gem 'os', '= 0.9.6' -gem 'paint', '= 1.0.1' -gem 'parallel', '= 1.12.0' -gem 'parser', '= 2.4.0.2' -gem 'parslet', '= 1.8.1' -gem 'plist', '= 3.3.0' -gem 'polyglot', '= 0.3.5' -gem 'powerpack', '= 0.1.1' -gem 'proxifier', '= 1.0.3' -gem 'pry', '= 0.11.3' -gem 'pry-byebug', '= 3.5.0' -gem 'pry-remote', '= 0.1.8' -gem 'pry-stack_explorer', '= 0.4.9.2' -gem 'public_suffix', '= 3.0.1' -gem 'rack', '= 2.0.3' -gem 'rainbow', '= 2.2.2' -gem 'rake', '= 12.3.0' -gem 'rb-fsevent', '= 0.10.2' -gem 'rb-inotify', '= 0.9.10' -gem 'rb-readline', '= 0.5.5' -gem 'rdoc', '= 5.1.0' -gem 'representable', '= 2.3.0' -gem 'resource_kit', '= 0.1.7' -gem 'retriable', '= 2.1.0' -gem 'retryable', '= 2.0.4' -gem 'ridley', '= 5.1.1' -gem 'rspec', '= 3.7.0' -gem 'rspec-core', '= 3.7.0' -gem 'rspec-expectations', '= 3.7.0' -gem 'rspec-its', '= 1.2.0' -gem 'rspec-mocks', '= 3.7.0' -gem 'rspec-support', '= 3.7.0' -gem 'rspec_junit_formatter', '= 0.2.3' -gem 'rubocop', '= 0.49.1' -gem 'ruby-prof', '= 0.16.2' -gem 'ruby-progressbar', '= 1.9.0' -gem 'ruby-shadow', '= 2.5.0' -gem 'ruby_dep', '= 1.5.0' -gem 'rubyntlm', '= 0.6.2' -gem 'rubyzip', '= 1.2.1' -gem 'rufus-lru', '= 1.1.0' -gem 'safe_yaml', '= 1.0.4' -gem 'sawyer', '= 0.8.1' -gem 'semverse', '= 2.0.0' -gem 'serverspec', '= 2.41.3' -gem 'sfl', '= 2.3' -gem 'shellany', '= 0.0.1' -gem 'signet', '= 0.8.1' -gem 'slop', '= 3.6.0' -gem 'solve', '= 4.0.0' -gem 'specinfra', '= 2.72.1' -gem 'sslshake', '= 1.2.0' -gem 'stove', '= 6.0.0' -gem 'stuartpreston-azure-sdk-for-ruby', '= 0.7.2' -gem 'syslog-logger', '= 1.6.8' -gem 'systemu', '= 2.6.5' -gem 'test-kitchen', '= 1.19.1' -gem 'thor', '= 0.19.1' -gem 'thread_safe', '= 0.3.6' -gem 'timers', '= 4.0.4' -gem 'tomlrb', '= 1.2.6' -gem 'train', '= 0.29.1' -gem 'treetop', '= 1.6.8' -gem 'tzinfo', '= 1.2.4' -gem 'uber', '= 0.0.15' -gem 'ubuntu_ami', '= 0.4.1' -gem 'unicode-display_width', '= 1.3.0' -gem 'uuid', '= 2.3.8' -gem 'uuidtools', '= 2.1.5' -gem 'varia_model', '= 0.6.0' -gem 'virtus', '= 1.0.5' -gem 'winrm', '= 2.2.3' -gem 'winrm-elevated', '= 1.1.0' -gem 'winrm-fs', '= 1.0.2' -gem 'wmi-lite', '= 1.0.0' -gem 'yard', '= 0.9.10' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 3f436f1..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,898 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (5.1.4) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) - minitest (~> 5.1) - tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - app_conf (0.4.2) - appbundler (0.10.0) - mixlib-cli (~> 1.4) - mixlib-shellout (~> 2.0) - artifactory (2.8.2) - ast (2.3.0) - aws-sdk (2.10.86) - aws-sdk-resources (= 2.10.86) - aws-sdk-core (2.10.86) - aws-sigv4 (~> 1.0) - jmespath (~> 1.0) - aws-sdk-resources (2.10.86) - aws-sdk-core (= 2.10.86) - aws-sigv4 (1.0.2) - axiom-types (0.1.1) - descendants_tracker (~> 0.0.4) - ice_nine (~> 0.11.0) - thread_safe (~> 0.3, >= 0.3.1) - backports (3.10.3) - berkshelf (6.3.1) - buff-config (~> 2.0) - buff-extensions (~> 2.0) - chef (>= 12.7.2) - 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) - binding_of_caller (0.7.3) - debug_inspector (>= 0.0.1) - 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) - byebug (9.1.0) - celluloid (0.16.0) - timers (~> 4.0.0) - celluloid-io (0.16.2) - celluloid (>= 0.16.0) - nio4r (>= 1.1.0) - chef (13.6.4) - addressable - bundler (>= 1.10) - chef-config (= 13.6.4) - chef-zero (>= 13.0) - diff-lcs (~> 1.2, >= 1.2.4) - erubis (~> 2.7) - ffi-yajl (~> 2.2) - highline (~> 1.6, >= 1.6.9) - iniparse (~> 1.4) - iso8601 (~> 0.9.1) - mixlib-archive (~> 0.4) - mixlib-authentication (~> 1.4) - mixlib-cli (~> 1.7) - mixlib-log (~> 1.3) - mixlib-shellout (~> 2.0) - net-sftp (~> 2.1, >= 2.1.2) - net-ssh (>= 2.9, < 5.0) - net-ssh-multi (~> 1.2, >= 1.2.1) - ohai (~> 13.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-api (0.7.1) - logify (~> 0.1) - mime-types - chef-config (13.6.4) - addressable - fuzzyurl - mixlib-config (~> 2.0) - mixlib-shellout (~> 2.0) - chef-dk (2.4.15) - addressable (>= 2.3.5, < 2.6) - chef (~> 13.0) - chef-provisioning (~> 2.0) - cookbook-omnifetch (~> 0.5) - diff-lcs (~> 1.0) - ffi-yajl (>= 1.0, < 3.0) - minitar (~> 0.5.4) - mixlib-cli (~> 1.7) - mixlib-shellout (~> 2.0) - paint (~> 1.0) - solve (> 2.0, < 5.0) - chef-provisioning (2.6.0) - cheffish (>= 4.0, < 14.0) - inifile (>= 2.0.2) - mixlib-install (>= 1.0) - net-scp (~> 1.0) - net-ssh (>= 2.9, < 5.0) - net-ssh-gateway (> 1.2, < 3.0) - winrm (~> 2.0) - winrm-elevated (~> 1.0) - winrm-fs (~> 1.0) - chef-provisioning-aws (3.0.0) - aws-sdk (>= 2.2.18, < 3.0) - chef-provisioning (>= 1.0, < 3.0) - retryable (~> 2.0, >= 2.0.1) - ubuntu_ami (~> 0.4, >= 0.4.1) - chef-provisioning-azure (0.6.0) - chef-provisioning (>= 1.0, < 3.0) - stuartpreston-azure-sdk-for-ruby (~> 0.7) - chef-provisioning-fog (0.26.0) - chef-provisioning (>= 1.0, < 3.0) - cheffish (>= 13.1.0, < 14.0) - fog-digitalocean - fog-joyent - fog-openstack - fog-rackspace - fog-scaleway - fog-softlayer - fog-xenserver - retryable - winrm-elevated - chef-sugar (3.6.0) - chef-vault (3.3.0) - chef-zero (13.1.0) - ffi-yajl (~> 2.2) - hashie (>= 2.0, < 4.0) - mixlib-log (~> 1.3) - rack (~> 2.0) - uuidtools (~> 2.1) - cheffish (13.1.0) - chef-zero (~> 13.0) - net-ssh - chefspec (7.1.0) - chef (>= 12.14.89) - fauxhai (>= 4, < 6) - rspec (~> 3.0) - chefstyle (0.6.0) - rubocop (= 0.49.1) - cleanroom (1.0.0) - coderay (1.1.2) - coercible (1.0.0) - descendants_tracker (~> 0.0.1) - concurrent-ruby (1.0.5) - cookbook-omnifetch (0.8.0) - mixlib-archive (~> 0.4) - cookstyle (2.1.0) - rubocop (= 0.49.1) - cucumber (3.0.2) - builder (>= 2.1.2) - cucumber-core (~> 3.0.0) - cucumber-expressions (~> 4.0.3) - cucumber-wire (~> 0.0.1) - diff-lcs (~> 1.3) - gherkin (~> 4.0) - multi_json (>= 1.7.5, < 2.0) - multi_test (>= 0.1.2) - cucumber-core (3.0.0) - backports (>= 3.8.0) - cucumber-tag_expressions (>= 1.0.1) - gherkin (>= 4.1.3) - cucumber-expressions (4.0.4) - cucumber-tag_expressions (1.0.1) - cucumber-wire (0.0.1) - dco (1.0.1) - git (~> 1.3) - thor (~> 0.19) - debug_inspector (0.0.3) - dep-selector-libgecode (1.3.1) - dep_selector (1.0.6) - dep-selector-libgecode (~> 1.0) - ffi (~> 1.9) - descendants_tracker (0.0.4) - thread_safe (~> 0.3, >= 0.3.1) - diff-lcs (1.3) - diffy (3.2.0) - docker-api (1.34.0) - excon (>= 0.47.0) - multi_json - droplet_kit (2.2.1) - activesupport (> 3.0, < 6) - faraday (~> 0.9) - kartograph (~> 0.2.3) - resource_kit (~> 0.1.5) - virtus (~> 1.0.3) - equalizer (0.0.11) - erubis (2.7.0) - excon (0.59.0) - faraday (0.13.1) - multipart-post (>= 1.2, < 3) - fauxhai (5.5.0) - net-ssh - ffi (1.9.18) - ffi-rzmq (2.0.5) - ffi-rzmq-core (>= 1.0.6) - ffi-rzmq-core (1.0.6) - ffi - ffi-yajl (2.3.1) - libyajl2 (~> 1.2) - fog-aws (1.4.1) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-core (1.45.0) - builder - excon (~> 0.58) - formatador (~> 0.2) - fog-digitalocean (0.3.0) - fog-core (~> 1.42) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.5) - fog-joyent (0.0.1) - fog-core (~> 1.42) - fog-json (>= 1.0) - fog-json (1.0.2) - fog-core (~> 1.0) - multi_json (~> 1.10) - fog-openstack (0.1.22) - fog-core (>= 1.40) - fog-json (>= 1.0) - ipaddress (>= 0.8) - fog-rackspace (0.1.5) - fog-core (>= 1.35) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.8) - fog-scaleway (0.3.0) - fog-core (~> 1.42) - fog-json (~> 1.0) - fog-softlayer (1.1.4) - fog-core - fog-json - fog-xenserver (0.3.0) - fog-core - fog-xml - fog-xml (0.1.3) - fog-core - nokogiri (>= 1.5.11, < 2.0.0) - foodcritic (12.2.1) - cucumber-core (>= 1.3) - erubis - ffi-yajl (~> 2.0) - nokogiri (>= 1.5, < 2.0) - rake - rufus-lru (~> 1.0) - treetop (~> 1.4) - formatador (0.2.5) - fuzzyurl (0.9.0) - gcewinpass (1.0.0) - google-api-client (~> 0.9.0) - gherkin (4.1.3) - git (1.3.0) - google-api-client (0.9.28) - addressable (~> 2.3) - googleauth (~> 0.5) - httpclient (~> 2.7) - hurley (~> 0.1) - memoist (~> 0.11) - mime-types (>= 1.6) - representable (~> 2.3.0) - retriable (~> 2.0) - googleauth (0.6.2) - faraday (~> 0.12) - jwt (>= 1.4, < 3.0) - logging (~> 2.0) - memoist (~> 0.12) - multi_json (~> 1.11) - os (~> 0.9) - signet (~> 0.7) - gssapi (1.2.0) - ffi (>= 1.0.1) - guard (2.14.1) - formatador (>= 0.2.4) - listen (>= 2.7, < 4.0) - lumberjack (~> 1.0) - nenv (~> 0.1) - notiffany (~> 0.0) - pry (>= 0.9.12) - shellany (~> 0.0) - thor (>= 0.18.1) - gyoku (1.3.1) - builder (>= 2.1.2) - hashie (3.5.6) - highline (1.7.8) - hitimes (1.2.6) - htmlentities (4.3.4) - httpclient (2.8.3) - hurley (0.2) - i18n (0.9.1) - concurrent-ruby (~> 1.0) - ice_nine (0.11.2) - inifile (3.0.0) - iniparse (1.4.4) - inspec (1.45.9) - 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) - rainbow (~> 2) - rspec (~> 3) - rspec-its (~> 1.2) - rubyzip (~> 1.1) - semverse - sslshake (~> 1.2) - thor (~> 0.19) - tomlrb (~> 1.2) - train (~> 0.29, >= 0.29.1) - ipaddress (0.8.3) - iso8601 (0.9.1) - jmespath (1.3.1) - json (1.8.6) - jwt (2.1.0) - kartograph (0.2.4) - kitchen-digitalocean (0.9.8) - droplet_kit (~> 2.2) - test-kitchen (~> 1.17) - kitchen-dokken (2.6.5) - docker-api (~> 1.33) - lockfile (~> 2.1) - test-kitchen (~> 1.15) - kitchen-ec2 (1.3.2) - aws-sdk (~> 2) - excon - multi_json - retryable (~> 2.0) - test-kitchen (~> 1.4, >= 1.4.1) - kitchen-google (1.4.0) - gcewinpass (~> 1.0) - google-api-client (~> 0.9.0) - test-kitchen - kitchen-hyperv (0.5.1) - test-kitchen (~> 1.4) - kitchen-inspec (0.20.0) - hashie (~> 3.4) - inspec (>= 0.34.0, < 2.0.0) - test-kitchen (~> 1.6) - kitchen-vagrant (1.2.1) - test-kitchen (~> 1.4) - knife-cloud (1.2.1) - chef (>= 0.10.10) - knife-windows (>= 0.5.14) - mixlib-shellout - knife-ec2 (0.16.0) - fog-aws (~> 1.0) - knife-windows (~> 1.0) - mime-types - knife-google (3.2.0) - chef (>= 12.0) - gcewinpass (~> 1.0) - google-api-client (~> 0.9.0) - knife-cloud (~> 1.2.0) - knife-opc (0.3.2) - knife-push (1.0.3) - chef (>= 12.7.2) - knife-spork (1.7.1) - app_conf (>= 0.4.0) - chef (>= 11.0.0) - diffy (>= 3.0.1) - git (>= 1.2.5) - knife-windows (1.9.0) - winrm (~> 2.1) - winrm-elevated (~> 1.0) - libyajl2 (1.2.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - little-plugger (1.1.4) - lockfile (2.1.3) - logging (2.2.2) - little-plugger (~> 1.1) - multi_json (~> 1.10) - logify (0.2.0) - lumberjack (1.0.12) - macaddr (1.7.1) - systemu (~> 2.6.2) - memoist (0.16.0) - method_source (0.9.0) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mini_portile2 (2.3.0) - minitar (0.5.4) - minitest (5.10.3) - mixlib-archive (0.4.1) - mixlib-log - mixlib-authentication (1.4.2) - mixlib-cli (1.7.0) - mixlib-config (2.2.4) - mixlib-install (3.8.0) - mixlib-shellout - mixlib-versioning - thor - mixlib-log (1.7.1) - mixlib-shellout (2.3.2) - mixlib-versioning (1.2.2) - molinillo (0.6.4) - multi_json (1.12.2) - multi_test (0.1.2) - multipart-post (2.0.0) - nenv (0.3.0) - net-scp (1.2.1) - net-ssh (>= 2.6.5) - net-sftp (2.1.2) - net-ssh (>= 2.6.5) - net-ssh (4.1.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.1.1) - nio4r (2.1.0) - nokogiri (1.8.1) - mini_portile2 (~> 2.3.0) - nori (2.6.0) - notiffany (0.1.1) - nenv (~> 0.1) - shellany (~> 0.0) - octokit (4.7.0) - sawyer (~> 0.8.0, >= 0.5.3) - ohai (13.6.0) - 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) - opscode-pushy-client (2.3.0) - chef (>= 12.19, < 14.0) - ffi-rzmq - ohai (>= 8.23, < 14.0) - uuidtools - os (0.9.6) - paint (1.0.1) - parallel (1.12.0) - parser (2.4.0.2) - ast (~> 2.3) - parslet (1.8.1) - plist (3.3.0) - polyglot (0.3.5) - powerpack (0.1.1) - proxifier (1.0.3) - pry (0.11.3) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - pry-byebug (3.5.0) - byebug (~> 9.1) - pry (~> 0.10) - pry-remote (0.1.8) - pry (~> 0.9) - slop (~> 3.0) - pry-stack_explorer (0.4.9.2) - binding_of_caller (>= 0.7) - pry (>= 0.9.11) - public_suffix (3.0.1) - rack (2.0.3) - rainbow (2.2.2) - rake - rake (12.3.0) - rb-fsevent (0.10.2) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) - rb-readline (0.5.5) - rdoc (5.1.0) - representable (2.3.0) - uber (~> 0.0.7) - resource_kit (0.1.7) - addressable (>= 2.3.6, < 3.0.0) - retriable (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.7.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-core (3.7.0) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-its (1.2.0) - rspec-core (>= 3.0.0) - rspec-expectations (>= 3.0.0) - rspec-mocks (3.7.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.0) - rspec_junit_formatter (0.2.3) - builder (< 4) - rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.49.1) - parallel (~> 1.10) - parser (>= 2.3.3.1, < 3.0) - powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) - ruby-prof (0.16.2) - ruby-progressbar (1.9.0) - ruby-shadow (2.5.0) - ruby_dep (1.5.0) - rubyntlm (0.6.2) - rubyzip (1.2.1) - rufus-lru (1.1.0) - 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) - shellany (0.0.1) - signet (0.8.1) - addressable (~> 2.3) - faraday (~> 0.9) - jwt (>= 1.5, < 3.0) - multi_json (~> 1.10) - slop (3.6.0) - solve (4.0.0) - molinillo (~> 0.6) - semverse (>= 1.1, < 3.0) - specinfra (2.72.1) - net-scp - net-ssh (>= 2.7, < 5.0) - net-telnet - sfl - sslshake (1.2.0) - stove (6.0.0) - chef-api (~> 0.5) - logify (~> 0.2) - stuartpreston-azure-sdk-for-ruby (0.7.2) - json (~> 1.8) - mime-types (> 1, < 4) - nokogiri (~> 1.5) - systemu (~> 2.6) - uuid (~> 2.0) - syslog-logger (1.6.8) - systemu (2.6.5) - test-kitchen (1.19.1) - mixlib-install (~> 3.6) - 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) - winrm (~> 2.0) - winrm-elevated (~> 1.0) - winrm-fs (~> 1.0.2) - thor (0.19.1) - thread_safe (0.3.6) - timers (4.0.4) - hitimes - tomlrb (1.2.6) - train (0.29.1) - 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) - treetop (1.6.8) - polyglot (~> 0.3) - tzinfo (1.2.4) - thread_safe (~> 0.1) - uber (0.0.15) - ubuntu_ami (0.4.1) - unicode-display_width (1.3.0) - uuid (2.3.8) - macaddr (~> 1.0) - uuidtools (2.1.5) - varia_model (0.6.0) - buff-extensions (~> 2.0) - hashie (>= 2.0.2, < 4.0.0) - virtus (1.0.5) - axiom-types (~> 0.1) - coercible (~> 1.0) - descendants_tracker (~> 0.0, >= 0.0.3) - equalizer (~> 0.0, >= 0.0.9) - 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.0.2) - erubis (~> 2.7) - logging (>= 1.6.1, < 3.0) - rubyzip (~> 1.1) - winrm (~> 2.0) - wmi-lite (1.0.0) - yard (0.9.10) - -PLATFORMS - ruby - -DEPENDENCIES - activesupport (= 5.1.4) - addressable (= 2.5.2) - app_conf (= 0.4.2) - appbundler (= 0.10.0) - artifactory (= 2.8.2) - ast (= 2.3.0) - aws-sdk (= 2.10.86) - aws-sdk-core (= 2.10.86) - aws-sdk-resources (= 2.10.86) - aws-sigv4 (= 1.0.2) - axiom-types (= 0.1.1) - backports (= 3.10.3) - berkshelf (= 6.3.1) - binding_of_caller (= 0.7.3) - buff-config (= 2.0.0) - buff-extensions (= 2.0.0) - buff-ignore (= 1.2.0) - buff-ruby_engine (= 1.0.0) - buff-shell_out (= 1.1.0) - builder (= 3.2.3) - byebug (= 9.1.0) - celluloid (= 0.16.0) - celluloid-io (= 0.16.2) - chef (= 13.6.4) - chef-api (= 0.7.1) - chef-config (= 13.6.4) - chef-dk (= 2.4.15) - chef-provisioning (= 2.6.0) - chef-provisioning-aws (= 3.0.0) - chef-provisioning-azure (= 0.6.0) - chef-provisioning-fog (= 0.26.0) - chef-sugar (= 3.6.0) - chef-vault (= 3.3.0) - chef-zero (= 13.1.0) - cheffish (= 13.1.0) - chefspec (= 7.1.0) - chefstyle (= 0.6.0) - cleanroom (= 1.0.0) - coderay (= 1.1.2) - coercible (= 1.0.0) - concurrent-ruby (= 1.0.5) - cookbook-omnifetch (= 0.8.0) - cookstyle (= 2.1.0) - cucumber (= 3.0.2) - cucumber-core (= 3.0.0) - cucumber-expressions (= 4.0.4) - cucumber-tag_expressions (= 1.0.1) - cucumber-wire (= 0.0.1) - dco (= 1.0.1) - debug_inspector (= 0.0.3) - dep-selector-libgecode (= 1.3.1) - dep_selector (= 1.0.6) - descendants_tracker (= 0.0.4) - diff-lcs (= 1.3) - diffy (= 3.2.0) - docker-api (= 1.34.0) - droplet_kit (= 2.2.1) - equalizer (= 0.0.11) - erubis (= 2.7.0) - excon (= 0.59.0) - faraday (= 0.13.1) - fauxhai (= 5.5.0) - ffi (= 1.9.18) - ffi-rzmq (= 2.0.5) - ffi-rzmq-core (= 1.0.6) - ffi-yajl (= 2.3.1) - fog-aws (= 1.4.1) - fog-core (= 1.45.0) - fog-digitalocean (= 0.3.0) - fog-joyent (= 0.0.1) - fog-json (= 1.0.2) - fog-openstack (= 0.1.22) - fog-rackspace (= 0.1.5) - fog-scaleway (= 0.3.0) - fog-softlayer (= 1.1.4) - fog-xenserver (= 0.3.0) - fog-xml (= 0.1.3) - foodcritic (= 12.2.1) - formatador (= 0.2.5) - fuzzyurl (= 0.9.0) - gcewinpass (= 1.0.0) - gherkin (= 4.1.3) - git (= 1.3.0) - google-api-client (= 0.9.28) - googleauth (= 0.6.2) - gssapi (= 1.2.0) - guard (= 2.14.1) - gyoku (= 1.3.1) - hashie (= 3.5.6) - highline (= 1.7.8) - hitimes (= 1.2.6) - htmlentities (= 4.3.4) - httpclient (= 2.8.3) - hurley (= 0.2) - i18n (= 0.9.1) - ice_nine (= 0.11.2) - inifile (= 3.0.0) - iniparse (= 1.4.4) - inspec (= 1.45.9) - ipaddress (= 0.8.3) - iso8601 (= 0.9.1) - jmespath (= 1.3.1) - json (= 1.8.6) - jwt (= 2.1.0) - kartograph (= 0.2.4) - kitchen-digitalocean (= 0.9.8) - kitchen-dokken (= 2.6.5) - kitchen-ec2 (= 1.3.2) - kitchen-google (= 1.4.0) - kitchen-hyperv (= 0.5.1) - kitchen-inspec (= 0.20.0) - kitchen-vagrant (= 1.2.1) - knife-cloud (= 1.2.1) - knife-ec2 (= 0.16.0) - knife-google (= 3.2.0) - knife-opc (= 0.3.2) - knife-push (= 1.0.3) - knife-spork (= 1.7.1) - knife-windows (= 1.9.0) - libyajl2 (= 1.2.0) - listen (= 3.1.5) - little-plugger (= 1.1.4) - lockfile (= 2.1.3) - logging (= 2.2.2) - logify (= 0.2.0) - lumberjack (= 1.0.12) - macaddr (= 1.7.1) - memoist (= 0.16.0) - method_source (= 0.9.0) - mime-types (= 3.1) - mime-types-data (= 3.2016.0521) - mini_portile2 (= 2.3.0) - minitar (= 0.5.4) - minitest (= 5.10.3) - mixlib-archive (= 0.4.1) - mixlib-authentication (= 1.4.2) - mixlib-cli (= 1.7.0) - mixlib-config (= 2.2.4) - mixlib-install (= 3.8.0) - mixlib-log (= 1.7.1) - mixlib-shellout (= 2.3.2) - mixlib-versioning (= 1.2.2) - molinillo (= 0.6.4) - multi_json (= 1.12.2) - multi_test (= 0.1.2) - multipart-post (= 2.0.0) - nenv (= 0.3.0) - net-scp (= 1.2.1) - net-sftp (= 2.1.2) - net-ssh (= 4.1.0) - net-ssh-gateway (= 1.3.0) - net-ssh-multi (= 1.2.1) - net-telnet (= 0.1.1) - nio4r (= 2.1.0) - nokogiri (= 1.8.1) - nori (= 2.6.0) - notiffany (= 0.1.1) - octokit (= 4.7.0) - ohai (= 13.6.0) - opscode-pushy-client (= 2.3.0) - os (= 0.9.6) - paint (= 1.0.1) - parallel (= 1.12.0) - parser (= 2.4.0.2) - parslet (= 1.8.1) - plist (= 3.3.0) - polyglot (= 0.3.5) - powerpack (= 0.1.1) - proxifier (= 1.0.3) - pry (= 0.11.3) - pry-byebug (= 3.5.0) - pry-remote (= 0.1.8) - pry-stack_explorer (= 0.4.9.2) - public_suffix (= 3.0.1) - rack (= 2.0.3) - rainbow (= 2.2.2) - rake (= 12.3.0) - rb-fsevent (= 0.10.2) - rb-inotify (= 0.9.10) - rb-readline (= 0.5.5) - rdoc (= 5.1.0) - representable (= 2.3.0) - resource_kit (= 0.1.7) - retriable (= 2.1.0) - retryable (= 2.0.4) - ridley (= 5.1.1) - rspec (= 3.7.0) - rspec-core (= 3.7.0) - rspec-expectations (= 3.7.0) - rspec-its (= 1.2.0) - rspec-mocks (= 3.7.0) - rspec-support (= 3.7.0) - rspec_junit_formatter (= 0.2.3) - rubocop (= 0.49.1) - ruby-prof (= 0.16.2) - ruby-progressbar (= 1.9.0) - ruby-shadow (= 2.5.0) - ruby_dep (= 1.5.0) - rubyntlm (= 0.6.2) - rubyzip (= 1.2.1) - rufus-lru (= 1.1.0) - safe_yaml (= 1.0.4) - sawyer (= 0.8.1) - semverse (= 2.0.0) - serverspec (= 2.41.3) - sfl (= 2.3) - shellany (= 0.0.1) - signet (= 0.8.1) - slop (= 3.6.0) - solve (= 4.0.0) - specinfra (= 2.72.1) - sslshake (= 1.2.0) - stove (= 6.0.0) - stuartpreston-azure-sdk-for-ruby (= 0.7.2) - syslog-logger (= 1.6.8) - systemu (= 2.6.5) - test-kitchen (= 1.19.1) - thor (= 0.19.1) - thread_safe (= 0.3.6) - timers (= 4.0.4) - tomlrb (= 1.2.6) - train (= 0.29.1) - treetop (= 1.6.8) - tzinfo (= 1.2.4) - uber (= 0.0.15) - ubuntu_ami (= 0.4.1) - unicode-display_width (= 1.3.0) - uuid (= 2.3.8) - uuidtools (= 2.1.5) - varia_model (= 0.6.0) - virtus (= 1.0.5) - winrm (= 2.2.3) - winrm-elevated (= 1.1.0) - winrm-fs (= 1.0.2) - wmi-lite (= 1.0.0) - yard (= 0.9.10) - -BUNDLED WITH - 1.15.4 diff --git a/Jenkinsfile b/Jenkinsfile index 585ecfa..ebbc2f3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ node('chef13') { sh 'foodcritic -f "any" -t "~FC071" -t "~FC078" -t "~FC104" -t "~FC005" -X "spec/**/*" -X "test/**/*" -I $FC_RULES_LOCATION .' stage 'EC2 integration tests' // this is the "chef exec bundle exec rake ec2 job" - sh 'chef exec bundle install && chef exec bundle exec rake ci' + sh 'chef exec rake ci' if (env.BRANCH_NAME == 'master') { stage 'supermarket upload' build job: 'supermarket_upload_sub', parameters: [string(name: 'COOKBOOK_BRANCH', value: "${env.BRANCH_COMMIT}"), From b4505fae115cfabd248403424f356f39e9ba9178 Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Tue, 21 Jan 2020 17:40:39 -0500 Subject: [PATCH 12/17] PENG-14437 - Fixed spacing issue. --- metadata.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/metadata.rb b/metadata.rb index 6f03e4e..3b57ce3 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,18 +1,18 @@ -name 'python' -maintainer 'PAAS' -maintainer_email 'paas-integration@gannett.com' -license ' Copyright (c) 2017 Gannett Co., Inc, All Rights Reserved.' -description 'Installs Python, pip and virtualenv. \ - Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' +name 'python' +maintainer 'PAAS' +maintainer_email 'paas-integration@gannett.com' +license ' Copyright (c) 2017 Gannett Co., Inc, All Rights Reserved.' +description 'Installs Python, pip and virtualenv. \ + Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '2.0.3' +version '2.0.3' chef_version '>= 12.11.18' -depends 'build-essential' -depends 'yum-epel' -depends 'yum-gd' +depends 'build-essential' +depends 'yum-epel' +depends 'yum-gd' source_url 'https://github.com/GannettDigital/chef-python' issues_url 'https://github.com/GannettDigital/chef-python/issues' From 5c99931a16272c5a4846b7e07f83da778aab27d4 Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Tue, 21 Jan 2020 18:02:53 -0500 Subject: [PATCH 13/17] PENG-14437 - Updating python version. --- attributes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index 19e35be..183033c 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -35,7 +35,7 @@ when 'custom-package' default['python']['version'] = '2.7.9-1.el7.centos.gd' when 'package' - default['python']['version'] = '2.7.5-58.el7' + default['python']['version'] = '2.7.5-80.el7_6' when 'source' default['python']['version'] = '2.7.9' end From 6d4626bad7e87a90294cfb06addd2c18738765c9 Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Thu, 23 Jan 2020 16:37:50 -0500 Subject: [PATCH 14/17] PENG-14254 - Removing yum-gd. --- .kitchen.ec2.yml | 6 ------ .kitchen.gce.yml | 6 ------ .kitchen.yml | 5 ----- CHANGELOG.md | 4 ++++ metadata.rb | 3 +-- recipes/custom-package.rb | 2 -- 6 files changed, 5 insertions(+), 21 deletions(-) diff --git a/.kitchen.ec2.yml b/.kitchen.ec2.yml index c83c13b..462981f 100644 --- a/.kitchen.ec2.yml +++ b/.kitchen.ec2.yml @@ -33,7 +33,6 @@ platforms: suites: - name: default run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -44,7 +43,6 @@ suites: provisioner: require_chef_omnibus: 14.0.202 run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -53,7 +51,6 @@ suites: virtualenv_version: 13.1.0 - name: package run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -63,7 +60,6 @@ suites: virtualenv_version: 13.1.0 - name: custom-package run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -73,7 +69,6 @@ suites: virtualenv_version: 13.1.0 - name: source run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -81,4 +76,3 @@ suites: install_method: "source" setuptools_version: 18.0.1 virtualenv_version: 13.1.0 - diff --git a/.kitchen.gce.yml b/.kitchen.gce.yml index bca0f16..72d270a 100644 --- a/.kitchen.gce.yml +++ b/.kitchen.gce.yml @@ -34,7 +34,6 @@ platforms: suites: - name: default run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -45,7 +44,6 @@ suites: provisioner: require_chef_omnibus: 14.0.202 run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -54,7 +52,6 @@ suites: virtualenv_version: 13.1.0 - name: package run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -64,7 +61,6 @@ suites: virtualenv_version: 13.1.0 - name: custom-package run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -74,7 +70,6 @@ suites: virtualenv_version: 13.1.0 - name: source run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -82,4 +77,3 @@ suites: install_method: "source" setuptools_version: 18.0.1 virtualenv_version: 13.1.0 - diff --git a/.kitchen.yml b/.kitchen.yml index 7e0d449..0f5fd34 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -13,7 +13,6 @@ platforms: suites: - name: default run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -24,7 +23,6 @@ suites: provisioner: require_chef_omnibus: 14.0.202 run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -33,7 +31,6 @@ suites: virtualenv_version: 13.1.0 - name: package run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -43,7 +40,6 @@ suites: virtualenv_version: 13.1.0 - name: custom-package run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: @@ -53,7 +49,6 @@ suites: virtualenv_version: 13.1.0 - name: source run_list: - - recipe[yum-gd] - recipe[python] - recipe[virtualenv-test] attributes: diff --git a/CHANGELOG.md b/CHANGELOG.md index 57530c7..a83aa06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ python Cookbook CHANGELOG ========================= This file is used to list changes made in each version of the python cookbook. +v2.0.4 +------ +- Joseph Kregloh - Removing yum-gd. (PENG-14254) + v2.0.3 ------ - Joseph Kregloh - Fix for Python setuptools version (PENG-14437) diff --git a/metadata.rb b/metadata.rb index 3b57ce3..cc7a13f 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,13 +6,12 @@ Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '2.0.3' +version '2.0.4' chef_version '>= 12.11.18' depends 'build-essential' depends 'yum-epel' -depends 'yum-gd' source_url 'https://github.com/GannettDigital/chef-python' issues_url 'https://github.com/GannettDigital/chef-python/issues' diff --git a/recipes/custom-package.rb b/recipes/custom-package.rb index a4db16e..fdeb360 100644 --- a/recipes/custom-package.rb +++ b/recipes/custom-package.rb @@ -21,8 +21,6 @@ # This recipe assumes that you have a custom package repository with # Python built and named as "python27" -include_recipe 'yum-gd' - python_pkgs = [node['python']['custom_package_name'], "#{node['python']['custom_package_name']}-devel"] python_pkgs.each do |pkg| From 252590125e8da217174e6bc09462ba7092a55111 Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Thu, 23 Jan 2020 16:46:26 -0500 Subject: [PATCH 15/17] PENG-14254 - Removed more yum-gd. --- spec/unit/recipes/custom_package_spec.rb | 6 +----- .../chef13-default/serverspec/custom-package_spec.rb | 3 +-- test/integration/default/serverspec/custom-package_spec.rb | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/spec/unit/recipes/custom_package_spec.rb b/spec/unit/recipes/custom_package_spec.rb index 20c2bd5..b3b08ed 100644 --- a/spec/unit/recipes/custom_package_spec.rb +++ b/spec/unit/recipes/custom_package_spec.rb @@ -11,16 +11,12 @@ end.converge(described_recipe) end - it 'includes yum-gd' do - expect(chef_run).to include_recipe('yum-gd') - end - it 'installs python27' do expect(chef_run).to install_package('python27') end it 'installs python-devel' do expect(chef_run).to install_package('python27-devel') - end + end end end diff --git a/test/integration/chef13-default/serverspec/custom-package_spec.rb b/test/integration/chef13-default/serverspec/custom-package_spec.rb index 5ccdba1..3d103ea 100644 --- a/test/integration/chef13-default/serverspec/custom-package_spec.rb +++ b/test/integration/chef13-default/serverspec/custom-package_spec.rb @@ -1,6 +1,5 @@ require_relative 'spec_helper' -#Should include yum-gd recipe describe file('/etc/yum.repos.d/gdcustom.repo') do it { should be_file } end @@ -12,4 +11,4 @@ describe package('python27-devel') do it { should be_installed } -end \ No newline at end of file +end diff --git a/test/integration/default/serverspec/custom-package_spec.rb b/test/integration/default/serverspec/custom-package_spec.rb index 5ccdba1..3d103ea 100644 --- a/test/integration/default/serverspec/custom-package_spec.rb +++ b/test/integration/default/serverspec/custom-package_spec.rb @@ -1,6 +1,5 @@ require_relative 'spec_helper' -#Should include yum-gd recipe describe file('/etc/yum.repos.d/gdcustom.repo') do it { should be_file } end @@ -12,4 +11,4 @@ describe package('python27-devel') do it { should be_installed } -end \ No newline at end of file +end From c2163f042fbd54b74ab4dfd63771011e5e969099 Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Fri, 18 Nov 2022 16:45:24 -0500 Subject: [PATCH 16/17] PENG-22741 - Add variable for wheel. --- CHANGELOG.md | 5 +++++ attributes/default.rb | 1 + metadata.rb | 2 +- recipes/pip.rb | 4 ++-- test/integration/chef13-default/serverspec/Gemfile | 2 ++ test/integration/custom-package/serverspec/Gemfile | 2 ++ test/integration/default/serverspec/Gemfile | 2 ++ test/integration/helpers/serverspec/Gemfile | 2 ++ test/integration/package/serverspec/Gemfile | 2 ++ test/integration/source/serverspec/Gemfile | 2 ++ 10 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 test/integration/chef13-default/serverspec/Gemfile create mode 100644 test/integration/custom-package/serverspec/Gemfile create mode 100644 test/integration/default/serverspec/Gemfile create mode 100644 test/integration/helpers/serverspec/Gemfile create mode 100644 test/integration/package/serverspec/Gemfile create mode 100644 test/integration/source/serverspec/Gemfile diff --git a/CHANGELOG.md b/CHANGELOG.md index a83aa06..22c5536 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ python Cookbook CHANGELOG ========================= This file is used to list changes made in each version of the python cookbook. +v2.0.5 +------ +- Joseph Kregloh - Added variable for Wheel and set a default. Wheel was updated + to not work with older versions of Python and get-pip.py just gets latest. (PENG-22741) + v2.0.4 ------ - Joseph Kregloh - Removing yum-gd. (PENG-14254) diff --git a/attributes/default.rb b/attributes/default.rb index 183033c..1cd35ac 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -51,4 +51,5 @@ default['python']['setuptools_version'] = nil # defaults to latest default['python']['virtualenv_version'] = nil default['python']['pip']['version'] = '7.1.2' +default['python']['wheel']['version'] = '0.37.1' default['python']['setuptools_version'] = '44.0.0' diff --git a/metadata.rb b/metadata.rb index cc7a13f..650ea8b 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,7 +6,7 @@ Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '2.0.4' +version '2.0.5' chef_version '>= 12.11.18' diff --git a/recipes/pip.rb b/recipes/pip.rb index abe9559..8e9ea8f 100644 --- a/recipes/pip.rb +++ b/recipes/pip.rb @@ -43,11 +43,11 @@ cwd Chef::Config[:file_cache_path] if node['python']['install_method'] == 'custom-package' command <<-EOF - #{node['python']['custom_binary']} get-pip.py --no-setuptools pip==#{node['python']['pip']['version']} + #{node['python']['custom_binary']} get-pip.py --no-setuptools wheel==#{node['python']['wheel']['version']} pip==#{node['python']['pip']['version']} EOF else command <<-EOF - #{node['python']['binary']} get-pip.py --no-setuptools pip==#{node['python']['pip']['version']} + #{node['python']['binary']} get-pip.py --no-setuptools wheel==#{node['python']['wheel']['version']} pip==#{node['python']['pip']['version']} EOF end not_if { ::File.exist?(pip_binary) } diff --git a/test/integration/chef13-default/serverspec/Gemfile b/test/integration/chef13-default/serverspec/Gemfile new file mode 100644 index 0000000..00b80ee --- /dev/null +++ b/test/integration/chef13-default/serverspec/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'serverspec', '= 2.41.3' diff --git a/test/integration/custom-package/serverspec/Gemfile b/test/integration/custom-package/serverspec/Gemfile new file mode 100644 index 0000000..00b80ee --- /dev/null +++ b/test/integration/custom-package/serverspec/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'serverspec', '= 2.41.3' diff --git a/test/integration/default/serverspec/Gemfile b/test/integration/default/serverspec/Gemfile new file mode 100644 index 0000000..00b80ee --- /dev/null +++ b/test/integration/default/serverspec/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'serverspec', '= 2.41.3' diff --git a/test/integration/helpers/serverspec/Gemfile b/test/integration/helpers/serverspec/Gemfile new file mode 100644 index 0000000..00b80ee --- /dev/null +++ b/test/integration/helpers/serverspec/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'serverspec', '= 2.41.3' diff --git a/test/integration/package/serverspec/Gemfile b/test/integration/package/serverspec/Gemfile new file mode 100644 index 0000000..00b80ee --- /dev/null +++ b/test/integration/package/serverspec/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'serverspec', '= 2.41.3' diff --git a/test/integration/source/serverspec/Gemfile b/test/integration/source/serverspec/Gemfile new file mode 100644 index 0000000..00b80ee --- /dev/null +++ b/test/integration/source/serverspec/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'serverspec', '= 2.41.3' From 8aad10ab6aed57b26f0fa4fba750580e2cbfa732 Mon Sep 17 00:00:00 2001 From: Joseph Kregloh <5833499+funzie19@users.noreply.github.com> Date: Tue, 29 Nov 2022 10:07:46 -0500 Subject: [PATCH 17/17] PENG-22741 - Added variable for virtualenv options. --- CHANGELOG.md | 4 ++++ attributes/default.rb | 1 + metadata.rb | 2 +- recipes/virtualenv.rb | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22c5536..fe54ec1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ python Cookbook CHANGELOG ========================= This file is used to list changes made in each version of the python cookbook. +v2.0.6 +------ +- Joseph Kregloh - Added variable virtualenv install options (PENG-22741) + v2.0.5 ------ - Joseph Kregloh - Added variable for Wheel and set a default. Wheel was updated diff --git a/attributes/default.rb b/attributes/default.rb index 1cd35ac..f4f9b33 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -50,6 +50,7 @@ default['python']['virtualenv_location'] = "#{node['python']['prefix_dir']}/bin/virtualenv" default['python']['setuptools_version'] = nil # defaults to latest default['python']['virtualenv_version'] = nil +default['python']['virtualenv_options'] = nil default['python']['pip']['version'] = '7.1.2' default['python']['wheel']['version'] = '0.37.1' default['python']['setuptools_version'] = '44.0.0' diff --git a/metadata.rb b/metadata.rb index 650ea8b..29d07f9 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,7 +6,7 @@ Includes LWRPs for managing Python packages with `pip` and `virtualenv` isolated Python environments.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '2.0.5' +version '2.0.6' chef_version '>= 12.11.18' diff --git a/recipes/virtualenv.rb b/recipes/virtualenv.rb index 65fabb9..11b9a58 100644 --- a/recipes/virtualenv.rb +++ b/recipes/virtualenv.rb @@ -23,4 +23,5 @@ python_pip 'virtualenv' do action :upgrade version node['python']['virtualenv_version'] + options node['python']['virtualenv_options'] end