hetzner-k3s 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/lib/hetzner/k3s/version.rb +1 -1
- data/lib/hetzner/utils.rb +11 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17e2373497278dc7f975158e93d2f0041e2e7b248fc31ba90f9088ad5a0c8b35
|
4
|
+
data.tar.gz: 35ff6dee9d6a84dbf7d1265ac4646da142c6ea030815dca4dbe6727528dec6de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a23e73a53b5cb205609c5b6cdaa17ef70bafcbf0c5783c0fa988fccac9cdae8da20fd12c3f644e47d2ff6d66bf914bcb2b0540ff83ef7a79943e970bd36bc18
|
7
|
+
data.tar.gz: 565b8e15b98dba8a0fbd0ef4699b0890fb5536e0f80d99f2dcab19352a26b50389c2923c4658a685a60569fa054b777fbe9d0111f9f9b1b78cd24070dceab96c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -64,7 +64,7 @@ brew install vitobotta/tap/hetzner_k3s
|
|
64
64
|
#### Binary installation (Intel)
|
65
65
|
|
66
66
|
```bash
|
67
|
-
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.
|
67
|
+
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.4/hetzner-k3s-mac-amd64
|
68
68
|
chmod +x hetzner-k3s-mac-x64
|
69
69
|
sudo mv hetzner-k3s-mac-x64 /usr/local/bin/hetzner-k3s
|
70
70
|
```
|
@@ -72,7 +72,7 @@ sudo mv hetzner-k3s-mac-x64 /usr/local/bin/hetzner-k3s
|
|
72
72
|
#### Binary installation (Apple Silicon/M1)
|
73
73
|
|
74
74
|
```bash
|
75
|
-
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.
|
75
|
+
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.4/hetzner-k3s-mac-arm64
|
76
76
|
chmod +x hetzner-k3s-mac-arm
|
77
77
|
sudo mv hetzner-k3s-mac-arm /usr/local/bin/hetzner-k3s
|
78
78
|
```
|
@@ -82,7 +82,7 @@ NOTE: currently the ARM version still requires [Rosetta](https://support.apple.c
|
|
82
82
|
### Linux
|
83
83
|
|
84
84
|
```bash
|
85
|
-
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.
|
85
|
+
wget https://github.com/vitobotta/hetzner-k3s/releases/download/v0.6.4/hetzner-k3s-linux-x86_64
|
86
86
|
chmod +x hetzner-k3s-linux-x86_64
|
87
87
|
sudo mv hetzner-k3s-linux-x86_64 /usr/local/bin/hetzner-k3s
|
88
88
|
```
|
@@ -107,7 +107,7 @@ Alternatively, if you don't want to set up a Ruby runtime but have Docker instal
|
|
107
107
|
docker run --rm -it \
|
108
108
|
-v ${PWD}:/cluster \
|
109
109
|
-v ${HOME}/.ssh:/tmp/.ssh \
|
110
|
-
vitobotta/hetzner-k3s:v0.6.
|
110
|
+
vitobotta/hetzner-k3s:v0.6.4 \
|
111
111
|
create-cluster \
|
112
112
|
--config-file /cluster/test.yaml
|
113
113
|
```
|
data/lib/hetzner/k3s/version.rb
CHANGED
data/lib/hetzner/utils.rb
CHANGED
@@ -69,6 +69,7 @@ module Utils
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def ssh(server, command, print_output: false)
|
72
|
+
debug = ENV.fetch('SSH_DEBUG', false)
|
72
73
|
retries = 0
|
73
74
|
|
74
75
|
public_ip = server.dig('public_net', 'ipv4', 'ip')
|
@@ -77,6 +78,7 @@ module Utils
|
|
77
78
|
params = { verify_host_key: (verify_host_key ? :always : :never) }
|
78
79
|
|
79
80
|
params[:keys] = private_ssh_key_path && [private_ssh_key_path]
|
81
|
+
params[:verbose] = :debug if debug
|
80
82
|
|
81
83
|
Net::SSH.start(public_ip, 'root', params) do |session|
|
82
84
|
session.exec!(command) do |_channel, _stream, data|
|
@@ -85,19 +87,24 @@ module Utils
|
|
85
87
|
end
|
86
88
|
end
|
87
89
|
output.chop
|
88
|
-
rescue Timeout::Error, IOError, Errno::EBADF
|
90
|
+
rescue Timeout::Error, IOError, Errno::EBADF => e
|
91
|
+
puts "SSH CONNECTION DEBUG: #{e.message}" if debug
|
89
92
|
retries += 1
|
90
93
|
retry unless retries > 15
|
91
94
|
rescue Net::SSH::Disconnect => e
|
95
|
+
puts "SSH CONNECTION DEBUG: #{e.message}" if debug
|
92
96
|
retries += 1
|
93
97
|
retry unless retries > 15 || e.message =~ /Too many authentication failures/
|
94
|
-
rescue Net::SSH::ConnectionTimeout, Errno::ECONNREFUSED, Errno::ENETUNREACH, Errno::EHOSTUNREACH
|
98
|
+
rescue Net::SSH::ConnectionTimeout, Errno::ECONNREFUSED, Errno::ENETUNREACH, Errno::EHOSTUNREACH => e
|
99
|
+
puts "SSH CONNECTION DEBUG: #{e.message}" if debug
|
95
100
|
retries += 1
|
96
101
|
retry if retries <= 15
|
97
|
-
rescue Net::SSH::AuthenticationFailed
|
102
|
+
rescue Net::SSH::AuthenticationFailed => e
|
103
|
+
puts "SSH CONNECTION DEBUG: #{e.message}" if debug
|
98
104
|
puts '\nCannot continue: SSH authentication failed. Please ensure that the private SSH key is correct.'
|
99
105
|
exit 1
|
100
|
-
rescue Net::SSH::HostKeyMismatch
|
106
|
+
rescue Net::SSH::HostKeyMismatch => e
|
107
|
+
puts "SSH CONNECTION DEBUG: #{e.message}" if debug
|
101
108
|
puts <<-MESSAGE
|
102
109
|
Cannot continue: Unable to SSH into server with IP #{public_ip} because the existing fingerprint in the known_hosts file does not match that of the actual host key.\n
|
103
110
|
This is due to a security check but can also happen when creating a new server that gets assigned the same IP address as another server you've owned in the past.\n
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hetzner-k3s
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vito Botta
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt_pbkdf
|