{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Message Tagging Service\n=======================\n\n.. image:: https://img.shields.io/pypi/v/message-tagging-service.svg\n :target: https://pypi.org/project/message-tagging-service/\n\n.. image:: https://img.shields.io/pypi/pyversions/message-tagging-service.svg\n :target: https://pypi.org/project/message-tagging-service/\n\n.. image:: https://img.shields.io/pypi/l/message-tagging-service.svg?colorB=green\n :target: https://pypi.org/project/message-tagging-service/\n\n.. image:: https://travis-ci.org/fedora-modularity/message-tagging-service.svg?branch=master\n :target: https://travis-ci.org/fedora-modularity/message-tagging-service\n\n.. image:: https://quay.io/repository/factory2/message-tagging-service/status\n :target: https://quay.io/repository/factory2/message-tagging-service/status\n\nMessage tagging service is a microservice to tag build with proper tags, which\nis triggered by specific message from a message bus. Currently, service\nsupports to tag module build according to a module build state change event.\n\nThis service works with Python 3.6 and 3.7.\n\nWorkflow\n--------\n\nThis is the service workflow, for example of a module build.\n\n* Listen on message bus (that is fedmsg in Fedora) and waiting for module build\n state change event. Only ``ready`` state is handled.\n* Service consult to predefined rule definitions to check if that module build\n matches any rule.\n* If one or more rules are matched, tag the module build with tags defined in\n matched rules.\n* Send message to message bus to announce a module build is tagged with\n specific tags.\n\nRule Definition\n---------------\n\nRule definition is documented in a `Modularity document`_\n\nFor detailed information on how the rules are matched, please refer to\n`paragraph`_ in that document.\n\n.. _Modularity document: https://pagure.io/modularity/blob/master/f/drafts/module-tagging-service/format.md\n.. _paragraph: https://pagure.io/modularity/blob/master/f/drafts/module-tagging-service/format.md?text=True#_8\n\nConfiguration\n-------------\n\nThere are two type of configurations.\n\n* ``fedmsg.d/mts.py``: including MTS-specific configs for fedmsg hub. ``mts.py``\n enables defined consumer and configures to connect UMB accordingly. Refer to\n section ``Environment Variables`` to learn how to enable stomp protocol to\n connect other message bus other than the fedmsg.\n\n* ``conf/config.py``: including configs for service.\n\n * ``BaseConfiguration`` provides default options which could be reused for\n running in production.\n * ``DevConfiguration`` contains anything for running in development mode.\n * ``TestConfiguration`` contains any config for test purpose.\n\n* Koji login authentication method. It defaults to Kerberos, which is set in\n default ``koji`` profile. It could be changed to other ``authtype``, for\n example ``ssl``. Please note that ``cert`` has to be set as well for\n ``ssl``.\n\nMessaging\n---------\n\nEvents\n~~~~~~\n\nbuild.tag.requested\n^^^^^^^^^^^^^^^^^^^\n\nMessage is sent when a ``tagBuild`` task is requested in Koji. An example message::\n\n {\n \"build\": {\n \"id\": id,\n \"name\": name,\n \"stream\": stream,\n \"version\": version,\n \"context\": context,\n },\n \"nvr\": N-V-R,\n \"destination_tags\": [\n {\"tag\": name_1, \"task_id\": 1},\n {\"tag\": name_2, \"task_id\": 2},\n ...\n ]\n }\n\nwhere, ``destination_tags`` is a list of mappings each of them contains the tag\nto apply and corresponding task ID returned from Koji.\n\nbuild.tag.unmatched\n^^^^^^^^^^^^^^^^^^^\n\nMessage is sent if a module build does not match any predefined rules. An\nexample message::\n\n {\n \"build\": {\n \"id\": id,\n \"name\": name,\n \"stream\": stream,\n \"version\": version,\n \"context\": context,\n },\n }\n\nThe message simply contains the module build information.\n\nTopic Prefix\n~~~~~~~~~~~~\n\nFor Fedora, messages are sent to topics with prefix ``org.fedoraproject.prod``,\ne.g. ``org.fedoraproject.prod.mts.build.tag.requested``.\n\nFor internal, the prefix is ``VirtualTopic.eng.mts``, e.g.\n``VirtualTopic.eng.mts.build.tag.requested``.\n\nEnvironment Variables\n---------------------\n\nMTS_DRY_RUN\n~~~~~~~~~~~\n\nDry run mode. Currently, no build is tagged actually in dry run mode. No\nparticular is required. Just define ``MTS_DRY_RUN`` in environment variables.\n\nMTS_DEV\n~~~~~~~\n\nSwitch service to run in development mode as long as ``MTS_DEV`` is defined.\n\nMTS_USE_STOMP\n~~~~~~~~~~~~~\n\nMake service run with internal infrastructure. No particular value is required.\nJust define ``MTS_USE_STOMP`` in environment variables.\n\nMTS_STOMP_URI\n~~~~~~~~~~~~~\n\nA comma-separated string of UMB broker URIs. For example::\n\n 'messaging-broker01.dev1.example.com,messaging-broker02.dev2.example.com'\n\nMTS_STOMP_CRT\n~~~~~~~~~~~~~\n\nAn absolute path to certificate file.\n\nMTS_STOMP_KEY\n~~~~~~~~~~~~~\n\nAn absolute path to private key file.\n\nBoth of the certificate file and this private key file are required to connect\nto internal UMB brokers.\n\nContribution\n------------\n\nReport issue at https://github.com/fedora-modularity/message-tagging-service/issues.\n\nBefore making a pull request, ensure the changes do not break anything and are\ncovered by tests. Run tests::\n\n tox\n\nChange Logs\n-----------\n\n0.5 (2019-04-15)\n~~~~~~~~~~~~~~~~\n\n- Change metric name to be in sync with other services (Filip Valder)\n- Reduce the number of tries to match rules (Chenxiong Qi)\n- Match module build by build state (Chenxiong Qi)\n\n0.4.1 (2019-04-01)\n~~~~~~~~~~~~~~~~~~\n\n- Ignore https verify while downloading ca cert (Chenxiong Qi)\n\n0.4 (2019-03-30)\n~~~~~~~~~~~~~~~~\n\n- Adjust gunicorn command line options (Chenxiong Qi)\n- Increase the number of workers to run the web app (Chenxiong Qi)\n- Set gunicorn log level to debug (Chenxiong Qi)\n- Test image build and container in Travis-CI (Chenxiong Qi)\n- Refactor Dockerfile (Chenxiong Qi)\n- Add missing deps to Dockerfile (Chenxiong Qi)\n- Add missing \\ to break dnf-install command properly in Dockerfile (Chenxiong Qi)\n- Expose metrics endpoint for monitoring (Chenxiong Qi)\n- Add container badge in README (Chenxiong Qi)\n- Include failed tagBuild task request in build.tag.requested message (Chenxiong Qi)\n\n0.3 (2019-02-20)\n~~~~~~~~~~~~~~~~\n\n- Refine event topics (Chenxiong Qi)\n- Fix badges in README (Chenxiong Qi)\n- Better log when module build in init state (Chenxiong Qi)\n- Use known good version of moksha-hub (Luiz Carvalho)\n- Tag -devel CG Koji build (Luiz Carvalho)\n- Handle multiple tags for single rule (Luiz Carvalho)\n- Refine code for the first match wins (Chenxiong Qi)\n- Use dedent in tests when mocking modulemd data (Luiz Carvalho)\n- Only allow a single rule match (Luiz Carvalho)\n- Make docker/install-ca.sh executable (mprahl)\n- Add missing docker/install-ca.sh (mprahl)\n- Add back the volumes for improved UX in OpenShift (mprahl)\n- Connect over http when using the rcm-tools repo since the CA isn't trusted (mprahl)\n- Fix a comment in the Jenkinsfile (mprahl)\n- Add a Jenkins job to build container images and push them to quay.io (mprahl)\n- Install rhmsg in the container image (mprahl)\n- Add the ability to install a custom CA in the container image (mprahl)\n- Set the default container user to 1001 to mimic OpenShift (mprahl)\n- Add additional DNF arguments to make the container image slightly smaller (mprahl)\n- Remove the volumes in the Dockerfile that MTS doesn't write to (mprahl)\n- Don't rely on default fedmsg configuration files in the container image (mprahl)\n- Add Dockerfile for building prod image (Chenxiong Qi)\n- Allow set None to a config (Chenxiong Qi)\n- Refine configuration section in README (Chenxiong Qi)\n- Fix consumer_topics in config (Chenxiong Qi)\n- Install MTS and fedmsg.d config files (Chenxiong Qi)\n- Fix grammar issues in README (Chenxiong Qi)\n- Support multiple authtype to login a Koji session (Chenxiong Qi)\n- Refactor fedmsg.d config (Chenxiong Qi)\n- Convert README to RST format (Chenxiong Qi)\n- Login koji session by calling koji_cli.lib.activate_session (Chenxiong Qi)\n- Config update and reset methods. Extending tests for Config (Valerij Maljulin)\n- Merge __getattr__ with __getitem__ in Config class (Valerij Maljulin)\n- Adding support for profile parameter (Valerij Maljulin)\n- Base class for configuration profiles (Valerij Maljulin)\n\n0.2 (2019-01-22)\n~~~~~~~~~~~~~~~~\n\n- Add missing files to tarball generated by sdist\n\n0.1 (2019-01-21)\n~~~~~~~~~~~~~~~~\n\n- First release that MTS is able to handle specific message to tag build.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fedora-modularity/message-tagging-service", "keywords": "messaging,module,tag,koji", "license": "GPLv2+", "maintainer": "Factory 2 Team", "maintainer_email": "message-tagging-service@fedoraproject.org", "name": "message-tagging-service", "package_url": "https://pypi.org/project/message-tagging-service/", "platform": "", "project_url": "https://pypi.org/project/message-tagging-service/", "project_urls": { "Homepage": "https://github.com/fedora-modularity/message-tagging-service" }, "release_url": "https://pypi.org/project/message-tagging-service/0.5/", "requires_dist": null, "requires_python": "", "summary": "Tag Koji build with correct tag which is triggered by message bus", "version": "0.5" }, "last_serial": 5143097, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4ab3f2d8482211b9c4f4d69dddda7ce6", "sha256": "7b8cd218307acd45a40e3c41dd73d2ec9715411e788607c8738e2c9896eb1261" }, "downloads": -1, "filename": "message-tagging-service-0.1.tar.gz", "has_sig": false, "md5_digest": "4ab3f2d8482211b9c4f4d69dddda7ce6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21389, "upload_time": "2019-01-21T13:25:57", "url": "https://files.pythonhosted.org/packages/09/34/9e100b5484ac0f3059abe8def988d6a2fd8b3e6b86a067c7ac350dedc2e8/message-tagging-service-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "74b084dd10a564baeff758d0d42944b6", "sha256": "722ae74fc346d6855f880e480146d306353836f56ae5ee5d6f90b1cb9a7b8445" }, "downloads": -1, "filename": "message-tagging-service-0.2.tar.gz", "has_sig": false, "md5_digest": "74b084dd10a564baeff758d0d42944b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21592, "upload_time": "2019-01-22T09:06:48", "url": "https://files.pythonhosted.org/packages/5b/02/c0d16b825f16b0adbb299cf7971fe6f3f89926847843f06bcd143940ef8c/message-tagging-service-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "16f98dae5344ff7b08073e2e4230e17f", "sha256": "50c61989410c91579c955a355466fb7557905bda3de5eb47743237093e768365" }, "downloads": -1, "filename": "message-tagging-service-0.3.tar.gz", "has_sig": false, "md5_digest": "16f98dae5344ff7b08073e2e4230e17f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27678, "upload_time": "2019-02-28T01:45:39", "url": "https://files.pythonhosted.org/packages/c5/5b/c0bc2b8e580b37c0b4bcf661cb06b02f7b948f71d59c2997872480850b84/message-tagging-service-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "aee98e611faab11a36512a410c547c87", "sha256": "c4e00e6d641824832fb246c6d518738944d2ed66361b79e9374e69a558421bee" }, "downloads": -1, "filename": "message-tagging-service-0.4.tar.gz", "has_sig": false, "md5_digest": "aee98e611faab11a36512a410c547c87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29625, "upload_time": "2019-04-01T03:35:52", "url": "https://files.pythonhosted.org/packages/29/d1/e7f5147bf09b9ff1b79e0061e683c337362122b9fd2b918fc62e5378f2a1/message-tagging-service-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "5813d3001c2e8582a14523dbdd08711f", "sha256": "fbf86f55376c6665368b65bf5a8990b986c67a46c9bb258435a553933ae7ac11" }, "downloads": -1, "filename": "message-tagging-service-0.4.1.tar.gz", "has_sig": false, "md5_digest": "5813d3001c2e8582a14523dbdd08711f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29765, "upload_time": "2019-04-01T14:10:12", "url": "https://files.pythonhosted.org/packages/8a/86/bfdbea70ee8d7552b75749276f154892bbfe81d562356b0e26e359825385/message-tagging-service-0.4.1.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "755415c3101f600770c504811d19a9ae", "sha256": "d40724833937e380149c7a141e9debf918fa54718d8a642d065fc072110bd056" }, "downloads": -1, "filename": "message-tagging-service-0.5.tar.gz", "has_sig": false, "md5_digest": "755415c3101f600770c504811d19a9ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30387, "upload_time": "2019-04-15T06:37:23", "url": "https://files.pythonhosted.org/packages/b7/ac/f7e268b9b158d9eac32958453c6341874c536a344d478cc443aca7b5da72/message-tagging-service-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "755415c3101f600770c504811d19a9ae", "sha256": "d40724833937e380149c7a141e9debf918fa54718d8a642d065fc072110bd056" }, "downloads": -1, "filename": "message-tagging-service-0.5.tar.gz", "has_sig": false, "md5_digest": "755415c3101f600770c504811d19a9ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30387, "upload_time": "2019-04-15T06:37:23", "url": "https://files.pythonhosted.org/packages/b7/ac/f7e268b9b158d9eac32958453c6341874c536a344d478cc443aca7b5da72/message-tagging-service-0.5.tar.gz" } ] }