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

feat(rdb): add support for snapshots and block volume storage #1875

Merged
merged 3 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARGS:
[node-type] Node type of the instance you want to upgrade to (DB-DEV-S | DB-DEV-M | DB-DEV-L | DB-DEV-XL | DB-GP-XS | DB-GP-S | DB-GP-M | DB-GP-L | DB-GP-XL)
[enable-ha] Set to true to enable high availability on your instance
[volume-size] Increase your block storage volume size
[volume-type] Change your instance storage type (lssd | bssd)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create an instance snapshot.

USAGE:
scw rdb snapshot create [arg=value ...]

ARGS:
instance-id UUID of the instance
name=<generated> Name of the snapshot
[expires-at] Expiration date (Format ISO 8601)
[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 create

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Delete an instance snapshot.

USAGE:
scw rdb snapshot delete <snapshot-id ...> [arg=value ...]

ARGS:
snapshot-id UUID of the snapshot to delete
[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 delete

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
19 changes: 19 additions & 0 deletions cmd/scw/testdata/test-all-usage-rdb-snapshot-get-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Get an instance snapshot.

USAGE:
scw rdb snapshot get <snapshot-id ...> [arg=value ...]

ARGS:
snapshot-id UUID of the snapshot
[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 get

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
23 changes: 23 additions & 0 deletions cmd/scw/testdata/test-all-usage-rdb-snapshot-list-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
List instance snapshots.

USAGE:
scw rdb snapshot list [arg=value ...]

ARGS:
[name] Name of the snapshot
[order-by] Criteria to use when ordering snapshot listing (created_at_asc | created_at_desc | name_asc | name_desc | expires_at_asc | expires_at_desc)
[instance-id] UUID of the instance
[project-id] Project ID the snapshots belongs to
[organization-id] Organization ID the snapshots belongs to
[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 list

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create a new instance from a given snapshot.

USAGE:
scw rdb snapshot restore <snapshot-id ...> [arg=value ...]

ARGS:
snapshot-id Block snapshot of the instance
[instance-name] Name of the instance created with the snapshot
[is-ha-cluster] Whether or not High-Availability is enabled on the new instance
[node-type] The node type used to restore the snapshot
[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 restore

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Update an instance snapshot.

USAGE:
scw rdb snapshot update <snapshot-id ...> [arg=value ...]

ARGS:
snapshot-id UUID of the snapshot to update
[name] Name of the snapshot
[expires-at] Expiration date (Format ISO 8601)
[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 update

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use
25 changes: 25 additions & 0 deletions cmd/scw/testdata/test-all-usage-rdb-snapshot-usage.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
Create, restore and manage block snapshot

USAGE:
scw rdb snapshot <command>

AVAILABLE COMMANDS:
create Create an instance snapshot
delete Delete an instance snapshot
get Get an instance snapshot
list List instance snapshots
restore Create a new instance from a given snapshot
update Update an instance snapshot

FLAGS:
-h, --help help for snapshot

GLOBAL FLAGS:
-c, --config string The path to the config file
-D, --debug Enable debug mode
-o, --output string Output format: json or human, see 'scw help output' for more info (default "human")
-p, --profile string The config profile to use

Use "scw rdb snapshot [command] --help" for more information about a command.
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-rdb-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ AVAILABLE COMMANDS:
log Instance logs management commands
node-type Node types management commands
privilege User privileges management commands
snapshot Block snapshot management
user User management commands

FLAGS:
Expand Down
Loading