Comments (2)
https://blog.leonshadow.com/763482/1819.html
https://blog.leonshadow.com/763482/1870.html
https://blog.leonshadow.com/763482/1873.html
https://blog.leonshadow.com/763482/1878.html
from notes.
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 1.6.0"
boxes = [
{
:name => "manager",
:eth0 => "192.168.205.10",
:mem => "1024",
:cpu => "1"
},
{
:name => "worker1",
:eth0 => "192.168.205.11",
:mem => "1024",
:cpu => "1"
},
{
:name => "worker2",
:eth0 => "192.168.205.12",
:mem => "1024",
:cpu => "1"
}
]
Vagrant.configure(2) do |config|
config.vm.box = "centos7"
config.vm.box_check_update = false
config.ssh.username = 'root'
config.ssh.password = 'root'
config.ssh.insert_key = 'true'
boxes.each do |opts|
config.vm.define opts[:name] do |config|
config.vm.hostname = opts[:name]
config.vm.provider "vmware_fusion" do |v|
v.vmx["memsize"] = opts[:mem]
v.vmx["numvcpus"] = opts[:cpu]
end
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", opts[:mem]]
v.customize ["modifyvm", :id, "--cpus", opts[:cpu]]
end
config.vm.network :private_network, ip: opts[:eth0]
config.vm.network :forwarded_port, guest: 8080, host: 8080
end
end
config.vm.synced_folder ".", "/vagrant"
config.vm.provision "shell", privileged: true, path: "./setup.sh"
end
setup.sh
# 安装你想安装的工具
sudo yum install -y git vim gcc glibc-static telnet bridge-utils
# 安装docker
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
# 启动docker服务
sudo systemctl start docker
#移除安装包
rm -rf get-docker.sh
from notes.
Related Issues (20)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notes.