代码拉取完成,页面将自动刷新
同步操作将从 buxiaomo/kubeasy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# -*- mode: ruby -*-
# vi: set ft=ruby :
# https://app.vagrantup.com/ubuntu/boxes/focal64
VAGRANTFILE_API_VERSION = "2"
cluster = {
"master01" => { :ip => "192.168.56.11", :cpus => 4, :mem => 4096 },
"worker01" => { :ip => "192.168.56.12", :cpus => 4, :mem => 4096 },
"worker02" => { :ip => "192.168.56.13", :cpus => 4, :mem => 4096 },
}
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
cluster.each_with_index do |(hostname, info), index|
config.vm.define hostname do |cfg|
cfg.vm.provider :virtualbox do |vb, override|
config.vm.box = "ubuntu/focal64"
config.vm.box_version = "20220715.0.0"
override.vm.network :private_network, ip: "#{info[:ip]}"
override.vm.hostname = hostname
vb.name = hostname
vb.customize ["modifyvm", :id, "--memory", info[:mem], "--cpus", info[:cpus], "--hwvirtex", "on"]
end # end provider
cfg.vm.provision "shell", inline: <<-SHELL
set -x
sudo mkdir -p /root/.ssh
sudo cp /vagrant/.ssh/id_rsa /root/.ssh/id_rsa
sudo cp /vagrant/.ssh/id_rsa.pub /root/.ssh/id_rsa.pub
sudo cp /vagrant/.ssh/id_rsa.pub /root/.ssh/authorized_keys
sudo chown -R root:root /root/.ssh
sudo apt-get update
sudo apt-get install python3 python3-pip sshpass curl rsync wget vim -y
sudo pip3 install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple pip
SHELL
end
end
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。