Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Support IP address range #311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ $vm_cpus = 1
$vb_cpuexecutioncap = 100
$shared_folders = {}
$forwarded_ports = {}
$ip_range_start = '100'
$ip_range_prefix = '172.17.8'

# Attempt to apply the deprecated environment variable NUM_INSTANCES to
# $num_instances while allowing config.rb to override it
Expand Down Expand Up @@ -136,7 +138,7 @@ Vagrant.configure("2") do |config|
config.ignition.config_obj = vb
end

ip = "172.17.8.#{i+100}"
ip = "#{$ip_range_prefix}.#{i + $ip_range_start.to_i - 1}"
config.vm.network :private_network, ip: ip
# This tells Ignition what the IP for eth1 (the host-only adapter) should be
config.ignition.ip = ip
Expand Down
9 changes: 9 additions & 0 deletions config.rb.sample
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ end
# export DOCKER_HOST='tcp://127.0.0.1:2375'
#$expose_docker_tcp=2375

# Set the final octet of the IP address
# The first host will begin at ${ip_prefix}.${ip_range_start}
# Each subsequent host will take the next IP address in the sequence
# $ip_range_start = '100'

# Set the IP address prefix for the VM
# All hosts in the cluster will use the following prefix for the IP
# $ip_range_prefix = '172.17.8'

# Enable NFS sharing of your home directory ($HOME) to CoreOS
# It will be mounted at the same path in the VM as on the host.
# Example: /Users/foobar -> /Users/foobar
Expand Down