From cead131f1df430634fbf3c181e26f7029cbf4539 Mon Sep 17 00:00:00 2001 From: Dayne Broderson Date: Sat, 28 Jan 2017 22:00:39 -0900 Subject: [PATCH 1/7] working 5.1 for ubuntu --- README.md | 5 +++++ attributes/default.rb | 6 +++--- metadata.rb | 2 +- recipes/default.rb | 7 ++++--- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5d3e1ca..72cf86e 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ Installs Virtualbox on OS X, Debian/Ubuntu or Windows. Changes ======= +## v2.0 + +* Update to Virtualbox 5.1 as default +* Point to new VirtualBox Ubuntu 2016 signing key + ## v1.0.4 * Add chefignore diff --git a/attributes/default.rb b/attributes/default.rb index a7eb105..463e46a 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -23,10 +23,10 @@ case node['platform_family'] when 'mac_os_x' - default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/4.2.12/VirtualBox-4.2.12-84980-OSX.dmg' + default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-OSX.dmg' when 'windows' - default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/4.2.12/VirtualBox-4.2.12-84980-Win.exe' + default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-Win.exe' default['virtualbox']['version'] = Vbox::Helpers.vbox_version(node['virtualbox']['url']) when 'debian', 'rhel', 'fedora' - default['virtualbox']['version'] = '4.3' + default['virtualbox']['version'] = '5.1' end diff --git a/metadata.rb b/metadata.rb index de6ab82..18932be 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license "Apache 2.0" description "Installs virtualbox" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "1.0.4" +version "2.0.1" %w{ubuntu debian centos redhat mac_os_x windows fedora}.each do |os| supports os diff --git a/recipes/default.rb b/recipes/default.rb index b51fa07..3ca4faa 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -46,7 +46,8 @@ apt_repository 'oracle-virtualbox' do uri 'http://download.virtualbox.org/virtualbox/debian' - key 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc' + key 'A2F683C52980AECF' + #key 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc' distribution node['lsb']['codename'] components ['contrib'] end @@ -57,10 +58,10 @@ when 'rhel', 'fedora' yum_repository 'oracle-virtualbox' do - description "#{node['platform_family']} $releasever - $basearch - Virtualbox" + description "#{node['platform_family']} $releasever - $basearch - Virtualbox" baseurl "http://download.virtualbox.org/virtualbox/rpm/#{node['platform_family']}/$releasever/$basearch" gpgcheck true - gpgkey 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc' + gpgkey 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc' end package "VirtualBox-#{node['virtualbox']['version']}" From a3153ee7af8850547ca215df3390c741e3fe230e Mon Sep 17 00:00:00 2001 From: Dayne Broderson Date: Sat, 11 Feb 2017 16:51:33 -0900 Subject: [PATCH 2/7] inspec tests for ubuntu, centos, fix rhel gpgkey --- .kitchen.yml | 34 +++++++++----------- recipes/default.rb | 3 +- spec/default_spec.rb | 6 ++-- test/integration/default/bats/installed.bats | 6 ---- test/integration/default/default_spec.rb | 9 ++++++ 5 files changed, 29 insertions(+), 29 deletions(-) delete mode 100644 test/integration/default/bats/installed.bats create mode 100644 test/integration/default/default_spec.rb diff --git a/.kitchen.yml b/.kitchen.yml index 3fe06ed..04fa904 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -1,23 +1,21 @@ ---- -driver_plugin: vagrant + +driver: + name: vagrant + +verifier: + name: inspec + +provisioner: + name: chef_zero platforms: -- name: debian-6 - driver_config: - box: opscode-debian-6.0.7 - box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_debian-6.0.7_chef-11.2.0.box - require_chef_omnibus: 11.4.0 -- name: ubuntu-12.04 - driver_config: - box: canonical-ubuntu-12.04 - box_url: http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box - require_chef_omnibus: true -- name: centos-6.3 - driver_config: - box: opscode-centos-6.3 - box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.3_chef-11.2.0.box + - name: ubuntu-16.04 + - name: debian-8.6 + - name: centos-6.8 + - name: centos-7.2 suites: - name: default - run_list: ["recipe[virtualbox]"] - attributes: {} + run_list: + - recipe[virtualbox] + attributes: diff --git a/recipes/default.rb b/recipes/default.rb index 3ca4faa..bfafc94 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -47,7 +47,6 @@ apt_repository 'oracle-virtualbox' do uri 'http://download.virtualbox.org/virtualbox/debian' key 'A2F683C52980AECF' - #key 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc' distribution node['lsb']['codename'] components ['contrib'] end @@ -61,7 +60,7 @@ description "#{node['platform_family']} $releasever - $basearch - Virtualbox" baseurl "http://download.virtualbox.org/virtualbox/rpm/#{node['platform_family']}/$releasever/$basearch" gpgcheck true - gpgkey 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc' + gpgkey 'https://www.virtualbox.org/download/oracle_vbox.asc' end package "VirtualBox-#{node['virtualbox']['version']}" diff --git a/spec/default_spec.rb b/spec/default_spec.rb index 8c6d8f1..3b968d5 100644 --- a/spec/default_spec.rb +++ b/spec/default_spec.rb @@ -1,11 +1,11 @@ require 'spec_helper' describe 'virtualbox::default' do - context 'on Centos 6.4 x86_64 with virtualbox 4.3' do + context 'on Centos 6.8 x86_64 with virtualbox 5.1' do let(:chef_run) do - ChefSpec::Runner.new(platform: 'centos', version: 6.4, step_into: ['yum_repository']) do |node| + ChefSpec::Runner.new(platform: 'centos', version: 6.8, step_into: ['yum_repository']) do |node| node.automatic['kernel']['machine'] = 'x86_64' - node.default['virtualbox']['version'] = 4.3 + node.default['virtualbox']['version'] = 5.1 end.converge(described_recipe) end diff --git a/test/integration/default/bats/installed.bats b/test/integration/default/bats/installed.bats deleted file mode 100644 index cdd18a3..0000000 --- a/test/integration/default/bats/installed.bats +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bats - -@test 'virtualbox-4.3 is installed' { - run test "rpm -qa Virtualbox-4.3 || dpkg-query -s virtualbox-4.3" - [ "$status" -eq 0 ] -} diff --git a/test/integration/default/default_spec.rb b/test/integration/default/default_spec.rb new file mode 100644 index 0000000..ec4b165 --- /dev/null +++ b/test/integration/default/default_spec.rb @@ -0,0 +1,9 @@ +describe package('VirtualBox-5.1') do + it { should be_installed } +end + +describe command('virtualbox --help') do + its('exit_status') { should eq 0 } + its('stdout') { should match 'Oracle VM VirtualBox Manager' } + its('stderr') { should match '' } +end From 68aa4c86608a182c05e9b0f0b5ee8c6d60b4b884 Mon Sep 17 00:00:00 2001 From: Dayne Broderson Date: Sat, 11 Feb 2017 17:01:45 -0900 Subject: [PATCH 3/7] update changelog and readme --- .kitchen.yml | 1 + CHANGELOG.md | 8 ++++++++ README.md | 10 ++++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index 04fa904..2055703 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -10,6 +10,7 @@ provisioner: platforms: - name: ubuntu-16.04 + - name: ubuntu-16.10 - name: debian-8.6 - name: centos-6.8 - name: centos-7.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index f0b0cb7..d8acb64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # changelog +## 2.0.1 + +* update to VirtualBox 5.1 and confirm it works for following in test kitchen + * ubuntu-16.04, 16.10 + * centos 6.8, 7.2 + * debian 8.6 +* convert to inspec tests to verify successfull install in above environments + ## 1.0.3 * update `yum` dependency to 3 diff --git a/README.md b/README.md index 72cf86e..765747f 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,12 @@ Installs Virtualbox on OS X, Debian/Ubuntu or Windows. Changes ======= -## v2.0 +## v2.0.1 -* Update to Virtualbox 5.1 as default -* Point to new VirtualBox Ubuntu 2016 signing key +* Update to Virtualbox-5.1 as default +* Point to new signing keys for Ubuntu and RHEL +* Expand test kitchen to test on Debian, Ubuntu, and centos-6 +* Add inspec test to verify install of VirtualBox-5.1 ## v1.0.4 * Add chefignore @@ -208,7 +210,7 @@ Contributions ============= The source for this cookbook is hosted on -[GitHub](https://github.com/peplin/virtualbox-cookbook). If you have any issues +[GitHub](https://github.com/bradleyd/virtualbox-cookbook). If you have any issues with this cookbook, please follow up there. License and Author From fd44b9f6f402b3fae552ab152e5acf60e5f84994 Mon Sep 17 00:00:00 2001 From: Dayne Broderson Date: Thu, 9 Mar 2017 10:19:52 -0900 Subject: [PATCH 4/7] 5.1.16 update capturing links to the 5.1.16 while thinking about it. --- attributes/default.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/attributes/default.rb b/attributes/default.rb index 463e46a..32cb6a9 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -24,8 +24,10 @@ case node['platform_family'] when 'mac_os_x' default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-OSX.dmg' + # http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-OSX.dmg when 'windows' default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-Win.exe' + # http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-Win.exe default['virtualbox']['version'] = Vbox::Helpers.vbox_version(node['virtualbox']['url']) when 'debian', 'rhel', 'fedora' default['virtualbox']['version'] = '5.1' From 15ca1aef1936ab5f82afb6469140051ca8d86c70 Mon Sep 17 00:00:00 2001 From: Dayne Broderson Date: Sat, 11 Mar 2017 08:43:35 -0900 Subject: [PATCH 5/7] updating osx and win to 5.1.16-113841 --- attributes/default.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index 32cb6a9..e290650 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -23,11 +23,9 @@ case node['platform_family'] when 'mac_os_x' - default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-OSX.dmg' - # http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-OSX.dmg + default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-OSX.dmg' when 'windows' - default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-Win.exe' - # http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-Win.exe + default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-Win.exe' default['virtualbox']['version'] = Vbox::Helpers.vbox_version(node['virtualbox']['url']) when 'debian', 'rhel', 'fedora' default['virtualbox']['version'] = '5.1' From 74d142eb58d4f438d0b6c3032924b7f70673b419 Mon Sep 17 00:00:00 2001 From: Dayne Broderson Date: Mon, 13 Mar 2017 22:11:26 -0800 Subject: [PATCH 6/7] updating to 5.1.16 for win&osx users not tested yet in a good way --- Berksfile | 3 ++- attributes/default.rb | 4 ++-- metadata.rb | 11 ++++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Berksfile b/Berksfile index 97d7d42..34fea21 100644 --- a/Berksfile +++ b/Berksfile @@ -1,2 +1,3 @@ -site :opscode +source 'https://supermarket.chef.io' + metadata diff --git a/attributes/default.rb b/attributes/default.rb index 463e46a..e290650 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -23,9 +23,9 @@ case node['platform_family'] when 'mac_os_x' - default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-OSX.dmg' + default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-OSX.dmg' when 'windows' - default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.14/VirtualBox-5.1.14-112924-Win.exe' + default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-Win.exe' default['virtualbox']['version'] = Vbox::Helpers.vbox_version(node['virtualbox']['url']) when 'debian', 'rhel', 'fedora' default['virtualbox']['version'] = '5.1' diff --git a/metadata.rb b/metadata.rb index 18932be..c40cdab 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,10 +1,15 @@ name "virtualbox" -maintainer "Bradley D Smith" -maintainer_email "bradleydsmith@gmail.com" +# maintainer "Bradley D Smith" +# maintainer_email "bradleydsmith@gmail.com" +maintainer "Dayne Broderson" +maintainer_email "broderson@gmail.com" license "Apache 2.0" description "Installs virtualbox" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "2.0.1" +version "2.0.2" + +source_url "https://github.com/dayne/virtualbox-cookbook" +issues_url "https://github.com/dayne/virtualbox-cookbook/issues" %w{ubuntu debian centos redhat mac_os_x windows fedora}.each do |os| supports os From 6f0e290e156ff30d62a36ce838c185951e67c02d Mon Sep 17 00:00:00 2001 From: Dayne Broderson Date: Sat, 25 Mar 2017 21:31:25 -0800 Subject: [PATCH 7/7] 5.1.18 update and working test kitchen windows install --- .kitchen.yml | 10 ++++++++++ CHANGELOG.md | 9 ++++++++- attributes/default.rb | 7 ++++--- metadata.rb | 2 +- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index 2055703..e9832ea 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -5,6 +5,12 @@ driver: verifier: name: inspec +transport: + username: vagrant + password: vagrant + elevated: true + name: winrm + provisioner: name: chef_zero @@ -14,6 +20,10 @@ platforms: - name: debian-8.6 - name: centos-6.8 - name: centos-7.2 + - name: windows-2016 + driver: + box: mwrock/Windows2016 + gui: false suites: - name: default diff --git a/CHANGELOG.md b/CHANGELOG.md index d8acb64..8418660 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,19 @@ # changelog +## 2.0.3 + +* VirtualBox 5.1.18 as default +* Working test kitchen for Windows 2016 using publicly available Windows 2016 +image from @mwrock's [mrock/packer-templates](https://github.com/mwrock/packer-templates). Others should be able to converge & verify for windows systems. +* Updating contact info in metadata + ## 2.0.1 * update to VirtualBox 5.1 and confirm it works for following in test kitchen * ubuntu-16.04, 16.10 * centos 6.8, 7.2 * debian 8.6 -* convert to inspec tests to verify successfull install in above environments +* convert to inspec tests to verify successful install in above environments ## 1.0.3 * update `yum` dependency to 3 diff --git a/attributes/default.rb b/attributes/default.rb index e290650..f6ce111 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -23,10 +23,11 @@ case node['platform_family'] when 'mac_os_x' - default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-OSX.dmg' + default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.18/VirtualBox-5.1.18-114002-OSX.dmg' when 'windows' - default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.16/VirtualBox-5.1.16-113841-Win.exe' - default['virtualbox']['version'] = Vbox::Helpers.vbox_version(node['virtualbox']['url']) + default['virtualbox']['url'] = 'http://download.virtualbox.org/virtualbox/5.1.18/VirtualBox-5.1.18-114002-Win.exe' + default['virtualbox']['version'] = '5.1.18' +# Vbox::Helpers.vbox_version(node['virtualbox']['url']) when 'debian', 'rhel', 'fedora' default['virtualbox']['version'] = '5.1' end diff --git a/metadata.rb b/metadata.rb index c40cdab..48aec8c 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,7 +6,7 @@ license "Apache 2.0" description "Installs virtualbox" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "2.0.2" +version "2.0.3" source_url "https://github.com/dayne/virtualbox-cookbook" issues_url "https://github.com/dayne/virtualbox-cookbook/issues"