Skip to content

feat(dbdr/net-peering) Add commands to configure net peerings of DB-DR#1229

Merged
leo-scalingo merged 7 commits into
masterfrom
feat/STORY-3635/database-endpoints-list
Jun 12, 2026
Merged

feat(dbdr/net-peering) Add commands to configure net peerings of DB-DR#1229
leo-scalingo merged 7 commits into
masterfrom
feat/STORY-3635/database-endpoints-list

Conversation

@leo-scalingo

Copy link
Copy Markdown
Member
  • database-network-configuration: Get networking information on a database to create a net peering
  • database-net-peerings: List all net peerings
  • database-net-peerings-add: Create a net peering to the database based on an outscale net peering request
  • database-net-peerings-remove: Delete a netpeering
  • database-endpoints: List the different types of endpoints of a given database (public/private rw/ro access)
  • Add a changelog entry in the section "To Be Released" of CHANGELOG.md

@leo-scalingo leo-scalingo requested a review from a team as a code owner June 10, 2026 12:17
@leo-scalingo leo-scalingo requested review from briceamen and removed request for a team June 10, 2026 12:17
@leo-scalingo leo-scalingo self-assigned this Jun 10, 2026
@notion-workspace

Copy link
Copy Markdown

@leo-scalingo leo-scalingo force-pushed the feat/STORY-3635/database-endpoints-list branch from 3a8dc74 to d4d36c7 Compare June 10, 2026 12:17
…o list the different types of endpoints of a given database (public/private rw/ro access)
@leo-scalingo leo-scalingo force-pushed the feat/STORY-3635/database-endpoints-list branch from d4d36c7 to 417924b Compare June 10, 2026 16:18

@curzolapierre curzolapierre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add example of output in PR's description please?

One question but overall LGTM

Comment thread cmd/firewall_rules.go
SeeAlso: []string{"database-net-peerings", "database-network-configuration"},
}.Render(),
Action: func(ctx context.Context, c *cli.Command) error {
databaseID := detect.ExtractDatabaseNameFromCommandLineOrEnv(c)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question Why not using already exported helper from detect/app.go?

@leo-scalingo leo-scalingo Jun 11, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing helper aimed at loading app + addon + database behind the DB. Here the new endpoints are DBFCC, we don't need the addon or anything, it's simply /databases/:id/network_configuration for instance, while before we were loading the addon, the hitting the db-api with the addon uuid. It's not required for these endpoints.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, and it's currently the only one DBFCC endpoint, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :-)

Comment thread cmd/databases_networking.go
Comment thread cmd/databases_networking.go

@briceamen briceamen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@curzolapierre curzolapierre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

SeeAlso: []string{"database-net-peerings", "database-network-configuration"},
}.Render(),
Action: func(ctx context.Context, c *cli.Command) error {
databaseID := detect.ExtractDatabaseNameFromCommandLineOrEnv(c)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, and it's currently the only one DBFCC endpoint, right?

@leo-scalingo

leo-scalingo commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

@curzolapierre

└> scalingo database-create --type postgresql-ng --plan postgresql-dr-starter-4096 --ip-range 10.244.0.0/24 test-net-peering-1
-----> Your postgresql-ng database 6a2ab4130da2d1fe69f12345 ('test-net-peering-1') is being provisioned…

└> scalingo databases
┌──────────────────────────┬────────────────────┬───────────────┬────────────────────────────┬───────┬─────────┬─────────┐
│            ID            │        NAME        │     TYPE      │            PLAN            │ ROLE  │ STATUS  │ PROJECT │
├──────────────────────────┼────────────────────┼───────────────┼────────────────────────────┼───────┼─────────┼─────────┤
│ 6a2ab4130da2d1fe69f12345 │ test-net-peering-1 │ postgresql-ng │ postgresql-dr-starter-4096 │ owner │ running │ default │
└──────────────────────────┴────────────────────┴───────────────┴────────────────────────────┴───────┴─────────┴─────────┘

└> scalingo --database test-net-peering-1 database-network-configuration     
┌─────────────────────┬─────────────────┐
│ Outscale account ID │ 5667276334223    │
│ Outscale net ID     │ vpc-43245325    │
│ IP range            │ 10.100.255.0/24 │
└─────────────────────┴─────────────────┘

└> scalingo --database test-net-peering-1 database-net-peerings-add --outscale-net-peering-id pcx-09016123
-----> Net peering '2f482307-12d7-4606-b411-1653baf868aa' creation has been initiated for database 'test-net-peering-1'.
  /!\  Expect some delay for the net peering to be applied.

└> scalingo --database test-net-peering-1 database-firewall-rules-add --cidr 10.100.4.192/26 --label 'DBDR 1'         
-----> Firewall rule '08019731-b069-4c03-b77a-d11f3f13f0f3' has been added to database 'test-net-peering-1'.
  /!\  Expect some delay for the firewall rules to be applied.

Connect to the private Outscale VPC

$ ping 10.100.255.13
PING 10.100.255.13 (10.100.255.13) 56(84) bytes of data.
64 bytes from 10.100.255.13: icmp_seq=2139 ttl=62 time=0.833 ms
64 bytes from 10.100.255.13: icmp_seq=2140 ttl=62 time=0.557 ms
64 bytes from 10.100.255.13: icmp_seq=2141 ttl=62 time=0.518 ms
64 bytes from 10.100.255.13: icmp_seq=2142 ttl=62 time=0.571 ms
64 bytes from 10.100.255.13: icmp_seq=2143 ttl=62 time=0.539 ms
64 bytes from 10.100.255.13: icmp_seq=2144 ttl=62 time=0.581 ms
64 bytes from 10.100.255.13: icmp_seq=2145 ttl=62 time=0.571 ms
64 bytes from 10.100.255.13: icmp_seq=2146 ttl=62 time=0.664 ms
64 bytes from 10.100.255.13: icmp_seq=2147 ttl=62 time=0.660 ms
64 bytes from 10.100.255.13: icmp_seq=2148 ttl=62 time=0.600 ms

@leo-scalingo leo-scalingo enabled auto-merge June 12, 2026 13:48
@leo-scalingo leo-scalingo merged commit 0687c2a into master Jun 12, 2026
7 checks passed
@leo-scalingo leo-scalingo deleted the feat/STORY-3635/database-endpoints-list branch June 12, 2026 13:51
leo-scalingo added a commit that referenced this pull request Jun 12, 2026
deps(urfave/cli) deps(go/crypto) Bump versions which were downgraded in #1229 without reason
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

Successfully merging this pull request may close these issues.

3 participants