我无法将ASF包上传到远程Azure Image Store。使用以下脚本时,该过程失败,53.8%,0/6复制文件(0/0%完成)。
我也无法使用Visual Studio发布到远程群集。因为我收到以下错误:
警告:无法联系命名服务。试图联系故障转移
是否有其他方法可以推送应用程序? Azure上的Azure Service Fabric体验并不适合我,而且我已经浪费了很多时间。
提前致谢!
# Variables
$endpoint = 'XXX-asf.australiaeast.cloudapp.azure.com:19000'
$privateThumbprint = 'XXX'
$publicThumbprint = 'XX'
$projectPath = "C:\dev\asf-network-hops\AsfNetworkHops\AsfNetworkHops\AsfNetworkHops.sfproj"
$projectConfiguration = "Debug"
$packagePath = Resolve-Path "$projectPath\..\pkg\$projectConfiguration"
$applicationTypeName = "AsfNetworkHopsType"
$applicationName = "fabric:/AsfNetworkHops"
$imageStoreConnectionString = "fabric:ImageStore"
# Connect
# $conn = Connect-ServiceFabricCluster -ConnectionEndpoint $endpoint `
# -KeepAliveIntervalInSec 10 `
# -X509Credential -ServerCertThumbprint $privateThumbprint `
# -FindType FindByThumbprint -FindValue $publicThumbprint `
# -StoreLocation CurrentUser -StoreName My
$imageStoreConnectionString = ""
$conn = Connect-ServiceFabricCluster -ConnectionEndpoint XXX-asf.australiaeast.cloudapp.azure.com:19000 `
-KeepAliveIntervalInSec 10 `
-X509Credential -ServerCertThumbprint XXX`
-FindType FindByThumbprint -FindValue XXX`
-StoreLocation CurrentUser -StoreName My
if (-not $conn)
{
$conn
throw "Connection error!"
}
# Clean, Compile, & Package
dotnet clean $projectPath /p:Configuration=$projectConfiguration /nologo
dotnet msbuild $projectPath /t:Package /nologo /p:Platform="x64" /p:Configuration=$projectConfiguration /nologo /p:WarningLevel=1
Write-Host "Uploading package $packagePath"
Copy-ServiceFabricApplicationPackage $packagePath -ImageStoreConnectionString $imageStoreConnectionString -ApplicationPackagePathInImageStore $applicationTypeName -ShowProgress -ShowProgressIntervalMilliseconds 500 -TimeoutSec 1000000 -CompressPackage