Git Product home page Git Product logo

pas-workshop-networking's Introduction

pas-workshop-networking - route service

1. ルートサービスの作成

  1. clone this repository
  2. route-service-header ディレクトリに移動
cd route-service-header
  1. cf push
  2. 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.

2. アプリ(1)のデプロイ

  1. route-service-oldapp ディレクトリに移動
  2. cf push

3. アプリ(2)のデプロイ

  1. route-service-newapp ディレクトリに移動
  2. cf push

4. アプリ(1)へのルートサービスのバインド

  1. 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ではない)
  1. cf routesで確認 ( アプリ(1)に2つのルートがあることを確認)
myground   route-service-olddemo   apps.pcfone.io                             route-service-olddemo   route-header

5. テスト

  1. アプリ(1)へのアクセスを確認
$ curl -k https://route-service-olddemo.apps.pcfone.io
this is old path....
  1. アプリ(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]まで

pas-workshop-networking's People

Contributors

tichimura-pivotal avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.