在将应用程序部署到专用Bluemix中时,它默认使用DEA架构。我如何强制它使用DIEGO架构呢?
发布于 2017-04-11 19:48:36
你必须使用更多的步骤。部署不启动,切换到迭戈,启动。
cf push APPLICATION_NAME --no-start
cf disable-diego APPLICATION_NAME
cf start APPLICATION_NAME发布于 2017-06-06 23:44:11
为此,我构建了一个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只需将此代码作为新文件放入编辑器中,然后使该文件成为可执行文件。我在根目录下的每个代码库中都保留了此exec的副本。执行复制粘贴并执行此exec后,可能会出现以下错误:
/bin/bash^M: bad interpreter: No such file or directory如果你这样做了,只要运行dos2unix命令,它就会‘修复’行的结尾,以匹配你的操作系统。
https://stackoverflow.com/questions/43343068
复制相似问题