Setting up the Cloud Code extension

The Cloud Code extension for IntelliJ adds support for Google Cloud Platform development to the JetBrains family of IDEs, including IntelliJ (both Community and Ultimate editions), GoLand, PyCharm, WebStorm (and others).

Prerequisites

The following tools are expected to be installed and setup on your system and available on the PATH of your machine:

  • JetBrains IDE version 2020.1+

    Your IDE should be a JetBrains IDE such as one of the following:

    • IntelliJ Ultimate or Community
    • PyCharm Professional or Community
    • WebStorm
    • GoLand
  • Docker for building and pushing your container images.

  • Configured Kubernetes cluster which can either be a cluster for local development, such as Minikube or Docker Kubernetes cluster, or a remote cluster, such as Google Kubernetes Engine cluster. A minikube cluster is recommended for local development; minikube can be managed automatically by Cloud Code.

Managed dependencies

Cloud Code will default to installing some required command line dependencies automatically, such as:

  • kubectl for working with Kubernetes clusters and managing Kubernetes deployments.
  • skaffold to support continuous development on a Kubernetes cluster, smart image building and tagging, and an array of supported deployment and build types.
  • minikube to support local development.
  • Cloud SDK to support managing resources on Google Cloud.

Custom versions of dependencies

If you would prefer to use custom versions of these dependencies, you may opt out of dependency management by specifying the relevant Cloud Code settings within your IDE (File > Settings > Tools > Cloud Code > Dependencies or for Mac OS X, IntelliJ IDEA > Preferences > Tools > Cloud Code > Dependencies, and configuring the Deployment Tools section).

Then, install the following on your PATH:

Additional prerequisites for M1 Macs

If you're using Cloud Code with an Apple M1 chip, you'll need to set up Rosetta 2.

If you prefer not to use Rosetta, turn off managed dependencies (IntelliJ IDEA > Preferences > Tools > Cloud Code > Dependencies) and install your own ARM versions of the dependencies as described in Custom versions of dependencies.

Importantly, Google Kubernetes Engine and Cloud Run support x86 images only. While M1 support is being worked on, you can still work with these services when using Cloud Code:

  • Kubernetes: To work with a Kubernetes application when using Cloud Code, you can build your images remotely. The recommended approach is to build your image with Cloud Build, adding a cloudbuild profile to your skaffold.yaml and using cloudbuild as your Deployment profile.
  • Cloud Run: While you can continue to develop and debug a Cloud Run application locally when using Cloud Code on a M1 Mac, you can't deploy to Cloud Run yet. As a workaround, you can deploy to a prebuilt container to Cloud Run using the Cloud SDK.

Installing the Cloud Code plugin

  • From your IDE's plugins marketplace (File > Settings > Plugins or for Mac OS X, IntelliJ IDEA > Preferences > Plugins), search for the 'Cloud Code' plugin and install it.

    You may be prompted to restart your IDE to activate the plugin.

  • Once done, you can start creating your own application or import an existing one.

Getting support

To send feedback, report an issue on GitHub or ask a question on Stack Overflow.