Git Product home page Git Product logo

cf-service-ping's Introduction

cf-service-ping

##Goal of this repository Aim of this repository is to provide a small simple cloudfoundry (v2) service called "ping" :

  • describe the minimal requirements to (un)provision a Ping as a Service
  • describe ping_node and ping_gateway
  • ping_node use warden container

Parent repositories :

##Ping Service installation

 echo "---" > config/dev.yml
 echo "dev_name: cf-service-ping" > config/dev.yml
 bosh create release --force
 bosh -n upload release
  • copy examples/ping.yml into your bosh workspace and adapt #TOCHANGE lines
  • update ping.yml (set the last release version of "cf-service-ping")
 bosh deployment ping.yml
 bosh deploy

##Target ping_node vm

Jobs to monitor are defined into /var/vcap/ping_node_ng/monit

  • monit start "warden" (then "warden" dependencies could be started)
  • monit start "ping_node"
  • ping_node start "warden_service_ctl" then the "ping_node" bin

##Target ping_node logs

  tail -20 /var/vcap/monit/monit.log
  tail -5  /var/vcap/data/sys/log/warden/warden.log
  tail -20 /var/vcap/data/sys/log/warden/warden.stdout.log
  tail -20 /var/vcap/data/sys/log/warden/warden.stderr.log
  tail -20 /var/vcap/data/sys/log/monit/ping_node_ctl.log
  tail -20 /var/vcap/data/sys/log/monit/ping_node_ctl.err.log
  tail -20 /var/vcap/data/sys/log/ping_node/ping_node.stderr.log
  tail -20 /var/vcap/data/sys/log/ping_node/ping_node.log
  tail -20 /var/vcap/data/sys/log/ping_node/ping_node.stdout.log

##Target ping_gateway logs

   tail -20 /var/vcap/data/sys/log/monit/ping_gateway_ctl.log
   tail -20 /var/vcap/data/sys/log/monit/ping_gateway_ctl.err.log
   tail -20 /var/vcap/data/sys/log/ping_gateway/ping_gateway.stderr.log
   tail -20 /var/vcap/data/sys/log/ping_gateway/ping_gateway.log

##Source configuration

Ping source

  • src/service/PingSvc : cloudfoundry ping service source code : bin, node, gateway, and rspec (tests : to do)

  • src/services/PingSvc/lib/ping_node.rb

    VCAP::Services::Ping::Node class wich extends VCAP::Services::Base::Node with the following functions : provision, unprovision, bind, unbind, announcement, (actions)_instance

    VCAP::Services::Ping::Node::ProvisionedService class : a provisioned service instance definition wich extends VCAP::Services::Base::Warden::Service with the following functions : start_script, start_options, finish_start? finish_first_start? ...

  • src/ping_src : ping minimal ruby server

Bosh source

  • config
  • jobs/* : ping_node_ng, ping_gateway
  • packages/* : ping dependencies (referenced by "jobs/X/spec" files)
  • packages/ping_node_ng/spec : ping_node_ng package definition giving source files to include into a ping node (ex. src/ping_src)

###Unhandled source

The following files or directories have been duplicated from cf-services-contrib-release and are not maintained into this repository.

  • packages : common, libyaml, node,root_lucid64, ruby, ruby_next, sqlite, syslog_aggregator
  • src : common, pkg_utils, syslog_aggregator, services_warden

###Stay to do

  • fix tests
  • write a readme on how to execute isolated tests (usin rspec, nats & warden shell)

cf-service-ping's People

Contributors

boly38 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.