Install the Cloud Code for IntelliJ plugin

The Cloud Code for IntelliJ plugin adds support for Google Cloud 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 2022.3+

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

    • IntelliJ Ultimate or Community
    • PyCharm Professional or Community
    • WebStorm
    • GoLand
  • Git so that Cloud Code can perform Git operations, like cloning a sample.

  • 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.

  • Google Cloud project with billing enabled if you're using Google Cloud. Projects allow you to collect all of the related resources for a single application in one place as well as manage APIs, enable Google Cloud services, add and remove collaborators, and manage permissions for Google Cloud resources.

Install the Cloud Code plugin

Install the Cloud Code plugin from the JetBrains Marketplace.

Alternatively, you can install the plugin directly from your IDE:

  1. Launch your IDE.

  2. Open your IDE's plugins marketplace:

    • For Windows, navigate to File > Settings > Plugins.
    • For macOS, navigate to IntelliJ IDEA > Preferences > Plugins.
  3. Enter Google Cloud Code in the search field and then install the Cloud Code plugin.

    Cloud Code plugin in IntelliJ marketplace

  4. If prompted, restart your IDE to activate the plugin.

Managed dependencies

By default, Cloud Code installs 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.
  • gcloud CLI to support managing resources on Google Cloud.

Custom versions of dependencies

To use custom versions of dependencies, opt out of dependency management as follows:

  1. Specify the relevant Cloud Code settings in your IDE by opening File > Settings > Tools > Cloud Code > Dependencies or, for Mac OS X, IntelliJ IDEA > Preferences > Tools > Cloud Code > Dependencies, and configuring the Deployment Tools section.

  2. Install the relevant dependencies on your PATH:

Optional: Download and verify the Cloud Code binary

Verifying the Cloud Code binary helps to ensure you that the Cloud Code plugin hasn't been tampered with over the course of the publishing and delivery pipeline.

To download the Cloud Code Stable or Insiders binary to your machine, follow these steps:

  1. On Cloud Code's Plugin versions page, select either the Stable or Insiders channel.

    For more information on the Insiders build, see Use pre-release features.

  2. Download the latest version of Cloud Code or a version that you want to verify that falls under the current versions that support verification:

    • Stable: Every release after 23.1.1-221/23.1.1-222 (23.1.1-221/23.1.1-222 not included)

    • Insiders: Every release after 23.1.1-221-IB.1/23.1.1-222-IB.1 (23.1.1-221-IB.1/23.1.1-222-IB.1 not included)

  3. Take note of the path to your Cloud Code binary (the google-cloud-code.zip file).

To verify the Cloud Code binary, follow these steps:

  1. Download the latest version of the marketplace-zip-signer-cli.jar file to your machine. Take note of the path to your jar file.

  2. Download DigiCert Trusted Root G4. Take note of the path to your certificate file.

  3. Ensure you have the JDK installed. This is required to run Java commands.

  4. To verify the zip file (the Cloud Code binary), run the following in your command line:

    java -jar PATH_TO_ZIP_SIGNER_JAR verify -in PATH_TO_ZIP_FILE -cert PATH_TO_CERTIFICATE_FILE
    

    If the verification fails, one of the following messages appears in your command line output:

    • Zip archive is not signed by provided certificate authority.
    • Provided zip archive is not signed.
    • Signature of zip archive is invalid.

    If you don't see a message in the command line output, then the verification is successful.

Get support

To submit feedback or report an issue in your IntelliJ IDE, go to Tools > Cloud Code > Help / About > Submit feedback or report an issue to report an issue on GitHub, or ask a question on Stack Overflow.