diff options
author | Tim Smith <tsmith@chef.io> | 2018-10-11 07:40:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-11 07:40:53 -0700 |
commit | e0eb569737fc480d8c4457e517b402abe4914fb9 (patch) | |
tree | 842be107c48f8a30c10b05e5dcde454916a3daee | |
parent | 1fe8b7702493a2b2854741a579d3ff5a5a2851ce (diff) | |
parent | 3d2438bcff27bf35a2a229c84bb5c7bb7e25fe93 (diff) | |
download | chef-e0eb569737fc480d8c4457e517b402abe4914fb9.tar.gz |
Merge pull request #7739 from chef/slim_13
Backport omnibus cleanup + MSI speedup logic from Chef 14
-rw-r--r-- | omnibus/.gitignore | 2 | ||||
-rw-r--r-- | omnibus/.kitchen.vmware.yml | 6 | ||||
-rw-r--r-- | omnibus/Berksfile | 8 | ||||
-rw-r--r-- | omnibus/Gemfile | 10 | ||||
-rw-r--r-- | omnibus/Gemfile.lock | 260 | ||||
-rw-r--r-- | omnibus/README.md | 95 | ||||
-rw-r--r-- | omnibus/config/projects/chef.rb | 12 | ||||
-rw-r--r-- | omnibus/kitchen.yml (renamed from omnibus/.kitchen.yml) | 66 | ||||
-rw-r--r-- | omnibus/resources/chef/msi/source.wxs.erb | 9 |
9 files changed, 275 insertions, 193 deletions
diff --git a/omnibus/.gitignore b/omnibus/.gitignore index 1a2c556f8d..a959250f6e 100644 --- a/omnibus/.gitignore +++ b/omnibus/.gitignore @@ -1,6 +1,6 @@ vendor/bundle pkg/* -.kitchen.local.yml +kitchen.local.yml bin/* files/chef-server-cookbooks/cache/ files/msi/ChefClient-Config.wxi diff --git a/omnibus/.kitchen.vmware.yml b/omnibus/.kitchen.vmware.yml deleted file mode 100644 index 69f001ef97..0000000000 --- a/omnibus/.kitchen.vmware.yml +++ /dev/null @@ -1,6 +0,0 @@ -driver: - name: vagrant - provider: vmware_fusion - customize: - numvcpus: 4 - memsize: 4096 diff --git a/omnibus/Berksfile b/omnibus/Berksfile index 614c6da643..4e6a878bf4 100644 --- a/omnibus/Berksfile +++ b/omnibus/Berksfile @@ -3,10 +3,10 @@ source "https://supermarket.chef.io" cookbook "omnibus" # 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 - cookbook "apt", "~> 2.3" - cookbook "freebsd", "~> 0.1" - cookbook "yum-epel", "~> 0.3" + cookbook "apt" + cookbook "freebsd" + cookbook "yum-epel" end diff --git a/omnibus/Gemfile b/omnibus/Gemfile index dbf7409032..8995215736 100644 --- a/omnibus/Gemfile +++ b/omnibus/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" -gem "omnibus", git: "https://github.com/chef/omnibus" -gem "omnibus-software", git: "https://github.com/chef/omnibus-software" +gem "omnibus", git: "https://github.com/chef/omnibus", branch: "master" +gem "omnibus-software", git: "https://github.com/chef/omnibus-software", branch: "master" gem "pedump" @@ -11,11 +11,11 @@ gem "pedump" # by running `bundle install --without development` to speed up build times. group :development do # Use Berkshelf for resolving cookbook dependencies - gem "berkshelf", "~> 4.0" + gem "berkshelf", ">= 7.0" # Use Test Kitchen with Vagrant for converging the build environment - gem "test-kitchen", "~> 1.13" - gem "kitchen-vagrant", "~> 0.19.0" + gem "test-kitchen", "~> 1.21" + gem "kitchen-vagrant", "~> 1.3.1" gem "winrm-fs", "~> 1.0" gem "pry" gem "pry-byebug" diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index 41a354582a..eda597a9ed 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -1,8 +1,9 @@ GIT remote: https://github.com/chef/omnibus - revision: 386cd17f6a6365bd4585761a2738b4561fbaea97 + revision: 9e1741c2e5925f60822c3192d7c8fc74a6947eeb + branch: master specs: - omnibus (6.0.1) + omnibus (6.0.2) aws-sdk (~> 2) chef-sugar (>= 3.3) cleanroom (~> 1.0) @@ -17,7 +18,8 @@ GIT GIT remote: https://github.com/chef/omnibus-software - revision: 8773058b6cafc053159bbe24851bc7eeb407d492 + revision: a2ee7a44bfb67203001e82b893cbab4cd3e33a75 + branch: master specs: omnibus-software (4.0.0) chef-sugar (>= 3.4.0) @@ -29,53 +31,104 @@ GEM addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) awesome_print (1.8.0) - aws-sdk (2.11.136) - aws-sdk-resources (= 2.11.136) - aws-sdk-core (2.11.136) + aws-sdk (2.11.146) + aws-sdk-resources (= 2.11.146) + aws-sdk-core (2.11.146) aws-sigv4 (~> 1.0) jmespath (~> 1.0) - aws-sdk-resources (2.11.136) - aws-sdk-core (= 2.11.136) + aws-sdk-resources (2.11.146) + aws-sdk-core (= 2.11.146) aws-sigv4 (1.0.3) - berkshelf (4.3.5) - addressable (~> 2.3, >= 2.3.4) - berkshelf-api-client (~> 2.0, >= 2.0.2) - buff-config (~> 1.0) - buff-extensions (~> 1.0) - buff-shell_out (~> 0.1) - celluloid (= 0.16.0) - celluloid-io (~> 0.16.1) + berkshelf (7.0.6) + chef (>= 13.6.52) + chef-config cleanroom (~> 1.0) - faraday (~> 0.9) - httpclient (~> 2.7) - minitar (~> 0.5, >= 0.5.4) - mixlib-archive (~> 0.1) + concurrent-ruby (~> 1.0) + minitar (>= 0.6) + mixlib-archive (~> 0.4) + mixlib-config (>= 2.2.5) + mixlib-shellout (~> 2.0) octokit (~> 4.0) retryable (~> 2.0) - ridley (~> 4.5) - solve (~> 2.0) - thor (~> 0.19) - berkshelf-api-client (2.0.2) - faraday (~> 0.9.1) - httpclient (~> 2.7.0) - ridley (~> 4.5) + solve (~> 4.0) + thor (>= 0.20) binding_of_caller (0.8.0) debug_inspector (>= 0.0.1) - buff-config (1.0.1) - buff-extensions (~> 1.0) - varia_model (~> 0.4) - buff-extensions (1.0.0) - buff-ignore (1.1.1) - buff-ruby_engine (0.1.0) - buff-shell_out (0.2.0) - buff-ruby_engine (~> 0.1.0) builder (3.2.3) byebug (10.0.2) - celluloid (0.16.0) - timers (~> 4.0.0) - celluloid-io (0.16.2) - celluloid (>= 0.16.0) - nio4r (>= 1.1.0) + chef (14.5.33) + addressable + bundler (>= 1.10) + chef-config (= 14.5.33) + chef-zero (>= 13.0) + diff-lcs (~> 1.2, >= 1.2.4) + erubis (~> 2.7) + ffi (~> 1.9, >= 1.9.25) + ffi-yajl (~> 2.2) + highline (~> 1.6, >= 1.6.9) + iniparse (~> 1.4) + iso8601 (~> 0.11.0) + mixlib-archive (~> 0.4) + mixlib-authentication (~> 2.1) + mixlib-cli (~> 1.7) + mixlib-log (~> 2.0, >= 2.0.3) + mixlib-shellout (~> 2.4) + net-sftp (~> 2.1, >= 2.1.2) + net-ssh (~> 4.2) + net-ssh-multi (~> 1.2, >= 1.2.1) + ohai (~> 14.0) + plist (~> 3.2) + proxifier (~> 1.0) + rspec-core (~> 3.5, < 3.8) + rspec-expectations (~> 3.5, < 3.8) + rspec-mocks (~> 3.5, < 3.8) + rspec_junit_formatter (~> 0.2.0) + serverspec (~> 2.7) + specinfra (~> 2.10) + syslog-logger (~> 1.6) + uuidtools (~> 2.1.5) + chef (14.5.33-universal-mingw32) + addressable + bundler (>= 1.10) + chef-config (= 14.5.33) + chef-zero (>= 13.0) + diff-lcs (~> 1.2, >= 1.2.4) + erubis (~> 2.7) + ffi (~> 1.9, >= 1.9.25) + ffi-yajl (~> 2.2) + highline (~> 1.6, >= 1.6.9) + iniparse (~> 1.4) + iso8601 (~> 0.11.0) + mixlib-archive (~> 0.4) + mixlib-authentication (~> 2.1) + mixlib-cli (~> 1.7) + mixlib-log (~> 2.0, >= 2.0.3) + mixlib-shellout (~> 2.4) + net-sftp (~> 2.1, >= 2.1.2) + net-ssh (~> 4.2) + net-ssh-multi (~> 1.2, >= 1.2.1) + ohai (~> 14.0) + plist (~> 3.2) + proxifier (~> 1.0) + rspec-core (~> 3.5, < 3.8) + rspec-expectations (~> 3.5, < 3.8) + rspec-mocks (~> 3.5, < 3.8) + rspec_junit_formatter (~> 0.2.0) + serverspec (~> 2.7) + specinfra (~> 2.10) + syslog-logger (~> 1.6) + uuidtools (~> 2.1.5) + win32-api (~> 1.5.3) + win32-dir (~> 0.5.0) + win32-event (~> 0.6.1) + win32-eventlog (= 0.6.3) + win32-mmap (~> 0.4.1) + win32-mutex (~> 0.4.2) + win32-process (~> 0.8.2) + win32-service (~> 1.0) + win32-taskscheduler (~> 1.0.0) + windows-api (~> 0.4.4) + wmi-lite (~> 1.0) chef-config (14.5.33) addressable fuzzyurl @@ -83,16 +136,26 @@ GEM mixlib-shellout (~> 2.0) tomlrb (~> 1.2) chef-sugar (4.1.0) + chef-zero (14.0.6) + ffi-yajl (~> 2.2) + hashie (>= 2.0, < 4.0) + mixlib-log (~> 2.0) + rack (~> 2.0) + uuidtools (~> 2.1) citrus (3.0.2) cleanroom (1.0.0) coderay (1.1.2) + concurrent-ruby (1.0.5) debug_inspector (0.0.3) + diff-lcs (1.3) erubis (2.7.0) - faraday (0.9.2) + faraday (0.15.3) multipart-post (>= 1.2, < 3) ffi (1.9.25) ffi (1.9.25-x64-mingw32) ffi (1.9.25-x86-mingw32) + ffi-win32-extensions (1.0.3) + ffi ffi-yajl (2.3.1) libyajl2 (~> 1.2) fuzzyurl (0.9.0) @@ -101,18 +164,17 @@ GEM gyoku (1.3.1) builder (>= 2.1.2) hashie (3.6.0) - hitimes (1.3.0) - hitimes (1.3.0-x64-mingw32) - hitimes (1.3.0-x86-mingw32) - httpclient (2.7.2) + highline (1.7.10) + httpclient (2.8.3) + iniparse (1.4.4) iostruct (0.0.4) ipaddress (0.8.3) + iso8601 (0.11.0) jmespath (1.4.0) - json (2.1.0) - kitchen-vagrant (0.19.0) + kitchen-vagrant (1.3.4) test-kitchen (~> 1.4) libyajl2 (1.2.0) - license_scout (1.0.15) + license_scout (1.0.16) ffi-yajl (~> 2.2) mixlib-shellout (~> 2.2) toml-rb (~> 1.0) @@ -138,15 +200,20 @@ GEM win32-process (~> 0.8.2) wmi-lite (~> 1.0) mixlib-versioning (1.2.2) - molinillo (0.4.5) + molinillo (0.6.6) multi_json (1.13.1) multipart-post (2.0.0) net-scp (1.2.1) net-ssh (>= 2.6.5) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) net-ssh (4.2.0) net-ssh-gateway (1.3.0) net-ssh (>= 2.6.5) - nio4r (2.3.1) + net-ssh-multi (1.2.1) + net-ssh (>= 2.6.5) + net-ssh-gateway (>= 1.2.0) + net-telnet (0.1.1) nori (2.6.0) octokit (4.12.0) sawyer (~> 0.8.0, >= 0.5.3) @@ -170,6 +237,7 @@ GEM zhexdump (>= 0.0.2) plist (3.4.0) progressbar (1.10.0) + proxifier (1.0.3) pry (0.11.3) coderay (~> 1.1.0) method_source (~> 0.9.0) @@ -180,35 +248,50 @@ GEM binding_of_caller (>= 0.7) pry (>= 0.9.11) public_suffix (3.0.3) + rack (2.0.5) retryable (2.0.4) - ridley (4.6.1) - addressable - buff-config (~> 1.0) - buff-extensions (~> 1.0) - buff-ignore (~> 1.1.1) - buff-shell_out (~> 0.1) - celluloid (~> 0.16.0) - celluloid-io (~> 0.16.1) - chef-config (>= 12.5.0) - erubis - faraday (~> 0.9.0) - hashie (>= 2.0.2, < 4.0.0) - httpclient (~> 2.7) - json (>= 1.7.7) - mixlib-authentication (>= 1.3.0) - retryable (~> 2.0) - semverse (~> 1.1) - varia_model (~> 0.4.0) + rspec (3.7.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-core (3.7.1) + 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.1) + rspec_junit_formatter (0.2.3) + builder (< 4) + rspec-core (>= 2, < 4, != 2.12.0) ruby-progressbar (1.10.0) rubyntlm (0.6.2) rubyzip (1.2.2) sawyer (0.8.1) addressable (>= 2.3.5, < 2.6) faraday (~> 0.8, < 1.0) - semverse (1.2.1) - solve (2.0.3) - molinillo (~> 0.4.2) - semverse (~> 1.1) + semverse (2.0.0) + serverspec (2.41.3) + multi_json + rspec (~> 3.0) + rspec-its + specinfra (~> 2.72) + sfl (2.3) + solve (4.0.0) + molinillo (~> 0.6) + semverse (>= 1.1, < 3.0) + specinfra (2.76.2) + net-scp + net-ssh (>= 2.7) + net-telnet (= 0.1.1) + sfl + structured_warnings (0.3.0) + syslog-logger (1.6.8) systemu (2.6.5) test-kitchen (1.23.2) mixlib-install (~> 3.6) @@ -221,16 +304,33 @@ GEM winrm-elevated (~> 1.0) winrm-fs (~> 1.1) thor (0.20.0) - timers (4.0.4) - hitimes toml-rb (1.1.2) citrus (~> 3.0, > 3.0) tomlrb (1.2.7) - varia_model (0.4.1) - buff-extensions (~> 1.0) - hashie (>= 2.0.2, < 4.0.0) + uuidtools (2.1.5) + win32-api (1.5.3-universal-mingw32) + win32-dir (0.5.1) + ffi (>= 1.0.0) + win32-event (0.6.3) + win32-ipc (>= 0.6.0) + win32-eventlog (0.6.3) + ffi + win32-ipc (0.7.0) + ffi + win32-mmap (0.4.2) + ffi + win32-mutex (0.4.3) + win32-ipc (>= 0.6.0) win32-process (0.8.3) ffi (>= 1.0.0) + win32-service (1.0.1) + ffi + ffi-win32-extensions + win32-taskscheduler (1.0.10) + ffi + structured_warnings + windows-api (0.4.4) + win32-api (>= 1.4.5) winrm (2.2.3) builder (>= 2.1.2) erubis (~> 2.7) @@ -257,15 +357,15 @@ PLATFORMS x86-mingw32 DEPENDENCIES - berkshelf (~> 4.0) - kitchen-vagrant (~> 0.19.0) + berkshelf (>= 7.0) + kitchen-vagrant (~> 1.3.1) omnibus! omnibus-software! pedump pry pry-byebug pry-stack_explorer - test-kitchen (~> 1.13) + test-kitchen (~> 1.21) winrm-fs (~> 1.0) BUNDLED WITH diff --git a/omnibus/README.md b/omnibus/README.md index 5f325aa164..aa58d6da5e 100644 --- a/omnibus/README.md +++ b/omnibus/README.md @@ -1,22 +1,21 @@ -Client Tools Omnibus project -============================ +# Client Tools Omnibus project + This project creates full-stack platform-specific packages for the following projects: -* AngryChef -* Chef -* Chef with FIPS enabled +- AngryChef +- Chef +- Chef with FIPS enabled + +## Installation -Installation ------------- -You must have a sane Ruby 1.9+ environment with Bundler installed. Ensure all -the required gems are installed: +You must have a sane Ruby environment with Bundler installed. Ensure all the required gems are installed: ```shell $ bundle install --without development ``` -Usage ------ +## Usage + ### Build You create a platform-specific package using the `build project` command: @@ -25,23 +24,17 @@ You create a platform-specific package using the `build project` command: $ bundle exec omnibus build <PROJECT> ``` -The platform/architecture type of the package created will match the platform -where the `build project` command is invoked. For example, running this command -on a MacBook Pro will generate a Mac OS X package. After the build completes -packages will be available in the `pkg/` folder. +The platform/architecture type of the package created will match the platform where the `build project` command is invoked. For example, running this command on a MacBook Pro will generate a Mac OS X package. After the build completes packages will be available in the `pkg/` folder. ### Clean -You can clean up all temporary files generated during the build process with -the `clean` command: +You can clean up all temporary files generated during the build process with the `clean` command: ```shell $ bundle exec omnibus clean <PROJECT> ``` -Adding the `--purge` purge option removes __ALL__ files generated during the -build including the project install directory (`/opt/chef`) and -the package cache directory (`/var/cache/omnibus/pkg`): +Adding the `--purge` purge option removes **ALL** files generated during the build including the project install directory (`/opt/chef`) and the package cache directory (`/var/cache/omnibus/pkg`): ```shell $ bundle exec omnibus clean <PROJECT> --purge @@ -49,9 +42,7 @@ $ bundle exec omnibus clean <PROJECT> --purge ### Publish -Omnibus has a built-in mechanism for releasing to a variety of "backends", such -as Amazon S3 and Artifactory. You must set the proper credentials in your `omnibus.rb` -config file or specify them via the command line. +Omnibus has a built-in mechanism for releasing to a variety of "backends", such as Amazon S3 and Artifactory. You must set the proper credentials in your `omnibus.rb` config file or specify them via the command line. ```shell $ bundle exec omnibus publish path/to/*.deb --backend s3 @@ -59,40 +50,33 @@ $ bundle exec omnibus publish path/to/*.deb --backend s3 ### Help -Full help for the Omnibus command line interface can be accessed with the -`help` command: +Full help for the Omnibus command line interface can be accessed with the `help` command: ```shell $ bundle exec omnibus help ``` -Kitchen-based Build Environment -------------------------------- -Every Omnibus project ships will a project-specific -[Berksfile](http://berkshelf.com/) that will allow you to build your omnibus projects on all of the projects listed -in the `.kitchen.yml`. You can add/remove additional platforms as needed by -changing the list found in the `.kitchen.yml` `platforms` YAML stanza. +## Kitchen-based Build Environment -This build environment is designed to get you up-and-running quickly. However, -there is nothing that restricts you to building on other platforms. Simply use -the [omnibus cookbook](https://github.com/chef-cookbooks/omnibus) to setup -your desired platform and execute the build steps listed above. +Every Omnibus project ships will a project-specific [Berksfile](https://docs.chef.io/berkshelf.html) that will allow you to build your omnibus projects on all of the projects listed in the `kitchen.yml`. You can add/remove additional platforms as needed by changing the list found in the `kitchen.yml` `platforms` YAML stanza. -The default build environment requires Test Kitchen and VirtualBox for local -development. Test Kitchen also exposes the ability to provision instances using -various cloud providers like AWS, DigitalOcean, or OpenStack. For more -information, please see the [Test Kitchen documentation](http://kitchen.ci). +This build environment is designed to get you up-and-running quickly. However, there is nothing that restricts you to building on other platforms. Simply use the [omnibus cookbook](https://github.com/chef-cookbooks/omnibus) to setup your desired platform and execute the build steps listed above. -Once you have tweaked your `.kitchen.yml` (or `.kitchen.local.yml`) to your -liking, you can bring up an individual build environment using the `kitchen` -command. +The default build environment requires Test Kitchen and VirtualBox for local development. Test Kitchen also exposes the ability to provision instances using various cloud providers like AWS, DigitalOcean, or OpenStack. For more information, please see the [Test Kitchen documentation](http://kitchen.ci). + +Once you have tweaked your `kitchen.yml` (or `kitchen.local.yml`) to your liking, you can bring up an individual build environment using the `kitchen` command. ```shell $ bundle exec kitchen converge chef-ubuntu-1404 ``` -Then login to the instance and build the project as described in the Usage -section: +Additional settings are required if using the kitchen-vagrant driver with the Hyper-V provider: + +``` +PS> $env:KITCHEN_LOCAL_YAML="kitchen.hyperv.yml"; kitchen converge chef-windows-server-2012r2-standard +``` + +Then login to the instance and build the project as described in the Usage section: ```shell $ bundle exec kitchen login <PROJECT>-ubuntu-1204 @@ -101,6 +85,7 @@ $ bundle exec kitchen login <PROJECT>-ubuntu-1204 [vagrant@ubuntu...] $ ... [vagrant@ubuntu...] $ bundle exec omnibus build <PROJECT> -l internal ``` + ```shell $ kitchen login chef-ubuntu-1404 [vagrant@ubuntu...] $ source load-omnibus-toolchain.sh @@ -110,10 +95,7 @@ $ kitchen login chef-ubuntu-1404 [vagrant@ubuntu...] $ bundle exec omnibus build chef -l internal ``` -You can also login to Windows instances but will have to manually call the -`load-omnibus-toolchain.bat` script which initializes the build environment. -Please note the mounted code directory is also at `C:\home\vagrant\chef\omnibus` -as opposed to `C:\Users\vagrant\chef\omnibus`. +You can also login to Windows instances but will have to manually call the `load-omnibus-toolchain.ps1` script from an administrative PowerShell session which initializes the build environment. You will also need to `git clone https://github.com/chef/chef` into the `c:\vagrant` folder to workaround the lack of a shared folder. ```shell $ bundle exec kitchen login <PROJECT>-windows-81-professional @@ -121,22 +103,21 @@ Last login: Sat Sep 13 10:19:04 2014 from 172.16.27.1 Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. -C:\>C:\vagrant\load-omnibus-toolchain.bat +C:\>C:\vagrant\load-omnibus-toolchain.ps1 -C:\>cd C:\vagrant\code\chef\omnibus +C:\>cd C:\vagrant\chef\omnibus -C:\vagrant\code\chef\omnibus>bundle install --without development +C:\vagrant\chef\omnibus>bundle install --without development -C:\vagrant\code\chef\omnibus>bundle exec omnibus build chef -l internal +C:\vagrant\chef\omnibus>bundle exec omnibus build chef -l internal ``` -For a complete list of all commands and platforms, run `kitchen list` or -`kitchen help`. +For a complete list of all commands and platforms, run `kitchen list` or `kitchen help`. + +## License -License -------- ```text -Copyright 2012-2016, Chef Software, Inc. +Copyright 2012-2018, Chef Software, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb index f758893cbb..78301b59b5 100644 --- a/omnibus/config/projects/chef.rb +++ b/omnibus/config/projects/chef.rb @@ -1,5 +1,5 @@ # -# Copyright 2012-2017, Chef Software Inc. +# Copyright 2012-2018, Chef Software Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,6 +46,7 @@ overrides_path = File.expand_path("../../../../omnibus_overrides.rb", current_fi instance_eval(IO.read(overrides_path), overrides_path) dependency "preparation" + dependency "chef" # @@ -67,13 +68,12 @@ if windows? dependency "ruby-windows-devkit-bash" end +dependency "chef-cleanup" + package :rpm do signing_passphrase ENV["OMNIBUS_RPM_SIGNING_PASSPHRASE"] - - unless rhel? && platform_version.satisfies?("< 6") - compression_level 1 - compression_type :xz - end + compression_level 1 + compression_type :xz end package :deb do diff --git a/omnibus/.kitchen.yml b/omnibus/kitchen.yml index 7042684836..aad8222c58 100644 --- a/omnibus/.kitchen.yml +++ b/omnibus/kitchen.yml @@ -17,10 +17,6 @@ driver: provisioner: name: chef_zero - # Always install the latest version of Chef. - # This is not the version of chef that we're building - this is the version - # of chef that omnibus needs to build chef/chef. - require_chef_omnibus: true attributes: vagrant: this_key_exists_so_we_have_a_vagrant_key: true @@ -33,55 +29,49 @@ provisioner: chef_omnibus_root: /opt/angrychef platforms: - - name: centos-5.11 + - name: centos-6 run_list: yum-epel::default - - name: centos-6.7 + - name: centos-7 run_list: yum-epel::default - - name: centos-7.2 - run_list: yum-epel::default - - name: debian-6.0.8 - run_list: apt::default - - name: debian-7.9 + - name: debian-8 run_list: apt::default - - name: debian-8.2 + - name: debian-9 run_list: apt::default - - name: freebsd-9.3 - run_list: - - freebsd::portsnap - - freebsd::pkgng - - name: freebsd-10.2 + - name: freebsd-11 run_list: freebsd::portsnap - - name: ubuntu-10.04 + - name: ubuntu-14.04 run_list: apt::default - - name: ubuntu-12.04 + - name: ubuntu-16.04 run_list: apt::default - - name: ubuntu-14.04 + - name: ubuntu-18.04 run_list: apt::default - # The following (private) boxes are shared via Atlas and are only + # The following (private) boxes are shared via Vagrant Cloud and are only # available to users working for Chef. Sorry, it's about software licensing. # # Chef-internal users, you will need to: - # 1. Create an Atlas account: https://atlas.hashicorp.com/ - # 2. Ping #eng-services-support with your Atlas account name - # to be added to the relevant team in Atlas, - # 3. Do `vagrant login` with your Atlas creds so that you can download - # the private boxes. + # 1. Create an Vagrant Cloud account: http://vagrantcloud.com/ + # 2. Ping #releng-support with your account name to be added to the relevant team. + # 3. Do `vagrant login` with your creds so that you can download the private boxes. # - # The Mac OS X boxes are VMware only also. You can enable VMware Fusion - # by activating the `.kitchen.vmware.yml` file with the `KITCHEN_LOCAL_YAML` + # The macOS boxes are VMware only also. You can enable VMware Fusion + # by activating the `kitchen.vmware.yml` file with the `KITCHEN_LOCAL_YAML` # environment variable: # - # KITCHEN_LOCAL_YAML=.kitchen.vmware.yml kitchen converge chefdk-macosx-109 + # KITCHEN_LOCAL_YAML=kitchen.vmware.yml kitchen converge chef-macosx-1011 # # OSX <% %w( - 10.9 - 10.10 - 10.11 + macosx-10.11 + macos-10.12 + macos-10.13 ).each do |mac_version| %> - - name: macosx-<%= mac_version %> + - name: <%= mac_version %> driver: + provider: vmware_fusion + customize: + numvcpus: 4 + memsize: 4096 box: chef/macosx-<%= mac_version %> # private synced_folders: - ['..', '/Users/vagrant/chef'] @@ -103,6 +93,7 @@ platforms: # mounts at `C:\vagrant\code` and the Chef source folder is available # at `C:\vagrant\code\chef` - ['../..', '/vagrant/code'] + communicator: winrm provisioner: attributes: omnibus: @@ -110,6 +101,9 @@ platforms: build_user_group: Administrators build_user_password: vagrant chef_omnibus_root: /opscode/angrychef + transport: + name: winrm + elevated: true # Windows 32-bit # By adding an `i386` to the name the Omnibus cookbook's `load-omnibus-toolchain.bat` @@ -119,6 +113,7 @@ platforms: box: chef/windows-<%= win_version %> # private synced_folders: - ['../..', '/vagrant/code'] + communicator: winrm provisioner: attributes: omnibus: @@ -126,6 +121,9 @@ platforms: build_user_group: Administrators build_user_password: vagrant chef_omnibus_root: /opscode/angrychef + transport: + name: winrm + elevated: true <% end %> suites: @@ -139,6 +137,8 @@ suites: - name: chef attributes: omnibus: + toolchain_channel: stable + toolchain_version: latest install_dir: /opt/chef run_list: - omnibus::default diff --git a/omnibus/resources/chef/msi/source.wxs.erb b/omnibus/resources/chef/msi/source.wxs.erb index 2c597237bb..8b8deaabaa 100644 --- a/omnibus/resources/chef/msi/source.wxs.erb +++ b/omnibus/resources/chef/msi/source.wxs.erb @@ -28,6 +28,13 @@ <Media Id="1" Cabinet="ChefClient.cab" EmbedCab="yes" CompressionLevel="high" /> + <!-- + Take advantage of Windows Installer 5.0 feature (if available) to disable + checkpointing and other costings that take significant amounts of time + ref: https://msdn.microsoft.com/en-us/library/windows/desktop/dd408005(v=vs.85).aspx + --> + <Property Id="MSIFASTINSTALL" Value="7" /> + <Property Id="CHEF_SERVICE_OPTIONS_RADIO_BUTTON_GROUP" Value="None" /> <!-- @@ -229,7 +236,7 @@ --> <Icon Id="oc.ico" SourceFile="Resources\assets\oc_16x16.ico"/> <Property Id="ARPPRODUCTICON" Value="oc.ico" /> - <Property Id="ARPHELPLINK" Value="http://www.getchef.com/support/" /> + <Property Id="ARPHELPLINK" Value="https://www.chef.io/support/" /> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" /> <UIRef Id="ChefClientUI_InstallDir"/> |