Ibm cloud Bluemix:使用DEA而不是DIEGO架构的cf推送
将应用程序部署到专用Bluemix时,默认情况下使用DEA体系结构。我怎样才能强制它使用DIEGO架构呢?您必须使用更多步骤。不启动部署,切换到diego,启动Ibm cloud Bluemix:使用DEA而不是DIEGO架构的cf推送,ibm-cloud,Ibm Cloud,将应用程序部署到专用Bluemix时,默认情况下使用DEA体系结构。我怎样才能强制它使用DIEGO架构呢?您必须使用更多步骤。不启动部署,切换到diego,启动 cf push APPLICATION_NAME --no-start cf disable-diego APPLICATION_NAME cf start APPLICATION_NAME Ref为此我构建了一个bash exec,它将使用您现有的manifest.yml文件并将所有这些打包到一个请求中。bash exec的内容如下
cf push APPLICATION_NAME --no-start
cf disable-diego APPLICATION_NAME
cf start APPLICATION_NAME
Ref为此我构建了一个bash exec,它将使用您现有的manifest.yml文件并将所有这些打包到一个请求中。bash exec的内容如下:
#!/bin/bash
filename="manifest.yml"
if [ -e $filename ];
then
echo "using manifest.yml file in this directory"
else
echo "no manifest.yml file found. exiting"
exit -2
fi
shopt -s nocasematch
string='name:'
targetName=""
echo "Retrieving name from manifest file"
while read -r line
do
name="$line"
variable=${name%%:*}
if [[ $variable == *"name"* ]]
then
inBound=${name#*:}
targetName="$(echo -e "${inBound}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
fi
done < "$filename"
if [ "$targetName" == "" ];
then
echo "Could not find name of application in manifest.yml file. Cancelling build."
echo "application name is identified by the 'name: ' term in the manifest.yml file"
exit -1
else
echo "starting cf push for $targetName"
cf push --no-start
echo "cf enable-diego $targetName"
cf enable-diego $targetName
echo "cf start $targetName"
cf start $targetName
exit 0
fi
如果您这样做,只需运行dos2unix命令,它将“修复”行结尾以匹配您的操作系统
/bin/bash^M: bad interpreter: No such file or directory