Skip to main content

A lightweight python script scheduler

Project description

gluetube

todo

roadmap

0.1.0 roadmap

  • run pipeline in isolated env
  • autodiscover pipelines
  • tracking status and stages of pipeline
  • shared variables across pipelines
  • pipeline scheduler
  • cron scheduling
  • at scheduling (run once at date time)
  • gluetube daemon
  • sqlite database schema
  • dockerfile
  • hello world tutorial
  • encrypted values in store.db
  • 50%+ test coverage
  • cli v1 (daemon control, modify scheduling, view pipelines and runs)
  • pip install (directory mgmt, upgrades, etc)
  • github actions
  • proxy support to ensure pip can pull pipeline dependencies

0.2.0 roadmap

  • remote shell connector (for executing cli apps on systems. e.g. ansible, rancid, etc)
  • re-run pipeline if crashed. specify max retries
  • git pull repo of pipelines into pipeline_dir
  • option to define (name, schedule) in pipeline (incl. run pipeline on change to get new potential name, schedule etc.)
  • a 'gluetube pipeline --clean' and 'gluetube pipeline --cleanall' to remove .venv's that are made
  • pipeline accessible database to store system object relationships related to pipeline
  • ability to view pipeline runs via cli
  • cgroup restrictions for pipelines

0.3.0 roadmap

  • frontend web ui
  • REST api endpoint to trigger running pipeline, including passing optional parameters as json payload that is accessable by pipeline (PUSH)
  • pipeline developement mode (ability to see the stdout of the pipeline to track it's run)
  • ability to 'attach' to running pipeline and see stdout (e.g. gluetube logs -f pipeline_name)

0.4.0 roadmap

  • dynamic webhook url that pipeline can access/monitor (long-lived LISTENER pipelines)
  • gracefully handle SIG[TERM|KILL] and ensure it waits for any running pipelines to stop or manually stop them
  • .rpm
  • .deb

0.5.0 roadmap

  • cli v2
  • ability to run pipelines serially that are linked together (e.g. pipeline reuse)

installation

adduser gluetube

pip install --user gluetube

gluetube --configure

gluetube --initdb

gluetube daemon --background

gluetube daemon --stop

OR

docker volume create gluetube

docker run -d --init -v gluetube:/home/gluetube/.gluetube ctomkow/gluetube

todo: systemd unit file (when rpm/deb is built, it will include a unit file since the packages are run as root)

usage

gluetube --help

gluetube summary

gluetube schedule 1 --now

pipeline development

docker pull ctomkow/gluetube

docker volume create gluetube-db

docker volume create gluetube-cfg

docker run -itd --name gluetube --net=host -v gluetube-db:/home/gluetube/.gluetube/db -v gluetube-cfg:/home/gluetube/.gluetube/etc ctomkow/gluetube:latest

Use VS code. Attach VS code to running container. Clone your pipeline repository inside your VS code instance attached to the container. Update ~/.gluetube/etc/gluetube.cfg and point config to pipeline directory

gluetube dev env

docker build -t gluetube-dev:0.1.0 -f dockerfile.dev .

docker volume create gluetube-db

docker volume create gluetube-cfg

docker run -itd --name gluetube-dev --net=host -v ~/code/gluetube/gluetube:/home/gluetube/.local/lib/python3.10/site-packages/gluetube -v ~/code/test_pipelines:/home/gluetube/.gluetube/pipelines -v gluetube-db:/home/gluetube/.gluetube/db gluetube-dev:0.1.0

docker exec -it gluetube-dev bash

design

Interfaces (cli, gui) interact with the gluetubed socket. The daemon is responsible for making changes to both the scheduler and the database. Treat the database only as a user facing state view.

If a pipeline is in the database, then it should be scheduled. It can be paused and not running, but still registered in the scheduler. Then, if a pipeline is removed, it is deleted from the database and deleted from the scheduler.

Remember, don't touch the db directly. All write should be through an RPC call, otherwise there will be db/scheduler mis-matches which whould require a daemon reload to resolve.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gluetube-0.1.0.dev6.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gluetube-0.1.0.dev6-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file gluetube-0.1.0.dev6.tar.gz.

File metadata

  • Download URL: gluetube-0.1.0.dev6.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for gluetube-0.1.0.dev6.tar.gz
Algorithm Hash digest
SHA256 3580ba18f47c6244d256b517f48ed5239f0b4f5c2f3e363ce477ee6be3a2ecaf
MD5 1ff7ed721fc1e142973f19f8e634084b
BLAKE2b-256 a86879e8125357cfa2902eb27f9e915543a4b1cc4884124d9e64774ab9e21638

See more details on using hashes here.

File details

Details for the file gluetube-0.1.0.dev6-py3-none-any.whl.

File metadata

  • Download URL: gluetube-0.1.0.dev6-py3-none-any.whl
  • Upload date:
  • Size: 34.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for gluetube-0.1.0.dev6-py3-none-any.whl
Algorithm Hash digest
SHA256 8586e9213790e52b1ea0a0b1d24784039c9b8a381fa3f6af95141fcecb9526f3
MD5 38eab2c57aa7ab5d42ad6b67a999a2c0
BLAKE2b-256 1b3ab92210f8235cc2643793ffa5788e3c69e20764409246a3a86289c282b0eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page