3 Star 0 Fork 0

dyrnq/seckill

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Vagrantfile 1.77 KB
一键复制 编辑 原始数据 按行查看 历史
dyrnq 提交于 2023-12-21 10:27 . Update Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
config.vm.box_check_update = false
config.ssh.insert_key = false
# insecure_private_key download from https://github.com/hashicorp/vagrant/blob/master/keys/vagrant
config.ssh.private_key_path = "insecure_private_key"
my_machines = {
'seckill' => '192.168.55.100',
'seckill2' => '192.168.55.102',
}
my_machines.each do |name, ip|
config.vm.define name do |machine|
machine.vm.network "private_network", ip: ip
machine.vm.hostname = name
machine.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--vram", "128"]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--cpus", "4"]
vb.customize ["modifyvm", :id, "--memory", "8192"]
end
machine.vm.provision "shell", inline: <<-SHELL
echo "root:vagrant" | sudo chpasswd
timedatectl set-timezone "Asia/Shanghai"
curl -fsSL https://mirror.ghproxy.com/https://github.com/dyrnq/install-docker/raw/main/install-docker.sh | bash -s docker \
--mirror tencent \
--version 20.10.23 \
--systemd-mirror ghproxy && \
usermod -aG docker vagrant
docker ps
SHELL
end
end
end
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/dyrnq/seckill.git
git@gitee.com:dyrnq/seckill.git
dyrnq
seckill
seckill
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385