Skip to content
103 changes: 102 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,106 @@ COPY --from=questing-build /tmp/google-cloud-ops-agent.tgz /google-cloud-ops-age
COPY --from=questing-build /google-cloud-ops-agent*.deb /
COPY --from=questing-build /google-cloud-ops-agent-plugin*.tar.gz /

# ======================================
# Build Ops Agent for ubuntu-resolute
# ======================================

FROM ubuntu:resolute AS resolute-build-base
ARG OPENJDK_MAJOR_VERSION

RUN set -x; apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install git systemd \
autoconf libtool libcurl4-openssl-dev libltdl-dev libssl-dev libyajl-dev \
build-essential cmake bison flex file systemd-dev debhelper libsystemd-dev tzdata \
devscripts cdbs pkg-config openjdk-${OPENJDK_MAJOR_VERSION}-jdk zip

SHELL ["/bin/bash", "-c"]

# Install golang
ARG TARGETARCH
ARG GO_VERSION
ADD https://go.dev/dl/go${GO_VERSION}.linux-${TARGETARCH}.tar.gz /tmp/go${GO_VERSION}.tar.gz
RUN set -xe; \
tar -xf /tmp/go${GO_VERSION}.tar.gz -C /usr/local
ENV PATH="${PATH}:/usr/local/go/bin"


FROM resolute-build-base AS resolute-build-otel
WORKDIR /work
# Download golang deps
COPY ./submodules/opentelemetry-operations-collector/go.mod ./submodules/opentelemetry-operations-collector/go.sum submodules/opentelemetry-operations-collector/
RUN cd submodules/opentelemetry-operations-collector && go mod download

COPY ./submodules/opentelemetry-java-contrib submodules/opentelemetry-java-contrib
# Install gradle. The first invocation of gradlew does this
RUN cd submodules/opentelemetry-java-contrib && ./gradlew --no-daemon -Djdk.lang.Process.launchMechanism=vfork tasks
COPY ./submodules/opentelemetry-operations-collector submodules/opentelemetry-operations-collector
COPY ./builds/otel.sh .
RUN \
unset OTEL_TRACES_EXPORTER && \
unset OTEL_EXPORTER_OTLP_TRACES_ENDPOINT && \
unset OTEL_EXPORTER_OTLP_TRACES_PROTOCOL && \
./otel.sh /work/cache/

FROM resolute-build-base AS resolute-build-fluent-bit
WORKDIR /work
COPY ./submodules/fluent-bit submodules/fluent-bit
COPY ./builds/fluent_bit.sh .
RUN ./fluent_bit.sh /work/cache/


FROM resolute-build-base AS resolute-build-systemd
WORKDIR /work
COPY ./systemd systemd
COPY ./builds/systemd.sh .
RUN ./systemd.sh /work/cache/


FROM resolute-build-base AS resolute-build-golang-base
WORKDIR /work
COPY go.mod go.sum ./
# Fetch dependencies
RUN go mod download
COPY confgenerator confgenerator
COPY apps apps
COPY internal internal


FROM resolute-build-golang-base AS resolute-build-wrapper
WORKDIR /work
COPY cmd/agent_wrapper cmd/agent_wrapper
COPY ./builds/agent_wrapper.sh .
RUN ./agent_wrapper.sh /work/cache/


FROM resolute-build-golang-base AS resolute-build
WORKDIR /work
COPY . /work

# Run the build script once to build the ops agent engine to a cache
RUN mkdir -p /tmp/cache_run/golang && cp -r . /tmp/cache_run/golang
WORKDIR /tmp/cache_run/golang
RUN ./pkg/deb/build.sh &> /dev/null || true
WORKDIR /work

COPY ./confgenerator/default-config.yaml /work/cache/etc/google-cloud-ops-agent/config.yaml
COPY --from=resolute-build-otel /work/cache /work/cache
COPY --from=resolute-build-fluent-bit /work/cache /work/cache
COPY --from=resolute-build-systemd /work/cache /work/cache
COPY --from=resolute-build-wrapper /work/cache /work/cache
RUN ./pkg/deb/build.sh

