Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e6364472
Commit
e6364472
authored
Mar 04, 2024
by
Derek Nola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow non-sudo vagrant
Signed-off-by:
Derek Nola
<
derek.nola@suse.com
>
parent
1075b3ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
45 deletions
+32
-45
action.yaml
.github/actions/vagrant-setup/action.yaml
+10
-2
install.yaml
.github/workflows/install.yaml
+19
-30
nightly-install.yaml
.github/workflows/nightly-install.yaml
+3
-13
No files found.
.github/actions/vagrant-setup/action.yaml
View file @
e6364472
...
@@ -20,6 +20,14 @@ runs:
...
@@ -20,6 +20,14 @@ runs:
run
:
|
run
:
|
sudo apt-get build-dep -y vagrant ruby-libvirt
sudo apt-get build-dep -y vagrant ruby-libvirt
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
# This is a workaround for the libvirt group not being available in the current shell
# https://github.com/actions/runner-images/issues/7670#issuecomment-1900711711
-
name
:
Make the libvirt socket rw accessible to everyone
shell
:
bash
run
:
|
sudo chmod a+rw /var/run/libvirt/libvirt-sock
-
name
:
Install vagrant-libvirt plugin
-
name
:
Install vagrant-libvirt plugin
shell
:
bash
shell
:
bash
run
:
sudo vagrant plugin install vagrant-libvirt
run
:
vagrant plugin install vagrant-libvirt
\ No newline at end of file
\ No newline at end of file
.github/workflows/install.yaml
View file @
e6364472
...
@@ -43,68 +43,57 @@ jobs:
...
@@ -43,68 +43,57 @@ jobs:
with
:
{
fetch-depth
:
1
}
with
:
{
fetch-depth
:
1
}
-
name
:
Set up vagrant and libvirt
-
name
:
Set up vagrant and libvirt
uses
:
./.github/actions/vagrant-setup
uses
:
./.github/actions/vagrant-setup
-
name
:
"
Vagrant
Cache"
-
name
:
"
Vagrant
Cache"
uses
:
actions/cache@v4
uses
:
actions/cache@v4
with
:
with
:
path
:
|
path
:
|
/tmp
/boxes
~/.vagrant.d
/boxes
key
:
vagrant-box-${{ matrix.vm }}
key
:
vagrant-box-${{ matrix.vm }}
# Workaround for https://github.com/actions/cache/issues/1319
-
name
:
Move vagrant cache to /root
run
:
|
mkdir -p /tmp/boxes
sudo rm -rf /root/.vagrant.d/boxes
sudo mv -f /tmp/boxes /root/.vagrant.d
-
name
:
"
Vagrant
Plugin(s)"
-
name
:
"
Vagrant
Plugin(s)"
run
:
sudo
vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
run
:
vagrant plugin install vagrant-k3s vagrant-reload vagrant-scp
-
name
:
"
Download
k3s
binary"
-
name
:
"
Download
k3s
binary"
uses
:
actions/download-artifact@v3
uses
:
actions/download-artifact@v3
with
:
with
:
name
:
k3s
name
:
k3s
path
:
tests/install/${{ matrix.vm }}
path
:
tests/install/${{ matrix.vm }}
-
name
:
"
Vagrant
Up"
-
name
:
"
Vagrant
Up"
run
:
sudo
vagrant up --no-provision
run
:
vagrant up --no-provision
-
name
:
"
Upload
k3s
binary
to
VM"
-
name
:
"
Upload
k3s
binary
to
VM"
run
:
|
run
:
|
chmod +x k3s
chmod +x k3s
sudo
vagrant scp k3s /tmp/k3s
vagrant scp k3s /tmp/k3s
sudo
vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s"
vagrant ssh -c "sudo mv /tmp/k3s /usr/local/bin/k3s"
sudo
vagrant provision --provision-with=k3s-upload
vagrant provision --provision-with=k3s-upload
-
name
:
Add binary to PATH
-
name
:
Add binary to PATH
if
:
matrix.vm == 'centos-7' || matrix.vm == 'rocky-8' || matrix.vm == 'rocky-9' || matrix.vm == 'opensuse-leap'
if
:
matrix.vm == 'centos-7' || matrix.vm == 'rocky-8' || matrix.vm == 'rocky-9' || matrix.vm == 'opensuse-leap'
run
:
sudo
vagrant provision --provision-with=add-bin-path
run
:
vagrant provision --provision-with=add-bin-path
-
name
:
"
⏩
Install
K3s"
-
name
:
"
⏩
Install
K3s"
run
:
|
run
:
|
sudo
vagrant provision --provision-with=k3s-prepare
vagrant provision --provision-with=k3s-prepare
sudo
vagrant provision --provision-with=k3s-install
vagrant provision --provision-with=k3s-install
if [ ${{ matrix.vm }} = 'opensuse-microos' ]; then vagrant reload --no-provision; fi
if [ ${{ matrix.vm }} = 'opensuse-microos' ]; then vagrant reload --no-provision; fi
-
name
:
"
⏳
Node"
-
name
:
"
⏳
Node"
run
:
sudo
vagrant provision --provision-with=k3s-wait-for-node
run
:
vagrant provision --provision-with=k3s-wait-for-node
-
name
:
"
⏳
CoreDNS"
-
name
:
"
⏳
CoreDNS"
run
:
sudo
vagrant provision --provision-with=k3s-wait-for-coredns
run
:
vagrant provision --provision-with=k3s-wait-for-coredns
-
name
:
"
⏳
Local
Storage"
-
name
:
"
⏳
Local
Storage"
run
:
sudo
vagrant provision --provision-with=k3s-wait-for-local-storage
run
:
vagrant provision --provision-with=k3s-wait-for-local-storage
continue-on-error
:
true
continue-on-error
:
true
-
name
:
"
⏳
Metrics
Server"
-
name
:
"
⏳
Metrics
Server"
run
:
sudo
vagrant provision --provision-with=k3s-wait-for-metrics-server
run
:
vagrant provision --provision-with=k3s-wait-for-metrics-server
continue-on-error
:
true
continue-on-error
:
true
-
name
:
"
⏳
Traefik"
-
name
:
"
⏳
Traefik"
run
:
sudo
vagrant provision --provision-with=k3s-wait-for-traefik
run
:
vagrant provision --provision-with=k3s-wait-for-traefik
continue-on-error
:
true
continue-on-error
:
true
-
name
:
"
k3s-status"
-
name
:
"
k3s-status"
run
:
sudo
vagrant provision --provision-with=k3s-status
run
:
vagrant provision --provision-with=k3s-status
-
name
:
"
k3s-procps"
-
name
:
"
k3s-procps"
run
:
sudo
vagrant provision --provision-with=k3s-procps
run
:
vagrant provision --provision-with=k3s-procps
-
name
:
Cleanup VM
-
name
:
Cleanup VM
run
:
sudo
vagrant destroy -f
run
:
vagrant destroy -f
-
name
:
On Failure, launch debug session
-
name
:
On Failure, launch debug session
uses
:
lhotari/action-upterm@v1
uses
:
lhotari/action-upterm@v1
if
:
${{ failure() }}
if
:
${{ failure() }}
with
:
with
:
## If no one connects after 5 minutes, shut down server.
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes
:
5
wait-timeout-minutes
:
5
-
name
:
Copy out vagrant boxes for cache
\ No newline at end of file
run
:
|
sudo mv -f /root/.vagrant.d/boxes /tmp/boxes
sudo chmod -R 777 /tmp/boxes
\ No newline at end of file
.github/workflows/nightly-install.yaml
View file @
e6364472
...
@@ -29,17 +29,11 @@ jobs:
...
@@ -29,17 +29,11 @@ jobs:
with
:
{
fetch-depth
:
1
}
with
:
{
fetch-depth
:
1
}
-
name
:
Set up vagrant and libvirt
-
name
:
Set up vagrant and libvirt
uses
:
./.github/actions/vagrant-setup
uses
:
./.github/actions/vagrant-setup
# Workaround for https://github.com/actions/cache/issues/1319
-
name
:
Move vagrant cache to /root
run
:
|
mkdir -p /tmp/boxes
sudo rm -rf /root/.vagrant.d/boxes
sudo mv -f /tmp/boxes /root/.vagrant.d
-
name
:
"
Vagrant
Cache"
-
name
:
"
Vagrant
Cache"
uses
:
actions/cache@v4
uses
:
actions/cache@v4
with
:
with
:
path
:
|
path
:
|
/tmp
/boxes
~/.vagrant.d
/boxes
key
:
vagrant-box-${{ matrix.vm }}
key
:
vagrant-box-${{ matrix.vm }}
id
:
vagrant-cache
id
:
vagrant-cache
-
name
:
"
Vagrant
Plugin(s)"
-
name
:
"
Vagrant
Plugin(s)"
...
@@ -62,8 +56,4 @@ jobs:
...
@@ -62,8 +56,4 @@ jobs:
-
name
:
"
k3s-status"
-
name
:
"
k3s-status"
run
:
vagrant provision --provision-with=k3s-status
run
:
vagrant provision --provision-with=k3s-status
-
name
:
"
k3s-procps"
-
name
:
"
k3s-procps"
run
:
vagrant provision --provision-with=k3s-procps
run
:
vagrant provision --provision-with=k3s-procps
-
name
:
Copy out vagrant boxes for cache
\ No newline at end of file
run
:
|
sudo mv -f /root/.vagrant.d/boxes /tmp/boxes
sudo chmod -R 777 /tmp/boxes
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment