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

Remove the need to set the MY_IP env var during OH hub setup. #10

Open
dabooz opened this issue Feb 18, 2020 · 5 comments
Open

Remove the need to set the MY_IP env var during OH hub setup. #10

dabooz opened this issue Feb 18, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@dabooz
Copy link
Contributor

dabooz commented Feb 18, 2020

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.

@dabooz dabooz added the enhancement New feature or request label Feb 18, 2020
@haveroot
Copy link

haveroot commented Feb 24, 2020

Normally, I use curl -s httpbin.org/ip | jq -r .origin to automatically get the external IP address. Since this approach depends on curl and jq commands, would you think, this would be a fairly platform agnostic solution? If yes, I can take a shot.

@joewxboy
Copy link
Member

joewxboy commented Feb 24, 2020 via email

@joewxboy
Copy link
Member

joewxboy commented Feb 24, 2020 via email

@dabooz
Copy link
Contributor Author

dabooz commented Feb 25, 2020

PR #12 is now merged, so we might be able to close this issue now.

@haveroot
Copy link

haveroot commented Mar 1, 2020

When I ran the command to set MY_IP on an AWS EC2 instance, there is no output. I noticed that the awk { print $2 } does not return a string that qualifies for the subsequent egrep.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants