Azure的服务面料 - install.sh文件未找到

问题描述 投票:0回答:1

我试图按照教程,但我找不到install.sh文件。

我怎么能生成文件?或者我在哪里能找到它,如果它是由微软创造的?

azure azure-service-fabric
1个回答
0
投票

docs你链接:

使用模板中所提供的安装脚本的应用程序包复制到集群的形象店,注册应用类型,并创建应用程序的实例。

自耕农模板应该会在根文件夹中的bash脚本调用install.sh和|或PowerShell脚本调用install.ps1,如果它没有产生,可能已经发生了问题,在任何情况下,你可以从演示的一个拷贝脚本:

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到您的应用程序的名称

© www.soinside.com 2019 - 2024. All rights reserved.