Techniques for persisting data across instances of a cloud shell
Techniques for persisting user data across secure shell instances are provided. The techniques include a method wherein a computer system receives a request to reserve a block volume, the request being received from a session manager service. The method also includes reserving the block volume, identifying a data center identifier of the block volume, returning the data center identifier of the block volume to the session manager service, attaching the block volume to a volume management fleet machine, receiving an instruction from the session manager service to release the block volume, creating a backup of the block volume comprising the data stored in the block volume, and releasing the block volume.
1. A method, comprising:
transmitting, by a first computing device, a first request to reserve a block volume;
receiving, by the first computing device, a data center identifier for a block volume reserved by a second computing device;
reserving, by the first computing device, a virtual compute instance;
transmitting, by the first computing device, a second request to attach the block volume;
receiving, by the first computing device, information that identifies that the block volume was attached;
transmitting, by the first computing device, an instruction to release the block volume;
receiving, by the first computing device, confirmation from a second device that the block volume was released.
2. The method of claim 1 , wherein the first computing device is part of a session manager service, and wherein the second computing device is part of a volume manager service.
3. The method of claim 2 , wherein the first request and the second request are transmitted to the volume manager service.
4. The method of claim 2 , wherein the first request comprises a user identifier, and wherein the volume manager service is configured to reserve the block volume by:
determining whether a registered block volume is allocated to a user corresponding to the user identifier;
in accordance with a registered block volume being allocated to the user, reserving the registered block volume; and
in accordance with a registered block volume not being allocated to a user corresponding to the user identifier, reserving an empty volume from a pool of empty volumes, the empty volume being preformatted to dock with a secure cloud shell.
5. The method of claim 1 , further comprising:
transmitting, by the first computing device, a third request to restore the block volume to create a restore volume; and
receiving, by the first computing device, a data center identifier of the restore volume.
6. The method of claim 5 , wherein the backup of the block volume further comprises an identifier of the backup, and wherein creating the restore volume comprises:
reserving an empty block volume from a pool of empty volumes, the empty block volume being preformatted to dock with a secure cloud shell;
retrieving the backup of the block volume using the identifier of the backup;
provisioning the empty block volume at least in part by loading the backup of the block volume onto the empty block volume; and
identifying the data center identifier of the empty block volume as the data center identifier of the restore volume.
7. The method of claim 1 , further comprising retaining the block volume during a retention period.
8. The method of claim 1 , wherein the confirmation further includes information that the block volume was backed up by the second computing device.
9. A first computing device, comprising:
a memory configured to store computer-executable instructions; and
a processor configured to access the memory and execute the computer-executable instructions to at least:
transmit a first request to reserve a block volume;
receive a data center identifier for a block volume reserved by a second computing device;
reserve a virtual compute instance;
transmit a second request to attach the block volume;
receive information that identifies that the block volume was attached;
transmit an instruction to release the block volume; and
receive confirmation from a second device that the block volume was released.
10. The first computing device of claim 9 , wherein the first computing device is part of a session manager service, and wherein the second computing device is part of a volume manager service.
11. The first computing device of claim 10 , wherein the first request and the second request are transmitted to the volume manager service.
12. The first computing device of claim 10 , wherein the first request comprises a user identifier, and wherein the volume manager service is configured to reserve the block volume by:
determining whether a registered block volume is allocated to a user corresponding to the user identifier;
in accordance with a registered block volume being allocated to the user, reserving the registered block volume; and
in accordance with a registered block volume not being allocated to a user corresponding to the user identifier, reserving an empty volume from a pool of empty volumes, the empty volume being preformatted to dock with a secure cloud shell.
13. The first computing device of claim 9 , where the processor is further configured to execute the computer-executable instructions to at least:
transmit a third request to restore the block volume to create a restore volume; and
receive a data center identifier of the restore volume.
14. The first computing device of claim 13 , wherein the backup of the block volume further comprises an identifier of the backup, and wherein creating the restore volume comprises:
reserving an empty block volume from a pool of empty volumes, the empty block volume being preformatted to dock with a secure cloud shell;
retrieving the backup of the block volume using the identifier of the backup;
provisioning the empty block volume at least in part by loading the backup of the block volume onto the empty block volume; and
identifying the data center identifier of the empty block volume as the data center identifier of the restore volume.
15. A non-transitory computer-readable storage medium, storing computer-executable instructions that, when executed, cause one or more processors of a first computing device to perform operations comprising:
transmitting a first request to reserve a block volume;
receiving a data center identifier for a block volume reserved by a second computing device;
reserving a virtual compute instance;
transmitting a second request to attach the block volume;
receiving, by the first computing device, information that identifies that the block volume was attached;
transmitting an instruction to release the block volume;
receiving confirmation from a second device that the block volume was released.
16. The non-transitory computer-readable storage medium of claim 15 , wherein the first request comprises a user identifier, and wherein the volume manager service is configured to reserve the block volume by:
determining whether a registered block volume is allocated to a user corresponding to the user identifier;
in accordance with a registered block volume being allocated to the user, reserving the registered block volume; and
in accordance with a registered block volume not being allocated to a user corresponding to the user identifier, reserving an empty volume from a pool of empty volumes, the empty volume being preformatted to dock with a secure cloud shell.
17. The non-transitory computer-readable storage medium of claim 15 , wherein the operations further comprise:
transmitting a third request to restore the block volume to create a restore volume; and
receiving a data center identifier of the restore volume.
18. The non-transitory computer-readable storage medium of claim 17 , wherein the backup of the block volume further comprises an identifier of the backup, and wherein creating the restore volume comprises:
reserving an empty block volume from a pool of empty volumes, the empty block volume being preformatted to dock with a secure cloud shell;
retrieving the backup of the block volume using the identifier of the backup;
provisioning the empty block volume at least in part by loading the backup of the block volume onto the empty block volume; and
identifying the data center identifier of the empty block volume as the data center identifier of the restore volume.
19. The non-transitory computer-readable storage medium of claim 15 , wherein the operations further comprise retaining the block volume during a retention period.
20. The non-transitory computer-readable storage medium of claim 15 , wherein the confirmation further includes information that the block volume was backed up by the second computing device.