17 Star 50 Fork 10

openGauss/ham4db

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Vagrantfile 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
DEVELOPMENT_DIR = File.join(ENV['HOME'], 'Development')
ENV['VAGRANT_SERVER_URL'] = "https://atlas.hashicorp.com" if ENV['VAGRANT_SERVER_URL'].nil? || ENV['VAGRANT_SERVER_URL'].empty?
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' if ENV['VAGRANT_DEFAULT_PROVIDER'].nil? || ENV['VAGRANT_DEFAULT_PROVIDER'].empty?
BOX = ENV['VAGRANT_BOX'].nil? || ENV['VAGRANT_BOX'].empty? ? 'nrel/CentOS-6.6-x86_64' : ENV['VAGRANT_BOX']
VAGRANTFILE_API_VERSION = "2"
system("
if [[ #{ARGV[0]} = 'up' ]] && [[ ! -e 'vagrant/vagrant-ssh-key' ]]; then
ssh-keygen -t rsa -b 768 -N '' -q -f vagrant/vagrant-ssh-key
fi
")
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = BOX
config.vm.box_download_insecure = true
config.vm.box_check_update = false
config.vm.synced_folder '.', '/ham4db', type: 'rsync', rsync__auto: true
(0..4).each do |n|
name = (n > 0 ? ("db" + n.to_s) : "admin")
config.vm.define name do |db|
db.vm.hostname = name
db.vm.network "private_network", ip: "192.168.57.20" + n.to_s,
virtualbox__inet: true
db.vm.provision "shell", path: "vagrant/base-build.sh"
if name == "admin"
db.vm.network "forwarded_port", guest:3000, host:3000
end
end
end
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opengauss/ham4db.git
git@gitee.com:opengauss/ham4db.git
opengauss
ham4db
ham4db
master

搜索帮助