Giter Club home page Giter Club logo

sonitus-exstructa's Introduction

Sonitus Exstructa

'Structured Noise' log generator for container orchestration log testing

Usage

Usage example for various container orchestration and execution solutions.

Development

Changes and improvements are ideally built and tested in a python virtual environment based on the repository Pipfile which installs the repository package as editable.

cd ~/src/sonitus-exstructa
pipenv install --dev --python python3.8
pipenv shell

Where you can do an editable install and execute the program as desired to test output:

(sonitus-exstructa) nkiraly@helios:~/src/sonitus-exstructa$ SONITUS_EXSTRUCTA_ACTOR="PowerManager PowerLord" \
SONITUS_EXSTRUCTA_TARGET="regulators accumulators" \
SONITUS_EXSTRUCTA_STATE="charged online dry" \
sonitus-exstructa generate

{"message": "PowerLord ensuring regulators online", "actor": "PowerLord", "action": "ensuring", "target": "regulators", "state": "online", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:48:02.480646"}
{"message": "PowerLord ensuring regulators online", "actor": "PowerLord", "action": "ensuring", "target": "regulators", "state": "online", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:48:30.509398"}
{"message": "PowerLord ensuring accumulators online", "actor": "PowerLord", "action": "ensuring", "target": "accumulators", "state": "online", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:48:54.530558"}
{"message": "PowerManager ensuring regulators dry", "actor": "PowerManager", "action": "ensuring", "target": "regulators", "state": "dry", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:49:12.549721"}
{"message": "PowerLord ensuring regulators charged", "actor": "PowerLord", "action": "ensuring", "target": "regulators", "state": "charged", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:49:35.573644"}
{"message": "PowerLord ensuring accumulators online", "actor": "PowerLord", "action": "ensuring", "target": "accumulators", "state": "online", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:49:51.590405"}
{"message": "PowerLord ensuring accumulators charged", "actor": "PowerLord", "action": "ensuring", "target": "accumulators", "state": "charged", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:50:16.616450"}
{"message": "PowerLord ensuring accumulators dry", "actor": "PowerLord", "action": "ensuring", "target": "accumulators", "state": "dry", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:50:46.646828"}
{"message": "PowerLord ensuring regulators online", "actor": "PowerLord", "action": "ensuring", "target": "regulators", "state": "online", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:51:11.659593"}

When upgrading core dependencies, it may be necessary to rebuild the Pipfile and lock, derived from requirements files a la

cd ~/src/sonitus-exstructa
pipenv install --dev --python python3.8
pipenv shell
pipenv install --requirements requirements.txt
pipenv install --dev --requirements requirements-testing.txt
pipenv install --dev --requirements requirements-build.txt
pipenv install --editable .

Testing

When satisfied with changes, you should also test an updated container image behaves as exeptected

$ DOCKER_BUILDKIT=1 docker build .
[+] Building 25.4s (21/21) FINISHED
.....
  => => writing image sha256:31ad9bf80200e93f90ce6b53433aaff89fa2323bbdc7f69cb98f2c6d7871daec                                                                                                                  0.0s

$ docker run -it --env SONITUS_EXSTRUCTA_TARGET="regulators accumulators" --env SONITUS_EXSTRUCTA_STATE="charged online dry" 31ad9bf80200e93f90ce6b53433aaff89fa2323bbdc7f69cb98f2c6d7871daec generate
{"message": "PowerLord ensuring accumulators online", "actor": "PowerLord", "action": "ensuring", "target": "accumulators", "state": "online", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:55:38.531466"}
{"message": "PowerLord failed ensuring accumulators charged", "actor": "PowerLord", "action": "ensuring", "target": "accumulators", "state": "charged", "result": "FAILURE", "level": "error", "timestamp": "2021-09-07T02:55:54.546809"}
{"message": "PowerLord ensuring regulators charged", "actor": "PowerLord", "action": "ensuring", "target": "regulators", "state": "charged", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:56:13.551927"}
{"message": "PowerManager ensuring regulators dry", "actor": "PowerManager", "action": "ensuring", "target": "regulators", "state": "dry", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:56:18.558007"}
{"message": "PowerManager ensuring regulators charged", "actor": "PowerManager", "action": "ensuring", "target": "regulators", "state": "charged", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:56:36.574668"}
{"message": "PowerManager ensuring accumulators online", "actor": "PowerManager", "action": "ensuring", "target": "accumulators", "state": "online", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:56:59.599014"}
{"message": "PowerLord ensuring accumulators charged", "actor": "PowerLord", "action": "ensuring", "target": "accumulators", "state": "charged", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:57:22.623623"}
{"message": "PowerLord ensuring regulators dry", "actor": "PowerLord", "action": "ensuring", "target": "regulators", "state": "dry", "result": "SUCCESS", "level": "info", "timestamp": "2021-09-07T02:57:41.643901"}

sonitus-exstructa's People

Contributors

dependabot[bot] avatar nkiraly avatar

Watchers

James Cloos 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.