{ "info": { "author": "genForma Corporation", "author_email": "code@genforma.com", "bugtrack_url": null, "classifiers": [], "description": "=========\nProvision\n=========\n\nIntroduction\n============\n\nProvision enables users to deploy customized nodes, either via shell\ncommands, or as a Python library. Building on Apache Libcloud, which\nprovides a common API for various providers, Provision allows users to\nspecify, for a new node, which files get installed, which scripts get\nrun, and which public keys have access, in a flexible yet repeatable\nway.\n\nIn addition to basic configuration decisions (such as disk image,\nsize, provider, location, and name), Provision supports four\nconceptually distinct components that determine how a node gets\ndeployed.\n\n#. Public keys that grant their respective private keys root access on\n the deployed node.\n\n#. Files that get copied into their specified location on the node.\n\n#. Script templates supporting run time variable substitution that get\n run on the node.\n\n#. Minimal Python configuration code for setting secret keys, creating\n named bundles of scripts and files for specific functionality, etc.\n\nProvision applications are themselves automatically configured from\nthe provision/defaults directory and optional, additional\nconfiguration directories which themselves contain an __init__.py\nfile, and possible subdirectories of files, scripts and public keys.\n\nThese additional configuration directories can be used to change the\ndefault configuration parameters in any way, and are typically used to\nset secret API keys, access keys, and define site-specific\nfunctionality bundles.\n\nA Bundle is a named collection of files and scripts that will get\ninstalled and run on the deployed node. You can specify a default set\nof Bundle names that will get installed for every new node, as well as\nspecifying which additional bundles to install via command line or\nlibrary interface.\n\n\nDependencies\n============\n\nSee setup.py for details on version requirements. The following\nmodules will be automatically installed if not present.\n\n* apache-libcloud\n* paramiko\n* pycrypto\n* argparse\n* cloudfiles (optional)\n\n\nInstallation\n============\n\nProvision uses distribute.setuptools for installation and test running.\n\nTo install, cd to top level directory and run::\n\n $ python setup.py install\n\nTo run tests, cd to top level directory and run::\n\n $ python setup.py test\n\n\nUsage\n=====\n\nShell Commands\n--------------\n\nThe following shell commands are available after installation:\n\n* deploy-node\n Typical usage: $ deploy-node -c ~/secrets_dir -b dev\n \n* list-nodes\n Typical usage: $ list-nodes -c ~/secrets_dir\n \n* destroy-node\n Typical usage: $ destroy-node -c ~/secrets_dir nodename\n\nSeveral command line arguments are common to all three commands:\n\n* -c --config-paths\n Specify path to a configuration directory. Can be used multiple times.\n\n* -p --provider\n Specify provider (defaults to config.DEFAULT_PROVIDER)\n\n* -u --userid\n Specify user id (defaults to config.DEFAULT_USERID)\n\n* -k --secret_key\n Specify secret key (defaults to config.DEFAULT_SECRET_KEY)\n\nOther command line arguments are specific to individual commands\n\ndeploy-node\n^^^^^^^^^^^\n\n* -b --bundles\n Specify names of bundles to install. Can be used multiple times.\n\n* -d --description-file\n If specified, output node description in json format to file.\n\n* -i --image\n Specify image name (defaults to config.DEFAULT_IMAGE_NAME)\n\n* -l --location\n Specify location id (defaults to config.DEFAULT_LOCATION_ID)\n\n* -n --name\n Generate randomized name based on prefix if name not specified.\n\n* -s --size\n Specify node size (defaults to config.DEFAULT_SIZE_ID)\n\n* -t --subvars\n Key=value pairs of template substitution variables. Can be used multiple times.\n\n* -x --prefix\n Use prefix to generate randomized name (defaults to config.DEFAULT_NAME_PREFIX)\n\ndestroy-node\n^^^^^^^^^^^^\n\n* name\n The name of the node to destroy\n\n* -t --testresults\n Only destroy node if all tests passed in specified junit-style XML formatted file\n\nConfiguration Directory Structure\n---------------------------------\n\nProvision is not particulary useful out of the box. At the minimum,\nyou will need to specify which provider, user id, and secret key to\nuse to access your account. This can all be done on the command line,\nbut it's can be simpler to create a local configuration directory and\neither specify its location on the command line, or put it in a\ndefault location that provision will try to load on startup.\n\nAside from authentication, a configuration directory can be use to\ndefine bundles of associated files and scripts that will get run when\na node is deployed. It can also read and write any variable defined\nin the provision.config module, which gives great flexibility in\ndetermining how the program will act by default.\n\nProvision configuration directories all share the same structure. At\nthe top level is a __init__.py file, which gets imported and its\ninit() function executed during configuration time.\n\nAlso at the top level are three directories called \"pubkeys\",\n\"scripts\", and \"files\". Provision uses libcloud, which uses public\nkey cryptography by default to communicate with the new node. During\na deploy, it will by default look for the file ~/.ssh/id_rsa.pub and\ninsert it into the node's /root/.ssh/authorized_keys file. If it\nexists and contains files, provision will also include those public\nkeys in the new node's authorized_keys.\n\nFrom the other two directories, files and scripts get loaded into\nmemory, and are mapped into bundles in __init__.py, which can then be\nspecified in the command line using -b bundle-name, or added to\nDEFAULT_BUNDLES, to get installed for every deploy.\n\nIt is sometimes useful to be able to substitute variables into scripts\nat runtime. This can be done by using the --subvars command line\noption with script templating.\n\nEmbed one of the following lines in a script to activate variable\nsubstitution::\n\n # provision-template-type: format-string\n or\n # provision-template-type: template-string\n\nSee `format string documentation\n`_\nand `template strings documentation\n`_ for\nthe respective syntaxes. Also see test cases in\ntest_script_templates.py.\n\nThe __init__.py file can also be used to override default settings in\nthe provision.config module, which gets passed into init() as a\nparameter.\n\nThis is an example of an __init__.py file::\n\n def init(config):\n config.DEFAULT_PROVIDER = 'rackspace'\n config.DEFAULT_USERID = 'user1'\n config.DEFAULT_SECRET_KEY = 'somehardtoguesssecret'\n\n config.DEFAULT_BOOTSTRAP_BUNDLES.extend(['tz', 'snmpd']\n config.DEFAULT_BUNDLES.extend(['security'])\n\n config.add_bundle('dev', ['emacs.sh', 'screen.sh'],\n ['/root/.emacs.d/init.el', '/root/.screenrc'])\n\n\nFor this example, the files directory contains init.el, which will get\ninstalled at /root/emacs.d/init.el in the deployed node, and .screenrc\nwhich gets installed and /root/.screenrc.\n\nSimilarly, the scripts directory contains emacs.sh and screen.sh,\nwhich get executed on the deployed node after it boots for the first\ntime.\n\n\nDefault Configuration Directory Locations\n-----------------------------------------\n\nWhen provision.config is first imported, it will try to load\nconfiguration directory in ~/.provision/secrets. If it cannot locate\none, it will then try $VIRTUAL_ENV/provision_secrets.", "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/genforma/provision", "keywords": null, "license": "Apache V2.0", "maintainer": null, "maintainer_email": null, "name": "provision", "package_url": "https://pypi.org/project/provision/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/provision/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/genforma/provision" }, "release_url": "https://pypi.org/project/provision/0.9.2/", "requires_dist": null, "requires_python": null, "summary": "Create highly customized servers in the cloud", "version": "0.9.2" }, "last_serial": 796749, "releases": { "0.9.1": [ { "comment_text": "", "digests": { "md5": "99b2ce578749f5fef6dd18ce11870904", "sha256": "c1384fc51548afff8323acc90c68ab75ea0ea937cc38bd70cfbe01409f06e8e6" }, "downloads": -1, "filename": "provision-0.9.1.tar.gz", "has_sig": false, "md5_digest": "99b2ce578749f5fef6dd18ce11870904", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26971, "upload_time": "2011-07-28T01:11:59", "url": "https://files.pythonhosted.org/packages/8e/e6/d89d9f4d41f079b36aa445597e7e161a0dd8a938dd06f2590a2701d3025a/provision-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "4c3bb6e9fb68a1531db9551b078929d5", "sha256": "319a4faada941ecca96d600b74e62b8dff2c80899094023a2097be9fdec3f4cc" }, "downloads": -1, "filename": "provision-0.9.2.tar.gz", "has_sig": false, "md5_digest": "4c3bb6e9fb68a1531db9551b078929d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28218, "upload_time": "2011-08-25T04:32:21", "url": "https://files.pythonhosted.org/packages/92/d3/f8173bcdd411466da6da934b6f2613c19a1214389b1fce1c426ad8370210/provision-0.9.2.tar.gz" } ], "0.9.3-dev": [ { "comment_text": "", "digests": { "md5": "e5fd42687cd0412e89a20763b9d6c117", "sha256": "61628d199e19fa6f43cea761341b17f13d74686cf0584cbf6ddb32b2acdb1fbd" }, "downloads": -1, "filename": "provision-0.9.3-dev.tar.gz", "has_sig": false, "md5_digest": "e5fd42687cd0412e89a20763b9d6c117", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31459, "upload_time": "2012-05-01T06:33:52", "url": "https://files.pythonhosted.org/packages/fb/f9/915b5f8350f251d4c4ae91c0cd649ceefb01ecea981b90ff4178dc7f2db8/provision-0.9.3-dev.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4c3bb6e9fb68a1531db9551b078929d5", "sha256": "319a4faada941ecca96d600b74e62b8dff2c80899094023a2097be9fdec3f4cc" }, "downloads": -1, "filename": "provision-0.9.2.tar.gz", "has_sig": false, "md5_digest": "4c3bb6e9fb68a1531db9551b078929d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28218, "upload_time": "2011-08-25T04:32:21", "url": "https://files.pythonhosted.org/packages/92/d3/f8173bcdd411466da6da934b6f2613c19a1214389b1fce1c426ad8370210/provision-0.9.2.tar.gz" } ] }