GithubHelp home page GithubHelp logo

leapp-insights-tasks's Introduction

Leapp Insights Tasks

Scripts related to leapp to be run via rhc-worker-script on Red Hat Insights.

Scripts themselves shouldn't have any additional requirements = they are relying on python standard library.

Structure of repository is following:

├── requirements.txt  # DEV requirements - tests & lint
├── schemas # All expected json outputs in the scripts stdouts
|   |   ...
│   └── preupgrade_schema_1.0.json
├── scripts # All available scripts for leapp related tasks
|   |   ...
│   └── preupgrade_script.py
├── playbooks # All available ansible playbooks for leapp related tasks
|   |   ...
│   └── leapp_preupgrade_ansible.yaml
└── tests
    |   ...
    └── preuprade  # Unit tests for given script

Schemas

Currently there is given format of the scripts stdout that is expected to be parsed by the Red Hat Insights Task UI. This stdout is JSON structure wrapped between agreed on separators (see below). Schemas of the JSONs for each script can be found in schemas folder.

  • separators (common to all scripts):
    • ### JSON START ###
    • ### JSON END ###

Scripts & Playbooks

Red Hat Insights Tasks are always distributed to registered systems as signed yaml files, those are either executed via rhc-worker-script or rhc-worker-playbook. For leapp this generally means that rhc-worker-script is used for RHEL 7 systems and rhc-playbook-worker is used for RHEL 8+ systems.

So in short playbooks folder contains true signed ansible playbooks and also files from scripts folder wrapped in signed yaml envelope.

Preupgrade

You can find official leapp_preupgrade_ansible.yaml for rhc-worker-playbook in playbooks folder. This playbook is officially signed and used on Red Hat Insights.

For rhc-worker-script we have only raw script leapp_preupgrade.py, signed version wrapped in yaml is still in development.

Upgrade

TBD for rhc-worker-playbook.

For rhc-worker-script we have only raw script leapp_upgrade.py, signed version wrapped in yaml is still in development.

Local Development & Contributing

Requirements

  • python2 - to run tests locally
  • virtualenv - versions < 20.22.0 to run tests locally
  • pre-commit - to run checks before each commit, see hook in .pre-commit-config.yml
  • make - to use handy commands

Run tests and lint

make install # install pre-commit hooks and python virtualenv
make tests # run pytest

leapp-insights-tasks's People

Contributors

andywaltlova avatar monnte avatar wecros avatar

Stargazers

Rodolfo Olivieri avatar adam kaminski avatar

Watchers

ina vasilevskaya avatar Petr Stodůlka avatar Rodolfo Olivieri avatar Michal Reznik (mreznik) avatar Vojtech Sokol avatar  avatar

Forkers

r0x0d

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.