vagrant-rke2 0.1.5 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -10
- data/README.md +5 -4
- data/lib/vagrant-rke2/provisioner.rb +16 -14
- data/lib/vagrant-rke2/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcdf8c5fdb0b83844650cfbe631a1efe37112422c79d7d857b8ce7118c2ce2cf
|
4
|
+
data.tar.gz: ba7954f2990ae6398a00d51b90e333f1f292cab55ef25a5312983013ad94f81b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 579f25876d80fcdc3adeab19738765b65bac39fea8a318e1447f18145ea3fc953566dcd5967c3178feda51eef2bffcebf980efa7ceee4ce69596824c10b61ea5
|
7
|
+
data.tar.gz: 6c788cee28e185713efbfd164f4c7d39c10b0b4585c94dc929547bb7d1ef276344492b4a8dd9ca2e6f4eeeea26901fb472799731e27b1af12f9c1a29f2311a33
|
data/Gemfile.lock
CHANGED
@@ -28,7 +28,7 @@ GIT
|
|
28
28
|
PATH
|
29
29
|
remote: .
|
30
30
|
specs:
|
31
|
-
vagrant-rke2 (0.1.
|
31
|
+
vagrant-rke2 (0.1.6)
|
32
32
|
|
33
33
|
GEM
|
34
34
|
remote: https://rubygems.org/
|
@@ -36,25 +36,26 @@ GEM
|
|
36
36
|
bcrypt_pbkdf (1.1.0)
|
37
37
|
builder (3.2.4)
|
38
38
|
childprocess (4.1.0)
|
39
|
-
concurrent-ruby (1.1.
|
39
|
+
concurrent-ruby (1.1.10)
|
40
40
|
ed25519 (1.2.4)
|
41
41
|
erubi (1.10.0)
|
42
|
-
excon (0.
|
42
|
+
excon (0.92.3)
|
43
43
|
ffi (1.15.5)
|
44
44
|
gssapi (1.3.1)
|
45
45
|
ffi (>= 1.0.1)
|
46
|
-
gyoku (1.
|
46
|
+
gyoku (1.4.0)
|
47
47
|
builder (>= 2.1.2)
|
48
|
+
rexml (~> 3.0)
|
48
49
|
hashicorp-checkpoint (0.1.5)
|
49
50
|
httpclient (2.8.3)
|
50
|
-
i18n (1.
|
51
|
+
i18n (1.10.0)
|
51
52
|
concurrent-ruby (~> 1.0)
|
52
53
|
listen (3.7.1)
|
53
54
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
54
55
|
rb-inotify (~> 0.9, >= 0.9.10)
|
55
56
|
little-plugger (1.1.4)
|
56
57
|
log4r (1.1.10)
|
57
|
-
logging (2.3.
|
58
|
+
logging (2.3.1)
|
58
59
|
little-plugger (~> 1.1)
|
59
60
|
multi_json (~> 1.14)
|
60
61
|
mime-types (3.4.1)
|
@@ -62,15 +63,15 @@ GEM
|
|
62
63
|
mime-types-data (3.2022.0105)
|
63
64
|
multi_json (1.15.0)
|
64
65
|
net-scp (3.0.0)
|
65
|
-
net-ssh (>= 2.6.5
|
66
|
+
net-ssh (>= 2.6.5)
|
66
67
|
net-sftp (3.0.0)
|
67
68
|
net-ssh (>= 5.0.0, < 7.0.0)
|
68
69
|
net-ssh (6.1.0)
|
69
70
|
nori (2.6.0)
|
70
|
-
rb-fsevent (0.11.
|
71
|
+
rb-fsevent (0.11.1)
|
71
72
|
rb-inotify (0.10.1)
|
72
73
|
ffi (~> 1.0)
|
73
|
-
rb-kqueue (0.2.
|
74
|
+
rb-kqueue (0.2.8)
|
74
75
|
ffi (>= 0.5.0)
|
75
76
|
rexml (3.2.5)
|
76
77
|
rubyntlm (0.6.3)
|
@@ -78,7 +79,7 @@ GEM
|
|
78
79
|
vagrant_cloud (3.0.5)
|
79
80
|
excon (~> 0.73)
|
80
81
|
log4r (~> 1.1.10)
|
81
|
-
rexml (~> 3.2
|
82
|
+
rexml (~> 3.2)
|
82
83
|
wdm (0.1.1)
|
83
84
|
winrm (2.3.6)
|
84
85
|
builder (>= 2.1.2)
|
data/README.md
CHANGED
@@ -44,6 +44,7 @@ Vagrant.configure("2") do |config|
|
|
44
44
|
# config: config file content in yaml
|
45
45
|
# type => String
|
46
46
|
rke2.config = <<~YAML
|
47
|
+
write-kubeconfig-mode: '0644'
|
47
48
|
disable:
|
48
49
|
- local-storage
|
49
50
|
- servicelb
|
@@ -72,8 +73,10 @@ Windows setup is much more restricted. See https://docs.rke2.io/install/install_
|
|
72
73
|
```ruby
|
73
74
|
Vagrant.require_version ">= 2.2.17"
|
74
75
|
Vagrant.configure("2") do |config|
|
75
|
-
config.vm.box = "
|
76
|
-
config.vm.communicator = "
|
76
|
+
config.vm.box = "jborean93/WindowsServer2022"
|
77
|
+
config.vm.communicator = "winssh"
|
78
|
+
config.ssh.password = "vagrant"
|
79
|
+
|
77
80
|
|
78
81
|
config.vm.provision :rke2, run: "once" do |rke2|
|
79
82
|
# installer_url: can be anything that Invoke-WebRequest can access from the guest
|
@@ -89,9 +92,7 @@ Vagrant.configure("2") do |config|
|
|
89
92
|
|
90
93
|
# config: config file content in yaml
|
91
94
|
# type => String
|
92
|
-
# NOTE: kube-proxy-arg: "feature-gates=IPv6DualStack=false" is currently a required config for windows
|
93
95
|
rke2.config = <<~YAML
|
94
|
-
kube-proxy-arg: "feature-gates=IPv6DualStack=false"
|
95
96
|
server: https://172.168.1.200:9345
|
96
97
|
token: vagrant-rke2
|
97
98
|
YAML
|
@@ -80,31 +80,33 @@ module VagrantPlugins
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
+
if config.install_path
|
84
|
+
@machine.ui.info "Adding RKE2 to PATH and KUBECONFIG"
|
85
|
+
outputs, handler = build_outputs
|
86
|
+
begin
|
87
|
+
@machine.communicate.sudo("echo 'export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin' >> /home/vagrant/.bashrc", &handler)
|
88
|
+
@machine.communicate.sudo("echo 'export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin' >> /root/.bashrc", &handler)
|
89
|
+
ensure
|
90
|
+
outputs.values.map(&:close)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
83
94
|
@machine.ui.info "Starting RKE2 service..."
|
84
95
|
if !service.empty?
|
85
96
|
@machine.communicate.sudo("systemctl enable rke2-#{service}.service")
|
86
|
-
|
87
|
-
@machine.
|
97
|
+
if !config.skip_start
|
98
|
+
@machine.communicate.sudo("systemctl restart rke2-#{service}.service") do |type, line|
|
99
|
+
@machine.ui.detail line, :color => :yellow
|
100
|
+
end
|
88
101
|
end
|
89
102
|
else
|
90
103
|
@machine.communicate.sudo("systemctl enable rke2-server.service")
|
91
104
|
if !config.skip_start
|
92
|
-
@machine.communicate.sudo("systemctl
|
105
|
+
@machine.communicate.sudo("systemctl restart rke2-server.service") do |type, line|
|
93
106
|
@machine.ui.detail line, :color => :yellow
|
94
107
|
end
|
95
108
|
end
|
96
109
|
end
|
97
|
-
|
98
|
-
if config.install_path
|
99
|
-
@machine.ui.info "Adding RKE2 to PATH and KUBECONFIG"
|
100
|
-
outputs, handler = build_outputs
|
101
|
-
begin
|
102
|
-
@machine.communicate.sudo("echo 'export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin' >> /home/vagrant/.bashrc", &handler)
|
103
|
-
@machine.communicate.sudo("echo 'export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin' >> /root/.bashrc", &handler)
|
104
|
-
ensure
|
105
|
-
outputs.values.map(&:close)
|
106
|
-
end
|
107
|
-
end
|
108
110
|
end
|
109
111
|
|
110
112
|
def provisionWindows
|
data/lib/vagrant-rke2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-rke2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Nola
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Manage RKE2 installations on Vagrant guests
|
14
14
|
email:
|
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
|
-
rubygems_version: 3.
|
62
|
+
rubygems_version: 3.3.5
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Manage RKE2 installations on Vagrant guests
|