Skip to content

Commit

Permalink
feat(rdb): add seemless major upgrade (#3452)
Browse files Browse the repository at this point in the history
Co-authored-by: Jules Castéran <[email protected]>
  • Loading branch information
scaleway-bot and Codelax authored Oct 26, 2023
1 parent b0d22c7 commit 87790e2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ USAGE:
scw rdb instance upgrade <instance-id ...> [arg=value ...]

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

FLAGS:
-h, --help help for upgrade
Expand Down
2 changes: 2 additions & 0 deletions docs/commands/rdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,8 @@ scw rdb instance upgrade <instance-id ...> [arg=value ...]
| volume-size | | Increase your block storage volume size |
| volume-type | One of: `lssd`, `bssd`, `sbs_5k`, `sbs_15k` | Change your Database Instance storage type |
| upgradable-version-id | | Update your database engine to a newer version |
| major-upgrade-workflow.upgradable-version-id | | Update your database engine to a newer version |
| major-upgrade-workflow.with-endpoints | | Include endpoint during the migration |
| 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 |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/moby/buildkit v0.11.6
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231024135134-9017dc9053be
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231025134805-9d4d800ad0ce
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231024135134-9017dc9053be h1:VmT6+vJNYE6dqBU9RHferKsXg2dGVCC0FFUvJbuO5Zk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231024135134-9017dc9053be/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231025134805-9d4d800ad0ce h1:h2AZP6SVZbUtuq1hgmKwAT80FHkSwNSyLl4zRHhn0NI=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231025134805-9d4d800ad0ce/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
Expand Down
14 changes: 14 additions & 0 deletions internal/namespaces/rdb/v1/rdb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,20 @@ func rdbInstanceUpgrade() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "major-upgrade-workflow.upgradable-version-id",
Short: `Update your database engine to a newer version`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "major-upgrade-workflow.with-endpoints",
Short: `Include endpoint during the migration`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down

0 comments on commit 87790e2

Please sign in to comment.