{ "info": { "author": "Matt Wise", "author_email": "matt@nextdoor.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Software Development" ], "description": "=========\nzkwatcher\n=========\n\n`zk_watcher` is a Python script that handles registration with an `Apache\nZooKeeper` service.\n\nThe goal of `zk_watcher` is to monitor a particular service on a host machine\nand register that machine as a `provider` of that service at a given path\non the ZooKeeper service.\n\nA simple example is having `zk_watcher` monitor Apache httpd by running `service\napache2 status` at a regular interval and registers with ZooKeeper at a given\npath (say `/services/production/webservers`). As long as the command returns\na safe exit code (`0`), `zk_watcher` will register with ZooKeeper that this\nserver is providing this particular service. If the hostname of the machine\nis `web1.mydomain.com`, the registration path would look like this ::\n\n /services/production/webservers/web1.mydomain.com:80\n\nIn the event that the service check fails, the host will be immediately de-\nregistered from that path.\n\nInstallation\n------------\n\nTo install, run ::\n\n python setup.py install\n\nor ::\n\n pip install zk_watcher\n\nService Configs\n---------------\n\nTo configure, edit the '/etc/zk/config.cfg' file. The file consists of sections\nthat each point to a particular service you want to monitor and register with\nZooKeeper. An example file is provided, but could look like this ::\n\n [ssh]\n cmd: /etc/init.d/sshd status\n refresh: 60\n service_port: 22\n service_hostname: 123.234.123.123\n zookeeper_path: /services/ssh\n zookeeper_data: { \"foo\": \"bar\", \"bah\": \"humbug\" }\n\n [apache]\n cmd: /etc/init.d/apache status\n refresh: 60\n service_port: 22\n zookeeper_path: /services/web\n zookeeper_data: foo=bar, bah=humbug\n\nAuthentication\n--------------\n\nIf you wish to create a Digset authentication token and use that for your\nclient session with Zookeeper, you can add the settings to the config file\nlike this ::\n\n [auth]\n user: username\n password: 123456\n\nIf you do this, please look at the `nd_service_registry` docs to understand how\nthe auth token is used, and what permissions are setup by default.\n\nRunning it\n----------\nSee the 'zk_watcher.rst' file for configuration and run-time options.\n\nCaveats\n-------\nRight now you must install this package as `root`, or you must create the\n`/etc/zk` directory ahead of time and change its ownership to your installation\nuser name. The `setup.py` uses a hard-coded path (`/etc/zk/config.cfg`) for the\nconfig file, and will fail if it cannot create the file at that path. This will\nbe fixed in the next version.\n\nContributing to this code\n-------------------------\n\nCode contributions can be made through the *Nextdoor Gerrit Code Review* system.\nIn order to contribute, you will want to follow these instructions:\n\n`Nextdoor Code Review System `_\n\nPlace the following lines into ~/.ssh/config:::\n\n Host review.opensource.nextdoor.com\n Port 29418\n User \n\nThen verify that you can connect to Gerrit:::\n\n $ ssh review.opensource.nextdoor.com\n **** Welcome to Gerrit Code Review ****\n\n Hi Matt Wise, you have successfully connected over SSH.\n\n Unfortunately, interactive shells are disabled.\n To clone a hosted Git repository, use:\n\n git clone ssh://@review.opensource.nextdoor.com:29418/REPOSITORY_NAME.git\n\n Connection to review.nextdoortest.com closed.\n\nInstall and configure git-change:::\n\n $ sudo easy_install pip\n $ sudo pip install git-change\n\nClone the repo and setup your hooks:::\n\n $ git clone review.opensource.nextdoor.com:zkwatcher\n $ cd zkwatcher\n $ etc/configure-repository.sh\n\nMake your change, and submit it:::\n\n $ touch MyFile\n $ git add MyFile\n $ git change create", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/zk_watcher#downloads", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Nextdoor/zkwatcher", "keywords": "zookeeper apache zk", "license": "Apache License, Version 2.0", "maintainer": null, "maintainer_email": null, "name": "zk_watcher", "package_url": "https://pypi.org/project/zk_watcher/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zk_watcher/", "project_urls": { "Download": "http://pypi.python.org/pypi/zk_watcher#downloads", "Homepage": "https://github.com/Nextdoor/zkwatcher" }, "release_url": "https://pypi.org/project/zk_watcher/0.3.2/", "requires_dist": null, "requires_python": null, "summary": "Python-based service registration daemon for Apache ZooKeeper", "version": "0.3.2" }, "last_serial": 850634, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b763c87ee173bc8ad984b0f3aac24f47", "sha256": "c98e9f0d072030d0940daf16115be5315a756dba31b61a04a53e30cc81ceebaf" }, "downloads": -1, "filename": "zk_watcher-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b763c87ee173bc8ad984b0f3aac24f47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8522, "upload_time": "2012-10-26T16:49:04", "url": "https://files.pythonhosted.org/packages/68/38/f0f346b836d261f6a7219119de0684a02bc92ef73cf037bd062e136b747c/zk_watcher-0.1.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "47e82c2236fd1cd0eb58cd4a715cb653", "sha256": "7c042d5821564eb17ba3eff5aa1505d12afc2f4c367364e60235808bbc1694ef" }, "downloads": -1, "filename": "zk_watcher-0.2.1.tar.gz", "has_sig": false, "md5_digest": "47e82c2236fd1cd0eb58cd4a715cb653", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8859, "upload_time": "2012-12-22T01:46:44", "url": "https://files.pythonhosted.org/packages/78/62/21cf6c4bc1519f146d7638799eae4c4eb3068a997619591ea831e9afea57/zk_watcher-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "cb4da03076c83d0f48a3e2b0d9229712", "sha256": "c1b8dd48297a0509ce59eaf227bf2b3656465da24d87b0718e38029cd07df108" }, "downloads": -1, "filename": "zk_watcher-0.2.2.tar.gz", "has_sig": false, "md5_digest": "cb4da03076c83d0f48a3e2b0d9229712", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9033, "upload_time": "2012-12-22T02:01:28", "url": "https://files.pythonhosted.org/packages/2c/b9/0443030aa7c9afce628c8f1433030e778c513b8a6a90cd42c5cd4e942e03/zk_watcher-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "be8bf5015fd8fd032cd5ee65669bbb2a", "sha256": "158bcc29f73817eb54aab4103cb76e9f36c5fe9e88a159337b33fb233acecc5d" }, "downloads": -1, "filename": "zk_watcher-0.3.0.tar.gz", "has_sig": false, "md5_digest": "be8bf5015fd8fd032cd5ee65669bbb2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9262, "upload_time": "2012-12-27T20:06:41", "url": "https://files.pythonhosted.org/packages/20/35/1def02c54d77a82bf40e07a1f2ef250e1f79ebafe9decccfdeffb976f69c/zk_watcher-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "768dc63ed749ceb6419cafc50684d425", "sha256": "0716f887d8c23d07c7b33498dbc1fc1c9fb0750c8fe39d475e98b8688e75adbe" }, "downloads": -1, "filename": "zk_watcher-0.3.1.tar.gz", "has_sig": false, "md5_digest": "768dc63ed749ceb6419cafc50684d425", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9256, "upload_time": "2013-01-02T21:27:58", "url": "https://files.pythonhosted.org/packages/3f/6d/42ac3f6862fb78677e7e5b4aaac1feb123e19fb52a724b0a03c5a5b087dd/zk_watcher-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "5dd9392cf1ed94d53749a9d6559add29", "sha256": "ba2d34c215ff980cbdbc6ab0ad312955af9e0c358f4dbed88a801d7b10bb88f8" }, "downloads": -1, "filename": "zk_watcher-0.3.2.tar.gz", "has_sig": false, "md5_digest": "5dd9392cf1ed94d53749a9d6559add29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9834, "upload_time": "2013-08-27T19:36:15", "url": "https://files.pythonhosted.org/packages/cc/af/7adecb329e7cc5b955f45010337afb9d5a5c2ee029105f0a9f3d1be9a68e/zk_watcher-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5dd9392cf1ed94d53749a9d6559add29", "sha256": "ba2d34c215ff980cbdbc6ab0ad312955af9e0c358f4dbed88a801d7b10bb88f8" }, "downloads": -1, "filename": "zk_watcher-0.3.2.tar.gz", "has_sig": false, "md5_digest": "5dd9392cf1ed94d53749a9d6559add29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9834, "upload_time": "2013-08-27T19:36:15", "url": "https://files.pythonhosted.org/packages/cc/af/7adecb329e7cc5b955f45010337afb9d5a5c2ee029105f0a9f3d1be9a68e/zk_watcher-0.3.2.tar.gz" } ] }