Skip to content

Commit

Permalink
Move edge-modules/MetricsCollector to test/modules/TestMetricsCollect…
Browse files Browse the repository at this point in the history
…or (Azure#6240)

Move test metrics collector into test directory for clarity and consistency w/ 1.1 branch.

These changes were tested by running a build images pipeline followed by E2E and Connectivity Test pipelines.

## Azure IoT Edge PR checklist:
  • Loading branch information
nlcamp authored Mar 30, 2022
1 parent 493d8d4 commit 3cc47b5
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Microsoft.Azure.Devices.Edge.sln
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkController", "test\c
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Modules.Test", "test\modules\Modules.Test\Modules.Test.csproj", "{837F5563-BB1C-4A59-A506-07ED8458DB4E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MetricsCollector", "edge-modules\MetricsCollector\MetricsCollector.csproj", "{4B0F95CF-E696-450F-B7F6-35E361C91777}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestMetricsCollector", "test\modules\TestMetricsCollector\TestMetricsCollector.csproj", "{4B0F95CF-E696-450F-B7F6-35E361C91777}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DirectMethodReceiver", "test\modules\DirectMethodReceiver\DirectMethodReceiver.csproj", "{8C964A2F-A163-421C-B262-BE9C81B555BC}"
EndProject
Expand Down
8 changes: 4 additions & 4 deletions builds/misc/templates/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,13 @@ stages:
buildx_flag: 'true'
use_rocksdb: true

- job: BuildImageMetricsCollector
- job: BuildImageTestMetricsCollector
steps:
- template: image-linux.yaml
parameters:
name: Metrics Collector
imageName: azureiotedge-metrics-collector
project: MetricsCollector
name: Test Metrics Collector
imageName: azureiotedge-test-metrics-collector
project: TestMetricsCollector
bin_dir: '$(Build.BinariesDirectory)'
buildx_flag: 'true'

Expand Down
4 changes: 2 additions & 2 deletions e2e_deployment_files/connectivity_deployment.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-test-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": "{\"HostConfig\":{\"NetworkMode\":\"host\"},\"NetworkingConfig\":{\"EndpointsConfig\":{\"host\":{}}}}"
}
}
Expand Down Expand Up @@ -947,4 +947,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions e2e_deployment_files/long_haul_deployment.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-test-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": "{\"HostConfig\":{\"LogConfig\":{\"Type\":\"json-file\",\"Config\":{\"max-size\":\"4m\",\"max-file\":\"<LogRotationMaxFile>\",\"compress\":\"true\"}}}}"
}
},
Expand Down Expand Up @@ -606,4 +606,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-test-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": "{\"HostConfig\":{\"Memory\":\"<MetricsCollectorMemoryThreshold>\", \"LogConfig\":{\"Type\":\"json-file\",\"Config\":{\"max-size\":\"4m\",\"max-file\":\"<LogRotationMaxFile>\",\"compress\":\"true\"}}}}"
}
},
Expand Down Expand Up @@ -436,4 +436,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@
}
},
"settings": {
"image": "$upstream:443/microsoft/azureiotedge-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"image": "$upstream:443/microsoft/azureiotedge-test-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": "{\"HostConfig\":{\"NetworkMode\":\"host\"},\"NetworkingConfig\":{\"EndpointsConfig\":{\"host\":{}}}}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-test-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": "{\"HostConfig\":{\"LogConfig\":{\"Type\":\"json-file\",\"Config\":{\"max-size\":\"4m\",\"max-file\":\"<LogRotationMaxFile>\",\"compress\":\"true\"}}}}"
}
},
Expand Down Expand Up @@ -588,4 +588,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-test-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": "{\"HostConfig\":{\"LogConfig\":{\"Type\":\"json-file\",\"Config\":{\"max-size\":\"4m\",\"max-file\":\"<LogRotationMaxFile>\",\"compress\":\"true\"}}}}"
}
},
Expand Down Expand Up @@ -700,4 +700,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions e2e_deployment_files/stress_deployment.template.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-test-metrics-collector:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": ""
}
}
Expand All @@ -377,4 +377,4 @@
}
}
}
}
}
4 changes: 2 additions & 2 deletions scripts/linux/buildBranch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ publish_app "DirectMethodReceiver"
publish_app "ModuleRestarter"
publish_app "TwinTester"
publish_app "Relayer"
publish_app "MetricsCollector"
publish_app "TestMetricsCollector"
publish_app "TestResultCoordinator"
publish_app "NetworkController"
publish_app "DeploymentTester"
Expand All @@ -261,4 +261,4 @@ publish_leafdevice linux-arm
publish_leafdevice linux-x64
publish_leafdevice linux-arm64

