-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
31 lines (29 loc) · 1.05 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "master" do |master|
master.vm.box = "centos/7"
master.vm.network "forwarded_port", guest: 8080, host: 8080
master.vm.network "private_network", ip: "192.168.10.2"
master.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 1
end
master.vm.provision "shell", inline: <<-SHELL
sed -i 's/ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/g' /etc/ssh/sshd_config
sudo systemctl restart sshd
SHELL
end
config.vm.define "slave" do |slave|
slave.vm.box = "centos/7"
slave.vm.network "private_network", ip: "192.168.10.3"
slave.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 1
end
slave.vm.provision "shell", inline: <<-SHELL
sed -i 's/ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/g' /etc/ssh/sshd_config
sudo systemctl restart sshd
sudo yum -y install java-1.8.0-openjdk
SHELL
end
end