Skip to main content

collective.zopeconsul

collective.zopeconsul enables asynchronous sending of zope configuration to consul. It sends the VHM domain information to consul along with port and ip address of this instance. It can also be used to set key/value pairs from buildout config options or environment variables.

Configuration

zopeconsul can be configured by adding the following to your buildout:

[instance]
eggs = collective.zopeconsul

zope-conf-additional =
  <product-config zopeconsul>
    consul_url http://localhost:8500
    consul_prefix zope
    consul_key_somename somevalue
  </product-config>

Any configuration option can be overridden by an environment variable:

$ export CONSUL_URL=http://localhost:8500
$ export CONSUL_KEY_SOMENAME=somevalue

Configuration options

consul_url

Url of the consul server to connect to. Default: http://localhost:8500

consul_prefix

When setting key/values, this is the base key from which all values are set. Default: zope

consul_instancename

Gives a name to the instance. Instead of values being placed in <consul_prefix>, they are placed in <consul_prefix>/instances/<instance_name> on the consul server. Useful when there are multiple instances being orchestrated from consul. Default: unset

consul_key_[name]

Allows to set arbitrary key values with any name. Example: ``consul_key_somekey = somevalue``

consul_ignore

Skips setting consul key values. Useful if you have multiple instances that share the same code. You can set this value on specific instances and no key/values will be set in consul.

consul_ignorevhm

Skips individual VHM hosts from being set. This should match the first part of the vhm string (i.e. before /VirtualHostBase) e.g. CONSUL_IGNOREVHM=”test.localhost,test2.localhost” which will prevent either of the corresponding vhm values being set in consul.

Changelog

0.3 (2024-09-23)

  • Create new CONSUL_IGNOREVHM option [instification]

  • Only update VHM values if they differ from consul [instification]

0.2 (2021-09-16)

  • Add Python3 compatibility [instification]

0.1 (2018-02-01)

  • Initial setup and vhm monkeypatching [djay]

  • Addition of zope-additional-configuration option [instification]

  • Addition of key/value pairs to consul [instification]

Metadata

Release files for collective.zopeconsul 0.3

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

Source distribution (sdist)

Source distribution for collective.zopeconsul 0.3
File Size Uploaded
collective_zopeconsul-0.3.tar.gz 9.5 kB Details

Built distribution (wheel)

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

Total release size: 16.5 kB

Release files / collective_zopeconsul-0.3.tar.gz

Download URL collective_zopeconsul-0.3.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8ecd6971e0ee1a4502a9277b18698d40e2dc29669ff7f2f163be49a9c9e63cb6
BLAKE2b-256 checksum
How to use checksums
20dd264c7532e4521fb8f5e3a17d02a26b1f6fa99271d0a65d40da584b7c0243
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.15

Release files / collective.zopeconsul-0.3-py3-none-any.whl

Download URL collective.zopeconsul-0.3-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc884ea9c8ef680aad9ed066595ccf88d754918fb52289b31bc68a9ce9d8afa2
BLAKE2b-256 checksum
How to use checksums
430f8a05f0df8158c398f0d8300750da288f03b9cb953a0f4eb140c0fee79034
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.15

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

1 release file

0.1

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