Skip to content

Commit

Permalink
merging with main
Browse files Browse the repository at this point in the history
  • Loading branch information
rashmichandrashekar committed Nov 6, 2024
2 parents 5f15308 + 5e1e97d commit 941d946
Show file tree
Hide file tree
Showing 35 changed files with 1,322 additions and 3,260 deletions.
326 changes: 311 additions & 15 deletions .pipelines/azure-pipeline-build.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion AddonArmTemplate/FullAzureMonitorMetricsProfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,4 +553,4 @@
}
}
]
}
}
7 changes: 7 additions & 0 deletions REMOTE-WRITE-RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Azure Monitor managed service for Prometheus remote write

## Release 06-17-2024
* Image - `mcr.microsoft.com/azuremonitor/containerinsights/ciprod/prometheus-remote-write/images:prom-remotewrite-20240617.1`
* Change log -
* CVE fixes
* golang update from 1.21.9 to 1.22.4
10 changes: 10 additions & 0 deletions internal/grafana_uami/action.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ARMClient doc: https://github.com/projectkudu/ARMClient
# ARMClient login

$grafanaResourceId="/subscriptions/{sub_id}/resourceGroups/{rg_name}/providers/Microsoft.Dashboard/grafana/{name}"
$grafanaApiVersion="2023-10-01-preview"

armclient get "$($grafanaResourceId)?api-version=$($grafanaApiVersion)"

Write-Output "Add user-assigned managed identity to Grafana"
armclient patch "$($grafanaResourceId)?api-version=$($grafanaApiVersion)" patch-add-umi.json -verbose
8 changes: 8 additions & 0 deletions internal/grafana_uami/patch-add-umi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{sub_id}/resourceGroups/{rg_name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{name}": {}
}
}
}
1 change: 1 addition & 0 deletions otelcollector/build/linux/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shared/process_utilities_windows.go
1 change: 1 addition & 0 deletions otelcollector/build/windows/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shared/process_utilities_linux.go
39 changes: 5 additions & 34 deletions otelcollector/build/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ ENV APPLICATIONINSIGHTS_AUTH_USNAT ZTliNjRmZmUtZDZlYi0xYjczLThjYWQtNDU2OTFjN2FhN
ENV TELEMETRY_DISABLED false

COPY ./build/windows/scripts/setup.ps1 $tmpdir/scripts/
COPY ./build/windows/scripts/main.ps1 $tmpdir/scripts/
COPY ./build/windows/scripts/filesystemwatcher.ps1 $tmpdir/scripts/
COPY ./build/windows/scripts/livenessprobe.cmd $tmpdir/microsoft/scripts/

COPY ./configmapparser/*.rb $tmpdir/microsoft/configmapparser/
RUN mkdir "C:\\opt\\microsoft\\configmapparser"
RUN mkdir "C:\\opt\\microsoft\\scripts"
COPY ./configmapparser/default-prom-configs/*.yml $tmpdir/microsoft/otelcollector/default-prom-configs/
COPY ./opentelemetry-collector-builder/otelcollector.exe ./opentelemetry-collector-builder/collector-config-default.yml ./opentelemetry-collector-builder/collector-config-template.yml $tmpdir/microsoft/otelcollector/
COPY ./prom-config-validator-builder/promconfigvalidator.exe $tmpdir/
Expand All @@ -36,40 +34,13 @@ COPY ./telegraf/telegraf-prometheus-collector-windows.conf $tmpdir/telegraf/
COPY ./fluent-bit/fluent-bit-windows.conf $tmpdir/fluent-bit/
COPY ./fluent-bit/fluent-bit-parsers.conf $tmpdir/fluent-bit/
COPY ./fluent-bit/src/out_appinsights.so $tmpdir/fluent-bit/bin/
COPY ./main/main.exe $tmpdir/microsoft
COPY ./react /Users/ContainerAdministrator/Documents/static/react
COPY ./LICENSE $tmpdir/microsoft
COPY ./NOTICE $tmpdir/microsoft

# Do not split this into multiple RUN!
# Docker creates a layer for every RUN-Statement
ENV chocolateyVersion "1.4.0"
RUN powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
# Fluentd depends on cool.io whose fat gem is only available for Ruby < 2.5, so need to specify --platform ruby when install Ruby > 2.5 and install msys2 to get dev tools
RUN choco install -y ruby --version 2.6.5.1 --params "'/InstallDir:C:\ruby26'" \
&& choco install -y msys2 --version 20211130.0.0 --params "'/NoPath /NoUpdate /InstallDir:C:\ruby26\msys64'" \
&& choco install -y vim

# gangams - optional MSYS2 update via ridk failing in merged docker file so skipping that since we dont need optional update
RUN refreshenv \
&& ridk install 3 \
&& echo gem: --no-document >> C:\ProgramData\gemrc \
&& gem install cool.io -v 1.5.4 --platform ruby \
&& gem install oj -v 3.3.10 \
&& gem install json -v 2.2.0 \
&& gem install fluentd -v 1.12.2 \
&& gem install win32-service -v 1.0.1 \
&& gem install win32-ipc -v 0.7.0 \
&& gem install win32-event -v 0.6.3 \
&& gem install windows-pr -v 1.2.6 \
&& gem install tomlrb -v 1.3.0 \
&& gem install deep_merge -v 1.2.1\
&& gem install colorize\
&& gem sources --clear-all

# Remove gem cache and chocolatey
RUN powershell -Command "Remove-Item -Force C:\ruby26\lib\ruby\gems\2.6.0\cache\*.gem; Remove-Item -Recurse -Force 'C:\ProgramData\chocolatey'"

SHELL ["powershell"]
RUN ./opt/scripts/setup.ps1

ENTRYPOINT ["powershell", "C:\\opt\\scripts\\main.ps1"]
# Run the Go executable, entrypoint
ENTRYPOINT ["powershell", "C:\\opt\\microsoft\\main.exe"]
491 changes: 0 additions & 491 deletions otelcollector/build/windows/scripts/main.ps1

This file was deleted.

9 changes: 0 additions & 9 deletions otelcollector/build/windows/scripts/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,6 @@ catch {
}
Write-Host ('Finished downloading Telegraf')
############################################################################################
#Remove gemfile.lock for http_parser gem 0.6.0
#see - https://github.com/fluent/fluentd/issues/3374 https://github.com/tmm1/http_parser.rb/issues/70
$gemfile = "\ruby26\lib\ruby\gems\2.6.0\gems\http_parser.rb-0.6.0\Gemfile.lock"
$gemfileFullPath = $Env:SYSTEMDRIVE + "\" + $gemfile
If (Test-Path -Path $gemfile ) {
Write-Host ("Renaming unused gemfile.lock for http_parser 0.6.0")
Rename-Item -Path $gemfileFullPath -NewName "renamed_Gemfile_lock.renamed"
}
############################################################################################
Write-Host ('Installing GenevaMonitoringAgent');
try {
$genevamonitoringagentUri = 'https://github.com/Azure/prometheus-collector/releases/download/Promtheus-MA-Windows-4.1.2024/GenevaMonitoringAgent.46.15.4.zip'
Expand Down
45 changes: 0 additions & 45 deletions otelcollector/configmapparser/ConfigParseErrorLogger.rb

This file was deleted.

Loading

0 comments on commit 941d946

Please sign in to comment.