Oliver Chang 4489ae2f64
Update install_deps_linux.bash to install google-cloud-cli instead. (#4186)
This was renamed to google-cloud-cli. Referencing google-cloud-sdk may
even cause old/stale versions to be installed in some setups.
2024-08-19 10:13:13 -04:00
..
2019-01-30 09:55:19 -08:00
2020-08-04 18:08:35 +10:00
2024-08-11 21:03:30 -03:00
2019-01-30 09:55:19 -08:00
2020-04-01 09:14:07 +11:00

This directory contains scripts for running ClusterFuzz docker images locally.

Prerequisites

Make sure you have installed the dependencies using:

$ ../local/install_deps.bash

Running a local metadata server

Provide credentials to connect to your project using one of the following ways:

  • To use your own account credentials, run:
    $ gcloud auth application-default login
    
  • To use a service account credentials file, run:
    $ export GOOGLE_APPLICATION_CREDENTIALS=<path-to-your-credentials.json>`
    

To run a local GCE metadata server emulating the credentials provided above:

$ ./run_metadata.bash \
  -project-id=<your-project-name> \
  -project-num=<your-project-number> \
  -deployment-bucket=<deployment.bucket attribute in your config-dir/project.yaml>

You can skip specifying the deployment-bucket if you plan to use local checkout.

Running a bot locally

To run a bot image locally, run:

$ ./run_docker.bash gcr.io/clusterfuzz-images/base

NOTE: You must run this command as a non-root user. Make sure that to add your user to the docker group using sudo adduser $USER docker.

By default this uses the latest deployed source, but you can also use your local checkout by doing:

$ LOCAL_SRC=1 CONFIG_DIR_OVERRIDE=<your-config-dir> ./run_docker.bash gcr.io/clusterfuzz-images/base

Running CI locally

To run the CI environment locally, run

$ ./run_ci.bash
# (inside container)
$ setup