[英]How can I use PowerShell to install this service fabric project?
I have the following folder structure once I package my Service Fabric NS1.NS2.MicroServicesTest
project (written in C#
, using .NET
): 打包Service Fabric
NS1.NS2.MicroServicesTest
项目(使用C#
编写,使用.NET
)后,便具有以下文件夹结构:
pkg
|-NS1.NS2.MicroServicesTest.MicroServiceA
|-NS1.NS2.MicroServicesTest.MicroServiceB
|-NS1.NS2.MicroServicesTest.MicroServiceC
|-NS1.NS2.MicroServicesTest.MicroServiceD
|-ApplicationManifest.xml
I am trying to deploy this package using the following PowerShell
script: 我正在尝试使用以下
PowerShell
脚本部署此程序包:
Copy-ServiceFabricApplicationPackage pkg -ImageStoreConnectionString file:C:\SfDevCluster\Data\ImageStoreShare -ApplicationPackagePathInImageStore NS1.NS2.MicroServicesTest
Register-ServiceFabricApplicationType NS1.NS2.MicroServicesTest
New-ServiceFabricApplication fabric:/NS1.NS2.MicroServicesTest NS1.NS2.MicroServicesTest 1.0.0
It fails on the last command, New-ServiceFabricApplication
, with the following error: 它在最后一个命令
New-ServiceFabricApplication
上失败,并显示以下错误:
New-ServiceFabricApplication : Application type and version not found
New-ServiceFabricApplication:找不到应用程序类型和版本
Where have I gone wrong? 我哪里出问题了? I have tried to follow this tutorial , albeit it kind of uses a base case in its example, whereas my project has 4 microservices as part of it, and an odd naming convention, which makes it even more confusing...
我尝试按照本教程进行操作 ,尽管在示例中使用了基本案例,而我的项目中包含4个微服务,并且使用了一个奇怪的命名约定,这使它更加令人困惑。
Edit : When I run the Get-ServiceFabricApplicationType
command, I see: 编辑 :当我运行
Get-ServiceFabricApplicationType
命令时,我看到:
ApplicationTypeName : MicroServicesTestType
ApplicationTypeVersion : 1.0.0
DefaultParameters : { "MicroServiceA_InstanceCount" = "-1";
"MicroServiceB_InstanceCount" = "-1";
"MicroServiceC_Endpoint" = "defaultValue";
"MicroServiceC_InstanceCount" = "-1";
"MicroServiceC_MaxRecords" = "100";
"MicroServiceD_InstanceCount" = "-1" }
(from discussion to answer) (从讨论到回答)
After registering it, validate that your Application Type shows up when calling 'Get-ServiceFabricApplicationType' 注册后,请在调用“ Get-ServiceFabricApplicationType”时验证您的应用程序类型是否显示
Check your Application Type version 1.0.0? 检查您的应用程序类型1.0.0版本?
Try using this command: New-ServiceFabricApplication fabric:/ MicroServicesTestType MicroServicesTestType 1.0.0
尝试使用此命令:
New-ServiceFabricApplication fabric:/ MicroServicesTestType MicroServicesTestType 1.0.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.