This directory contains the following scripts to create and configure GCP projects/storage etc. These GCP projects are where our CI builders run tests.
generate_host_files.py: This script generates host files for different projects that share the same storage location. It will be used by our LUCI bot at the beginning of a test run to generate candidate host files to which to deploy.
Usage examples:
python generate_host_files.py --template examples/schema/host/example.host.textpb --projects="p1;p2;p3" --storage_bucket celab-ci-pool-assets --storage_prefix=tests-1234 --destination_dir /tmp/host_files
python scripts/tests/create_test_pool.py --name celab-ci-pool --folder <XYZ> --billing <XYZ> --service_accounts="celab-ci-builder@...com" --size 5 Example with real value: python create_test_pool.py --name celab-poros --folder 960844185733 --billing 01771F-48826F-E305AD --index 11 --size 10 --service_accounts 'poros-dev@appspot.gserviceaccount.com;poros-prod@appspot.gserviceaccount.com'
<name>@<project_id>.iam.gserviceaccount.com).Usage 1 example:
python grant_project_iam.py \ --project_names "celab-poros-001;celab-poros-002;celab-poros-003;celab-poros-004;celab-poros-005;celab-poros-006;celab-poros-007;celab-poros-008;celab-poros-009;celab-poros-010" \ --principal_type "group" \ --emailid "chrome-enterprise-lab@google.com" \ --role "roles/editor"
Usage 2 example:
python grant_project_iam.py \ --project_names "celab-chrome-try-021;celab-chrome-try-022;celab-chrome-try-023;celab-chrome-try-024;celab-chrome-try-025;celab-chrome-try-026;celab-chrome-try-027;celab-chrome-try-028;celab-chrome-try-029;celab-chrome-try-030;celab-chrome-try-031;celab-chrome-try-032;celab-chrome-try-033;celab-chrome-try-034;celab-chrome-try-035;celab-chrome-try-036;celab-chrome-try-037;celab-chrome-try-038;celab-chrome-try-039;celab-chrome-try-040;celab-chrome-try-041;celab-chrome-try-042;celab-chrome-try-043;celab-chrome-try-044;celab-chrome-try-045;celab-chrome-try-046;celab-chrome-try-047;celab-chrome-try-048;celab-chrome-try-049;celab-chrome-try-050" \ --principal_type "serviceAccount" \ --postfix "@appspot.gserviceaccount.com" \ --role "roles/editor"
Usage 3 example:
python grant_project_iam.py \ --project_names "celab-poros-031;celab-poros-032;celab-poros-033;celab-poros-034;celab-poros-035;celab-poros-036;celab-poros-037;celab-poros-038;celab-poros-039;celab-poros-040;celab-poros-041;celab-poros-042;celab-poros-043;celab-poros-044;celab-poros-045;celab-poros-046;celab-poros-047;celab-poros-048;celab-poros-049;celab-poros-050;celab-poros-051;celab-poros-052;celab-poros-053;celab-poros-054;celab-poros-055;celab-poros-056;celab-poros-057;celab-poros-058;celab-poros-059;celab-poros-060" \ --principal_type "serviceAccount" \ --prefix_type "project_number" \ --postfix "@cloudservices.gserviceaccount.com" \ --role "roles/compute.imageUser" \ --target_project_id "celab-selfhost-instances"
Usage 4 example (grant Infrastructure Manager access):
python grant_project_iam.py \ --project_names "celab-try-001;celab-try-002;celab-try-003;celab-try-004;celab-try-005" \ --principal_type "serviceAccount" \ --service_account_name "cel-instance-service" \ --role "roles/config.admin"