From 8ef2ee046d23e9e0f6f5ee5a2d6555bf9c596ead Mon Sep 17 00:00:00 2001 From: bragi92 Date: Wed, 3 Apr 2024 17:42:40 -0700 Subject: [PATCH] Upgrade MA/mdsd + ME (#811) * Update mdsd, MA, MetricsExtension * Linux * mdsd 1.27.4 --> 1.30.3 * MetricsExtension 2.2023.928.2134 --> 2.2024.328.1744 * Windows * MA 46.4.1 --> 46.15.4 * MetricsExtension 2.2023.224.2214 -> 2.2024.328.1744 --------- Co-authored-by: vishwanath --- RELEASENOTES.md | 9 +++ otelcollector/build/linux/Dockerfile | 4 +- otelcollector/build/linux/ccp/Dockerfile | 66 +++++++++---------- otelcollector/build/windows/scripts/setup.ps1 | 7 +- otelcollector/scripts/ccpsetup.sh | 4 +- otelcollector/scripts/setup.sh | 4 +- 6 files changed, 51 insertions(+), 43 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 657b77b39..0ab13969e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,14 @@ # Azure Monitor Metrics for AKS clusters +## Pending + + * Update mdsd, MA, MetricsExtension + * Linux + * mdsd 1.27.4 --> 1.30.3 + * MetricsExtension 2.2023.928.2134 --> 2.2024.328.1744 + * Windows + * MA 46.4.1 --> 46.15.4 + * MetricsExtension 2.2023.224.2214 -> 2.2024.328.1744 ## Release 03-08-2024 diff --git a/otelcollector/build/linux/Dockerfile b/otelcollector/build/linux/Dockerfile index a8a2326a0..8322ad74e 100644 --- a/otelcollector/build/linux/Dockerfile +++ b/otelcollector/build/linux/Dockerfile @@ -149,7 +149,8 @@ COPY --from=builder /usr/lib/libruby.so.3.1 /usr/lib/libz.so.1 /usr/lib/libgmp.s COPY --from=builder /usr/lib/libre2.so.0a /usr/lib/libstdc++.so.6 /usr/lib/libgcc_s.so.1 /usr/lib/libz.so.1 /usr/lib/libgmp.so.10 /usr/lib/libcrypt.so.1 /usr/lib/libm.so.6 /usr/lib/ # metricsextension dependencies # libssl.so.1.1 & libcrypto.so.1.1 are already available with openssl in distroless and copying them over causes FIPS HMAC verification failures -COPY --from=builder /lib/libprotobuf.so.28 /lib/libgrpc++.so.1.42 /lib/libabsl_synchronization.so.2206.0.0 /lib/libboost_filesystem.so.1.76.0 /lib/libboost_coroutine.so.1.76.0 /lib/libboost_thread.so.1.76.0 /lib/libcpprest.so.2.10 /lib/libuuid.so.1 /lib/libstdc++.so.6 /lib/libm.so.6 /lib/libgcc_s.so.1 /lib/libc.so.6 /lib/libz.so.1 /lib64/libgrpc.so.20 /lib/libabsl_raw_hash_set.so.2206.0.0 /lib/libabsl_hash.so.2206.0.0 /lib/libabsl_statusor.so.2206.0.0 /lib/libgpr.so.20 /lib/libupb.so.20 /lib/libabsl_status.so.2206.0.0 /lib/libabsl_time.so.2206.0.0 /lib/libabsl_strings.so.2206.0.0 /lib/libabsl_stacktrace.so.2206.0.0 /lib/libabsl_symbolize.so.2206.0.0 /lib/libabsl_malloc_internal.so.2206.0.0 /lib/libabsl_base.so.2206.0.0 /lib/libabsl_spinlock_wait.so.2206.0.0 /lib/libabsl_raw_logging_internal.so.2206.0.0 /lib/libboost_chrono.so.1.76.0 /lib/libboost_context.so.1.76.0 /lib/libbrotlidec.so.1 /lib/libbrotlienc.so.1 /lib/libcares.so.2 /lib/libaddress_sorting.so.20 /lib/libre2.so.0a /lib/libabsl_cord.so.2206.0.0 /lib/libabsl_str_format_internal.so.2206.0.0 /lib/libabsl_time_zone.so.2206.0.0 /lib/libabsl_city.so.2206.0.0 /lib/libabsl_low_level_hash.so.2206.0.0 /lib/libabsl_cordz_info.so.2206.0.0 /lib/libabsl_strerror.so.2206.0.0 /lib/libabsl_int128.so.2206.0.0 /lib/libabsl_strings_internal.so.2206.0.0 /lib/libabsl_debugging_internal.so.2206.0.0 /lib/libabsl_demangle_internal.so.2206.0.0 /lib/libbrotlicommon.so.1 /lib/libabsl_cord_internal.so.2206.0.0 /lib/libabsl_cordz_functions.so.2206.0.0 /lib/libabsl_cordz_handle.so.2206.0.0 /lib/libabsl_throw_delegate.so.2206.0.0 /lib/libabsl_exponential_biased.so.2206.0.0 /lib/ +COPY --from=builder /lib/libboost_filesystem.so.1.76.0 /lib/libcpprest.so.2.10 /lib/libstdc++.so.6 /lib/libm.so.6 /lib/libgcc_s.so.1 /lib/libc.so.6 /lib/libbrotlidec.so.1 /lib/libbrotlienc.so.1 /lib/libz.so.1 /lib/libbrotlicommon.so.1 /lib/ +COPY --from=builder /lib64/libuuid.so.1 /lib64 # fluent-bit dependencies # libssl.so.1.1 & libcrypto.so.1.1 are already available with openssl in distroless and copying them over causes FIPS HMAC verification failures COPY --from=builder /lib/libyaml-0.so.2 /lib/libsystemd.so.0 /lib/libm.so.6 /lib/libgcc_s.so.1 /lib/liblzma.so.5 /lib/liblz4.so.1 /lib/libcap.so.2 /lib/libgcrypt.so.20 /lib/libgpg-error.so.0 /lib/ @@ -157,7 +158,6 @@ COPY --from=builder /lib/libyaml-0.so.2 /lib/libsystemd.so.0 /lib/libm.so.6 /li COPY --from=builder /lib/libc.so.6 /lib/ # mdsd dependencies COPY --from=builder /usr/lib/libdl.so.2 /usr/lib/librt.so.1 /usr/lib/libpthread.so.0 /usr/lib/libm.so.6 /usr/lib/libstdc++.so.6 /usr/lib/libgcc_s.so.1 /usr/lib/ -COPY --from=builder /usr/local/lib/libtcmalloc_minimal.so.4 /usr/local/lib/ # logrotate dependencies COPY --from=builder /lib/libselinux.so.1 /lib/libpopt.so.0 /lib/libpcre.so.1 /lib/ # curl dependencies diff --git a/otelcollector/build/linux/ccp/Dockerfile b/otelcollector/build/linux/ccp/Dockerfile index 6bc773804..5aa380b3c 100644 --- a/otelcollector/build/linux/ccp/Dockerfile +++ b/otelcollector/build/linux/ccp/Dockerfile @@ -99,44 +99,44 @@ COPY --from=builder /usr/sbin/MetricsExtension /usr/sbin/MetricsExtension COPY --from=builder /usr/bin/inotifywait /usr/bin/inotifywait COPY --from=builder /lib/libinotifytools.so.0 /lib/libc.so.6 /lib/ # metricsextension dependencies -COPY --from=builder /lib/libprotobuf.so.28 /lib/libgrpc++.so.1.42 /lib/libabsl_synchronization.so.2206.0.0 /lib/libboost_filesystem.so.1.76.0 /lib/libboost_coroutine.so.1.76.0 /lib/libboost_thread.so.1.76.0 /lib/libcpprest.so.2.10 /lib/libuuid.so.1 /lib/libstdc++.so.6 /lib/libm.so.6 /lib/libgcc_s.so.1 /lib/libc.so.6 /lib/libz.so.1 /lib64/libgrpc.so.20 /lib/libabsl_raw_hash_set.so.2206.0.0 /lib/libabsl_hash.so.2206.0.0 /lib/libabsl_statusor.so.2206.0.0 /lib/libgpr.so.20 /lib/libupb.so.20 /lib/libabsl_status.so.2206.0.0 /lib/libabsl_time.so.2206.0.0 /lib/libabsl_strings.so.2206.0.0 /lib/libabsl_stacktrace.so.2206.0.0 /lib/libabsl_symbolize.so.2206.0.0 /lib/libabsl_malloc_internal.so.2206.0.0 /lib/libabsl_base.so.2206.0.0 /lib/libabsl_spinlock_wait.so.2206.0.0 /lib/libabsl_raw_logging_internal.so.2206.0.0 /lib/libboost_chrono.so.1.76.0 /lib/libboost_context.so.1.76.0 /lib/libbrotlidec.so.1 /lib/libbrotlienc.so.1 /lib/libcares.so.2 /lib/libaddress_sorting.so.20 /lib/libre2.so.0a /lib/libabsl_cord.so.2206.0.0 /lib/libabsl_str_format_internal.so.2206.0.0 /lib/libabsl_time_zone.so.2206.0.0 /lib/libabsl_city.so.2206.0.0 /lib/libabsl_low_level_hash.so.2206.0.0 /lib/libabsl_cordz_info.so.2206.0.0 /lib/libabsl_strerror.so.2206.0.0 /lib/libabsl_int128.so.2206.0.0 /lib/libabsl_strings_internal.so.2206.0.0 /lib/libabsl_debugging_internal.so.2206.0.0 /lib/libabsl_demangle_internal.so.2206.0.0 /lib/libbrotlicommon.so.1 /lib/libabsl_cord_internal.so.2206.0.0 /lib/libabsl_cordz_functions.so.2206.0.0 /lib/libabsl_cordz_handle.so.2206.0.0 /lib/libabsl_throw_delegate.so.2206.0.0 /lib/libabsl_exponential_biased.so.2206.0.0 /lib/ +COPY --from=builder /lib/libboost_filesystem.so.1.76.0 /lib/libcpprest.so.2.10 /lib/libstdc++.so.6 /lib/libm.so.6 /lib/libgcc_s.so.1 /lib/libc.so.6 /lib/libbrotlidec.so.1 /lib/libbrotlienc.so.1 /lib/libz.so.1 /lib/libbrotlicommon.so.1 /lib/ +COPY --from=builder /lib64/libuuid.so.1 /lib64 # mdsd dependencies COPY --from=builder /usr/sbin/mdsd /usr/sbin/mdsd COPY --from=builder /usr/lib/libdl.so.2 /usr/lib/librt.so.1 /usr/lib/libpthread.so.0 /usr/lib/libm.so.6 /usr/lib/libstdc++.so.6 /usr/lib/libgcc_s.so.1 /usr/lib/ -COPY --from=builder /usr/local/lib/libtcmalloc_minimal.so.4 /usr/local/lib/ # debug image -COPY --from=builder /busybin /busybin -COPY --from=builder /var/lib/logrotate /var/lib/logrotate -COPY --from=builder /var/spool/cron /var/spool/cron -COPY --from=builder /usr/share/p11-kit /usr/share/p11-kit -COPY --from=builder /usr/share/pki/ /usr/share/pki -COPY --from=builder /usr/bin/bash /usr/bin/bash -COPY --from=builder /usr/sbin/busybox /usr/sbin/busybox -COPY --from=builder /usr/sbin/crond /usr/sbin/crond -COPY --from=builder /usr/bin/vim /usr/bin/vim -COPY --from=builder /usr/share/vim /usr/share/vim -COPY --from=builder /usr/sbin/logrotate /usr/sbin/logrotate -COPY --from=builder /usr/bin/gzip /usr/bin/ -COPY --from=builder /usr/bin/update-ca-trust /usr/bin -COPY --from=builder /bin/sh /bin/sh -COPY --from=builder /usr/bin/p11-kit /usr/bin -COPY --from=builder /usr/bin/trust /usr/bin -COPY --from=builder /lib/libreadline.so.8 /lib/ -COPY --from=builder /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.6 /usr/lib/ -COPY --from=builder /lib/libselinux.so.1 /lib/libpam.so.0 /lib/libc.so.6 /lib/libpcre.so.1 /lib/libaudit.so.1 /lib/libcap-ng.so.0/ /lib/ -COPY --from=builder /lib/libm.so.6 /lib/libtinfo.so.6 /lib/ -COPY --from=builder /lib/libselinux.so.1 /lib/libpopt.so.0 /lib/libpcre.so.1 /lib/ -COPY --from=builder /lib/libreadline.so.8 /lib/libc.so.6 /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.6 /lib/ -COPY --from=builder /usr/lib64/pkcs11 /usr/lib64 -COPY --from=builder /usr/lib/pkcs11 /usr/lib/ -COPY --from=builder /usr/libexec/p11-kit /usr/libexec -COPY --from=builder /lib/libp11-kit.so.0 /lib/libtasn1.so.6 /lib/libc.so.6 /lib/libffi.so.8 /lib/ -COPY --from=builder /usr/lib/p11-kit-trust.so /usr/lib/p11-kit-proxy.so /usr/lib/libp11-kit.so.0.3.0 /usr/lib/libnssckbi.so /usr/lib/ -COPY --from=builder /usr/lib/pkcs11/p11-kit-trust.so /usr/lib/pkcs11/ -COPY --from=builder /usr/bin/curl /usr/bin/ -COPY --from=builder /lib/libcurl.so.4 /lib/libz.so.1 /lib/libc.so.6 /lib/libnghttp2.so.14 /lib/libssh2.so.1 /lib/libgssapi_krb5.so.2 /lib/libzstd.so.1 /lib/ -COPY --from=builder /usr/lib/libkrb5.so.3 /usr/lib/libk5crypto.so.3 /usr/lib/libcom_err.so.2 /usr/lib/libkrb5support.so.0 /usr/lib/libresolv.so.2 /usr/lib/ +# COPY --from=builder /busybin /busybin +# COPY --from=builder /var/lib/logrotate /var/lib/logrotate +# COPY --from=builder /var/spool/cron /var/spool/cron +# COPY --from=builder /usr/share/p11-kit /usr/share/p11-kit +# COPY --from=builder /usr/share/pki/ /usr/share/pki +# COPY --from=builder /usr/bin/bash /usr/bin/bash +# COPY --from=builder /usr/sbin/busybox /usr/sbin/busybox +# COPY --from=builder /usr/sbin/crond /usr/sbin/crond +# COPY --from=builder /usr/bin/vim /usr/bin/vim +# COPY --from=builder /usr/share/vim /usr/share/vim +# COPY --from=builder /usr/sbin/logrotate /usr/sbin/logrotate +# COPY --from=builder /usr/bin/gzip /usr/bin/ +# COPY --from=builder /usr/bin/update-ca-trust /usr/bin +# COPY --from=builder /bin/sh /bin/sh +# COPY --from=builder /usr/bin/p11-kit /usr/bin +# COPY --from=builder /usr/bin/trust /usr/bin +# COPY --from=builder /lib/libreadline.so.8 /lib/ +# COPY --from=builder /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.6 /usr/lib/ +# COPY --from=builder /lib/libselinux.so.1 /lib/libpam.so.0 /lib/libc.so.6 /lib/libpcre.so.1 /lib/libaudit.so.1 /lib/libcap-ng.so.0/ /lib/ +# COPY --from=builder /lib/libm.so.6 /lib/libtinfo.so.6 /lib/ +# COPY --from=builder /lib/libselinux.so.1 /lib/libpopt.so.0 /lib/libpcre.so.1 /lib/ +# COPY --from=builder /lib/libreadline.so.8 /lib/libc.so.6 /usr/lib/libncursesw.so.6 /usr/lib/libtinfo.so.6 /lib/ +# COPY --from=builder /usr/lib64/pkcs11 /usr/lib64 +# COPY --from=builder /usr/lib/pkcs11 /usr/lib/ +# COPY --from=builder /usr/libexec/p11-kit /usr/libexec +# COPY --from=builder /lib/libp11-kit.so.0 /lib/libtasn1.so.6 /lib/libc.so.6 /lib/libffi.so.8 /lib/ +# COPY --from=builder /usr/lib/p11-kit-trust.so /usr/lib/p11-kit-proxy.so /usr/lib/libp11-kit.so.0.3.0 /usr/lib/libnssckbi.so /usr/lib/ +# COPY --from=builder /usr/lib/pkcs11/p11-kit-trust.so /usr/lib/pkcs11/ +# COPY --from=builder /usr/bin/curl /usr/bin/ +# COPY --from=builder /lib/libcurl.so.4 /lib/libz.so.1 /lib/libc.so.6 /lib/libnghttp2.so.14 /lib/libssh2.so.1 /lib/libgssapi_krb5.so.2 /lib/libzstd.so.1 /lib/ +# COPY --from=builder /usr/lib/libkrb5.so.3 /usr/lib/libk5crypto.so.3 /usr/lib/libcom_err.so.2 /usr/lib/libkrb5support.so.0 /usr/lib/libresolv.so.2 /usr/lib/ # Expose the port on which the application listens EXPOSE 8080 diff --git a/otelcollector/build/windows/scripts/setup.ps1 b/otelcollector/build/windows/scripts/setup.ps1 index a2e83001e..6fdfad5a8 100644 --- a/otelcollector/build/windows/scripts/setup.ps1 +++ b/otelcollector/build/windows/scripts/setup.ps1 @@ -15,8 +15,8 @@ New-Item -Type Directory -Path /etc/genevamonitoringagent ############################################################################################ Write-Host ('Installing Metrics Extension'); try { - Invoke-WebRequest -Uri "https://github.com/Azure/prometheus-collector/releases/download/Prometheus-MetricsExtension-Windows-3.15.2023/MdmMetricsExtension.2.2023.224.2214.nupkg" -OutFile /installation/ME/mdmmetricsextension.2.2023.224.2214.zip - Expand-Archive -Path /installation/ME/mdmmetricsextension.2.2023.224.2214.zip -Destination /installation/ME/ + Invoke-WebRequest -Uri "https://github.com/Azure/prometheus-collector/releases/download/metricsext2-2.2024.328.1744/MdmMetricsExtension.2.2024.328.1744.nupkg" -OutFile /installation/ME/mdmmetricsextension.2.2024.328.1744.zip + Expand-Archive -Path /installation/ME/mdmmetricsextension.2.2024.328.1744.zip -Destination /installation/ME/ Move-Item /installation/ME/MetricsExtension /opt/metricextension/ } catch { @@ -83,8 +83,7 @@ If (Test-Path -Path $gemfile ) { ############################################################################################ Write-Host ('Installing GenevaMonitoringAgent'); try { - # $genevamonitoringagentUri='https://github.com/bragi92/helloWorld/releases/download/MA/GenevaMonitoringAgent.46.2.54-jriego2233952464.zip' - $genevamonitoringagentUri='https://github.com/Azure/prometheus-collector/releases/download/Promtheus-MA-Windows-3.9.2023/genevamonitoringagent.46.4.1.zip' + $genevamonitoringagentUri='https://github.com/Azure/prometheus-collector/releases/download/Promtheus-MA-Windows-4.1.2024/GenevaMonitoringAgent.46.15.4.zip' Invoke-WebRequest -Uri $genevamonitoringagentUri -OutFile /installation/genevamonitoringagent.zip Expand-Archive -Path /installation/genevamonitoringagent.zip -Destination /installation/genevamonitoringagent Move-Item -Path /installation/genevamonitoringagent -Destination /opt/genevamonitoringagent/ -ErrorAction SilentlyContinue diff --git a/otelcollector/scripts/ccpsetup.sh b/otelcollector/scripts/ccpsetup.sh index 8829d6b7f..fec0265e2 100644 --- a/otelcollector/scripts/ccpsetup.sh +++ b/otelcollector/scripts/ccpsetup.sh @@ -28,7 +28,7 @@ sudo tdnf repolist --refresh sudo tdnf install inotify-tools -y echo "Installing mdsd..." -sudo tdnf install -y azure-mdsd-1.27.4 +sudo tdnf install -y azure-mdsd-1.30.3 cp -f $TMPDIR/envmdsd /etc/mdsd.d # Create the following directory for mdsd logs @@ -36,7 +36,7 @@ mkdir /opt/microsoft/linuxmonagent # Install ME echo "Installing Metrics Extension..." -sudo tdnf install -y metricsext2-2.2023.928.2134 +sudo tdnf install -y metricsext2-2.2024.328.1744 sudo tdnf list installed | grep metricsext2 | awk '{print $2}' > metricsextversion.txt # Remove any RPMs downloaded not from Mariner diff --git a/otelcollector/scripts/setup.sh b/otelcollector/scripts/setup.sh index cef336ebc..4cca29059 100644 --- a/otelcollector/scripts/setup.sh +++ b/otelcollector/scripts/setup.sh @@ -44,7 +44,7 @@ echo "Installing mdsd..." # fi # Install this way once moving to the Mariner published RPMs: -sudo tdnf install -y azure-mdsd-1.27.4 +sudo tdnf install -y azure-mdsd-1.30.3 cp -f $TMPDIR/envmdsd /etc/mdsd.d # Create the following directory for mdsd logs @@ -64,7 +64,7 @@ cp /etc/cron.daily/logrotate /etc/cron.hourly/ # Install ME echo "Installing Metrics Extension..." -sudo tdnf install -y metricsext2-2.2023.928.2134 +sudo tdnf install -y metricsext2-2.2024.328.1744 sudo tdnf list installed | grep metricsext2 | awk '{print $2}' > metricsextversion.txt # tdnf does not have an autoremove feature. Only necessary packages are copied over to distroless build. Below reduces the image size if using non-distroless