mirror of
https://github.com/inspec/inspec
synced 2024-11-22 20:53:11 +00:00
Modernize omnibus config and reduce omnibus package size (#3543)
* Modernize the kitchen config This is basically the same one we use in chef/chef * Modernize the omnibus deps * Remove cookbook constraints * Avoid security warnings when bundle installing * Use the ruby-cleanup project to slim the omnibus package We're using this in chef and DK to greatly reduce our artifact size. It's just a set of cleanup steps that are the same for all ruby omnibus projects. Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
parent
41b19003de
commit
559d6d3178
5 changed files with 36 additions and 35 deletions
|
@ -1,6 +0,0 @@
|
||||||
driver:
|
|
||||||
name: vagrant
|
|
||||||
provider: vmware_fusion
|
|
||||||
customize:
|
|
||||||
numvcpus: 4
|
|
||||||
memsize: 4096
|
|
|
@ -4,10 +4,10 @@ source 'https://supermarket.chef.io'
|
||||||
cookbook 'omnibus'
|
cookbook 'omnibus'
|
||||||
|
|
||||||
# Uncomment to use the latest version of the Omnibus cookbook from GitHub
|
# Uncomment to use the latest version of the Omnibus cookbook from GitHub
|
||||||
# cookbook 'omnibus', github: 'opscode-cookbooks/omnibus'
|
# cookbook 'omnibus', github: 'chef-cookbooks/omnibus'
|
||||||
|
|
||||||
group :integration do
|
group :integration do
|
||||||
cookbook 'apt', '~> 2.8'
|
cookbook 'apt'
|
||||||
cookbook 'freebsd', '~> 0.3'
|
cookbook 'freebsd'
|
||||||
cookbook 'yum-epel', '~> 0.6'
|
cookbook 'yum-epel'
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,8 +11,8 @@ source 'https://rubygems.org'
|
||||||
# gem 'omnibus-software', github: 'chef/omnibus-software', branch: 'ksubrama/ruby23'
|
# gem 'omnibus-software', github: 'chef/omnibus-software', branch: 'ksubrama/ruby23'
|
||||||
|
|
||||||
# Use entries from chef's Gemfile
|
# Use entries from chef's Gemfile
|
||||||
gem 'omnibus', github: 'chef/omnibus'
|
gem 'omnibus', git: 'https://github.com/chef/omnibus', branch: 'master'
|
||||||
gem 'omnibus-software', github: 'chef/omnibus-software'
|
gem 'omnibus-software', git: 'https://github.com/chef/omnibus-software', branch: 'master'
|
||||||
|
|
||||||
# This development group is installed by default when you run `bundle install`,
|
# This development group is installed by default when you run `bundle install`,
|
||||||
# but if you are using Omnibus in a CI-based infrastructure, you do not need
|
# but if you are using Omnibus in a CI-based infrastructure, you do not need
|
||||||
|
@ -20,10 +20,10 @@ gem 'omnibus-software', github: 'chef/omnibus-software'
|
||||||
# by running `bundle install --without development` to speed up build times.
|
# by running `bundle install --without development` to speed up build times.
|
||||||
group :development do
|
group :development do
|
||||||
# Use Berkshelf for resolving cookbook dependencies
|
# Use Berkshelf for resolving cookbook dependencies
|
||||||
gem 'berkshelf', '~> 4.3'
|
gem 'berkshelf', '>= 7.0'
|
||||||
|
|
||||||
# Use Test Kitchen with Vagrant for converging the build environment
|
# Use Test Kitchen with Vagrant for converging the build environment
|
||||||
gem 'kitchen-vagrant', '~> 0.19'
|
gem 'kitchen-vagrant', '~> 1.3.1'
|
||||||
gem 'test-kitchen', '~> 1.9'
|
gem 'test-kitchen', '~> 1.21'
|
||||||
gem 'winrm-fs', '~> 0.4'
|
gem 'winrm-fs', '~> 1.0'
|
||||||
end
|
end
|
||||||
|
|
|
@ -59,6 +59,8 @@ dependency 'openssl-customization'
|
||||||
# Remove all .dll.a and .a files needed for static linkage.
|
# Remove all .dll.a and .a files needed for static linkage.
|
||||||
dependency 'clean-static-libs'
|
dependency 'clean-static-libs'
|
||||||
|
|
||||||
|
dependency 'ruby-cleanup'
|
||||||
|
|
||||||
package :rpm do
|
package :rpm do
|
||||||
signing_passphrase ENV['OMNIBUS_RPM_SIGNING_PASSPHRASE']
|
signing_passphrase ENV['OMNIBUS_RPM_SIGNING_PASSPHRASE']
|
||||||
unless rhel? && platform_version.satisfies?('< 6')
|
unless rhel? && platform_version.satisfies?('< 6')
|
||||||
|
|
|
@ -11,7 +11,6 @@ driver:
|
||||||
|
|
||||||
provisioner:
|
provisioner:
|
||||||
name: chef_zero
|
name: chef_zero
|
||||||
require_chef_omnibus: true
|
|
||||||
attributes:
|
attributes:
|
||||||
vagrant:
|
vagrant:
|
||||||
this_key_exists_so_we_have_a_vagrant_key: true
|
this_key_exists_so_we_have_a_vagrant_key: true
|
||||||
|
@ -22,41 +21,47 @@ provisioner:
|
||||||
install_dir: /opt/inspec
|
install_dir: /opt/inspec
|
||||||
|
|
||||||
platforms:
|
platforms:
|
||||||
- name: centos-7.2
|
- name: centos-6
|
||||||
run_list: yum-epel::default
|
run_list: yum-epel::default
|
||||||
- name: centos-6.7
|
- name: centos-7
|
||||||
run_list: yum-epel::default
|
run_list: yum-epel::default
|
||||||
- name: debian-8.2
|
- name: debian-8
|
||||||
run_list: apt::default
|
run_list: apt::default
|
||||||
- name: debian-7.9
|
- name: debian-9
|
||||||
run_list: apt::default
|
run_list: apt::default
|
||||||
- name: ubuntu-14.04
|
- name: ubuntu-14.04
|
||||||
run_list: apt::default
|
run_list: apt::default
|
||||||
- name: ubuntu-12.04
|
- name: ubuntu-16.04
|
||||||
run_list: apt::default
|
run_list: apt::default
|
||||||
# The following (private) boxes are shared via Atlas and are only
|
- name: ubuntu-18.04
|
||||||
|
run_list: apt::default
|
||||||
|
# The following (private) boxes are shared via Vagrant Cloud and are only
|
||||||
# available to users working for Chef. Sorry, it's about software licensing.
|
# available to users working for Chef. Sorry, it's about software licensing.
|
||||||
#
|
#
|
||||||
# Chef-internal users, you will need to:
|
# Chef-internal users, you will need to:
|
||||||
# 1. Create an Atlas account: https://atlas.hashicorp.com/
|
# 1. Create an Vagrant Cloud account: http://vagrantcloud.com/
|
||||||
# 2. Ping #eng-services-support with your Atlas account name
|
# 2. Ping #releng-support with your account name to be added to the relevant team.
|
||||||
# to be added to the relevant team in Atlas,
|
# 3. Do `vagrant login` with your creds so that you can download the private boxes.
|
||||||
# 3. Do `vagrant login` with your Atlas creds so that you can download
|
|
||||||
# the private boxes.
|
|
||||||
#
|
#
|
||||||
# The Mac OS X boxes are VMware only also. You can enable VMware Fusion
|
# The macOS boxes are VMware only also. You can enable VMware Fusion
|
||||||
# by activating the `.kitchen.vmware.yml` file with the `KITCHEN_LOCAL_YAML`
|
# by activating the `kitchen.vmware.yml` file with the `KITCHEN_LOCAL_YAML`
|
||||||
# environment variable:
|
# environment variable:
|
||||||
#
|
#
|
||||||
# KITCHEN_LOCAL_YAML=.kitchen.vmware.yml kitchen converge inspec-macosx-109
|
# KITCHEN_LOCAL_YAML=kitchen.vmware.yml kitchen converge chef-macosx-1011
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# OSX
|
||||||
<% %w(
|
<% %w(
|
||||||
10.9
|
macosx-10.11
|
||||||
10.10
|
macos-10.12
|
||||||
10.11
|
macos-10.13
|
||||||
).each do |mac_version| %>
|
).each do |mac_version| %>
|
||||||
- name: macosx-<%= mac_version %>
|
- name: <%= mac_version %>
|
||||||
driver:
|
driver:
|
||||||
|
provider: vmware_fusion
|
||||||
|
customize:
|
||||||
|
numvcpus: 4
|
||||||
|
memsize: 4096
|
||||||
box: chef/macosx-<%= mac_version %> # private
|
box: chef/macosx-<%= mac_version %> # private
|
||||||
synced_folders:
|
synced_folders:
|
||||||
- ['..', '/Users/vagrant/chef']
|
- ['..', '/Users/vagrant/chef']
|
Loading…
Reference in a new issue