{ "info": { "author": "Fr\u00e9d\u00e9ric MOHIER", "author_email": "frederic.mohier@alignak.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Programming Language :: Python", "Topic :: System :: Monitoring", "Topic :: System :: Systems Administration" ], "description": "Alignak setup utilities\n=======================\n\n*Utility functions to build checks packages setup.*\n\n\nThis package is deprecated and should not be used anymore for the installation of the alignak checks packs and modules !\n-------------\n\n\n\nRelease notes\n-------------\n\n **Version 0.2.2:**\n * allow installing from Python 2.6 (no more exit on Python > 2.6)\n * parse all files in the `ALIGNAKETC` sub-directory for Alignak variables\n\n **Version 0.1.2:**\n\n * first published version\n\n\nInstallation\n------------\n\nTo install the package from PyPI:\n::\n\n pip install alignak-setup\n\n\nPackager features\n-----------------\n\nThis module implements interesting features for the Alignak packager:\n\nFile parsing\n~~~~~~~~~~~~\n\nIf your Alignak checks package or module needs to adapt configuration files to the real system Alignak setup, you can define a sub-directory named `ALIGNAKETC`. The content of this sub-directory will be copied (during installation process...) in the real Alignak *etc* directory of the target system.\n\nIn addition, all the files in this sub-directory will be included in the `to_be_parsed_files` list. The default setup process parses this list of file to replace variables with their real value found in the current Alignak installation. See the result of the `get_alignak_cfg` function for this list of variables\n\nThe most usual need for this is to get the real Alignak configuration or log directory. If it exists, in your package, a file named *ALIGNAKETC/arbiter/modules/mod-example.cfg* and if this file contains::\n\n ## Module: example\n ## Loaded by: Broker\n\n define module {\n module_alias example\n python_name alignak_module_example\n\n # Log filename\n log_file ALIGNAKLOG/my_logs.log\n\n # Extra configuration\n cfg_file ALIGNAKETC/arbiter/modules/my_conf.cfg\n }\n\n this file will be copied to */usr/local/etc/alignak/arbiter/modules/mod-example.cfg* and its content will be parsed to replace Alignak variables. The result will be::\n\n ## Module: example\n ## Loaded by: Broker\n\n define module {\n module_alias example\n python_name alignak_module_example\n\n # Log filename\n log_file /usr/local/var/log/alignak/my_logs.log\n\n # Extra configuration\n cfg_file /usr/local/etc/alignak/arbiter/modules/my_conf.cfg\n }\n\n\n\n\nFile replacement and backup\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAs a default behaviour, the files to be installed that are already existing will not be replaced.\n\nTo change the default behaviour, you can set an environment variable: `ALIGNAK_SETUP_REPLACE`. If this variable exists, the former existing files will be replaced with the new package files.\n\nIf you set an environment variable: `ALIGNAK_SETUP_BACKUP`. The replaced files will be backed-up with an installation date timestamp. This to avoid deleting former configuration files...\n\n\nDocumentation\n-------------\n\nThis package contains utility functions to be used in the *setup.py* installation scripts of Alignak checks packages.\n\n**Note** that the default *setup.py* do not need to be changed because it implements a default behavior suitable for almost any Alignak checks package or module installer.\n\nget_alignak_cfg\n~~~~~~~~~~~~~~~\nThis function gets the locally installed Alignak directories to be used. It returns a dictionary containing the main Alignak installation information.\n::\n\n alignak_cfg = {\n 'ALIGNAKETC': '/usr/local/etc/alignak',\n 'ALIGNAKVAR': '/usr/local/var/lib/alignak',\n 'ALIGNAKBIN': '/usr/local/bin',\n 'ALIGNAKRUN': '/usr/local/var/run/alignak',\n 'ALIGNAKLOG': '/usr/local/var/log/alignak',\n 'ALIGNAKLIB': '/usr/local/var/libexec/alignak',\n 'ALIGNAKUSER': 'alignak',\n 'ALIGNAKGROUP': 'alignak'\n }\n\n\nget_files\n~~~~~~~~~\nThis function returns the list of files concerned by the installation process. The result is a tuple containing:\n\n - `data_files`, a list of the data files detected in the current package. Each item in this list is formatted as Python setup.py expects for its data_files variable (eg. local package file, target file)\n - `to_be_parsed_files`, an array of files that will be parsed for Alignak variables. Each item in this list is a tuple with target directory and file name.\n - `to_be_installed_files`, an array of files that will be installed. Each item in this list is a tuple with target directory and file name.\n\nWhen calling this function for the setup of an Alignak module, you must specify the *module* parameter when calling the function.\n\nIf the module has a sub-directory named `ALIGNAKETC`, the content of this sub-directory will be copied (during installation process...) in the real Alignak *etc* directory of the target system. All the files in this sub-directory will also be included in the `to_be_parsed_files` list.\n\nget_to_be_installed_files\n~~~~~~~~~~~~~~~~~~~~~~~~~\nThis function returns the list of the files that will be really copied during the installation process.\n\nAs a default behaviour, the files to be installed that are already existing will not be replaced. The default behaviour can be changed thanks to the environment variables: `ALIGNAK_SETUP_REPLACE` and `ALIGNAK_SETUP_BACKUP`.\n\nparse_files\n~~~~~~~~~~~\nThis function iterates the provided list of files and replace the foud Alignak variables by their real value. This is very useful to update a default script or macro with the real Alignak installation existing on the target system.\n\nBugs, issues and contributing\n-----------------------------\n\nContributions to this project are welcome and encouraged ... issues in the `project repository `_ are the common way to raise an information.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Alignak-monitoring-contrib/alignak-setup", "keywords": "alignak monitoring contribution utilities", "license": "GNU Affero General Public License, version 3", "maintainer": null, "maintainer_email": null, "name": "alignak_setup", "package_url": "https://pypi.org/project/alignak_setup/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/alignak_setup/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Alignak-monitoring-contrib/alignak-setup" }, "release_url": "https://pypi.org/project/alignak_setup/0.2.4/", "requires_dist": null, "requires_python": null, "summary": "Alignak setup tools and utilities", "version": "0.2.4" }, "last_serial": 2557883, "releases": { "0.2.3": [], "0.2.4": [ { "comment_text": "", "digests": { "md5": "2bb1f7fcb474fb616bba7c51da9fd17a", "sha256": "5333d6243f4df923986507a0ce19b8043fbbb0e75f78ab05d27bfcff7271a013" }, "downloads": -1, "filename": "alignak_setup-0.2.4.tar.gz", "has_sig": false, "md5_digest": "2bb1f7fcb474fb616bba7c51da9fd17a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8432, "upload_time": "2017-01-06T15:10:41", "url": "https://files.pythonhosted.org/packages/41/75/01bed7d2ab138403b5793fb8d88c5fb02ada23697db4209d2e092f0b9e86/alignak_setup-0.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2bb1f7fcb474fb616bba7c51da9fd17a", "sha256": "5333d6243f4df923986507a0ce19b8043fbbb0e75f78ab05d27bfcff7271a013" }, "downloads": -1, "filename": "alignak_setup-0.2.4.tar.gz", "has_sig": false, "md5_digest": "2bb1f7fcb474fb616bba7c51da9fd17a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8432, "upload_time": "2017-01-06T15:10:41", "url": "https://files.pythonhosted.org/packages/41/75/01bed7d2ab138403b5793fb8d88c5fb02ada23697db4209d2e092f0b9e86/alignak_setup-0.2.4.tar.gz" } ] }