tinkerbell / playground

Example deployments of the Tinkerbell Stack for use as playground environments
Apache License 2.0
132 stars 87 forks source link

Hegel not exposed #12

Closed geekgonecrazy closed 4 years ago

geekgonecrazy commented 4 years ago

Documentation indicates we call the provisioner ip /metadata

For example, if you are using the Vagrant Setup, Hegel runs as part of the Provisioner virtual machine with the IP: 192.168.1.2. When the Worker starts and if you have logged in to osie using the password root you can access the metadata for your server via cURL:

Looks like

https://github.com/tinkerbell/hegel/blob/master/http_server.go#L31

https://github.com/tinkerbell/hegel/blob/master/main.go#L105

Its running on port 50061 it seems. But 192.168.1.2 is the nginx service.. and it doesn't seem to be proxying through to it. Unless i'm missing something?

Expected Behaviour

If I hit 192.168.1.2/metadata I should hit hegel

Current Behaviour

It hits nginx which is just serving its webroot. Only way to get it up is to hit that port directly.

Possible Solution

Change nginx config to proxy through.

Steps to Reproduce (for bugs)

  1. Deploy
  2. Provision hello world on worker
  3. on worker access http://192.168.1.2/metadata

Context

Your Environment

gianarb commented 4 years ago

I remember myself doing that test when running the vagrant setup. I think I pinged directly Hegel on its port. And I think I confused myself and I wrote the documentation in the other way.

I will update the documentation to say that Hegel in Vagrant is exposed on port 50061. I am validating now if it works or not.

I personally do not feel strong about proxying it or not. I will double-check now and consolidate based on what I can fix faster!

Thank you for opening this issue!

geekgonecrazy commented 4 years ago

No problem! Yeah I think in a real environment I’d put that on a dedicated subdomain somewhere like http://metadata.myinternaldns.com

But good to have it documented or at least working for the sandbox :)

gianarb commented 4 years ago

I opened a PR in the documentation to get it fixed! Thanks a lot!

gianarb commented 4 years ago

This one is fixed! Thank you @geekgonecrazy