Skip to main content

Rancon (aka rancher-consul)

We use consul as a service discovery mechanism, and a Consul-template / HAProxy combination to route traffic into our services. This python script is a helper to automatically enter Rancher services into Consul based on Rancher label selectors, so they can picked up by the load HAProxy load balancing layer.

This might not be of any use to anybody but me, but I’ll make it public anyway because I did not find another solution so I had to write it, and maybe someone else has the same problem.

CHANGELOG

0.17.1

Date: 2017-06-07

  • FIX: made “/” URL path work again (threw HTTP 500 because of code error)

  • FIX: way better exception handling, the registration cycle is no longer aborted if an exception occurs

  • FIX: the consul backend handles a connection error gracefully now

0.17.0

Date: 2017-01-19

  • FIX: again some critical fixes in consul backend (don’t use v0.16)

  • FIX: cleanup ID now includes rancher environment name (rancher.sh change)

  • FEATURE: contrib/congler helper added, script to delete and list services

0.16.0

Date: 2017-01-19

  • FIX: small internal bug fix which should never have triggered

  • CHANGE: cleanup ID now different, removal of standard “rancon” tag

  • CHANGE: output of rancher.sh a bit different

  • CHANGE: log outputs changed partially

  • INTERNAL: some code refactorings

0.15.0

Date: 2017-01-19

  • FEATURE: make consul urls dynamic (use %HOST% etc. placeholders)

  • FEATURE: deregistering uses the correct consul instances, not blindly “the ones registered with”

0.14.0

Date: 2017-01-06

  • FEATURE: add metric “rancon_registration_exceptions”

0.13.0

Date: 2017-01-05

  • Very confused version. Maybe it’s 0.14.0 already? Don’t use.

0.12.0

Date: 2017-01-04

  • FEATURE: add version number to ‘/’ URL path & prometheus metrics

0.11.1

Date: 2017-01-04

  • FIX: rancher.sh startup script processes env names with spaces now

0.11.0

Date: 2017-01-03

  • FIX: Service tag replacment exception

0.10.0

Date: 2017-01-03

  • FEATURE: Add “web interface” (basically only for metrics and health check)

  • FEATURE: Add health check under /health

  • FEATURE: Add prometheus metrics under /metrics

  • CHANGE: Deregistration behavior for services which failed registration (was: unregister, is now: keep)

0.9.0

Date: 2016-06-15

  • CHANGE: convert IDs, tags, names to all lowercase in consul

  • CHANGE: do not allow non-url characters in service IDs (basically nothing but [a-z0-9-])

0.8.0

Date: 2016-06-15

  • BREAKING: -i/--id parameter no longer global, moved to cleanup_id parameter of backend

  • CHANGE: output now logging based, so all to stderr, and -vvvv flags possible

  • FIX: bug in service lookup in Rancher

  • OPEN: https connections

0.7.0

Date: 2016-06-15

  • FEATURE: authentication now used

  • FIX: bug in service lookup in Rancher

  • OPEN: https connections (untested, might work)

0.6.1

Date: 2016-06-09

  • More verbosity during init process

0.6.0

Date: 2016-06-09

  • Unified naming scheme of used environment variables

  • Added convenience script “rancon.py”

  • Dockerfile fixes

  • Doc fixes

0.5.0

Date: 2016-06-07

  • Initial PyPI release

  • module works, docker setup not tested yet

  • documentation unfinished / not present

Metadata

Release files for rancon 0.17.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for rancon 0.17.1
File Interpreter ABI Platform
rancon-0.17.1-py3-none-any.whl Python 3 none any Details

Release files / rancon-0.17.1-py3-none-any.whl

Download URL rancon-0.17.1-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06b5710b350849f6ff5a206d34568ae73d95b7f824e6c996fb768908eef758f1
BLAKE2b-256 checksum
How to use checksums
9b64a8061920a3aa1a8f8e89ec654e980319acfd013481fd8f179da522813c34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.17.1 This release

1 release file

0.11.0

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page