Working with Keys and Storage¶
Overview¶
Cloud keys provide credentials for launching machines, while storage resources — object storage, file storage, block storage, volumes, and snapshots — give your formations persistent data. In this tutorial you will manage keys and work with storage from the CLI.
Prerequisites¶
- [ ] Completed Getting Started with the CLI
- [ ] At least one cloud account connected
- [ ] Default cloud and region configured
Steps¶
Step 1: List Cloud Keys¶
Each key shows the cloud provider, region, account, and allowed instance types.
Step 2: Create and Manage Cloud Keys¶
Set a key as default:
Share a key:
Delete a key:
Step 3: Manage Key Pairs¶
SSH key pairs for secure access to your machines:
Step 4: Object Storage (Buckets)¶
Create and manage S3 buckets, Azure Blob containers, and GCS buckets:
Browse storage contents:
Upload and download files:
rh storage put <storageUid> --file /path/to/file
rh storage syncup <storageUid>
rh storage syncdown <storageUid>
Clone or copy storage:
Enable CDN or static website hosting:
Step 5: Volumes¶
Managed disk volumes that can be attached to formations:
Create a snapshot from a volume:
Share a volume:
Step 6: File Storage¶
Network file systems (EFS, Azure Files, etc.):
rh file-storage ls
rh file-storage create --label "Team NFS"
rh file-storage delete <fileStorageUid>
Step 7: Block Snapshots¶
Create, manage, and restore from snapshots:
rh snapshot ls
rh snapshot create --label "Pre-upgrade Backup"
rh snapshot clone <snapshotUid>
rh snapshot delete <snapshotUid>
Create a volume from a snapshot:
Retrieve snapshots from your cloud account:
Step 8: Share Storage Resources¶
All storage types support sharing:
rh storage share <storageUid>
rh volume share <volumeUid>
rh snapshot share <snapshotUid>
rh file-storage share <fileStorageUid>
Next Steps¶
- Creating and Launching Formations — use keys and storage with formations
- Cloud Account and IAM Management — manage the accounts behind your keys
Troubleshooting¶
No keys listed
Keys are provisioned from cloud accounts. Ensure your cloud account is connected and has active regions.
Storage creation fails
Check your scope quotas with rh scope ls. You may have reached the maximum storage limit.
How do I attach storage to a formation?
Use the -w (working storage) or -e (reference storage) flags when launching a formation: rh formation launch <uid> -l "label" -w <storageUid>.