Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 3.05 KB

DEVELOPER.md

File metadata and controls

44 lines (29 loc) · 3.05 KB

Developing the Bazel / K8s demo

Helpful Scripts

scripts/local_vs_remote.sh will remove the deployed applications, run make create locally, remove the apps again, and then run make create with RBE enabled. See the README for notes on RBE.

You can also do a make destroy_apps to just destroy the apps that have been deployed to your cluster, without tearing down the cluster.

Alpha RBE Support

RBE on GCP is in Alpha, so do not use in production.

From the official Bazel Remote Build Execution docs:

By default, Bazel executes builds and tests on your local machine. Remote execution of a Bazel build allows you to distribute build and test actions across multiple machines, such as a datacenter.

Remote execution provides the following benefits:

* Faster build and test execution through scaling of nodes available for parallel actions
* A consistent execution environment for a development team
* Reuse of build outputs across a development team

Google Cloud Platform has RBE support in alpha. If you'd like to run this demo with GCP RBE support, you will need to do a few things:

  1. Fill out this form to get alpha access.
  2. When you're onboarded to the alpha program, you'll be asked to give project ids to the team so they can whitelist your project as able to use RBE.
  3. You may want to re-authenticate to ensure your alpha access is configured locally with gcloud auth application-default login.
  4. Run the make create step of this demo with an RBE flag, like this: RBE=true make create.

Troubleshooting:

  • If you want to verify your alpha access and RBE authentication are correct, the RBE documentation has instructions for building an example application. Follow those instructions to verify your setup.
  • If you're getting errors when running gcloud alpha commands in scripts/create.sh, make sure to update all gcloud components: gcloud components update.
  • If you're not the owner of the project you're using, you'll likely need to add some IAM roles to your account to enable the RBE API & create worker pools.

Linting the Project

You can run the linter simply with make lint, however you'll need to install some dependencies first: