US-12625720-B2 - Cloud shell extension framework
Abstract
The present embodiments relate to a cloud shell extension framework. A cloud infrastructure (CI) service can invoke a cloud shell from a console to the CI. The service may request that context data to be added for use in a terminal session. The cloud shell extension can include a tool or script that can be used to obtain context data or sample code for preparing an environment specific to the service prior to the user interaction with the environment. The cloud shell extension can allow for a service to register an extension in the cloud shell framework, and their extension can be invoked when a client initiates the cloud shell with the service. The extension can allow for the invoked service to forward context data, such as environment variables, to be set in the terminal session for the client.
Inventors
- Christopher S. Kasso
- John Wells
- Linda K. Schneider
- Jacco Martijn Flenter
Assignees
- ORACLE INTERNATIONAL CORPORATION
Dates
- Publication Date
- 20260512
- Application Date
- 20230822
Claims (17)
- 1 . A method performed by a cloud infrastructure node for implementing a cloud shell extension framework, the method comprising: receiving, from a client device, a request to initiate a cloud shell, the request associated with a service; responsive to receiving the request to initiate the cloud shell, identifying a cloud shell extension associated with the service; executing the cloud shell extension associated with the service, wherein the cloud shell extension includes an initializer extension configured to provide, to a terminal session, context data comprising a plurality of environment variables specific to the service; initiating the terminal session with the client device, wherein the terminal session is initiated using the context data provided by the initializer extension; providing, to the client device, the plurality of environment variables specific to the service; obtaining one or more selected environment variables of the plurality of environment variables from the client device; and terminating the execution of the initializer extension responsive to the initiation of the terminal session with the client device.
- 2 . The method of claim 1 , further comprising: creating, by an agent of a data plane of the cloud infrastructure node, a virtual machine instance for execution of the terminal session, wherein web socket data is configured to be transmitted between the virtual machine instance and the client device during the terminal session.
- 3 . The method of claim 2 , further comprising: detecting a termination of the terminal session; and executing a shutdown script to end the terminal session.
- 4 . The method of claim 1 , wherein the cloud shell extension includes an interactive extension, wherein the execution of the interactive extension is terminated responsive to detecting a termination of the terminal session.
- 5 . The method of claim 1 , further comprising: downloading content from an external node according to a script corresponding with the cloud shell extension, wherein the context data includes the downloaded content.
- 6 . The method of claim 1 , wherein executing the cloud shell extension further comprises: executing a secure shell proxy to tunnel data from the client device to a specified virtual machine instance specific to the service.
- 7 . The method of claim 1 , wherein identifying the cloud shell extension associated with the service further comprises: determining that execution of a first version of the cloud shell extension has failed; responsive to determining that execution of the first version of the cloud shell extension has failed, identifying a second version of the cloud shell extension with an earlier version instance that the first version of the cloud shell extension to be executed; and executing the second version of the cloud shell extension.
- 8 . A method performed by a cloud infrastructure node for implementing a cloud shell extension framework, the method comprising: receiving, from a client device, a request to initiate a cloud shell, the request associated with a service; responsive to receiving the request to initiate the cloud shell, identifying a cloud shell extension associated with the service; creating a virtual machine instance for implementation of a terminal session, wherein web socket data is transmitted between the virtual machine instance and the client device during the terminal session; initiating the terminal session with the client device; executing the cloud shell extension associated with the service, wherein the cloud shell extension includes an interactive extension configured to run during the terminal session, to request context data comprising one or more input parameters from the client device, and to receive the context data comprising the one or more input parameters from the client device during the terminal session; and terminating the execution of the interactive extension responsive to detecting a termination of the terminal session.
- 9 . The method of claim 8 , wherein the cloud shell extension includes an initializer extension, wherein executing the cloud shell extension further comprises: providing, to the client device, a plurality of environment variables specific to the service; obtaining one or more selected environment variables of the plurality of environment variables from the client device, wherein the one or more selected environment variables are included in the context data; and terminating the execution of the cloud shell extension responsive to the initiation of the terminal session with the client device.
- 10 . The method of claim 9 , further comprising: downloading content from an external node according to a script corresponding with the cloud shell extension, wherein the downloaded content is included as part of the context data.
- 11 . The method of claim 8 , further comprising: detecting a termination of the terminal session; and executing a shutdown script to end the terminal session.
- 12 . The method of claim 8 , wherein executing the cloud shell extension further comprises: executing a secure shell proxy to tunnel data from the client device to a specified virtual machine instance specific to the service.
- 13 . The method of claim 8 , wherein identifying the cloud shell extension associated with the service further comprises: determining that execution of a first version of the cloud shell extension has failed; responsive to determining that execution of the first version of the cloud shell extension has failed, identifying a second version of the cloud shell extension with an earlier version instance that the first version of the cloud shell extension to be executed; and executing the second version of the cloud shell extension.
- 14 . A cloud infrastructure node comprising: one or more hardware processors; and one or more non-transitory computer-readable media; and program instructions stored on the one or more non-transitory computer-readable media that, when executed by the one or more hardware processors, cause the one or more processors to: receive a request to initiate a cloud shell from a client device, the request associated with a service; identify a cloud shell extension associated with the service; execute the cloud shell extension associated with the service, wherein the cloud shell extension is configured to at least one of: identify context data specific to the service or download the context data specific to the service from an external data source, the context data comprising one or more environment variables for preparing an environment in a terminal session; provide the context data specific to the service to a virtual machine instance for executing the terminal session with the client device; initiate the terminal session between the client device and the virtual machine instance, wherein the context data modifies at least one aspect of the terminal session; and terminate the execution of the cloud shell extension responsive to initiating the terminal session with the client device.
- 15 . The cloud infrastructure node of claim 14 , wherein the cloud shell extension includes an initializer extension, wherein said execute the cloud shell extension further comprises: provide a request to select one or more environment variables from a plurality of environment variables specific to the service to the client device; and obtain one or more selected environment variables from the client device, wherein the context data includes the one or more selected environment variables.
- 16 . The cloud infrastructure node of claim 14 , wherein the cloud shell extension includes an interactive extension, wherein said execute the cloud shell extension further comprises: execute the interactive extension with the terminal session, wherein the interactive extension is configured to request input parameters from the client device and receive one or more input parameters from the client device during the terminal session, the context data including the one or more input parameters.
- 17 . The cloud infrastructure node of claim 14 , wherein said execute the cloud shell extension further comprises: execute a secure shell proxy to tunnel data from the client device to a specified virtual machine instance corresponding to the service.
Description
INCORPORATION BY REFERENCE; DISCLAIMER The following application is hereby incorporated by reference: application Ser. No. 17/321,240 filed on May 14, 2021. The Applicant hereby rescinds any disclaimer of claim scope in the parent application(s) or the prosecution history thereof and advises the USPTO that the claims in this application may be broader than any claim in the parent application(s). BACKGROUND In many instances, a cloud service may require a client to interact with a service via a command line interface (CLI). Example services can include a bastion comprising a computing instance that serves as the public entry point for accessing a private network from external networks like the Internet or a container engine providing a managed, scalable, and highly available service that can be used to deploy containerized applications to the cloud. A cloud shell can be executed between the cloud infrastructure computer and a client device to run the CLI for the service. However, existing cloud shell techniques are in need of improvements, especially with respect to user interaction. SUMMARY The present embodiments relate to a cloud shell extension framework. A first exemplary embodiment provides a method performed by a cloud infrastructure node for implementing a cloud shell extension framework. The method can include receiving, from a client device, a request to initiate a cloud shell. The request can be associated with a service. The method can also include identifying a cloud shell extension associated with the service. This can be performed responsive to receiving the request to initiate the cloud shell. The method can also include executing the cloud shell extension associated with the service to obtain context data specific to the service. The method can also include initiating a terminal session with the client device. The initiation of the terminal session can include the obtained context data. BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a block diagram illustrating an example system for implementing a cloud shell extension framework, according to at least one embodiment. FIG. 2 is a signaling process for implementing a cloud shell extension framework, according to at least one embodiment. FIG. 3 is a block diagram illustrating a method for implementing a cloud shell extension framework, according to at least one embodiment. FIG. 4 is a signaling process of executing an example initializer extension, according to at least one embodiment. FIG. 5 is a signaling process of executing an example interactive extension, according to at least one embodiment. FIG. 6 is a block diagram illustrating one pattern for implementing a cloud infrastructure as a service system, according to at least one embodiment. FIG. 7 is a block diagram illustrating another pattern for implementing a cloud infrastructure as a service system, according to at least one embodiment. FIG. 8 is a block diagram illustrating another pattern for implementing a cloud infrastructure as a service system, according to at least one embodiment. FIG. 9 is a block diagram illustrating another pattern for implementing a cloud infrastructure as a service system, according to at least one embodiment. FIG. 10 is a block diagram illustrating an example computer system, according to at least one embodiment. DETAILED DESCRIPTION The present embodiments relate to implementing a cloud shell extension framework. A cloud infrastructure (CI) service can invoke a cloud shell from a console. However, many services may desire certain data specific to the service to be added for use in a terminal session. For example, a service may desire environment variables set by the client or have code downloaded from an external data source to prepare an environment for a terminal session. The cloud shell plugin framework as described herein can provide CI services (e.g., a bastion, a container engine, or the like) with an ability to obtain and execute preferred variables in obtained context data before the user is provided the terminal session. A first example service can include a CI bastion service. The bastion can provide an operator with secure shell (SSH) access to hosts. A cloud shell session can start a SSH tunnel to a virtual machine instance specific to the CI bastion service. Another example service can include a container engine environment service. The container engine environment service can request a user to generate a cluster configuration file in a cloud shell, and the cloud shell session can start with the configuration file automatically generated. The cloud shell extension can include a tool or script that can be used to obtain context data or pre-determined code for preparing an environment specific to the service prior to the user interaction with the environment. The cloud shell extension can allow for a service to register an extension in the cloud shell framework, and the extension can be invoked when a client initiates the cloud shell with the service