- clone this repository
route-service-header
ディレクトリに移動
cd route-service-header
- cf push
- create route service
cf create-user-provided-service SERVICE_NAME_TO_BE_USED -r URL_TO_APP0
- SERVICE_NAME_TO_BE_USED: 任意のサービス名
- URL_TO_APP0: ルートサービス用にプッシュしたアプリのURL
$ cf service route-header
Showing info of service route-header in org pivot-tichimura / space myground as [email protected]...
name: route-header
service: user-provided
tags:
route service url: https://route-service-header.apps.pcfone.io
There are no bound apps for this service.
route-service-oldapp
ディレクトリに移動- cf push
route-service-newapp
ディレクトリに移動- cf push
- cf bind-route-serviceの実行
cf bind-route-service apps.pcfone.io SERVICE_NAME_TO_BE_USED --hostname APP_1_NAME
- SERVICE_NAME_TO_BE_USED: ルートサービスとして作成したサービス名
- APP_1_NAME: アプリ(1)の名前(URLではない)
- cf routesで確認 ( アプリ(1)に2つのルートがあることを確認)
myground route-service-olddemo apps.pcfone.io route-service-olddemo route-header
- アプリ(1)へのアクセスを確認
$ curl -k https://route-service-olddemo.apps.pcfone.io
this is old path....
- アプリ(1)にHeader情報をつけて確認
$ curl -k https://route-service-olddemo.apps.pcfone.io -H "X-Cf-Canary-Url: https://route-service-newdemo.apps.pcfone.io"
this is new path....
ご要望は[email protected]まで