elastic / elastic/elastic-package

Avoid port conflicts on ports exposed by managed stacks

Open
#2,895 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
72
Forks
141
Avg merge
19h 42m
Merged PRs (30d)
55

Description

This is a meta issue for discussion on how to avoid conflicts on ports exposed by managed stacks with the compose provider.

Port conflicts can happen now in different situations given that the ports are exposed at the host network, for example:
* If the host is already using any of the ports (as in https://github.com/elastic/elastic-package/issues/2889).
* If multiple stacks are started from different profiles.

There are some improvements that could be done to avoid these situations:
* Avoid exposing fixed ports on the host network by default. Docker can expose ports on random ports, `elastic-package` could easily get them and use them in their subcommands. Ports that are not needed by elastic-package, such as package-registry, could be not exposed by default.
* Allow to customize ports per profile, this is not so straightforward because hosts and ports are hard-coded in several places.
* Combine both, by using random ports (or not exposing ports) by default, and adding a command to expose ports on demand, running some kind of proxy.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files or tests. Start by tracing the compose provider and the subcommands that consume ports, then compare the listed conflict scenarios and proposed approaches. Done requires an agreed, testable scope for handling host-port conflicts across managed stacks.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, go
Domain
cli, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.