Skip to content

Instantly share code, notes, and snippets.

@nota-ja
nota-ja / ccng-routes.v176.txt
Created August 12, 2014 10:02
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v176)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccng-routes.v175.txt
Created August 12, 2014 10:00
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v175)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccng-routes.v173.txt
Created August 12, 2014 09:58
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v173)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/app_security_groups/:guid {:controller => "VCAP::CloudController::AppSecurityGroupsController", :action => "delete"}
####### DELETE /v2/app_security_groups/:guid/spaces/:other_id {:controller => "VCAP::CloudC
@nota-ja
nota-ja / ccng-routes.v172.txt
Created August 12, 2014 09:56
Cloud Foundry's Cloud Controller NG routes (submoduled from cf-release v172)
####### DELETE /services/:name {:controller => "VCAP::CloudController::LegacyService", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /services/v1/offerings/:label_and_version/:provider {:controller => "VCAP::CloudController::LegacyServiceGateway", :action => "delete"}
####### DELETE /v2/app_events/:guid {:controller => "VCAP::CloudController::AppEventsController", :action => "delete"}
####### DELETE /v2/apps/:guid {:controller => "VCAP::CloudController::AppsController", :action => "delete"}
####### DELETE /v2/apps/:guid/events/:other_id {:controller => "VCAP::CloudController::Ap
@nota-ja
nota-ja / ccdb-tables.txt
Created March 16, 2014 17:08
Tables in CCDB
| app_events |
| app_usage_events |
| apps |
| apps_routes |
| billing_events |
| buildpacks |
| delayed_jobs |
| domains |
| domains_organizations |
| droplets |
Defined route: 'get' '/v2/spaces/:guid/services' -> 'VCAP::CloudController::SpacesController': 'enumerate_services' / {}
Defined route: 'get' '/v2/spaces/:guid/service_instances' -> 'VCAP::CloudController::SpacesController': 'enumerate_service_instances' / {}
Defined route: 'post' '/v2/spaces' -> 'VCAP::CloudController::SpacesController': 'create' / {}
Defined route: 'get' '/v2/spaces' -> 'VCAP::CloudController::SpacesController': 'enumerate' / {}
Defined route: 'get' '/v2/spaces/:guid' -> 'VCAP::CloudController::SpacesController': 'read' / {}
Defined route: 'put' '/v2/spaces/:guid' -> 'VCAP::CloudController::SpacesController': 'update' / {}
Defined route: 'delete' '/v2/spaces/:guid' -> 'VCAP::CloudController::SpacesController': 'delete' / {}
Defined route: 'get' '/v2/spaces/:guid/developers' -> 'VCAP::CloudController::SpacesController': '' / {#<Proc:0x000000030fb128@/home/nsnt/gitrepos/cloud_controller_ng/lib/cloud_controller/rest_controller/routes.rb:52>}
Defined route: 'put' '/v2/spaces/:guid/developers/:o
<!DOCTYPE html>
<html>
<head>
<title>Cloud Foundry API</title>
<meta charset="utf-8">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"></link>
<style>
body {
margin-left: auto;
margin-right: auto;
@nota-ja
nota-ja / gist:8100666
Last active January 1, 2016 05:49
Cloud Controller NG の API ドキュメント生成を試してみる

 このgistは Cloud Foundry Advent Calendar 2013 の23日目の記事です。今回はかなり軽めに。

 Cloud Controller NG (以下「CCng」) の document_api については,輪読会などでも何度か「壊れていて使えない」と言ってきましたが,この間再度試してみようと思ってREADMEを読んだら,気になる記述が。

API documentation

To genenerate the API documentation

bundle exec rspec spec/api/ --format RspecApiDocumentation::ApiFormatter
open doc/api/index.html
@nota-ja
nota-ja / gist:8082495
Last active July 6, 2018 01:54
Gatlingを使った性能測定 (「Gorouter と Ruby Router v2 の性能比較」 その3)

 このgistは Cloud Foundry Advent Calendar 2013 の19日目の記事です。またしても大幅に遅れて本当に申し訳ありません。

 今日は,「Gorouter と Ruby Router v2 の性能比較」の3回目として,Gatling を使って Gorouterと Ruby Router v2 の負荷テストを行います。

準備

 まずは準備から。

 (準備1) Gatlingのインストール。面倒なので詳細は省きます。以下のURL等を参考にしました。

@nota-ja
nota-ja / gist:7959093
Last active December 31, 2015 08:09
Gorouter と Ruby Router v2 の改造 (「Gorouter と Ruby Router v2 の性能比較」 その2)

 このgistは Cloud Foundry Advent Calendar 2013 の13日目の記事です。大幅に遅れてすみません..。

 今日は,「Gorouter と Ruby Router v2 の性能比較」の2回目として,Gorouterと Ruby Router v2 の改造を行います。

 が,その前に,前回の記事で作ったmassregistrarを修正しましたhttps://gist.github.com/nota-ja/7901644/revisions3f9cdbfのところの差分を見てもらうとわかりますが,主な修正点は,1) バックエンドのダミーアプリのURLの数もコマンドライン・オプションで指定するようにしたこと, 2) IPアドレスごとにポートとURLの対応付けを行う処理を1回しか行わないようにしたこと, の2点です。後者の修正で,前回の記事で書いた問題は解消しています。

 さて,今回の本題に戻ります。前回説明したように,Cloud Foundry のRouterの主な機能はプロキシー動作です。

  • クライアントからアプリへのリクエストを受け付け,
  • それを適切なアプリに転送し,