COPY cmd/ops_agent_uap_plugin cmd/ops_agent_uap_plugin
COPY ./builds/ops_agent_plugin.sh .
RUN ./ops_agent_plugin.sh /work/cache/
RUN ./pkg/plugin/build.sh /work/cache resolute


FROM scratch AS resolute
COPY --from=resolute-build /tmp/google-cloud-ops-agent.tgz /google-cloud-ops-agent-ubuntu-resolute.tgz
COPY --from=resolute-build /google-cloud-ops-agent*.deb /
COPY --from=resolute-build /google-cloud-ops-agent-plugin*.tar.gz /

FROM scratch
COPY --from=centos8 /* /
COPY --from=rockylinux9 /* /
Expand All @@ -1338,4 +1438,5 @@ COPY --from=sles15 /* /
COPY --from=sles16 /* /
COPY --from=jammy /* /
COPY --from=noble /* /
COPY --from=questing /* /
COPY --from=questing /* /
COPY --from=resolute /* /
12 changes: 12 additions & 0 deletions dockerfiles/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,18 @@ RUN ln -fs /usr/lib/systemd /lib/systemd` + installJava + installCMake,
tar_distro_name: "ubuntu-questing",
package_extension: "deb",
},
{
from_image: "ubuntu:resolute",
target_name: "resolute",
install_packages: `RUN set -x; apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install git systemd \
autoconf libtool libcurl4-openssl-dev libltdl-dev libssl-dev libyajl-dev \
build-essential cmake bison flex file systemd-dev debhelper libsystemd-dev tzdata \
devscripts cdbs pkg-config openjdk-${OPENJDK_MAJOR_VERSION}-jdk zip`,
package_build: "RUN ./pkg/deb/build.sh",
tar_distro_name: "ubuntu-resolute",
package_extension: "deb",
},
}

func getDockerfileFooter() string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,6 @@ platforms_to_skip:
- ml-images:common-cu129-ubuntu-2404-nvidia-580 # 24.04 only has Aerospike 7.2.0+
- ubuntu-os-cloud:ubuntu-2510-amd64 # aerospike not available for 25.10 yet: https://download.aerospike.com/artifacts/aerospike-server-community/7.2.0/
- ubuntu-os-cloud:ubuntu-2510-arm64 # aerospike not available for 25.10 yet: https://download.aerospike.com/artifacts/aerospike-server-community/7.2.0/
- ubuntu-os-cloud:ubuntu-2604-lts-amd64 # aerospike not available for 26.04 yet: https://download.aerospike.com/artifacts/aerospike-server-community/7.2.0/
- ubuntu-os-cloud:ubuntu-2604-lts-arm64 # aerospike not available for 26.04 yet: https://download.aerospike.com/artifacts/aerospike-server-community/7.2.0/
public_url: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/aerospike
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ platforms_to_skip:
- ubuntu-os-cloud:ubuntu-2404-lts-arm64
- ubuntu-os-cloud:ubuntu-2510-amd64 # couchdb not available for 25.10 yet: https://docs.couchdb.org/en/stable/install/unix.html
- ubuntu-os-cloud:ubuntu-2510-arm64
- ubuntu-os-cloud:ubuntu-2604-lts-amd64 # couchdb not available for 26.04 yet: https://docs.couchdb.org/en/stable/install/unix.html
- ubuntu-os-cloud:ubuntu-2604-lts-arm64 # couchdb not available for 26.04 yet: https://docs.couchdb.org/en/stable/install/unix.html
- debian-cloud:debian-12
- debian-cloud:debian-12-arm64
# couchdb does not support Debian 13 yet: https://apache.jfrog.io/ui/native/couchdb-deb/dists/.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
sudo apt-get update
# Debian 12 very specifically wants openjdk-17-jdk for installing Java via apt
source /etc/os-release
if [[ $ID == debian && "${VERSION_ID}" == 12 ]]; then
if [[ $ID == debian && "${VERSION_ID}" == 12 ]] || [[ $ID == ubuntu && "${VERSION_ID}" == "26.04" ]]; then
sudo apt-get install -y openjdk-17-jdk openjdk-17-jdk-headless wget
else
sudo apt-get install -y default-jdk default-jdk-headless wget
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ platforms_to_skip:
- suse-cloud:sles-15-arm64
- ubuntu-os-cloud:ubuntu-2510-amd64 # Possible support in the future
- ubuntu-os-cloud:ubuntu-2510-arm64 # Possible support in the future
- ubuntu-os-cloud:ubuntu-2604-lts-amd64 # TODO(b/512442712): Skipped on Ubuntu 26.04 due to systemd/AppArmor custom directory blockages
- ubuntu-os-cloud:ubuntu-2604-lts-arm64 # TODO(b/512442712): Skipped on Ubuntu 26.04 due to systemd/AppArmor custom directory blockages
supported_app_version: ["10.1.X through 10.7.X", ""] # Indicate multiple versions.
expected_metrics:
- type: workload.googleapis.com/mysql.buffer_pool_data_pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ minimum_supported_agent_version:
logging: 2.10.0
supported_operating_systems: linux
platforms_to_skip:
# mongodb is not currently supported on various distros.
# mongodb is not currently supported on various distros: https://www.mongodb.com/docs/manual/installation/
- debian-cloud:debian-13
- debian-cloud:debian-13-arm64
- debian-cloud:debian-12
Expand All @@ -45,6 +45,8 @@ platforms_to_skip:
- rocky-linux-cloud:rocky-linux-10-optimized-gcp-arm64
- ubuntu-os-cloud:ubuntu-2510-amd64
- ubuntu-os-cloud:ubuntu-2510-arm64
- ubuntu-os-cloud:ubuntu-2604-lts-amd64 # mongodb is not available on Ubuntu 26.04 yet
- ubuntu-os-cloud:ubuntu-2604-lts-arm64 # mongodb is not available on Ubuntu 26.04 yet
supported_app_version: ["2.6", "3.x", "4.x", "5.0", "6.0"]
expected_metrics:
- type: workload.googleapis.com/mongodb.cache.operations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ platforms_to_skip:
- ml-images:common-cu129-ubuntu-2404-nvidia-580
- ubuntu-os-cloud:ubuntu-2510-amd64
- ubuntu-os-cloud:ubuntu-2510-arm64
- ubuntu-os-cloud:ubuntu-2604-lts-amd64 # EOL version, doesn't support resolute.
- ubuntu-os-cloud:ubuntu-2604-lts-arm64 # EOL version, doesn't support resolute.
supported_app_version: ["2.6", "3.0+", "4.0+", "5.0"]
expected_metrics:
- type: workload.googleapis.com/mongodb.cache.operations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ minimum_supported_agent_version:
logging: 2.5.0
supported_operating_systems: linux
platforms_to_skip:
# MySQL is not currently supported on various distros.
# MySQL is not currently supported on various distros: https://www.mysql.com/support/supportedplatforms/database.html
- debian-cloud:debian-12
- debian-cloud:debian-12-arm64
- debian-cloud:debian-13
Expand All @@ -42,6 +42,8 @@ platforms_to_skip:
- suse-sap-cloud:sles-12-sp5-sap
- ubuntu-os-cloud:ubuntu-2510-amd64 # MySQL is not available on Ubuntu 25.10 yet
- ubuntu-os-cloud:ubuntu-2510-arm64 # MySQL is not available on Ubuntu 25.10 yet
- ubuntu-os-cloud:ubuntu-2604-lts-amd64 # MySQL is not available on Ubuntu 26.04 yet
- ubuntu-os-cloud:ubuntu-2604-lts-arm64 # MySQL is not available on Ubuntu 26.04 yet
supported_app_version: ["5.7", "8.0"]
expected_metrics:
- type: workload.googleapis.com/mysql.buffer_pool_data_pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ platforms_to_skip:
- ml-images:common-cu129-ubuntu-2404-nvidia-580
- ubuntu-os-cloud:ubuntu-2510-amd64
- ubuntu-os-cloud:ubuntu-2510-arm64
- ubuntu-os-cloud:ubuntu-2604-lts-amd64 # EOL version, doesn't support resolute.
- ubuntu-os-cloud:ubuntu-2604-lts-arm64 # EOL version, doesn't support resolute.
supported_app_version: ["5.7", "8.0"]
expected_metrics:
- type: workload.googleapis.com/mysql.buffer_pool_data_pages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ platforms_to_skip:
- ml-images:common-cu129-ubuntu-2404-nvidia-580
- ubuntu-os-cloud:ubuntu-2510-amd64
- ubuntu-os-cloud:ubuntu-2510-arm64
- ubuntu-os-cloud:ubuntu-2604-lts-amd64
- ubuntu-os-cloud:ubuntu-2604-lts-arm64
supported_app_version: ["12.2", "18c", "19c", "21c"]
expected_metrics:
- type: workload.googleapis.com/oracle.backup.latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ case $VERSION_ID in
22.04)
echo "deb http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
;;
24.04|25.10)
24.04|25.10|26.04)
echo "deb http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu noble main" | sudo tee /etc/apt/sources.list.d/rabbitmq.list
;;
# debian
Expand All @@ -36,15 +36,15 @@ case $VERSION_ID in
;;
esac

if [[ "${VERSION_ID}" != "24.04" && "${VERSION_ID}" != "22.04" && "${VERSION_ID}" != "12" && "${VERSION_ID}" != "25.10" ]]; then
if [[ "${VERSION_ID}" != "24.04" && "${VERSION_ID}" != "22.04" && "${VERSION_ID}" != "12" && "${VERSION_ID}" != "25.10" && "${VERSION_ID}" != "26.04" ]]; then
# Ubuntu Noble, Jammy and Debian 12 do not require the extra repo, and adding the extra repo
# would sometime cause package conflicts - b/433254435
curl -s \
https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | \
sudo bash
fi

if [[ "${VERSION_ID}" == "25.10" ]]; then
if [[ "${VERSION_ID}" == "25.10" || "${VERSION_ID}" == "26.04" ]]; then
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh > install_rabbitmq.sh
chmod +x install_rabbitmq.sh
sudo PLUGINS_DIR="/usr/lib/rabbitmq/lib/rabbitmq_server-4.0.5/plugins" os=ubuntu dist=noble ./install_rabbitmq.sh
Expand All @@ -63,7 +63,7 @@ fi
sudo systemctl daemon-reload
sudo systemctl enable rabbitmq-server
sudo systemctl restart rabbitmq-server
if [[ "${VERSION_ID}" == "25.10" ]]; then
if [[ "${VERSION_ID}" == "25.10" || "${VERSION_ID}" == "26.04" ]]; then
sudo PLUGINS_DIR="/usr/lib/rabbitmq/lib/rabbitmq_server-4.0.5/plugins" rabbitmq-plugins enable rabbitmq_management
else
sudo rabbitmq-plugins enable rabbitmq_management
Expand Down Expand Up @@ -92,7 +92,7 @@ curl -i -u admin:admin \
-X POST "${endpoint}/api/bindings/dev/e/webex/q/webq1" \
-d'{"routing_key":"webq1","arguments":{}}'

if [[ "${VERSION_ID}" == "25.10" ]]; then
if [[ "${VERSION_ID}" == "25.10" || "${VERSION_ID}" == "26.04" ]]; then
sudo PLUGINS_DIR="/usr/lib/rabbitmq/lib/rabbitmq_server-4.0.5/plugins" rabbitmq-plugins enable rabbitmq_management
else
sudo rabbitmq-plugins enable rabbitmq_management
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ if [[ $ID == debian && "${VERSION_ID}" == 13 ]]; then
elif [[ $ID == debian && "${VERSION_ID}" == 12 ]]; then
sudo apt-get install -y openjdk-17-jdk openjdk-17-jdk-headless
TOMCAT_VERSION=tomcat10
elif [[ $ID == ubuntu && "${VERSION_ID}" == 24* ]]; then
elif [[ $ID == ubuntu && "${VERSION_ID}" =~ ^(24|25|26) ]]; then
sudo apt-get install -y default-jdk default-jdk-headless
TOMCAT_VERSION=tomcat10
else
if [[ $ID == ubuntu && "${VERSION_ID}" == 24* ]]; then
TOMCAT_VERSION=tomcat10
elif [[ $ID == ubuntu && "${VERSION_ID}" == 25* ]]; then
TOMCAT_VERSION=tomcat10
else
TOMCAT_VERSION=tomcat9
fi
TOMCAT_VERSION=tomcat9
sudo apt-get install -y curl default-jdk default-jdk-headless
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ platforms_to_skip:
- rocky-linux-cloud:rocky-linux-10-optimized-gcp-arm64
- ubuntu-os-cloud:ubuntu-2510-amd64 # vault not available for 25.10 yet: https://www.hashicorp.com/en/official-packaging-guide
- ubuntu-os-cloud:ubuntu-2510-arm64 # vault not available for 25.10 yet: https://www.hashicorp.com/en/official-packaging-guide
- ubuntu-os-cloud:ubuntu-2604-lts-amd64 # vault not available for 26.04 yet: https://www.hashicorp.com/en/official-packaging-guide
- ubuntu-os-cloud:ubuntu-2604-lts-arm64 # vault not available for 26.04 yet: https://www.hashicorp.com/en/official-packaging-guide
supported_app_version: ["1.6+"]
expected_metrics:
- type: workload.googleapis.com/vault.core.request.count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
sudo apt-get update
# Debian 12 very specifically wants openjdk-17-jdk for installing Java via apt
source /etc/os-release
if [[ $ID == debian && "${VERSION_ID}" == 12 ]]; then
if [[ $ID == debian && "${VERSION_ID}" == 12 ]] || [[ $ID == ubuntu && "${VERSION_ID}" == "26.04" ]]; then
sudo apt-get install -y curl openjdk-17-jdk
else
sudo apt-get install -y curl default-jre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sudo apt install -y zookeeper-bin zookeeperd
# For some reason the zookeeper package doesn't set the CLASSPATH in the environment file
# on Ubuntu 23.04 and Debian 12, which it does on previous versions of Ubuntu and Debian.
source /etc/os-release
if [[ "${VERSION_ID}" == 23* || "${VERSION_ID}" == 24* || "${VERSION_ID}" == 25* || "${VERSION_ID}" == 12 || "${VERSION_ID}" == 13 ]]; then
if [[ "${VERSION_ID}" =~ ^(23|24|25|26|12|13) ]]; then
sudo tee -a /etc/zookeeper/conf/environment >/dev/null <<EOF
CLASSPATH="/etc/zookeeper/conf:/usr/share/java/jline.jar:/usr/share/java/log4j-1.2.jar:/usr/share/java/xercesImpl.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/netty.jar:/usr/share/java/slf4j-api.jar:/usr/share/java/slf4j-log4j12.jar:/usr/share/java/zookeeper.jar"
JAVA_OPTS="-Dzookeeper.4lw.commands.whitelist=*"
Expand Down
17 changes: 17 additions & 0 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ targets:
- ubuntu-os-cloud:ubuntu-2510-arm64
exhaustive:
- ubuntu-os-cloud:ubuntu-minimal-2510-arm64
resolute:
os_versions: [ubuntu-26.04*]
package_extension:
deb
architectures:
x86_64:
test_distros:
representative:
- ubuntu-os-cloud:ubuntu-2604-lts-amd64
exhaustive:
- ubuntu-os-cloud:ubuntu-minimal-2604-lts-amd64
aarch64:
test_distros:
representative:
- ubuntu-os-cloud:ubuntu-2604-lts-arm64
exhaustive:
- ubuntu-os-cloud:ubuntu-minimal-2604-lts-arm64
trixie:
os_versions: [debian-13*]
package_extension:
Expand Down
Loading