Giter Site home page Giter Site logo

metrics-collector-client-kubernetes's Introduction

Overview

Metrics Collector Service collects statistics for deployment of a github sample code on Cloud Foundry, Kubernetes, Data Science Experience, OpenWhisk etc.

This Kubernetes Metrics client can send metrics related to workload deployments on Kubernetes. This is a Kubernetes Job that can track and report details of a demo/tutorial that has been deployed to Kubernetes.

To Use

  1. Clone and go into this repository

    git clone https://github.com/IBM/metrics-collector-client-kubernetes.git
    cd metrics-collector-client-kubernetes
  2. Fill in the information in the repository.yaml file and save it in this repository. For more details, please go to Example repository.yaml file

  3. Use the following commands to install the necessary Python packages and run the Python Job to build your custom Kubernetes job.

    pip install -r requirement.txt
    python build.py

    Now, a metricjob.yaml file should be created with all the information in your repository.yaml file.

  4. Copy the job in metricjob.yaml and only paste it in one of your main Kubernetes yaml files.

  5. Add a copy of the Privacy Notice to your README file.

    Note: All apps that have deployment tracker must include the Privacy Notice.

Example repository.yaml file

The repository.yaml need to be written in YAML format. Also, please put all your keys in lower case.

id: https://github.com/IBM/spring-boot-microservices-on-kubernetes
event_id: web
event_organizer: dev-journeys
runtimes: 
  - Kubernetes Cluster
  - OpenWhisk
services: 
  - Compose for MySQL
language: java

Required field:

  1. id: Put your Github URL of your pattern/project.
    • Note: Please put down the Github URL if your pattern is not from IBM organization in Github.
  2. runtimes: Put down all your platform runtime environments in a list.
  3. services: Put down all the IBM Cloud services that are used in your journey in a list.
  4. event_id: Put down where you will distribute your application. Default is web.
  5. event_organizer: Put down your event organizer if you have one. Default is dev-journeys
  6. language: Please put down the application's main language in lower case if you have one.

List of runtimes, services, and languages

Please go to the service list page to get the list of official names for runtimes, services, and languages.

Example app

To see how to include this into your app please visit Java Spring Boot microservices on Kubernetes. You will want to pay attention to one of its main yaml files with the client job.

Privacy Notice

Sample Kubernetes Yaml file that includes this package may be configured to track deployments to IBM Cloud and other Kubernetes platforms. The following information is sent to a Deployment Tracker service on each deployment:

  • Kubernetes Cluster Provider(IBM Cloud,Minikube,etc)
  • Kubernetes Cluster ID (Only from IBM Cloud's cluster)

This data is collected from the Kubernetes Job in the sample application's yaml file. This data is used by IBM to track metrics around deployments of sample applications to IBM Cloud to measure the usefulness of our examples so that we can continuously improve the content we offer to you. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.

Disabling Deployment Tracking

Please comment out/remove the Metric Kubernetes Job portion in the Yaml file where you inserted this Kubernetes Job.

License

Apache 2.0

metrics-collector-client-kubernetes's People

Contributors

animeshsingh avatar tomcli avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

metrics-collector-client-kubernetes's Issues

Throws errors on Kube 1.8+

kubectl logs lovely-sasquatch-ny-power-metrics-rhlg2
Error from server (Forbidden): nodes is forbidden: User "system:serviceaccount:default:default" cannot list nodes at the cluster scope
Error from server (Forbidden): pods is forbidden: User "system:serviceaccount:default:default" cannot list pods in the namespace "kube-system"
Error from server (Forbidden): configmaps "cluster-info" is forbidden: User "system:serviceaccount:default:default" cannot get configmaps in the namespace "kube-system"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 315 0 11 100 304 57 1589 --:--:-- --:--:-- --:--:-- 1591
{"ok":true}

The collector assumes a certain level of access. It would be best if this created a dedicate role that allowed those permissions just for the job in question.

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.