mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #2913 from erikwilson/vagrant-opensuse15
Add opensuse 15 vagrant provision
This commit is contained in:
commit
41fd27ab56
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@ -8,7 +8,7 @@ NODE_CPUS = (ENV['NODE_CPUS'] || 4).to_i
|
||||
NODE_MEMORY = (ENV['NODE_MEMORY'] || 8192).to_i
|
||||
NETWORK_PREFIX = ENV['NETWORK_PREFIX'] || "10.135.135"
|
||||
VAGRANT_PROVISION = ENV['VAGRANT_PROVISION'] || "./scripts/provision/vagrant"
|
||||
MOUNT_TYPE = ENV['MOUNT_TYPE'] || "nfs"
|
||||
MOUNT_TYPE = ENV['MOUNT_TYPE'] || "virtualbox"
|
||||
|
||||
# --- Rules for /etc/sudoers to avoid password entry configuring NFS:
|
||||
# %admin ALL = (root) NOPASSWD: /usr/bin/sed -E -e * -ibak /etc/exports
|
||||
@ -19,7 +19,7 @@ MOUNT_TYPE = ENV['MOUNT_TYPE'] || "nfs"
|
||||
def provision(vm, node_num)
|
||||
node_os = (ENV["OS_#{node_num}"] || OS)
|
||||
vm.box = (ENV["BOX_#{node_num}"] || ENV["BOX"] || "#{BOX_REPO}/#{node_os}")
|
||||
vm.hostname = "#{PROJECT}-#{node_num}-#{node_os}"
|
||||
vm.hostname = "#{PROJECT}-#{node_num}-#{vm.box.gsub(/^.*\//,"")}"
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
vm.provision "shell",
|
||||
path: VAGRANT_PROVISION,
|
||||
|
23
scripts/provision/generic/opensuse15/vagrant
Executable file
23
scripts/provision/generic/opensuse15/vagrant
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -ve
|
||||
|
||||
download_go
|
||||
# ---
|
||||
cat <<EOF >/etc/profile.d/build.sh
|
||||
export SELINUX=true
|
||||
# export STATIC_BUILD=true
|
||||
EOF
|
||||
. /etc/profile.d/build.sh
|
||||
# ---
|
||||
zypper -q install -y \
|
||||
git \
|
||||
libseccomp-devel \
|
||||
libselinux-devel \
|
||||
zstd \
|
||||
|
||||
# ---
|
||||
sed -E 's|apk( -U)?( --no-cache)?( --repository [^ ]*)? add .*||g' -i /tmp/docker-run
|
||||
. /tmp/docker-run
|
||||
# ---
|
||||
go get -u github.com/go-delve/delve/cmd/dlv
|
||||
# ---
|
Loading…
Reference in New Issue
Block a user