tree: cefb5920bcab4ce253a7c625d799074ea789f6ab [path history] [tgz]
  1. data/
  2. gradle-node/
  3. .gitignore
  4. config.yaml
  5. OWNERS
  6. README.md
  7. run_node
development/gradleRemoteCache/README.md

Setting up the Gradle Build Cache Node on Google Cloud Platform.

To setup the Gradle Remote Cache you need to do the following:

Create a new Instance

  • Open the Cloud Platform console.

  • Select Compute Engine Instances.

  • Click on an existing node, and use Create Similar to create a new node. Note: This node has to be tagged with a network tag called gradle-remote-cache-node for it to be picked up by the load balancer. Make sure you create the node in the zone us-east-1-b.

  • Click Allow HTTP Traffic and Allow HTTPs Traffic. By doing do, you are allowing UberProxy access to the remote cache. The load balancer is only available when you are on a corp network.

  • Connect to the newly created node using an SSH session. You can use the gcloud CLI for this. Note: Use the external IP of the newly created node to SSH.

# Note: To switch projects use `gcloud config set project fetch-licenses`
# Will show the newly created instance
gcloud compute instances list
# Will setup ssh configurations
gcloud compute config-ssh

Starting the Gradle Remote Cache Node

  • Create a folder Workspace in the home directory.
  • Copy the contents of this folder, into the Workspace folder. Remove the .empty file from the data folder.
  • Download the build cache jar and copy it into the gradle-node folder.
  • Create a tmux session using tmux new -s gradle.
  • Run chmod +x ~/Workspace/run_node.
  • Install JDK 11 using sudo apt install openjdk-11-jdk.
  • Finally run the run_node script using sudo ./run_node from inside the tmux session.
  • Detach from the tmux session.

Update the gradle-remote-cache-group instance group.

  • Add the newly created node, to the instance group by using Edit instance group.
  • Select the node, from the drop-down list.
  • Click Save.