exit $RES
exit $RES
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\netcoreappVersion.props" />
<Import Project="..\..\..\netcoreappVersion.props" />

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -24,9 +24,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\edge-util\src\Microsoft.Azure.Devices.Edge.Util\Microsoft.Azure.Devices.Edge.Util.csproj" />
<ProjectReference Include="..\..\test\modules\ModuleLib\Microsoft.Azure.Devices.Edge.ModuleUtil.csproj" />
<ProjectReference Include="..\..\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Diagnostics\Microsoft.Azure.Devices.Edge.Agent.Diagnostics.csproj" />
<ProjectReference Include="..\..\..\edge-util\src\Microsoft.Azure.Devices.Edge.Util\Microsoft.Azure.Devices.Edge.Util.csproj" />
<ProjectReference Include="..\..\..\test\modules\ModuleLib\Microsoft.Azure.Devices.Edge.ModuleUtil.csproj" />
<ProjectReference Include="..\..\..\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Diagnostics\Microsoft.Azure.Devices.Edge.Agent.Diagnostics.csproj" />
</ItemGroup>

<ItemGroup>
Expand All @@ -36,11 +36,11 @@
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
<AdditionalFiles Include="..\..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>..\..\stylecop.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\..\..\stylecop.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<Import Project="..\..\stylecop.props" />
<Import Project="..\..\..\stylecop.props" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/dotnet/runtime:${base_tag}

ARG EXE_DIR=.

ENV MODULE_NAME "MetricsCollector.dll"
ENV MODULE_NAME "TestMetricsCollector.dll"

WORKDIR /app

Expand All @@ -14,4 +14,4 @@ RUN adduser -Ds /bin/sh moduleuser
USER moduleuser

CMD echo "$(date --utc +"[%Y-%m-%d %H:%M:%S %:z]"): Starting Module" && \
exec /usr/bin/dotnet MetricsCollector.dll
exec /usr/bin/dotnet TestMetricsCollector.dll
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USER moduleuser

ARG EXE_DIR=.

ENV MODULE_NAME "MetricsCollector.dll"
ENV MODULE_NAME "TestMetricsCollector.dll"

WORKDIR /app

Expand All @@ -16,4 +16,4 @@ COPY $EXE_DIR/ ./
USER moduleuser

CMD echo "$(date --utc +"[%Y-%m-%d %H:%M:%S %:z]"): Starting Module" && \
exec /usr/bin/dotnet MetricsCollector.dll
exec /usr/bin/dotnet TestMetricsCollector.dll
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USER moduleuser

ARG EXE_DIR=.

ENV MODULE_NAME "MetricsCollector.dll"
ENV MODULE_NAME "TestMetricsCollector.dll"

WORKDIR /app

Expand All @@ -16,4 +16,4 @@ COPY $EXE_DIR/ ./
USER moduleuser

CMD echo "$(date --utc +"%Y-%m-%d %H:%M:%S %:z") Starting Module" && \
exec /usr/bin/dotnet MetricsCollector.dll
exec /usr/bin/dotnet TestMetricsCollector.dll

0 comments on commit 3cc47b5

Please sign in to comment.