Skip to content

🔧 📦 Process boot-strapping utilities that support writing robust application/service launcher and process life-cycle management scripts.

License

Notifications You must be signed in to change notification settings

Build-The-Web/bootils

Repository files navigation

Bootils

logo Utilities for robust launcher and process life-cycle management scripts.
Project GroupsLicenseDevelopment Status
QA Travis CICoverallsGitHub IssuesReadyIn Progress
Release Latest VersionDownload formatDownloads

Overview

Bootils offers process boot-strapping utilities that support writing robust application/service launcher and process life-cycle management scripts. It is comprised of a bootils Python package with building blocks for process and resource management, and a CLI tool named nanny that watches your child process after starting, until it grows up into a stable running state.

📚 For more details, see the full documentation at Read The Docs.

Installation

Refer to the Installation Guide on Read The Docs.

See Contributing on how to create a full development environment.

Usage

“nanny” Process Launcher and Watchdog

nanny can launch an application or service based on an INI-style configuration file. The following is a hopefully pretty much self-explanatory and totally made up example.

[launcher]
java-classpath = """
    /usr/share/java/commons-logging*.jar
    /usr/share/java/log4j*.jar
"""

java-agents = """
    /usr/share/java/jmx/jolokia-jvm-agent.jar=config=/etc/cassandra/jolokia-config.properties
"""

launch = """
    wait_for:port:12345
    timeout:120s
    jsw:StartStopApp:/usr/lib/cassandra/cassandra.jar
"""

[post-check]
logscan = """
    timeout:90s
    success:Started in [0-9]+ msec
    warn:Exception
    warn:WARNING: Could not open
    fail:OutOfMemory
    file:/var/log/cassandra/demon.log
"""

commands = """
    after:10s
    detach:/usr/sbin/jolocas watchdog
    after:60s
    call:/usr/sbin/nodetool status | grep '^U.* ${env:FACTER_IPV4} '
    call:/usr/sbin/jolocas check health
"""

The pre and post checks can also be called explicitely (via the pre-check and post-check sub-commands), to support some outside process launcher. In this case, the checks are performed as per config, and the return code reflects the outcome (0 for OK, and 1 for failures).

Contributing

Contributing to this project is easy, and reporting an issue or adding to the documentation also improves things for every user. You don’t need to be a developer to contribute. See CONTRIBUTING for more.

As a documentation author or developer, to create a working directory for this project, call these commands:

git clone "https://github.com/Build-The-Web/bootils.git"
cd "bootils"
. .env --yes --develop
invoke build --docs test check

You might also need to follow some setup procedures to make the necessary basic commands available on Linux, Mac OS X, and Windows.

Similar and Related Projects

Acknowledgements

1&1 Project sponsored by 1&1.

Documentation hosted by Read the Docs.

About

🔧 📦 Process boot-strapping utilities that support writing robust application/service launcher and process life-cycle management scripts.

Resources

License

Stars

Watchers

Forks

Packages

No packages published