Coder Social home page Coder Social logo

a8ctl's Introduction

Amalgam8 Command Line Interface (CLI)

Command-line tool for Amalgam8 Microservices Fabric (http://www.amalgam8.io/).

Installation

To install the Amalgam8 CLI:

pip install a8ctl

For usage information, execute the following command:

a8ctl -h

Commands

a8ctl service-list

a8ctl route-list
a8ctl route-set <service> [--default <version>] [--selector <version> "(" <condition> ")"]*
a8ctl route-delete <service>

a8ctl rule-list
a8ctl rule-set --source <service> --destination <service> [--header <string>] [--patern <regexp>] [--delay-probability <float>] [--delay <float>] [--abort-probability <float>] [--abort-code <code>]
a8ctl rule-clear

a8ctl traffic-start <service> <version> [--amount <percent>]
a8ctl traffic-step <service> [--amount <percent>]
a8ctl traffic-abort <service>

Examples

$ a8ctl service-list
+-------------+---------------------+
| Service     | Instances           |
+-------------+---------------------+
| reviews     | v1(1), v2(1), v3(1) |
| productpage | v1(1)               |
| ratings     | v1(1)               |
| helloworld  | v1(2), v2(2)        |
| details     | v1(1)               |
| serviceA    | UNVERSIONED(1)      |
+-------------+---------------------+

$ a8ctl route-list
+-------------+-----------------+---------------------------------------+
| Service     | Default Version | Version Selectors                     |
+-------------+-----------------+---------------------------------------+
| productpage | v1              |                                       |
| reviews     | v1              | v2(user="frankb"), v3(user="shriram") |
| ratings     | v1              |                                       |
| details     | v1              |                                       |
| helloworld  | v1              | v2(weight=0.25)                       |
| serviceA    | UNVERSIONED     |                                       |
+-------------+-----------------+---------------------------------------+

$ a8ctl route-set reviews --default v1 --selector 'v2(user="frankb")' --selector 'v3(user="shriram")'
Set routing rules for microservice reviews

$ a8ctl rule-list
+---------+-------------+----------------+----------------+-------------------+-------+-------------------+------------+
| Source  | Destination | Header         | Header Pattern | Delay Probability | Delay | Abort Probability | Abort Code |
+---------+-------------+----------------+----------------+-------------------+-------+-------------------+------------+
| reviews | ratings     | X-Gremlin-Test | *              | 0.5               | 7     | 0                 | 0          |
+---------+-------------+----------------+----------------+-------------------+-------+-------------------+------------+

$ a8ctl rule-set --source reviews --destination ratings --header X-Gremlin-Test --pattern=\* --delay-probability 0.5 --delay 7
Set fault injection rule between reviews and ratings

$ a8ctl rule-clear
Cleared fault injection rules from all microservices

$ a8ctl traffic-start reviews v2
Transfer starting for reviews: diverting 10% of traffic from v1 to v2
$ a8ctl traffic-step reviews
Transfer step for reviews: diverting 20% of traffic from v1 to v2
$ a8ctl traffic-step reviews --amount 40
Transfer step for reviews: diverting 40% of traffic from v1 to v2
...
$ a8ctl traffic-step reviews
Transfer step for reviews: diverting 90% of traffic from v1 to v2
$ a8ctl traffic-step reviews
Transfer complete for reviews: sending 100% of traffic to v2

$ a8ctl traffic-start reviews v2
Transfer starting for reviews: diverting 10% of traffic from v1 to v2
$ a8ctl traffic-abort reviews
Transfer aborted for reviews: all traffic reverted to v1

Documentation

Documentation is available at http://www.amalgam8.io/.

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.