From 21b1c5678f278f724571e5772043e88835a2588b Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Fri, 17 Apr 2015 15:00:26 +0200 Subject: [PATCH 1/7] Add the unattended-upgrades recipe and set to false by default Signed-off-by: Jeroen van Baarsen --- roles/rails_passenger.rb | 3 ++- vendor/cookbooks/rails/attributes/default.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/rails_passenger.rb b/roles/rails_passenger.rb index e99563ad..5d032546 100644 --- a/roles/rails_passenger.rb +++ b/roles/rails_passenger.rb @@ -10,7 +10,8 @@ "recipe[rails::env_vars]", "recipe[git]", "recipe[ssh_deploy_keys]", - "recipe[postfix]" + "recipe[postfix]", + "recipe[apt::unattended-upgrades]" ) default_attributes( diff --git a/vendor/cookbooks/rails/attributes/default.rb b/vendor/cookbooks/rails/attributes/default.rb index 646f2508..b2836a61 100644 --- a/vendor/cookbooks/rails/attributes/default.rb +++ b/vendor/cookbooks/rails/attributes/default.rb @@ -1,3 +1,4 @@ +default["apt"]["unattended_upgrades"]["enabled"] = false default["rails"]["applications_root"] = "/u/apps" default["rbenv"]["binaries_url"] = "http://binaries.intercityup.com/ruby/ubuntu" default["rbenv"]["available_binaries"] = %w(1.9.3-p547 2.0.0-p481 2.1.1 2.1.2 2.1.3 2.1.5 2.2.1) From 23fa3a2e7e95605d0aa7128038de07f55984e05f Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Fri, 17 Apr 2015 15:19:34 +0200 Subject: [PATCH 2/7] Added unattended upgrades to the sample file Signed-off-by: Jeroen van Baarsen --- Vagrantfile | 5 +++++ nodes/sample_host.json | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 1e50261f..0ec582df 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -80,6 +80,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| "users" => ["vagrant"] } }, + "apt" => { + "unattended_upgrades": { + "enabled": true + } + }, "mysql" => { "server_debian_password" => "a", "server_repl_password" => "a", diff --git a/nodes/sample_host.json b/nodes/sample_host.json index 13957906..00b74363 100644 --- a/nodes/sample_host.json +++ b/nodes/sample_host.json @@ -15,6 +15,11 @@ ] } }, + "apt": { + "unattended_upgrades": { + "enabled": true + } + }, "ssh_deploy_keys": [ "" ], From dadf18db866a829d25c4e77643ed8757ab01473d Mon Sep 17 00:00:00 2001 From: Jeroen van Baarsen Date: Fri, 17 Apr 2015 15:22:00 +0200 Subject: [PATCH 3/7] Syntax error in the vagrant file Signed-off-by: Jeroen van Baarsen --- Vagrantfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 0ec582df..48c02d1b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -81,8 +81,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| } }, "apt" => { - "unattended_upgrades": { - "enabled": true + "unattended_upgrades" => { + "enabled" => true } }, "mysql" => { From c167b89d0e20fc58697b264910753a5fe4b95933 Mon Sep 17 00:00:00 2001 From: Michiel Sikkes Date: Thu, 30 Apr 2015 15:17:55 +0200 Subject: [PATCH 4/7] Add unattended-upgrades recipe for regular unicorn rails stack --- roles/rails.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/rails.rb b/roles/rails.rb index ea6fa548..daba6c64 100644 --- a/roles/rails.rb +++ b/roles/rails.rb @@ -11,7 +11,8 @@ "recipe[git]", "recipe[ssh_deploy_keys]", "recipe[postfix]", - "recipe[rails::env_vars]" + "recipe[rails::env_vars]", + "recipe[apt::unattended-upgrades]" ) default_attributes( From 4b51e73f03581064b43c8e3bef3837e86b8f448d Mon Sep 17 00:00:00 2001 From: Michiel Sikkes Date: Thu, 30 Apr 2015 15:24:01 +0200 Subject: [PATCH 5/7] Added a changelog entry for Unattended Upgrades --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db773ec3..71d848fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. This project makes use of the [Sementic Versioning](http://semver.org/) +## 2.5.0 - 2015-04-30 + +### Added +- Allow enabling of unattended upgrades by enabling the "apt:unattended-upgrades" recipe in our Rails stacks + ## 2.4.0 - 2015-04-28 ### Added From 9aef9abd647cdc1df502d7d5d12ddf672514f2b5 Mon Sep 17 00:00:00 2001 From: Michiel Sikkes Date: Thu, 30 Apr 2015 15:40:37 +0200 Subject: [PATCH 6/7] Remove the default attribute for disabling unattended upgrades, this is already the default in the apt cookbook --- vendor/cookbooks/rails/attributes/default.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/vendor/cookbooks/rails/attributes/default.rb b/vendor/cookbooks/rails/attributes/default.rb index 05f5dbb0..7eebc617 100644 --- a/vendor/cookbooks/rails/attributes/default.rb +++ b/vendor/cookbooks/rails/attributes/default.rb @@ -1,4 +1,3 @@ -default["apt"]["unattended_upgrades"]["enabled"] = false default["rails"]["applications_root"] = "/u/apps" default["rbenv"]["binaries_url"] = "http://binaries.intercityup.com/ruby/ubuntu" default["rbenv"]["available_binaries"] = %w(1.9.3-p547 2.0.0-p481 2.1.0 2.1.1 2.1.2 2.1.3 2.1.5 2.2.1) From 63d1a692fa7fba6e084132a84da29f0c5e8f1e41 Mon Sep 17 00:00:00 2001 From: Michiel Sikkes Date: Thu, 30 Apr 2015 15:42:36 +0200 Subject: [PATCH 7/7] Make changelog entry for unattended upgrades clear --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71d848fe..d4af1ca7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This project makes use of the [Sementic Versioning](http://semver.org/) ## 2.5.0 - 2015-04-30 ### Added -- Allow enabling of unattended upgrades by enabling the "apt:unattended-upgrades" recipe in our Rails stacks +- Added the "apt:unattended-upgrades" recipe in our Rails stacks so people can enable unattended upgrades. ## 2.4.0 - 2015-04-28