Task executor, handy for DevOps and not only - balance between Makefile and Gradle.
Project description
Task executor - balance between Makefile and Gradle [see documentation], designed with :heart: by RiotKit for DevOps.
Easiest and cleanest way to write management scripts and share them between projects, teams and even organizations
RKD is a stable, open-source, multi-purpose automation tool which balance flexibility with simplicity. The primary language is Python and YAML syntax.
RiotKit-Do can be compared to Gradle and to GNU Make, by allowing both Python and Makefile-like YAML syntax.
Can be used on PRODUCTION, for development, for testing, to replace some of Bash scripts inside docker containers, and for many more, where Makefile was used.
It is not a build tool for Java, but more a DevOps multi-purpose tool. At this time it will not replace Gradle, but maybe in the future this can be achieved by building community packages with support for building eg. Java applications.
Example use cases
Docker based production environment with multiple configuration files, procedures
Database administrator workspace (importing dumps, creating new user accounts, plugging/unplugging databases)
Development environment (executing migrations, importing test database, splitting tests and running parallel)
On CI (prepare project to run on eg. Jenkins or Gitlab CI) - RKD is reproducible on local computer which makes inspection easier
Kubernetes/OKD deployment workspace (create shared YAML parts with JINJA2 between multiple environments and deploy from RKD)
Automate things like certificate regeneration on production server, RKD can generate any application configs using JINJA2
Installers (RKD has built-in commands for replacing lines in files, modifying .env files)
Quick start
# 1) via PIP
pip install rkd
# 2) Create project (will create a virtual env and prepare files that could be commited to git)
rkd :rkd:create-structure
Please check available releases there: https://pypi.org/project/rkd/#history
Goals:
Define tasks as simple as in Makefile
Write tasks code in Python as simple as possible
Reuse code as simple as in Gradle (using extensions that provides tasks. Extensions are installable from PIP)
Simple configuration in Python
Integrates with GIT
Suitable for PRODUCTION (log as much as possible, log each executed task into separated *.log files). We planned also extended logging of most important auditing information such as who executed action, and how the state looked in that time
Rules
No hooks eg. task.executeAfter(otherTask), no complex dependencies
No in-memory state between tasks. State could be only changed in files/database/kv-store like it is in other build systems
No dynamic tasks names eg. by turning on Publish component it should not create tasks eg. :publishIWAToDockerRegistry (where IWA is the project name)
Don’t pack too many features into the core, do this in external modules. Keep the RKD core clean!
Full static analysis, you can work on makefile.py and on task’s code in PyCharm with full code completion!
Do early validation. Runtime validation for long running builds is a pain-in-the-ass for the user.
Show clear error messages as much as it is possible. Task not found? Tell the user - do not leave a stack trace. Import error in makefile.py? Tell the user + add stack trace. RESPECT TIME OF ALL OF US! :)
Do not overuse libraries in RKD core - it must be installable in any environment, including Docker. Libraries count should be small, and the libraries cannot depend on GCC/G++
RKD in action
YAML syntax example
Python syntax example (makefile.py)
Documentation
Please read the documentation here.
Roadmap
Check our github milestones, to see what’s actually planned for next releases.
Projects using RKD
Alternative ways of installation
Releasing
Create a release in Github releases
Wait for pipeline to build and publish to PyPI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file rkd-2.4.0.tar.gz
.
File metadata
- Download URL: rkd-2.4.0.tar.gz
- Upload date:
- Size: 77.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 582d05994606915f4f16f46d8855bac3a46d3fef597fa922ce5f231a245be074 |
|
MD5 | 8ea0240d128491beff8a0741a2fb3638 |
|
BLAKE2b-256 | 93e0b1063851b2a543e38e31fa443ee877b3035505d5cec604cf6a3b0d67fc85 |