Skip to content

Commit 87790e2

Browse files
feat(rdb): add seemless major upgrade (#3452)
Co-authored-by: Jules Castéran <jcasteran@scaleway.com>
1 parent b0d22c7 commit 87790e2

File tree

5 files changed

+28
-10
lines changed

5 files changed

+28
-10
lines changed

cmd/scw/testdata/test-all-usage-rdb-instance-upgrade-usage.golden

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ USAGE:
66
scw rdb instance upgrade <instance-id ...> [arg=value ...]
77

88
ARGS:
9-
instance-id UUID of the Database Instance you want to upgrade
10-
[node-type] Node type of the Database Instance you want to upgrade to
11-
[enable-ha] Defines whether or not high availability should be enabled on the Database Instance
12-
[volume-size] Increase your block storage volume size
13-
[volume-type] Change your Database Instance storage type (lssd | bssd | sbs_5k | sbs_15k)
14-
[upgradable-version-id] Update your database engine to a newer version
15-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
9+
instance-id UUID of the Database Instance you want to upgrade
10+
[node-type] Node type of the Database Instance you want to upgrade to
11+
[enable-ha] Defines whether or not high availability should be enabled on the Database Instance
12+
[volume-size] Increase your block storage volume size
13+
[volume-type] Change your Database Instance storage type (lssd | bssd | sbs_5k | sbs_15k)
14+
[upgradable-version-id] Update your database engine to a newer version
15+
[major-upgrade-workflow.upgradable-version-id] Update your database engine to a newer version
16+
[major-upgrade-workflow.with-endpoints] Include endpoint during the migration
17+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1618

1719
FLAGS:
1820
-h, --help help for upgrade

docs/commands/rdb.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,8 @@ scw rdb instance upgrade <instance-id ...> [arg=value ...]
918918
| volume-size | | Increase your block storage volume size |
919919
| volume-type | One of: `lssd`, `bssd`, `sbs_5k`, `sbs_15k` | Change your Database Instance storage type |
920920
| upgradable-version-id | | Update your database engine to a newer version |
921+
| major-upgrade-workflow.upgradable-version-id | | Update your database engine to a newer version |
922+
| major-upgrade-workflow.with-endpoints | | Include endpoint during the migration |
921923
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
922924

923925

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/moby/buildkit v0.11.6
2525
github.com/opencontainers/go-digest v1.0.0
2626
github.com/pkg/errors v0.9.1
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231024135134-9017dc9053be
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231025134805-9d4d800ad0ce
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.7.0
3030
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN
487487
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
488488
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
489489
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
490-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231024135134-9017dc9053be h1:VmT6+vJNYE6dqBU9RHferKsXg2dGVCC0FFUvJbuO5Zk=
491-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231024135134-9017dc9053be/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
490+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231025134805-9d4d800ad0ce h1:h2AZP6SVZbUtuq1hgmKwAT80FHkSwNSyLl4zRHhn0NI=
491+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231025134805-9d4d800ad0ce/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
492492
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
493493
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
494494
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/namespaces/rdb/v1/rdb_cli.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,20 @@ func rdbInstanceUpgrade() *core.Command {
688688
Deprecated: false,
689689
Positional: false,
690690
},
691+
{
692+
Name: "major-upgrade-workflow.upgradable-version-id",
693+
Short: `Update your database engine to a newer version`,
694+
Required: false,
695+
Deprecated: false,
696+
Positional: false,
697+
},
698+
{
699+
Name: "major-upgrade-workflow.with-endpoints",
700+
Short: `Include endpoint during the migration`,
701+
Required: false,
702+
Deprecated: false,
703+
Positional: false,
704+
},
691705
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
692706
},
693707
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)