[英]Azure service fabric - install.sh file not found
从您链接的文档中 :
使用模板中提供的安装脚本将应用程序包复制到群集的映像存储中,注册应用程序类型并创建该应用程序的实例。
Yeoman模板应该在根文件夹中生成一个名为install.sh
的bash脚本和|或一个名为install.ps1
的Powershell脚本,如果未生成,则可能是发生了问题,无论如何您都可以从一个脚本中复制一个脚本的演示:
Services/CounterService/install.sh
#!/bin/bash
create_app()
{
sfctl application create --app-name fabric:/CounterServiceApplication --app-type CounterServiceApplicationType --app-version 1.0.0 --parameters $1
}
print_help()
{
echo "Additional Options"
echo "-onebox (Default): If you are deploying application on one box cluster"
echo "-multinode: If you are deploying application on a multi node cluster"
}
if [ "$1" = "--help" ]
then
print_help
exit 0
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
appPkg="$DIR/CounterServiceApplication"
WebServiceManifestlocation="$appPkg/CounterServiceWebServicePkg"
WebServiceManifestlocationLinux="$WebServiceManifestlocation/ServiceManifest-Linux.xml"
WebServiceManifestlocationWindows="$WebServiceManifestlocation/ServiceManifest-Windows.xml"
WebServiceManifestlocation="$WebServiceManifestlocation/ServiceManifest.xml"
cp $WebServiceManifestlocationLinux $WebServiceManifestlocation
StatefulServiceManifestlocation="$appPkg/CounterServicePkg"
StatefulServiceManifestlocationLinux="$StatefulServiceManifestlocation/ServiceManifest-Linux.xml"
StatefulServiceManifestlocationWindows="$StatefulServiceManifestlocation/ServiceManifest-Windows.xml"
StatefulServiceManifestlocation="$StatefulServiceManifestlocation/ServiceManifest.xml"
cp $StatefulServiceManifestlocationLinux $StatefulServiceManifestlocation
cp dotnet-include.sh ./CounterServiceApplication/CounterServicePkg/Code
cp dotnet-include.sh ./CounterServiceApplication/CounterServiceWebServicePkg/Code
sfctl application upload --path CounterServiceApplication --show-progress
sfctl application provision --application-type-build-path CounterServiceApplication
if [ $# -eq 0 ]
then
echo "No arguments supplied, proceed with default instanceCount of 1"
create_app "{\"CounterServiceWebService_InstanceCount\":\"1\"}"
elif [ $1 = "-onebox" ]
then
echo "Onebox environment, proceed with default instanceCount of 1."
create_app "{\"CounterServiceWebService_InstanceCount\":\"1\"}"
elif [ $1 = "-multinode" ]
then
echo "Multinode env, proceed with default instanceCount of -1"
create_app {}
fi
将CounterService
替换为您的应用名称
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.