Update Long Haul and Image Build Pipeline to use the new Direct Method Sender Module

- Remove the old Direct Method Cloud Sender module
- Modify Long Haul pipeline to handle a new deployment for the new Direct Method Sender module
- Set the default value of the Direct Method Sender to be compatible with the old E2E pipeline
- Fix a broken reporting endpoint for Long Haul pipeline
This commit is contained in:
yophilav 2019-12-19 10:05:43 -08:00 коммит произвёл GitHub
Родитель 6aadb5fb87
Коммит dc51787e89
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
15 изменённых файлов: 48 добавлений и 376 удалений

Просмотреть файл

@ -172,8 +172,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DirectMethodReceiver", "edg
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Devices.Edge.ModuleUtil", "edge-modules\ModuleLib\Microsoft.Azure.Devices.Edge.ModuleUtil.csproj", "{A58633ED-5302-41DF-A0F6-FDC48E5C6B04}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DirectMethodCloudSender", "edge-modules\DirectMethodCloudSender\DirectMethodCloudSender.csproj", "{A68ABCD4-5926-4005-9525-559DD74991C9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2300ED4C-1D5A-460F-8691-7C85E1162E0C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Devices.Edge.Test.Common", "test\Microsoft.Azure.Devices.Edge.Test.Common\Microsoft.Azure.Devices.Edge.Test.Common.csproj", "{950DACB0-B011-41AF-B0FB-245F749B01AB}"
@ -583,14 +581,6 @@ Global
{A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A58633ED-5302-41DF-A0F6-FDC48E5C6B04}.Release|Any CPU.Build.0 = Release|Any CPU
{A68ABCD4-5926-4005-9525-559DD74991C9}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU
{A68ABCD4-5926-4005-9525-559DD74991C9}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU
{A68ABCD4-5926-4005-9525-559DD74991C9}.CodeCoverage|Any CPU.ActiveCfg = CodeCoverage|Any CPU
{A68ABCD4-5926-4005-9525-559DD74991C9}.CodeCoverage|Any CPU.Build.0 = CodeCoverage|Any CPU
{A68ABCD4-5926-4005-9525-559DD74991C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A68ABCD4-5926-4005-9525-559DD74991C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A68ABCD4-5926-4005-9525-559DD74991C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A68ABCD4-5926-4005-9525-559DD74991C9}.Release|Any CPU.Build.0 = Release|Any CPU
{950DACB0-B011-41AF-B0FB-245F749B01AB}.CheckInBuild|Any CPU.ActiveCfg = CheckInBuild|Any CPU
{950DACB0-B011-41AF-B0FB-245F749B01AB}.CheckInBuild|Any CPU.Build.0 = CheckInBuild|Any CPU
{950DACB0-B011-41AF-B0FB-245F749B01AB}.CodeCoverage|Any CPU.ActiveCfg = Debug|Any CPU
@ -770,7 +760,6 @@ Global
{029174D7-588D-4D29-BF3D-4A414B070C39} = {578D5330-2F72-44C6-9DB5-C93B3F42C473}
{013D53C7-3AB5-41A4-9A8D-0F2C47238773} = {578D5330-2F72-44C6-9DB5-C93B3F42C473}
{A58633ED-5302-41DF-A0F6-FDC48E5C6B04} = {578D5330-2F72-44C6-9DB5-C93B3F42C473}
{A68ABCD4-5926-4005-9525-559DD74991C9} = {578D5330-2F72-44C6-9DB5-C93B3F42C473}
{950DACB0-B011-41AF-B0FB-245F749B01AB} = {2300ED4C-1D5A-460F-8691-7C85E1162E0C}
{B63C506E-5CB5-4DE8-8275-F7BA8354799E} = {54351E51-19CB-4DE3-8302-99846AB216CF}
{A5DFFB52-D8EA-4E1A-BF4F-8B9665C7DAFE} = {F5E37327-3AA9-4CC2-9FE3-B28271ADB5E3}

Просмотреть файл

@ -91,13 +91,6 @@ jobs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-direct-method-receiver -n microsoft -P DirectMethodReceiver --target-arch aarch64
# Direct Method Cloud Sender - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Direct Method Cloud Sender - aarch64
inputs:
filePath: scripts/linux/buildImage.sh
arguments: -r $(registry.address) -u $(registry.user) -p $(registry.password) -i azureiotedge-direct-method-cloud-sender -n microsoft -P DirectMethodCloudSender --target-arch aarch64
# Module Restarter - Not Using Template for ARM64 because we have 2 different .NET Core.
- task: Bash@3
displayName: Build Image - Module Restarter - aarch64
@ -223,13 +216,6 @@ jobs:
imageName: azureiotedge-direct-method-receiver
project: DirectMethodReceiver
# Direct Method Cloud Sender
- template: templates/image-linux.yaml
parameters:
name: Direct Method Cloud Sender
imageName: azureiotedge-direct-method-cloud-sender
project: DirectMethodCloudSender
# Module Restarter
- template: templates/image-linux.yaml
parameters:
@ -405,13 +391,6 @@ jobs:
imageName: azureiotedge-direct-method-receiver
project: DirectMethodReceiver
# Direct Method Cloud Sender
- template: templates/image-windows.yaml
parameters:
name: Direct Method Cloud Sender
imageName: azureiotedge-direct-method-cloud-sender
project: DirectMethodCloudSender
# Module Restarter
- template: templates/image-windows.yaml
parameters:

Просмотреть файл

@ -271,21 +271,28 @@
"createOptions": "{\"HostConfig\":{\"PortBindings\":{\"15000/tcp\":[{\"HostPort\":\"15000\"}]}}}"
}
},
"DirectMethodCloudSender": {
"DirectMethodSender": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"env": {
"TargetModuleId": {
"value": "DirectMethodReceiver"
"AnalyzerUrl":
{
"value": "http://analyzer:15000"
},
"InvocationSource": {
"value": "Cloud"
},
"ServiceClientConnectionString": {
"value": "<ServiceClientConnectionString>"
},
"TargetModuleId": {
"value": "DirectMethodReceiver"
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-direct-method-cloud-sender:<Build.BuildNumber>-linux-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-direct-method-sender:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": ""
}
},
@ -304,21 +311,28 @@
"createOptions": ""
}
},
"DirectMethodCloudSender2": {
"DirectMethodSender2": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"env": {
"TargetModuleId": {
"value": "DirectMethodReceiver2"
"AnalyzerUrl":
{
"value": "http://analyzer:15000"
},
"InvocationSource": {
"value": "Cloud"
},
"ServiceClientConnectionString": {
"value": "<ServiceClientConnectionString>"
},
"TargetModuleId": {
"value": "DirectMethodReceiver2"
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-direct-method-cloud-sender:<Build.BuildNumber>-linux-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-direct-method-sender:<Build.BuildNumber>-linux-<Architecture>",
"createOptions": ""
}
},
@ -370,8 +384,8 @@
"TempSensorToTempFilter": "FROM /messages/modules/tempSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/tempFilter/inputs/input1\")",
"TempFilterToCloud2": "FROM /messages/modules/tempFilter2/outputs/* INTO $upstream",
"TempSensorToTempFilter2": "FROM /messages/modules/tempSensor2/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/tempFilter2/inputs/input1\")",
"upstreamDirectMethodCloudSender1": "FROM /messages/modules/DirectMethodCloudSender/outputs/output1 INTO $upstream",
"upstreamDirectMethodCloudSender2": "FROM /messages/modules/DirectMethodCloudSender2/outputs/output1 INTO $upstream"
"DirectMethodSender1ToUpstream": "FROM /messages/modules/DirectMethodSender/outputs/output1 INTO $upstream",
"DirectMethodSender2ToUpstream": "FROM /messages/modules/DirectMethodSender2/outputs/output1 INTO $upstream"
},
"storeAndForwardConfiguration": {
"timeToLiveSecs": 86400

Просмотреть файл

@ -274,21 +274,28 @@
"createOptions": "{\"HostConfig\":{\"PortBindings\":{\"15000/tcp\":[{\"HostPort\":\"15000\"}]}}}"
}
},
"DirectMethodCloudSender": {
"DirectMethodSender": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"env": {
"TargetModuleId": {
"value": "DirectMethodReceiver"
"AnalyzerUrl":
{
"value": "http://analyzer:15000"
},
"InvocationSource": {
"value": "Cloud"
},
"ServiceClientConnectionString": {
"value": "<ServiceClientConnectionString>"
},
"TargetModuleId": {
"value": "DirectMethodReceiver"
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-direct-method-cloud-sender:<Build.BuildNumber>-windows-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-direct-method-sender:<Build.BuildNumber>-windows-<Architecture>",
"createOptions": ""
}
},
@ -307,21 +314,28 @@
"createOptions": ""
}
},
"DirectMethodCloudSender2": {
"DirectMethodSender2": {
"version": "1.0",
"type": "docker",
"status": "running",
"restartPolicy": "always",
"env": {
"TargetModuleId": {
"value": "DirectMethodReceiver2"
"AnalyzerUrl":
{
"value": "http://analyzer:15000"
},
"InvocationSource": {
"value": "Cloud"
},
"ServiceClientConnectionString": {
"value": "<ServiceClientConnectionString>"
},
"TargetModuleId": {
"value": "DirectMethodReceiver2"
}
},
"settings": {
"image": "<Container_Registry>/microsoft/azureiotedge-direct-method-cloud-sender:<Build.BuildNumber>-windows-<Architecture>",
"image": "<Container_Registry>/microsoft/azureiotedge-direct-method-sender:<Build.BuildNumber>-windows-<Architecture>",
"createOptions": ""
}
},
@ -373,8 +387,8 @@
"TempSensorToTempFilter": "FROM /messages/modules/tempSensor/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/tempFilter/inputs/input1\")",
"TempFilterToCloud2": "FROM /messages/modules/tempFilter2/outputs/* INTO $upstream",
"TempSensorToTempFilter2": "FROM /messages/modules/tempSensor2/outputs/temperatureOutput INTO BrokeredEndpoint(\"/modules/tempFilter2/inputs/input1\")",
"upstreamDirectMethodCloudSender1": "FROM /messages/modules/DirectMethodCloudSender/outputs/output1 INTO $upstream",
"upstreamDirectMethodCloudSender2": "FROM /messages/modules/DirectMethodCloudSender2/outputs/output1 INTO $upstream"
"DirectMethodSender1ToUpstream": "FROM /messages/modules/DirectMethodSender/outputs/output1 INTO $upstream",
"DirectMethodSender2ToUpstream": "FROM /messages/modules/DirectMethodSender2/outputs/output1 INTO $upstream"
},
"storeAndForwardConfiguration": {
"timeToLiveSecs": 86400

Просмотреть файл

@ -1,64 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition="'$(DotNet_Runtime)' != 'netcoreapp3.0'">
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(OS)|$(DotNet_Runtime)' == 'Unix|netcoreapp3.0'">
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<Configurations>Debug;Release;CodeCoverage;CheckInBuild</Configurations>
<HighEntropyVA>true</HighEntropyVA>
</PropertyGroup>
<!--
Normally, the 'Debug' configuration would work for code coverage, but Microsoft.CodeCoverage currently requires '<DebugType>full</DebugType>' for .NET Core.
See https://github.com/Microsoft/vstest-docs/blob/06f9dc0aeb47be7204dc4e1a98c110ead3e978c7/docs/analyze.md#setup-a-project.
That setting seems to break the "Open Test" context menu in VS IDE, so we'll use a dedicated configuration for code coverage.
-->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'CodeCoverage|AnyCPU' ">
<IntermediateOutputPath>obj\CodeCoverage</IntermediateOutputPath>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\CodeCoverage</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Content Include="docker*/**/*.*" CopyToPublishDirectory="Always" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Devices" Version="1.18.2" />
<PackageReference Include="Microsoft.Azure.Devices.Client" Version="1.21.3" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\edge-util\src\Microsoft.Azure.Devices.Edge.Util\Microsoft.Azure.Devices.Edge.Util.csproj" />
<ProjectReference Include="..\ModuleLib\Microsoft.Azure.Devices.Edge.ModuleUtil.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="config/appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="..\..\stylecop.json" Link="stylecop.json" />
</ItemGroup>
<PropertyGroup>
<CodeAnalysisRuleSet>..\..\stylecop.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<Import Project="..\..\stylecop.props" />
</Project>

Просмотреть файл

@ -1,107 +0,0 @@
// Copyright (c) Microsoft. All rights reserved.
namespace DirectMethodCloudSender
{
using System;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Devices;
using Microsoft.Azure.Devices.Edge.ModuleUtil;
using Microsoft.Azure.Devices.Edge.Util;
using Microsoft.Extensions.Logging;
using TransportType = Microsoft.Azure.Devices.TransportType;
class Program
{
const string RouteOutputName = "output1";
static readonly ILogger Logger = ModuleUtil.CreateLogger("DirectMethodCloudSender");
public static int Main() => MainAsync().Result;
public static async Task<int> MainAsync()
{
Logger.LogInformation($"Starting DirectMethodCloudSender with the following settings:\r\n{Settings.Current}");
try
{
string serviceClientConnectionString = Settings.Current.ServiceClientConnectionString;
Uri analyzerUrl = Settings.Current.AnalyzerUrl;
ServiceClient serviceClient = ServiceClient.CreateFromConnectionString(serviceClientConnectionString, (TransportType)Settings.Current.TransportType);
AnalyzerClient analyzerClient = new AnalyzerClient { BaseUrl = analyzerUrl.AbsoluteUri };
(CancellationTokenSource cts, ManualResetEventSlim completed, Option<object> handler) = ShutdownHandler.Init(TimeSpan.FromSeconds(5), Logger);
await CallDirectMethodFromCloud(serviceClient, Settings.Current.DirectMethodDelay, analyzerClient, cts);
completed.Set();
handler.ForEach(h => GC.KeepAlive(h));
Logger.LogInformation("DirectMethodCloudSender Main() finished.");
}
catch (Exception ex)
{
Logger.LogError($"Error occurred during direct method cloud sender test setup.\r\n{ex}");
}
return 0;
}
static async Task CallDirectMethodFromCloud(
ServiceClient serviceClient,
TimeSpan delay,
AnalyzerClient analyzerClient,
CancellationTokenSource cts)
{
Logger.LogInformation("CallDirectMethodFromCloud started.");
CloudToDeviceMethod cloudToDeviceMethod = new CloudToDeviceMethod("HelloWorldMethod").SetPayloadJson("{ \"Message\": \"Hello\" }");
string deviceId = Settings.Current.DeviceId;
string targetModuleId = Settings.Current.TargetModuleId;
int directMethodCount = 1;
while (!cts.Token.IsCancellationRequested)
{
Logger.LogInformation($"Calling Direct Method from cloud on device {Settings.Current.DeviceId} targeting module [{Settings.Current.TargetModuleId}] with count {directMethodCount}.");
try
{
CloudToDeviceMethodResult result = await serviceClient.InvokeDeviceMethodAsync(deviceId, targetModuleId, cloudToDeviceMethod, CancellationToken.None);
string statusMessage = $"Calling Direct Method from cloud with count {directMethodCount} returned with status code {result.Status}";
if (result.Status == (int)HttpStatusCode.OK)
{
Logger.LogDebug(statusMessage);
}
else
{
Logger.LogError(statusMessage);
}
await ReportStatus(targetModuleId, result, analyzerClient);
directMethodCount++;
}
catch (Exception e)
{
Logger.LogError($"Exception caught with count {directMethodCount}: {e}");
}
await Task.Delay(delay, cts.Token);
}
Logger.LogInformation("CallDirectMethodFromCloud finished.");
await serviceClient.CloseAsync();
}
static async Task ReportStatus(string moduleId, CloudToDeviceMethodResult result, AnalyzerClient analyzerClient)
{
try
{
await analyzerClient.ReportResultAsync(new TestOperationResult { Source = moduleId, Result = result.Status.ToString(), CreatedAt = DateTime.UtcNow, Type = Enum.GetName(typeof(TestOperationResultType), TestOperationResultType.LegacyDirectMethod) });
}
catch (Exception e)
{
Logger.LogError(e, "Failed call to report status to analyzer");
}
}
}
}

Просмотреть файл

@ -1,78 +0,0 @@
// Copyright (c) Microsoft. All rights reserved.
namespace DirectMethodCloudSender
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Azure.Devices.Client;
using Microsoft.Azure.Devices.Edge.Util;
using Microsoft.Extensions.Configuration;
public class Settings
{
static readonly Lazy<Settings> DefaultSettings = new Lazy<Settings>(
() =>
{
IConfiguration configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("config/settings.json", optional: true)
.AddEnvironmentVariables()
.Build();
return new Settings(
configuration.GetValue<string>("IOTEDGE_DEVICEID"),
configuration.GetValue<string>("TargetModuleId", "DirectMethodReceiver"),
configuration.GetValue<TransportType>("TransportType", TransportType.Amqp_Tcp_Only),
configuration.GetValue<TimeSpan>("DirectMethodDelay", TimeSpan.FromSeconds(5)),
configuration.GetValue<Uri>("AnalyzerUrl", new Uri("http://analyzer:15000")),
configuration.GetValue<string>("ServiceClientConnectionString"));
});
Settings(
string deviceId,
string targetModuleId,
TransportType transportType,
TimeSpan directMethodDelay,
Uri analyzerUrl,
string serviceClientConnectionString)
{
this.DeviceId = Preconditions.CheckNonWhiteSpace(deviceId, nameof(deviceId));
this.TargetModuleId = Preconditions.CheckNonWhiteSpace(targetModuleId, nameof(targetModuleId));
Preconditions.CheckArgument(TransportType.IsDefined(typeof(TransportType), transportType));
this.TransportType = transportType;
this.DirectMethodDelay = Preconditions.CheckNotNull(directMethodDelay);
this.AnalyzerUrl = Preconditions.CheckNotNull(analyzerUrl);
this.ServiceClientConnectionString = Preconditions.CheckNonWhiteSpace(serviceClientConnectionString, nameof(serviceClientConnectionString));
}
public static Settings Current => DefaultSettings.Value;
public string DeviceId { get; }
public string TargetModuleId { get; }
public TransportType TransportType { get; }
public TimeSpan DirectMethodDelay { get; }
public Uri AnalyzerUrl { get; }
public string ServiceClientConnectionString { get; }
public override string ToString()
{
// serializing in this pattern so that secrets don't accidentally get added anywhere in the future
var fields = new Dictionary<string, string>()
{
{ nameof(this.DeviceId), this.DeviceId },
{ nameof(this.TargetModuleId), this.TargetModuleId },
{ nameof(this.TransportType), Enum.GetName(typeof(TransportType), this.TransportType) },
{ nameof(this.DirectMethodDelay), this.DirectMethodDelay.ToString() },
{ nameof(this.AnalyzerUrl), this.AnalyzerUrl.AbsoluteUri },
};
return $"Settings:{Environment.NewLine}{string.Join(Environment.NewLine, fields.Select(f => $"{f.Key}={f.Value}"))}";
}
}
}

Просмотреть файл

@ -1,5 +0,0 @@
{
"EdgeHubConnectionString": "<YourConnectionString>",
"TargetModuleId": "DirectMethodReceiver",
"DirectMethodDelay": "00:00:05"
}

Просмотреть файл

@ -1,17 +0,0 @@
ARG base_tag=2.1.13-alpine3.10
FROM mcr.microsoft.com/dotnet/core/runtime:${base_tag}
ARG EXE_DIR=.
ENV MODULE_NAME "DirectMethodCloudSender.dll"
WORKDIR /app
COPY $EXE_DIR/ ./
# Add an unprivileged user account for running the module
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 DirectMethodCloudSender.dll

Просмотреть файл

@ -1,15 +0,0 @@
ARG base_tag=1.0.3-linux-arm32v7
FROM azureiotedge/azureiotedge-module-base:${base_tag}
ARG EXE_DIR=.
ENV MODULE_NAME "DirectMethodCloudSender.dll"
WORKDIR /app
COPY $EXE_DIR/ ./
USER moduleuser
CMD echo "$(date --utc +"[%Y-%m-%d %H:%M:%S %:z]"): Starting Module" && \
exec /usr/bin/dotnet DirectMethodCloudSender.dll

Просмотреть файл

@ -1,15 +0,0 @@
ARG base_tag=1.0.3-linux-arm64v8
FROM azureiotedge/azureiotedge-module-base:${base_tag}
ARG EXE_DIR=.
ENV MODULE_NAME "DirectMethodCloudSender.dll"
WORKDIR /app
COPY $EXE_DIR/ ./
USER moduleuser
CMD echo "$(date --utc +"%Y-%m-%d %H:%M:%S %:z") Starting Module" && \
exec /usr/bin/dotnet DirectMethodCloudSender.dll

Просмотреть файл

@ -1,10 +0,0 @@
ARG base_tag=2.1.13-nanoserver-1809
FROM mcr.microsoft.com/dotnet/core/runtime:${base_tag}
ARG EXE_DIR=.
WORKDIR /app
COPY $EXE_DIR/ ./
CMD ["dotnet", "DirectMethodCloudSender.dll"]

Просмотреть файл

@ -1,11 +0,0 @@
ARG base_tag=1.0.3-windows-arm32v7
ARG base_registry
FROM ${base_registry}/azureiotedge/azureiotedge-module-base:${base_tag}
ARG EXE_DIR=.
WORKDIR /app
COPY $EXE_DIR/ ./
CMD ["dotnet", "DirectMethodCloudSender.dll"]

Просмотреть файл

@ -251,7 +251,6 @@ publish_app "load-gen"
publish_app "TestAnalyzer"
publish_app "DirectMethodSender"
publish_app "DirectMethodReceiver"
publish_app "DirectMethodCloudSender"
publish_app "ModuleRestarter"
publish_app "TwinTester"
publish_app "Relayer"

Просмотреть файл

@ -148,7 +148,6 @@ $appProjectList.Add("load-gen.csproj")
$appProjectList.Add("TestAnalyzer.csproj")
$appProjectList.Add("DirectMethodSender.csproj")
$appProjectList.Add("DirectMethodReceiver.csproj")
$appProjectList.Add("DirectMethodCloudSender.csproj")
$appProjectList.Add("ModuleRestarter.csproj")
$appProjectList.Add("TwinTester.csproj")
$appProjectList.Add("Relayer.csproj")