Get startedGet started for free

Cloud Shell and Cloud Code

1. Cloud Shell and Cloud Code

Finally, we look at Cloud Shell and Cloud Code. Cloud Shell is a free admin machine with browser-based command-line access that is used from the Google Cloud console. It provides you with a temporary virtual machine instance that has 5 GB of persistent disk storage. When you start Cloud Shell, it provisions a Compute Engine virtual machine that runs a Debian-based Linux operating system. Cloud Shell instances are provisioned on a per-user, per-session basis. The instances persist only while your Cloud Shell session is active and terminate after an hour of inactivity. When a new instance needs to be provisioned, it retains the persistent disk that was used with the previous instance. The Google Cloud SDK comes pre-installed in Cloud Shell with built-in authorization to your Google Cloud projects and resources. Cloud Shell comes with a built-in code editor, based on Theia, that you can use to browse directories and view and edit files within your VM. You can use Cloud Code to help you develop your cloud applications in your favorite integrated development environment, or IDE. Cloud Code is a set of IDE plugins that make it easier to create, deploy, and debug cloud applications for Google Cloud. Cloud Code is available for the Cloud Shell Editor, Visual Studio Code, and the JetBrains IDEs, which include IntelliJ for Java and PyCharm for Python development. Cloud Code streamlines common workflows within the IDE by merging non-trivial tasks into a simple user interface inside your IDE. Cloud Code integrates with Secret Manager, which is Google Cloud's service for securely storing passwords, keys, certificates, and other sensitive data. This integration lets you manage your sensitive data within the IDE. You can also manage Cloud APIs from the IDE. You can browse the available Cloud APIs and see Cloud Client Library documentation specific to your programming language. You can also find and copy code samples that use the Cloud APIs. Cloud Code for Kubernetes lets you develop your Kubernetes applications in your IDE. You can run and debug your applications in a local cluster or on Google Kubernetes Engine (GKE). Cloud Code's Kubernetes Explorer provides you with an easy way to visualize and manage your Kubernetes resources within the IDE. You don't need to remember the associated CLI commands. For example, you can right-click on a Pod and stream its logs or open an interactive terminal. If you have developed or deployed Kubernetes applications, you know that YAML configuration files for Kubernetes can be complex and require detailed schemas. Cloud Code's YAML authoring assistance simplifies the process of creating and editing these configuration files by providing autocomplete and inline documentation. Cloud Code also works with Cloud Run, Google Cloud's fully managed serverless product with autoscaling that scales down to zero. You can use Cloud Code to develop your Cloud Run service and then use the Cloud Run Emulator to run and debug it locally. When you're ready to deploy your service, you can deploy it from the IDE. You can also use Cloud Run Explorer to manage your Cloud Run services from the IDE. The gcloud CLI includes local emulators for several of the Google Cloud services that you can use in your applications. You can use the "gcloud beta emulators" commands to install and manage emulators. You do not need to change your application code when you switch between using a local emulator and the Google Cloud service. When you set specified environment variables, Cloud Client Libraries used by your application will automatically connect to the local emulator instead of the Google Cloud service. The local emulators let you develop your code without requiring a connection to the corresponding services, and you will not consume project resources. Local emulators are currently available for Bigtable, Datastore, Firestore, Pub/Sub, and Spanner. Cloud Workstations provides fully managed and secure cloud-based development environments for Google Cloud. Instead of requiring your developers to install software and run setup scripts, you can create a workstation configuration that specifies your environment in a reproducible way. Developers can access fast and consistent development environments anytime and anywhere, using a browser, SSH, or a local IDE. Cloud Workstations supports any code editors and applications that can be run in a container. IT admins can easily provision, scale, manage, and secure cloud development environments for all developers on the team. Environments are consistent no matter where the developers are located or what type of computer and network they use. Cloud Workstations runs on ephemeral Compute Engine VMs, and can be started or stopped on demand or when the IDE is idle to improve cost savings. The IDE runs on customer owned VMs and persistent disks inside the customer VPC, ensuring that the developer machines and code are secure.

2. Let's practice!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.