Skip to content

Commit

Permalink
Check that Tessera ports are available
Browse files Browse the repository at this point in the history
Signed-off-by: rodion <rodion.lim@partior.com>
  • Loading branch information
rodion-lim-partior committed Jun 28, 2024
1 parent 3fea393 commit 6690a16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/stacks/stack_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ func (s *StackManager) copyDataExchangeConfigToVolumes() error {

func (s *StackManager) createMember(id string, index int, options *types.InitOptions, external bool) (*types.Organization, error) {
serviceBase := options.ServicesBasePort + (index * 100)
ptmBase := options.PtmBasePort + (index * 10)
member := &types.Organization{
ID: id,
Index: &index,
Expand All @@ -565,6 +566,7 @@ func (s *StackManager) createMember(id string, index int, options *types.InitOpt
ExposedConnectorPort: serviceBase + 2,
ExposedUIPort: serviceBase + 3,
ExposedDatabasePort: serviceBase + 4,
ExposePtmTpPort: ptmBase,
External: external,
OrgName: options.OrgNames[index],
NodeName: options.NodeNames[index],
Expand Down Expand Up @@ -783,6 +785,7 @@ func (s *StackManager) checkPortsAvailable() error {
ports = append(ports, member.ExposedDatabasePort)
ports = append(ports, member.ExposedUIPort)
ports = append(ports, member.ExposedTokensPorts...)
ports = append(ports, member.ExposePtmTpPort)

if !member.External {
ports = append(ports, member.ExposedFireflyAdminSPIPort)
Expand Down

0 comments on commit 6690a16

Please sign in to comment.