All Projects → ionelmc → python-holdup

ionelmc / python-holdup

Licence: BSD-2-Clause license
A tool to wait for services and execute command. Useful in Docker containers.

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to python-holdup

socket
Dazzle Async Socket
Stars: ✭ 19 (-34.48%)
Mutual labels:  tcp
czspas
Minimalistic socket library inspired by Asio/Boost Asio, implemented in 1 single header file
Stars: ✭ 25 (-13.79%)
Mutual labels:  tcp
workerman
An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols. PHP>=5.4.
Stars: ✭ 10,005 (+34400%)
Mutual labels:  tcp
DzSocket
Delphi Client/Server components to communicate using TCP Socket Asynchronous easily
Stars: ✭ 44 (+51.72%)
Mutual labels:  tcp
dockerizing-django
🐳 Dockerize your Django application.
Stars: ✭ 27 (-6.9%)
Mutual labels:  dockerize
watcher
watcher(守望者)提供java应用暴露监控/健康检查的能力。
Stars: ✭ 65 (+124.14%)
Mutual labels:  healthcheck
server-framework
纯C的分布式服务器框架通用模板,跨平台,模块动态加载,tcp/可靠UDP,协程RPC,日志,集群建立
Stars: ✭ 24 (-17.24%)
Mutual labels:  tcp
nc
Porting Netcat in Node.js. CLI util. 💻
Stars: ✭ 17 (-41.38%)
Mutual labels:  tcp
sledgehammer
🔨 📶 WiFi-Jammer/DoS toolset
Stars: ✭ 34 (+17.24%)
Mutual labels:  tcp
maikai
RFC-compliant, Kubernetes-ready, intelligent health check middleware for HTTP APIs and microservices written in Node
Stars: ✭ 23 (-20.69%)
Mutual labels:  healthcheck
ctsTraffic
ctsTraffic is a highly scalable client/server networking tool giving detailed performance and reliability analytics
Stars: ✭ 125 (+331.03%)
Mutual labels:  tcp
tcpserver
A TCP Server with simple and clean API
Stars: ✭ 12 (-58.62%)
Mutual labels:  tcp
iit-kgp-network
Information repository and Solutions on IIT KGP Internet Problems.
Stars: ✭ 28 (-3.45%)
Mutual labels:  tcp
wiresham
Simple TCP service mocking tool for replaying https://www.wireshark.org and http://www.tcpdump.org captured service traffic
Stars: ✭ 44 (+51.72%)
Mutual labels:  tcp
metacom
RPC communication protocol for Metarhia stack 🔌
Stars: ✭ 42 (+44.83%)
Mutual labels:  tcp
fastim
🚀基于Netty高可用分布式即时通讯系统,支持长连接网关管理、单聊、群聊、离线消息、消息推送消息、消息已读未读、消息未读数、红包、消息漫游等功能,支持集群部署的分布式架构。
Stars: ✭ 111 (+282.76%)
Mutual labels:  tcp
voice
Implementation of the Discord Voice API for discord.js and other JS/TS libraries
Stars: ✭ 310 (+968.97%)
Mutual labels:  tcp
pheromones
实现长/短链接方式的p2p网络
Stars: ✭ 18 (-37.93%)
Mutual labels:  tcp
Rmessage
Reactive Programming Multi-protocol push service
Stars: ✭ 23 (-20.69%)
Mutual labels:  tcp
nodejs-health-checker
This is a Node package that allows you to track the health of your application providing readiness and liveness functionalities.
Stars: ✭ 34 (+17.24%)
Mutual labels:  healthcheck

Overview

docs Documentation Status
tests
package

A tool to wait for services and execute command. Useful for Docker containers that depend on slow to start services (like almost everything).

  • Free software: BSD 2-Clause License

Installlation

Currently holdup is only published to PyPI and hub.docker.com.

To install from PyPI:

pip install holdup

It has no dependencies except the optional PostgreSQL check support, which you'd install with:

pip install 'holdup[pg]'

You can also install the in-development version with:

pip install https://github.com/ionelmc/python-holdup/archive/master.zip

Alternate installation (Docker image)

Example:

docker run --rm ionelmc/holdup tcp://foobar:1234

Note that this will have some limitations:

  • executing the command is pretty pointless because holdup will run in its own container
  • you'll probably need extra network configuration to be able to access services
  • you won't be able to use docker run inside a container without exposing a docker daemon in said container

Usage

usage: holdup [-h] [-t SECONDS] [-T SECONDS] [-i SECONDS] [-n] service [service ...] [-- command [arg [arg ...]]]

Wait for services to be ready and optionally exec command.

positional arguments:
service
A service to wait for. Supported protocols: "tcp://host:port/", "path:///path/to/something", "unix:///path/to/domain.sock", "eval://expr", "pg://user:password@host:port/dbname" ("postgres" and "postgresql" also allowed), "http://urn", "https://urn", "https+insecure://urn" (status 200 expected for http*). Join protocols with a comma to make holdup exit at the first passing one, eg: "tcp://host:1,host:2" or "tcp://host:1,tcp://host:2" are equivalent and mean any that pass.
command
An optional command to exec.
optional arguments:
-h, --help show this help message and exit
-t SECONDS, --timeout SECONDS
 Time to wait for services to be ready. Default: 60.0
-T SECONDS, --check-timeout SECONDS
 Time to wait for a single check. Default: 1.0
-i SECONDS, --interval SECONDS
 How often to check. Default: 0.2
-v, --verbose Verbose mode.
--verbose-passwords
 Disable PostgreSQL/HTTP password masking.
-n, --no-abort Ignore failed services. This makes holdup return 0 exit code regardless of services actually responding.
--insecure Disable SSL Certificate verification for HTTPS services.
--version display the version of the holdup package and its location, then exit.

Example:

holdup tcp://foobar:1234 -- django-admin ...

Documentation

https://python-holdup.readthedocs.io/

Development

To run all the tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows
set PYTEST_ADDOPTS=--cov-append
tox
Other
PYTEST_ADDOPTS=--cov-append tox
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].