Git Product home page Git Product logo

fabric8-analytics-server's Introduction

Fabric8-Analytics Core API Documentation

Note on naming: The Fabric8-Analytics project has evolved from 2 different projects called "cucos" and "bayesian". We're currently in process of renaming the modules and updating documentation. Until that is completed, please consider "cucos" and "bayesian" to be synonyms of "Fabric8-Analytics".

The Fabric8-Analytics API is a microservice that is responsible for:

  • Serving generated analysis results to clients through API
  • Scheduling new analyses based on client requests

Contributing

See our contributing guidelines for more info.

API definition

The API details are provided as a RAML file.

A JSON schema definition is provided for the component analysis endpoint.

Core API Access Logs

Core API access logs have following format:

{remote hostname} {remote logname, default '-'} {username, default '-'} {access time} "{first line of request}" {response status} {response length} {referer, default '-'} "{user agent}"

In terms of httpd LogFormat option, this is %h %l %u %t \"%r\" %>s %b %{Referer}i \"%{User-agent}i\". See httpd documentation for details

For example:

172.19.0.1 - - [18/Mar/2016:07:59:17 +0000] "GET /static/patternfly/css/patternfly.min.css HTTP/1.1" 304 - http://localhost:32000/ "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"

Method of accessing logs can vary based on the way the API is deployed. See below for instructions on accessing logs.

Docker based API testing

From the top-level git directory, run the tests in a container using the helper script:

$ ./runtests.sh

(The above command assumes you have passwordless docker invocation configured - if you don't, then sudo will be necessary to enable docker invocation).

If you're changing dependencies rather than just editing source code locally, you will need images to be rebuilt when invoking runtest.sh. You can set environment variable REBUILD=1 to request image rebuilding.

If the offline virtualenv based tests have been run, then this may complain about mismatched locations in compiled files. Those can be deleted using:

$ find -name *.pyc -delete

NOTE: Running the container based tests is likely to cause any already running local core API instance launched via Docker Compose to fall over due to changes in the SELinux labels on mounted volumes, and may also cause spurious test failures.

Virtualenv based offline testing

Test cases marked with pytest.mark.offline may be executed without having a Docker daemon running locally.

For server testing, the virtualenv should be created using Python 3.4 or later

To configure a virtualenv (called bayesian in the example) to run these tests:

(bayesian) $ python -m pip install -e ../lib
(bayesian) $ python -m pip install -r requirements.txt
(bayesian) $ python -m pip install -r tests/requirements.txt

The marked offline tests can then be run as:

(bayesian) $ py.test -m offline tests/

If the Docker container based tests have been run, then this may complain about mismatched locations in compiled files. Those can be deleted using:

(bayesian) $ sudo find -name *.pyc -delete

fabric8-analytics-server's People

Contributors

bkabrda avatar fridex avatar invinciblejai avatar jpopelka avatar miteshvp avatar msrb avatar vpavlin avatar

Watchers

 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.