GithubHelp home page GithubHelp logo

tools-cf-plugin's Introduction

Build StatusGem Version

Tools

Info

This plugin provides various utility commands for administering/monitoring a Cloud Foundry deployment.

Conflicts

To use this plugin, during installation bundler will install the legacy cf CLI which will be added into your $PATH.

The Requirements & Installation sections below includes a solution. The constraint is that you must install the tool and its dependencies into an RVM gemset to isolate it from the rest of the environment, and run the tool from within the project folder.

Requirements

This plugin, and the legacy cf CLI, require Ruby 1.9.3 (not Ruby 2.0+).

rvm install 1.9.3

Installation

Bundler is the most reliable way to run cf tools:

git clone https://github.com/cloudfoundry/tools-cf-plugin
cd tools-cf-plugin/

rvm 1.9.3@tools-cf-plugin --create --ruby-version

bundle
ssh-add <bosh_ssh_keys>/<your id_rsa for director> # use your key for the director or microbosh
ssh vcap@<your bosh director> id # check connectivity
bundle exec cf tunnel-nats <your bosh director> dea-apps --gateway vcap@<your bosh director>

Usage if you have direct access to the NATS server

bundle exec cf watch <APP>       # Watch messages going over NATS relevant to an application
bundle exec cf dea-apps        # See summary information about apps running on DEAs
bundle exec cf dea-ads         # Watch the DEA advertisements
bundle exec cf app-placement   # See the distribution of apps over DEAs

Usage if you must tunnel to the NATS server

bundle exec cf tunnel-nats <your bosh director> watch <APP> --gateway vcap@<your bosh director>
bundle exec cf tunnel-nats <your bosh director> dea-apps --gateway vcap@<your bosh director>
bundle exec cf tunnel-nats <your bosh director> dea-ads --gateway vcap@<your bosh director>
bundle exec cf tunnel-nats <your bosh director> app-placement --gateway vcap@<your bosh director>

tools-cf-plugin's People

Contributors

cf-frameworks avatar drich10 avatar drnic avatar mark-rushakoff avatar mreider avatar thansmann avatar vito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tools-cf-plugin's Issues

problems with eventmachine-0.12.10

when i try to install "tools-cf-plugin"
i get the following error

klm21904@ramonskie-W530 ~ $ sudo gem install tools-cf-plugin
Building native extensions.  This could take a while...
ERROR:  Error installing tools-cf-plugin:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
checking for main() in -lcrypto... no
creating Makefile

make
compiling cplusplus.cpp
compiling sigs.cpp
compiling files.cpp
compiling ssl.cpp
compiling em.cpp
em.cpp: In member function ‘bool EventMachine_t::_RunEpollOnce()’:
em.cpp:501:3: warning: ‘int rb_thread_select(int, fd_set*, fd_set*, fd_set*, timeval*)’ is deprecated (declared at /usr/include/ruby-1.9.1/ruby/intern.h:379) [-Wdeprecated-declarations]
em.cpp:501:37: warning: ‘int rb_thread_select(int, fd_set*, fd_set*, fd_set*, timeval*)’ is deprecated (declared at /usr/include/ruby-1.9.1/ruby/intern.h:379) [-Wdeprecated-declarations]
em.cpp:556:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
em.cpp: In member function ‘bool EventMachine_t::_RunSelectOnce()’:
em.cpp:873:4: warning: ‘int rb_thread_select(int, fd_set*, fd_set*, fd_set*, timeval*)’ is deprecated (declared at /usr/include/ruby-1.9.1/ruby/intern.h:379) [-Wdeprecated-declarations]
em.cpp:873:38: warning: ‘int rb_thread_select(int, fd_set*, fd_set*, fd_set*, timeval*)’ is deprecated (declared at /usr/include/ruby-1.9.1/ruby/intern.h:379) [-Wdeprecated-declarations]
em.cpp: In member function ‘void EventMachine_t::_ReadLoopBreaker()’:
em.cpp:924:52: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘bool EventMachine_t::_RunTimers()’:
em.cpp:948:72: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘const long unsigned int EventMachine_t::ConnectToServer(const char*, int, const char*, int)’:
em.cpp:1089:22: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘const long unsigned int EventMachine_t::ConnectToUnixServer(const char*)’:
em.cpp:1218:22: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1221:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1237:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1243:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1249:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘const long unsigned int EventMachine_t::CreateTcpServer(const char*, int)’:
em.cpp:1453:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1455:33: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1535:9: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘const long unsigned int EventMachine_t::OpenDatagramSocket(const char*, int)’:
em.cpp:1545:33: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1596:9: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘const long unsigned int EventMachine_t::_OpenFileForWriting(const char*)’:
em.cpp:1773:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘const long unsigned int EventMachine_t::CreateUnixDomainServer(const char*)’:
em.cpp:1805:33: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1866:9: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘const long unsigned int EventMachine_t::Socketpair(char* const*)’:
em.cpp:1927:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1932:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1934:33: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1938:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp:1948:10: warning: converting to non-pointer type ‘long unsigned int’ from NULL [-Wconversion-null]
em.cpp: In member function ‘void EventMachine_t::_ReadLoopBreaker()’:
em.cpp:922:50: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
em.cpp: In member function ‘void EventMachine_t::SignalLoopBreaker()’:
em.cpp:294:34: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
compiling emwin.cpp
compiling rubymain.cpp
rubymain.cpp: In function ‘VALUE t_connect_server(VALUE, VALUE, VALUE)’:
rubymain.cpp:468:42: error: format not a string literal and no format arguments [-Werror=format-security]
rubymain.cpp: In function ‘VALUE t_bind_connect_server(VALUE, VALUE, VALUE, VALUE, VALUE)’:
rubymain.cpp:488:42: error: format not a string literal and no format arguments [-Werror=format-security]
cc1plus: some warnings being treated as errors
make: *** [rubymain.o] Error 1


