vagrant-rke2 0.1.3 → 0.1.5
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b838e8def0fb51bb79dcb0bb72a2ddface01f74dbcdd169a55cbdee901d80c07
|
|
4
|
+
data.tar.gz: 595aa43091f782c45fb012c5be3ef43b88fd52161cfae526aec72fde39f74556
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c68abdb236886bcd516f993072be888f16025501b4f05c86bd57c220b272f94391e3a20bc1a2f4e7f27fe658e700e33c4a072971d01e04a70bf232b2fbb34df
|
|
7
|
+
data.tar.gz: 69c5fe349a1b8ee5724e4d0809ccae89d643568521af6b0c33880f078ca73abff2ae340830c36d1e86818a0c18eb6796854e60de587d0ebc96f87e06801f11c6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -58,6 +58,11 @@ Vagrant.configure("2") do |config|
|
|
|
58
58
|
# type => Boolean
|
|
59
59
|
# default => true
|
|
60
60
|
rke2.install_path = false
|
|
61
|
+
|
|
62
|
+
# skip_start: install but don't start RKE2
|
|
63
|
+
# type => Boolean
|
|
64
|
+
# default => false
|
|
65
|
+
rke2.skip_start = true
|
|
61
66
|
end
|
|
62
67
|
end
|
|
63
68
|
```
|
|
@@ -90,6 +95,16 @@ Vagrant.configure("2") do |config|
|
|
|
90
95
|
server: https://172.168.1.200:9345
|
|
91
96
|
token: vagrant-rke2
|
|
92
97
|
YAML
|
|
98
|
+
|
|
99
|
+
# install_path: QOL feature, add RKE2 to the PATH
|
|
100
|
+
# type => Boolean
|
|
101
|
+
# default => true
|
|
102
|
+
rke2.install_path = false
|
|
103
|
+
|
|
104
|
+
# skip_start: install but don't start RKE2
|
|
105
|
+
# type => Boolean
|
|
106
|
+
# default => false
|
|
107
|
+
rke2.skip_start = true
|
|
93
108
|
end
|
|
94
109
|
end
|
|
95
110
|
```
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Write-Host "Creating RKE2 environment variables..."
|
|
2
|
+
$env:PATH+=";C:\var\lib\rancher\rke2\bin;c:\usr\local\bin"
|
|
3
|
+
[Environment]::SetEnvironmentVariable("Path",
|
|
4
|
+
[Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";C:\var\lib\rancher\rke2\bin;c:\usr\local\bin",
|
|
5
|
+
[EnvironmentVariableTarget]::Machine)
|
|
@@ -11,12 +11,6 @@ Set-Content -Path !!CONFIG_PATH!! -Value @"
|
|
|
11
11
|
Write-Host "Installing RKE2 as an agent..."
|
|
12
12
|
./install.ps1 !!ENV!!
|
|
13
13
|
|
|
14
|
-
Write-Host "Creating RKE2 environment variables..."
|
|
15
|
-
$env:PATH+=";C:\var\lib\rancher\rke2\bin;c:\usr\local\bin"
|
|
16
|
-
[Environment]::SetEnvironmentVariable("Path",
|
|
17
|
-
[Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";C:\var\lib\rancher\rke2\bin;c:\usr\local\bin",
|
|
18
|
-
[EnvironmentVariableTarget]::Machine)
|
|
19
|
-
|
|
20
14
|
Write-Host "Open ports for RKE2 and Calico in firewall..."
|
|
21
15
|
netsh advfirewall firewall add rule name= "RKE2-kubelet" dir=in action=allow protocol=TCP localport=10250
|
|
22
16
|
netsh advfirewall firewall add rule name= "RKE2-agent" dir=in action=allow protocol=TCP localport=4789
|
|
@@ -148,14 +148,23 @@ module VagrantPlugins
|
|
|
148
148
|
@machine.ui.detail line.chomp, :color => :yellow
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
if config.install_path
|
|
152
|
+
setupPath = "setup-path.ps1"
|
|
153
|
+
@machine.ui.info "Invoking: #{setupPath}"
|
|
154
|
+
command = File.read(scriptDir + setupPath)
|
|
155
|
+
@machine.communicate.execute(command, {shell: :powershell, elevated: true}) do |type, line|
|
|
156
|
+
@machine.ui.detail line.chomp, :color => :yellow
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
151
160
|
@machine.ui.info "Checking RKE2 version:"
|
|
152
161
|
@machine.communicate.test("Get-Command rke2", {shell: :powershell})
|
|
153
|
-
@machine.communicate.execute(
|
|
162
|
+
@machine.communicate.execute('C:\usr\local\bin\rke2.exe --version', {shell: :powershell}) do |type, line|
|
|
154
163
|
@machine.ui.detail line, :color => :yellow
|
|
155
164
|
end
|
|
156
165
|
|
|
157
166
|
@machine.ui.info "Starting RKE2 agent:"
|
|
158
|
-
@machine.communicate.execute(
|
|
167
|
+
@machine.communicate.execute('C:\usr\local\bin\rke2.exe agent service --add', {shell: :powershell, elevated: true} )
|
|
159
168
|
if !config.skip_start
|
|
160
169
|
@machine.communicate.execute("Start-Service -Name 'rke2'", {shell: :powershell, elevated: true} )
|
|
161
170
|
end
|
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.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Derek Nola
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-03-
|
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Manage RKE2 installations on Vagrant guests
|
|
14
14
|
email:
|
|
@@ -31,6 +31,7 @@ files:
|
|
|
31
31
|
- lib/vagrant-rke2/cap/linux/curl_installed.rb
|
|
32
32
|
- lib/vagrant-rke2/cap/linux/rke2_installed.rb
|
|
33
33
|
- lib/vagrant-rke2/cap/windows/scripts/install-containers-feature.ps1
|
|
34
|
+
- lib/vagrant-rke2/cap/windows/scripts/setup-path.ps1
|
|
34
35
|
- lib/vagrant-rke2/cap/windows/scripts/setup-rke2.ps1
|
|
35
36
|
- lib/vagrant-rke2/config.rb
|
|
36
37
|
- lib/vagrant-rke2/plugin.rb
|