2017-04-11 7 views

答えて

1

さらに多くの手順を実行する必要があります。開始せずにデプロイし、diegoに切り替えて起動します。

cf push APPLICATION_NAME --no-start 
cf disable-diego APPLICATION_NAME 
cf start APPLICATION_NAME 

参考Deploying Apps

0

私は、既存のmanifest.ymlファイルを使用して、単一の要求に、このすべてをパックなる、これを行うにはbash execを構築しました。 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のコピーを保存します。あなたは、単にDOS2UNIXコマンドを実行しないと、それはあなたのOSに合わせて、行末「をアップ修正」する場合は

/bin/bash^M: bad interpreter: No such file or directory 

:コピー&ペーストを行うと、この幹部を実行した後、次のエラーを得ることができます。

関連する問題