-
Notifications
You must be signed in to change notification settings - Fork 14
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
Remove the need to set the MY_IP env var during OH hub setup. #10
Comments
Normally, I use |
Yes, both curl and jq are required and installed, so both would be available to retrieve the external IP address.
But ... see following comment, since that technique doesn't work.
|
However, on my test VM, it has a local subnet IP address of 172.* and an external IP of 9.* and yet running curl -s httpbin.org/ip | jq -r .origin shows my IP address as 129.*, which I'm guessing is my NAT'ted IP address.
IP address for ens3: 172.x.x.x
IP address for ens7: 9.x.x.x
curl -s httpbin.org/ip | jq -r .origin129.x.x.x
So that's not going to work for me.
The makefile in hub/oh and the instructions in the directions (once PR #12 is merged) will address this, for the most part, by viewing the active networrk connections and removing known loopback addresses and known local subnets.
|
PR #12 is now merged, so we might be able to close this issue now. |
When I ran the command to set ubuntu@ip-172-31-20-227:~/horizon-edgex$ ifconfig | egrep 'inet ' | awk '{ print $2 }'
172.17.0.1
172.31.20.227
127.0.0.1 |
Teach the ./hub/makefile how to introspect the public IP address of the machine you're running on and use that introspected IP address during generation of the config.json file. If the introspection is not successful, make will fail. Don't forget to update the doc.
Issue #8 should be done before this one.
The text was updated successfully, but these errors were encountered: