Skip to main content

Light-weight configuration management using Consul

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Passport
========
Passport is a command line tool for rendering templates containing information
gained from Consul's Service Discovery API and Key/Value database.

|Version| |Downloads| |License|

Installation
------------
Passport is available via pypi_ and can be installed with easy_install or pip:

.. code:: bash

pip install passport

Usage
-----
.. code:: bash

usage: passport.py [-h] [--host HOST] [--port PORT] [--datacenter DATACENTER]
{kv,file} path destination

Example
-------

As an example, the following template is stored in the KV database as
``templates/memcached/memcached.conf``

.. code:: python

{% set nodes = ['%s:%s' % (r['Address'], r['ServicePort']) for r in consul.catalog.service('memcached')] %}

[memcached]
servers = {{ ','.join(nodes) }}

Invoking passport will render the file with a list of all memcached nodes to
``/etc/memcached.conf``.

.. code:: bash

passport kv templates/memcached/memcached.conf /etc/memcached.conf

And the output would look something like:

.. code:: ini

[memcached]
servers = 172.17.0.7:11211,172.17.0.8:11211

Template rendering is done via the `Tornado Template <https://tornado.readthedocs.org/en/latest/template.html>`_ engine.

Todo
----
- Add a *managed* mode where Passport will check for new services on a regular interval and when changes occur, update the rendered template and notify a process using HUP
- Add daemonization for managed mode
- Add the ability to specify pairs of templates/destinations in a single invocation

.. |Version| image:: https://badge.fury.io/py/passport.svg?
:target: http://badge.fury.io/py/passport

.. |Downloads| image:: https://pypip.in/d/consulate/badge.svg?
:target: https://pypi.python.org/pypi/passport

.. |License| image:: https://pypip.in/license/passport/badge.svg?
:target: https://github.com/gmr/passport

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

passport-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file passport-0.1.0.tar.gz.

File metadata

  • Download URL: passport-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for passport-0.1.0.tar.gz
Algorithm Hash digest
SHA256 48ce6372cf2c09a67847b68c45acd765b3458657ac557c95366b6e6f6a0e7c78
MD5 6ee1b72acd41d7f41ef37a09722086dd
BLAKE2b-256 2f6c34708e0d225d87e3a8f4385cddb7ddf9158327b00773c680489048d53284

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