-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch linux RBE to ubuntu18.04, get rid of rbe_autoconfig (grpc#32559)
First step in the modernization of our RBE stack (see go/rbe-tech-debt-notes). - Get rid of the deprecated rbe_autoconfig and start using [rbe_configs_gen](https://github.com/bazelbuild/bazel-toolchains#rbe_configs_gen---cli-tool-to-generate-configs) + check in the generated toolchain configs. - Switch from marketplace.gcr.io/google/rbe-ubuntu16-04 to marketplace.gcr.io/google/rbe-ubuntu18-04 (this image is still not owned by us, but at least it's newer and demonstrates how a switch to a newer docker image is done). - provide script for generating the linux RBE toolchain configs. - cleanup RBE configuration in the bazelrc files used for remote build
- Loading branch information
1 parent
d47b569
commit a27b86f
Showing
20 changed files
with
6,824 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
# Copyright 2023 The gRPC Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Generate linux RBE configs using rbe_configs_gen. | ||
# See https://github.com/bazelbuild/bazel-toolchains#rbe_configs_gen---cli-tool-to-generate-configs | ||
|
||
set -ex | ||
|
||
cd $(dirname $0)/../.. | ||
|
||
REPO_ROOT="$(pwd)" | ||
|
||
TEMP_DIR="$(mktemp -d)" | ||
pushd "${TEMP_DIR}" | ||
# Build the "rbe_configs_gen" binary using the official instructions. | ||
git clone https://github.com/bazelbuild/bazel-toolchains.git | ||
cd bazel-toolchains | ||
# Build "rbe_configs_gen" binary under docker and put it to the current directory. | ||
docker run --rm -v $PWD:/srcdir -w /srcdir golang:1.16 go build -o rbe_configs_gen ./cmd/rbe_configs_gen/rbe_configs_gen.go | ||
popd | ||
|
||
# location of the "rbe_config_gen" binary as build by the previous step. | ||
RBE_CONFIGS_GEN_TOOL_PATH="${TEMP_DIR}/bazel-toolchains/rbe_configs_gen" | ||
|
||
# the container under which RBE actions will run | ||
LINUX_RBE_DOCKER_IMAGE=l.gcr.io/google/rbe-ubuntu18-04@sha256:48b67b41118dbcdfc265e7335f454fbefa62681ab8d47200971fc7a52fb32054 | ||
|
||
# Bazel version used for configuring | ||
# Needs to be one of the versions from bazel/supported_versions.txt chosen so that the result is compatible | ||
# with other supported bazel versions. | ||
BAZEL_VERSION=5.4.0 | ||
|
||
# TODO(jtattermusch): experiment with --cpp_env_json to simplify bazel build configuration. | ||
|
||
# Where to store the generated configs (relative to repo root) | ||
CONFIG_OUTPUT_PATH=third_party/toolchains/rbe_ubuntu1804 | ||
|
||
# Delete old generated configs. | ||
rm -rf "${REPO_ROOT}/${CONFIG_OUTPUT_PATH}" | ||
|
||
${RBE_CONFIGS_GEN_TOOL_PATH} \ | ||
--bazel_version="${BAZEL_VERSION}" \ | ||
--toolchain_container="${LINUX_RBE_DOCKER_IMAGE}" \ | ||
--output_src_root="${REPO_ROOT}" \ | ||
--output_config_path="${CONFIG_OUTPUT_PATH}" \ | ||
--exec_os=linux \ | ||
--target_os=linux \ | ||
--generate_java_configs=false |
Oops, something went wrong.