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

Allow grouping of servers by stage/environment #65

Closed
gervaisb opened this issue Mar 13, 2018 · 11 comments
Closed

Allow grouping of servers by stage/environment #65

gervaisb opened this issue Mar 13, 2018 · 11 comments
Labels
keep-open Prevents stale bot from closing this issue or PR

Comments

@gervaisb
Copy link

It is common to have many servers for the same stage (dev, test, acc, ..), the variable substitutions into the server object can help but the substitution can also be problematic when there is some restriction on what can be substituted.
A solution is to create different servers however, there is nothing to group them and to restrict the usage of servers from different stages.
I can be interesting to have a group attribute in server:

Configuration:

  • dev-master-1:1234
  • dev-master-2:1234
  • dev-slave-1:4321
  • dev-slave-2:4321
  • test-master-1:1234
  • test-master-2:1234
  • test-slave-1:4321
  • test-slave-2:4321

Current:

servers:
  - url: dev-master-{node}:1234
    variables:
      node:
        enum:
          - '1'
          - '2'
  - url: dev-slave-{node}:4321
    variables:
      node:
        enum:
          - '1'
          - '2'
  - url: test-master-{node}:1234
    variables:
      node:
        enum:
          - '1'
          - '2'
  - url: test-slave-{node}:4321
    variables:
      node:
        enum:
          - '1'
          - '2'

Proposal:

servers:
  - url: dev-master-{node}:1234
    group: dev
    variables:
      node:
        enum:
          - '1'
          - '2'
  - url: dev-slave-{node}:4321
    group: dev
    variables:
      node:
        enum:
          - '1'
          - '2'
  - url: test-master-{node}:1234
    group: test
    variables:
      node:
        enum:
          - '1'
          - '2'
  - url: test-slave-{node}:4321
    group: test
    variables:
      node:
        enum:
          - '1'
          - '2'
@fmvilas
Copy link
Member

fmvilas commented Mar 13, 2018

That's a great suggestion. Thanks for sharing! I'm not going to add anything to the spec in the short term but I'll take into account for future features.

Anyone interested in this feature, please upvote it so that I know if this is something urgent or not.

@fmvilas fmvilas modified the milestone: Backlog Feb 3, 2019
@lwielek
Copy link

lwielek commented Jul 23, 2019

@fmvilas
@gervaisb

Slightly different, but similar issue.
An application publishes/subscribes to 2 separate message brokers (clusters).
Some topics exist only on the first message broker, while others exist on the other.

Besides the server.group field, it would be nice to have e.g. topic.serverGroup field, that would identify the message broker, which actually maintains the topic.

@fmvilas
Copy link
Member

fmvilas commented Jul 24, 2019

@lwielek that's an interesting approach to consider too. Would you mind creating a proposal?

@lwielek
Copy link

lwielek commented Jul 24, 2019

@fmvilas
Proposal

servers:
  - url: api.streetlights.smartylighting.com:1234
    scheme: mqtt
    description: API broker
    group: api
  - url: audit.streetlights.smartylighting.com:1234
    scheme: mqtt
    description: Audit broker
    group: audit
  
topics:
  event.{streetlightId}.lighting.measured:
    serverGroup: api
    publish:
      $ref: '#/components/messages/lightMeasured'
  event.lighting.audit:
    serverGroup: audit
    publish:
      $ref: '#/components/messages/auditMessage'

@fmvilas
Copy link
Member

fmvilas commented Jul 24, 2019

Sorry, I meant creating a separate issue as the problem is different. As part of the proposal, I'd like to understand:

  • What's your use case?
  • Why it can't be done right now? or, how it would improve the current way of doing it?
  • Areas of the spec that might get affected.
  • Other considerations.

Thanks!

@lwielek
Copy link

lwielek commented Jul 25, 2019

@fmvilas Created #244

@fmvilas
Copy link
Member

fmvilas commented Jul 25, 2019

Thanks, @lwielek! Great job describing the feature.

@stale
Copy link

stale bot commented Oct 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 29, 2019
@fmvilas fmvilas removed the stale label Oct 30, 2019
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Mar 12, 2020
@fmvilas fmvilas added this to the AsyncAPI specification 2.1.0 milestone Mar 13, 2020
@derberg derberg reopened this Apr 13, 2020
@derberg derberg removed the stale label Apr 13, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions github-actions bot added the stale label Jun 13, 2020
@fmvilas fmvilas added keep-open Prevents stale bot from closing this issue or PR and removed stale labels Jun 14, 2020
@fmvilas fmvilas removed this from the Next specification version milestone May 12, 2021
@smoya
Copy link
Member

smoya commented Feb 5, 2024

This was solved by #654

@smoya smoya closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-open Prevents stale bot from closing this issue or PR
Projects
None yet
Development

No branches or pull requests

5 participants