Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting static IP Address in clustered configuration #99

Closed
ChrisDay-Australia opened this issue Jul 25, 2016 · 1 comment
Closed

Setting static IP Address in clustered configuration #99

ChrisDay-Australia opened this issue Jul 25, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@ChrisDay-Australia
Copy link

Had to edit the Vagrantfile in order to get static IP addressing working with a cluster configuration.

Original Vagrantfile code:

    def inc_ip(ip, i)
      newip = "#{ip}"
      nr = "#{ip}"
      nr.gsub!(/^(.*\.)+/, "").to_i
      newip.gsub!(/\.\d+$/, ".#{nr + i}")
      newip
    end

Edited Vagrantfile code:

newip.gsub!(/.\d+$/, ".#{nr.to_i + i}")

    def inc_ip(ip, i)
      newip = "#{ip}"
      nr = "#{ip}"
      nr.gsub!(/^(.*\.)+/, "").to_i
      newip.gsub!(/\.\d+$/, ".#{nr.to_i + i}")
      newip
    end

Once edit in place, each node gets a static IP address based on the settings in the project.properties file.

@grtjn
Copy link
Owner

grtjn commented Jul 27, 2016

Looks like a very logical patch, thnx for reporting!

@grtjn grtjn added the bug label Sep 9, 2016
@grtjn grtjn added this to the 1.0.2 milestone Sep 9, 2016
@grtjn grtjn self-assigned this Sep 9, 2016
@grtjn grtjn closed this as completed in b7e9638 Sep 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants