From 288d8db00f88dcb0c1bc36aad5e83a4939d022a6 Mon Sep 17 00:00:00 2001 From: Gleb Rusakov Date: Thu, 9 Jul 2020 01:31:06 +0300 Subject: [PATCH] update dependency: etcd ~> 6.0 --- Berksfile | 2 +- Berksfile.lock | 26 +++++++++++++------------- CHANGELOG.md | 1 + metadata.rb | 2 +- recipes/etcd.rb | 14 ++++++++------ 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Berksfile b/Berksfile index ee72face..1ac62817 100644 --- a/Berksfile +++ b/Berksfile @@ -2,7 +2,7 @@ source 'https://supermarket.chef.io' cookbook 'apt' cookbook 'tar' -cookbook 'etcd', '~> 5.6' +cookbook 'etcd', '~> 6.0' cookbook 'firewall' cookbook 'ufw' cookbook 'network_interfaces_v2', github: 'target/network_interfaces_v2-cookbook' diff --git a/Berksfile.lock b/Berksfile.lock index 11f5918b..901a47d7 100644 --- a/Berksfile.lock +++ b/Berksfile.lock @@ -1,6 +1,6 @@ DEPENDENCIES apt - etcd (~> 5.6) + etcd (~> 6.0) firewall kubernetes path: . @@ -14,32 +14,32 @@ DEPENDENCIES ufw GRAPH - apt (7.0.0) - chef-sugar (4.0.0) - docker (4.6.7) - etcd (5.6.0) + apt (7.3.0) + chef-sugar (5.1.8) + docker (6.0.3) + etcd (6.0.0) docker (>= 0.0.0) - firewall (2.6.3) + firewall (2.7.0) chef-sugar (>= 0.0.0) - kernel_module (1.1.1) + kernel_module (1.1.2) kubernetes (1.18.5) apt (>= 0.0.0) - etcd (~> 5.5) + etcd (~> 6.0) firewall (>= 0.0.0) network_interfaces_v2 (>= 0.0.0) tar (>= 0.0.0) ufw (>= 0.0.0) - ms_dotnet (4.2.0) + ms_dotnet (4.2.1) windows (>= 2.1.0) network_interfaces_v2 (2.11.0) kernel_module (~> 1.0) powershell (>= 0.0.0) - powershell (6.1.2) + powershell (6.1.3) ms_dotnet (>= 3.2.1) windows (>= 3.0) - tar (2.1.1) + tar (2.2.0) testrig (0.0.1) kubernetes (>= 0.0.0) - ufw (3.1.1) + ufw (3.2.1) firewall (>= 2.0) - windows (4.3.2) + windows (7.0.0) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ccbbf73..a42d9fa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # UNRELEASED +- Update etcd cookbook to 6.0.0 version # 1.18.5 (08.07.2020) - [Kubernetes: 1.18.5](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.18.md#changelog-since-v1184) diff --git a/metadata.rb b/metadata.rb index f1e0c1c5..0d4cff1e 100644 --- a/metadata.rb +++ b/metadata.rb @@ -11,7 +11,7 @@ supports 'ubuntu', '>= 16.04' depends 'apt' -depends 'etcd', '~> 5.5' +depends 'etcd', '~> 6.0' depends 'network_interfaces_v2' depends 'tar' depends 'firewall' diff --git a/recipes/etcd.rb b/recipes/etcd.rb index 48dd7930..89410a44 100644 --- a/recipes/etcd.rb +++ b/recipes/etcd.rb @@ -91,12 +91,16 @@ end end - etcd_service 'etcd' do - action %i[create start] + etcd_installation_binary 'etcd' do + version node['etcd']['version'].tr('A-z', '') + checksum node['etcd']['checksum'] + action :create + end + + etcd_service_manager_systemd 'etcd' do + action :start node_name k8s_ip default_service_name node['etcd']['default_service_name'] - install_method 'binary' - service_manager service_type advertise_client_urls "#{node['etcd']['proto']}://#{etcd_ip}:#{node['etcd']['client_port']}" cert_file node['etcd']['cert_file'] client_cert_auth node['etcd']['client_cert_auth'] @@ -114,8 +118,6 @@ peer_trusted_ca_file node['etcd']['peer_trusted_ca_file'] trusted_ca_file node['etcd']['trusted_ca_file'] wal_dir node['etcd']['wal_dir'] - version node['etcd']['version'].tr('A-z', '') - checksum node['etcd']['checksum'] not_if do etcd_nodes.empty? or etcd_nodes.any?(&:empty?) end