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

Make port publishing easier #678

Open
larsks opened this issue Dec 19, 2024 · 3 comments
Open

Make port publishing easier #678

larsks opened this issue Dec 19, 2024 · 3 comments
Assignees

Comments

@larsks
Copy link
Member

larsks commented Dec 19, 2024

Port forwarding is a nice way to expose services, but the process is too complicated. Let's say that I want to "forward tcp port 4321 from a public ip address to port 4321 on internal address 10.100.100.10". That means:

  1. Find the existing port with 10.100.100.10, or create a new port with that address if one doesn't already exist.
  2. Create a floating ip address.
  3. Take the information from the first two steps and plug it into an openstack floating ip publishing command

It would be really neat if instead I could write:

openstack esi publish --network mynetwork --from 10.100.100.10:4321

And have it perform all the above steps. If I want to use a specific floating ip:

openstack esi publish --network mynetwork --from 10.100.100.10:4321 --to 128.31.20.112

And if I want the external port to be different from the internal port:

openstack esi publish --network mynetwork --from 10.100.100.10:4321 --to 128.31.20.112:1234

(I've gone with the verb publish here, because that's what we use in the container world, but we could just as easily use something like port forward)

@larsks larsks changed the title Make publishing easier Make port publishing easier Dec 19, 2024
@larsks
Copy link
Member Author

larsks commented Dec 19, 2024

There should probably be a corresponding unpublish verb that would delete the port forwarding, and maybe optionally delete the internal port and the floating ip if there are no other port forwardings associated with it. Maybe that's something like:

openstack esi unpublish --purge --from 10.100.100.10:4321

@tzumainn tzumainn self-assigned this Dec 19, 2024
@tzumainn
Copy link
Contributor

Fair enough. I'd probably go for the "port forwarding" syntax just because it matches existing OpenStack commands better.

@larsks
Copy link
Member Author

larsks commented Dec 20, 2024

E.g. see the portforward.sh script here.

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

No branches or pull requests

2 participants