community pluginを使う その1 communityのplugin用urlをcfコマンドに登録する https://blog.starkandwayne.com/2015/03/04/installing-cloud-foundry-cli-plugins/ $ cf add-plugin-repo community http://plugins.cfapps.io/ OK http://plugins.cfapps.io/list added as 'community' $ cf list-plugin-repos OK Repo Name Url community http://plugins.cfapps.io/
community pluginを使う その2 communityのplugin一覧から入れたいpluginを探す https://blog.starkandwayne.com/2015/03/04/installing-cloud-foundry-cli-plugins/ $ cf repo-plugins community Getting plugins from all repositories ... Repository: community name version description CLI-Recorder 1.0.1 Records and playbacks CLI commands. Live Stats 1.0.0 Monitor CPU and Memory usage on an app via the browser. Console 1.0.0 Start a tmate session on an application container Diego-Beta 1.3.0 Enables Diego-specific commands and functionality etc…
community pluginを使う その3 communityの一覧経由でpluginを入れる https://blog.starkandwayne.com/2015/03/04/installing-cloud-foundry-cli-plugins/ $ cf install-plugin Console -r community Looking up 'Console' from repository 'community' 7974312 bytes downloaded... Installing plugin /tmp/cf-plugin-console... OK Plugin Console successfully installed. $ cf plugins Listing Installed Plugins... OK Plugin name Version Command name Command Help hoge 1.0.0 hoge cf hoge plugin Console N/A console Start a live console 入れたいplugin名がConsoleの場合 ※ -rで取得元のnameを入れる
Community plugin一覧 その1 (2015/5/6調べ) Version Description CLI-Recorder v1.0.1 Records and playbacks CLI commands. Live Stats v1.0.0 Monitor CPU and Memory usage on an app via the browser. Console v1.0.0 Start a tmate session on an application container
Community plugin一覧 その2 (2015/5/6調べ) Version Description Diego-Beta v1.3.0 Enables Diego-specific commands and functionality Open v1.10 Open app url in browser autopilot v0.0.1 zero downtime deploy plugin for cf applications
Community plugin一覧 その3 (2015/5/6調べ) Version Description Brooklyn v0.1.1 Interact with Service Broker for Apache Brooklyn kinaba-me-logs v0.3.0 Launches the Kibana UI (from kibana-me- logs) for an application. Buildpack Usage v1.0.0 Buildpack Usage CF App Stack Changer v1.0.0 Allows admins to list and update applications with outdated lucid64 stacks.
CF App Stack Changer lucid64のstacksをcflinuxfs2に移行する為のplugin ◎ lucid64のアプリの確認 ◎ stacks変更+restartが行える https://github.com/simonleung8/cli-stack-changer $ cf stack-list Getting all apps with lucid64 stack... OK Total 14 found ... name guid state hogehoge 09d03ad3-24ee-44a1-8969-4abb3268aab6 STARTED $ cf stack-change APP_NAME
Community plugin一覧 その4 (2015/5/6調べ) Version Description Targets v1.0.0 Easily manage multiple CF targets Test User v0.0.1 Create a user and assign all possible permissions, organisation and space are created if they do not already exist as well. If no organisation or space name are specified then the default value of 'development' is used cf-download v1.0.0 Plugin for downloading your application contents after staging.
実装する上で参考になるコード解説 4 https://github.com/cloudfoundry/cli/tree/master/plugin_examples/call_cli_cmd/main $ cf cli-command apps Getting apps in org testOrg / space testSpace as admin... OK name requested state instances memory disk urls aaa started ?/1 256M 1G aaa.10.244.0.34.xip.io go started 1/1 256M 1G go.10.244.0.34.xip.io dora started 1/1 256M 1G dora.10.244.0.34.xip.io ---------- Command output from the plugin ---------- # 0 value: Getting apps in org testOrg / space testSpace as admin... # 1 value: OK # 2 value: # 3 value: name requested state instances memory disk urls # 4 value: aaa started ?/1 256M 1G aaa.10.244.0.34.xip.io # 5 value: go started 1/1 256M 1G go.10.244.0.34.xip.io # 6 value: dora started 1/1 256M 1G dora.10.244.0.34.xip.io ---------- FIN ----------- cli-command pluginに値を渡した時の挙動
Credits Special thanks to all the people who made and released these awesome resources for free: ◎ Presentation template by SlidesCarnival ◎ Photographs by Unsplash & Death to the Stock Photo (license)