Gem files will remain installed in /var/lib/gems/1.9.1/gems/eventmachine-0.12.10 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out

when i did a quick search i found that some other apps using this version of eventmachine has the same problems
https://github.com/gitlabhq/gitlabhq/issues/1051

Unknown command 'app-placement'

cf app-placement is mentioned in the README; but isn't being discovered:

$ cf app-placement
Unknown command 'app-placement'. See 'help' for available commands.

[ruby 2.0.0] dyld: lazy symbol binding failed: Symbol not found: _rb_enable_interrupt

There are no issues in installing eventmachine but there is an EV related bug when using cf watch; ideas?

> gem install eventmachine -v 0.12.10
Fetching: eventmachine-0.12.10.gem (100%)
Building native extensions.  This could take a while...
Successfully installed eventmachine-0.12.10
Parsing documentation for eventmachine-0.12.10
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/fastfilereaderext.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/rubyeventmachine.bundle, skipping
Installing ri documentation for eventmachine-0.12.10
1 gem installed
> gem install tools-cf-plugin
Fetching: nats-0.4.28.gem (100%)
Successfully installed nats-0.4.28
Fetching: tools-cf-plugin-3.0.0.gem (100%)
Successfully installed tools-cf-plugin-3.0.0
Parsing documentation for nats-0.4.28
Installing ri documentation for nats-0.4.28
Parsing documentation for tools-cf-plugin-3.0.0
Installing ri documentation for tools-cf-plugin-3.0.0
2 gems installed


> cf watch cf-env
dyld: lazy symbol binding failed: Symbol not found: _rb_enable_interrupt
  Referenced from: /Users/sbb/.rvm/gems/ruby-2.0.0-p247/gems/eventmachine-0.12.10/lib/rubyeventmachine.bundle
  Expected in: flat namespace

dyld: Symbol not found: _rb_enable_interrupt
  Referenced from: /Users/sbb/.rvm/gems/ruby-2.0.0-p247/gems/eventmachine-0.12.10/lib/rubyeventmachine.bundle
  Expected in: flat namespace

Trace/BPT trap: 5

Running on OS X Lion.

/cc @drnic since he's writing this ticket in my account during a workshop

NATS::Connect Error

I Just installed this gem and I am getting a problem with nats.
Any idea?

|ruby-1.9.3-p448|→ cf dea-apps
Time of crash:
  2014-01-06 17:06:25 -0300

NATS::ConnectError: Could not connect to server on nats://nats:[email protected]:4222

nats-0.4.28/lib/nats/client.rb:112:in `block in connect'
nats-0.4.28/lib/nats/client.rb:599:in `call'
nats-0.4.28/lib/nats/client.rb:599:in `process_disconnect'
nats-0.4.28/lib/nats/client.rb:589:in `unbind'
eventmachine-0.12.10/lib/eventmachine.rb:1417:in `event_callback'
eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
nats-0.4.28/lib/nats/client.rb:129:in `start'
tools-cf-plugin-3.0.0/lib/tools-cf-plugin/dea-apps.rb:37:in `render_apps'
tools-cf-plugin-3.0.0/lib/tools-cf-plugin/dea-apps.rb:29:in `dea_apps'
mothership-0.5.1/lib/mothership/base.rb:66:in `run'
mothership-0.5.1/lib/mothership/command.rb:72:in `block in invoke'
mothership-0.5.1/lib/mothership/command.rb:86:in `instance_exec'
mothership-0.5.1/lib/mothership/command.rb:86:in `invoke'
mothership-0.5.1/lib/mothership/base.rb:55:in `execute'
cf-5.2.2/lib/cf/cli.rb:195:in `block (2 levels) in execute'
cf-5.2.2/lib/cf/cli.rb:206:in `save_token_if_it_changes'
cf-5.2.2/lib/cf/cli.rb:194:in `block in execute'
cf-5.2.2/lib/cf/cli.rb:123:in `wrap_errors'
cf-5.2.2/lib/cf/cli.rb:190:in `execute'
mothership-0.5.1/lib/mothership.rb:45:in `start'
cf-5.2.2/bin/cf:18:in `<top (required)>'
ruby-1.9.3-p448/bin/cf:23:in `load'
ruby-1.9.3-p448/bin/cf:23:in `<main>'
ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `eval'
ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `<main>'

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.