mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Merge pull request #4192 from vadorovsky/vagrant-fixes
Various Vagrant improvements
This commit is contained in:
commit
623f579869
8
Vagrantfile
vendored
8
Vagrantfile
vendored
@ -1,4 +1,4 @@
|
||||
OS = (ENV['OS'] || "alpine312")
|
||||
DISTRO = (ENV['DISTRO'] || "alpine312")
|
||||
BOX_REPO = (ENV['BOX_REPO'] || "generic")
|
||||
HOME = ENV['HOME']
|
||||
PROJ_HOME = File.dirname(__FILE__)
|
||||
@ -17,7 +17,7 @@ MOUNT_TYPE = ENV['MOUNT_TYPE'] || "virtualbox"
|
||||
# --- May need to add terminal to System Preferences -> Security & Privacy -> Privacy -> Full Disk Access
|
||||
|
||||
def provision(vm, node_num)
|
||||
node_os = (ENV["OS_#{node_num}"] || OS)
|
||||
node_os = (ENV["DISTRO_#{node_num}"] || DISTRO)
|
||||
vm.box = (ENV["BOX_#{node_num}"] || ENV["BOX"] || "#{BOX_REPO}/#{node_os}")
|
||||
vm.hostname = "#{PROJECT}-#{node_num}-#{vm.box.gsub(/^.*\//,"")}"
|
||||
vm.network "private_network", ip: "#{NETWORK_PREFIX}.#{100+node_num}"
|
||||
@ -33,6 +33,10 @@ Vagrant.configure("2") do |config|
|
||||
v.memory = NODE_MEMORY
|
||||
v.customize ["modifyvm", :id, "--audio", "none"]
|
||||
end
|
||||
config.vm.provider "libvirt" do |v|
|
||||
v.cpus = NODE_CPUS
|
||||
v.memory = NODE_MEMORY
|
||||
end
|
||||
if Vagrant.has_plugin?("vagrant-timezone")
|
||||
config.timezone.value = :host
|
||||
end
|
||||
|
@ -9,17 +9,32 @@ export SELINUX=true
|
||||
EOF
|
||||
. /etc/profile.d/build.sh
|
||||
# ---
|
||||
apt-get update
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
ca-certificates \
|
||||
curl \
|
||||
docker.io \
|
||||
gcc \
|
||||
git \
|
||||
jq \
|
||||
libffi-dev \
|
||||
libseccomp-dev \
|
||||
libsqlite3-dev \
|
||||
libselinux1-dev \
|
||||
libuv1-dev \
|
||||
make \
|
||||
npm \
|
||||
pkg-config \
|
||||
python3 \
|
||||
squashfs-tools \
|
||||
tar \
|
||||
wget \
|
||||
vim \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zstd
|
||||
|
||||
# ---
|
||||
sed -E 's|apk( -U)?( --no-cache)?( --repository [^ ]*)? add|apt-get install -y|g' -i /tmp/docker-run
|
||||
. /tmp/docker-run
|
||||
# ---
|
||||
go get -u github.com/go-delve/delve/cmd/dlv
|
||||
# ---
|
||||
|
1
scripts/provision/generic/ubuntu2104
Symbolic link
1
scripts/provision/generic/ubuntu2104
Symbolic link
@ -0,0 +1 @@
|
||||
ubuntu1804
|
Loading…
Reference in New Issue
Block a user