{ "info": { "author": "Propertyshelf, Inc.", "author_email": "development@propertyshelf.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python" ], "description": "propertyshelf.fabfile.plone\n===========================\n\nThis project contains a bunch of fabric commands we use at\n`Propertyshelf`_ to deploy and maintain our Plone CMS systems.\n\n\nRequirements\n------------\n\n`propertyshelf.fabfile.plone` currently uses `knife`_ to communicate with\nRackspace servers. Please make sure `knife` is installed and configured\nsuccessfully on your system.\n\n\nInstall\n-------\n\nYou can install `propertyshelf.fabfile.plone` with PIP::\n\n pip install propertyshelf.fabfile.plone\n\nAll required dependencies will be installed automatically.\n\n\nUsage\n-----\n\nFirst, we need a working `knife.rb` file to interact with our Chef server and\nthe Rackspace cloud eco system. Below is an example `knife.rb` file that gets\nall its required info from environment variables. This way you can add this\n`knife.rb` file inside a `.chef` directory to your project and savely put it\nunder version control::\n\n # Logging.\n log_level :info\n log_location STDOUT\n\n # Chef server configuration.\n chef_server_url \"#{ENV['KNIFE_CHEF_SERVER']}\"\n client_key \"#{ENV['KNIFE_CLIENT_KEY']}\"\n node_name \"#{ENV['KNIFE_NODE_NAME']}\"\n validation_client_name \"#{ENV['KNIFE_VALIDATION_CLIENT_NAME']}\"\n validation_key \"#{ENV['KNIFE_VALIDATION_CLIENT_KEY']}\"\n encrypted_data_bag_secret \"#{ENV['ENCRYPTED_DATA_BAG_SECRET_FILE']}\"\n\n # Rackspace API configuration.\n knife[:rackspace_api_key] = \"#{ENV['RACKSPACE_API_KEY']}\"\n knife[:rackspace_api_username] = \"#{ENV['RACKSPACE_USERNAME']}\"\n knife[:rackspace_endpoint] = \"#{ENV['RACKSPACE_ENDPOINT']}\"\n knife[:rackspace_version] = \"#{ENV['RACKSPACE_VERSION']}\"\n\nNext, we need a `fabfile.py`. All we need to do is to import\n`propertyshelf.fabfile.plone` to make the fabric commands available and the\navailable environments we can work with from `propertyshelf.fabfile.common`.::\n\n # -*- coding: utf-8 -*-\n \"\"\"Sample application deployment script.\"\"\"\n\n from fabric import api\n\n from propertyshelf.fabfile.common.environments import *\n from propertyshelf.fabfile.plone import *\n\n\n # Definition of role names to be used.\n api.env.role_base = 'plone_01'\n api.env.role_database = '%s_database' % api.env.role_base\n api.env.role_frontend = '%s_frontend' % api.env.role_base\n api.env.role_worker = '%s_worker' % api.env.role_base\n\n # Definition of used Rackspace flavors (server sized) for our servers.\n api.env.flavor_database = '4'\n api.env.flavor_frontend = '2'\n api.env.flavor_worker = '2'\n\n # Definition of node names to be used.\n BASE_NODENAME = 'plone-01'\n api.env.nodename_database = '%s-database' % BASE_NODENAME\n api.env.nodename_frontend = '%s-frontend' % BASE_NODENAME\n api.env.nodename_worker = '%s-worker' % BASE_NODENAME\n api.env.nodename_development = BASE_NODENAME\n\n # The Rackspace server image we use. This is a Debian 6.0.6.\n api.env.os_image = '695ca76e-fc0d-4e36-82e0-8ed66480a999'\n\n api.env.domain = 'example.com'\n api.env.vhost_databag = 'virtual_hosts_plone_01'\n api.env.plone_version = '4.3.2'\n\nYou can now use fabric to manage your Plone application::\n\n $ fab -l\n Sample application deployment script.\n\n Available commands:\n\n development Work locally with vagrant.\n production Work with the production environment.\n staging Work with the staging environment.\n bootstrap.database Bootstrap a new standalone database server.\n bootstrap.frontend Bootstrap a new standalone frontend server.\n bootstrap.plone_m Bootstrap a new 'Plone M' bundle.\n bootstrap.staging Bootstrap a staging system.\n bootstrap.worker Bootstrap a new standalone application worker.\n client.rebuild Rebuild the application using buildout.\n client.remove Remove an existing MLS application client.\n client.restart Restart the application client component.\n client.update Update the client packages.\n database.download_blobs Download blob part of Zope's data from the server.\n database.download_data Download the database files from the server.\n database.download_zodb Download ZODB part of Zope's data from the server.\n database.restart Restart the database component.\n database.upload_blob Upload blob part of Zope's data to the server.\n database.upload_data Upload the database files to the server.\n database.upload_zodb Upload ZODB part of Zope's data to the server.\n frontend.restart Restart the frontend components.\n frontend.restart_haproxy Restart the HA-Proxy load balancer component.\n frontend.restart_nginx Restart the NginX web server component.\n frontend.restart_varnish Restart the Varnish caching proxy component.\n roles.check Check if the required roles are available.\n roles.create_missing Create missing roles on the chef server.\n roles.list_nodes List all available nodes with given roles.\n\nBefore we can start it is a good idea to check if all roles we defined are\navailable on the chef server::\n\n $ fab roles.check\n Role plone_01 NOT available.\n Role plone_01_database NOT available.\n Role plone_01_frontend NOT available.\n Role plone_01_worker NOT available.\n\n Done.\n\nTo create the missing roles based on our configuration, we simply have to do::\n\n $ fab roles.create_missing\n Created role plone_01\n Created role plone_01_database\n Created role plone_01_frontend\n Created role plone_01_worker\n\n Done.\n\nYou can now manage the single components::\n\n $ fab production frontend.restart\n [x.x.x.x] Executing task 'frontend.restart'\n [x.x.x.x] sudo: /etc/init.d/haproxy restart\n [x.x.x.x] out: sudo password:\n\n [x.x.x.x] out: Restarting haproxy: haproxy.\n [x.x.x.x] out:\n\n [x.x.x.x] sudo: /etc/init.d/varnish restart\n [x.x.x.x] out: sudo password:\n [x.x.x.x] out: Stopping HTTP accelerator: varnishd.\n [x.x.x.x] out: Starting HTTP accelerator: varnishd.\n [x.x.x.x] out:\n\n [x.x.x.x] sudo: /etc/init.d/nginx restart\n [x.x.x.x] out: sudo password:\n [x.x.x.x] out: Restarting nginx: nginx.\n [x.x.x.x] out:\n\n\n Done.\n Disconnecting from x.x.x.x... done.\n\nWe also support download of the database files for local testing::\n\n $ fab production database.download_data\n [x.x.x.x] Executing task 'database.download_data'\n This will overwrite your local Data.fs. Are you sure you want to continue? [Y/n]\n [localhost] local: mkdir -p var/filestorage\n [localhost] local: mv var/filestorage/Data.fs var/filestorage/Data.fs.bak\n [x.x.x.x] out: sudo password:\n [x.x.x.x] sudo: rsync -a var/filestorage/Data.fs /tmp/Data.fs\n [x.x.x.x] out: sudo password:\n [x.x.x.x] out:\n [x.x.x.x] download: /Volumes/Work/Propertyshelf/Plone/Provisioning/var/filestorage/Data.fs <- /tmp/Data.fs\n This will overwrite your local blob files. Are you sure you want to continue? [Y/n]\n [localhost] local: rm -rf var/blobstorage_bak\n [localhost] local: mv var/blobstorage var/blobstorage_bak\n [x.x.x.x] sudo: rsync -a ./var/blobstorage /tmp/\n [x.x.x.x] out: sudo password:\n [x.x.x.x] out:\n [x.x.x.x] sudo: tar czf blobstorage.tgz blobstorage\n [x.x.x.x] out: sudo password:\n [x.x.x.x] out:\n [x.x.x.x] download: /Volumes/Work/Propertyshelf/Plone/Provisioning/var/blobstorage.tgz <- /tmp/blobstorage.tgz\n\n Warning: Local file /Volumes/Work/Propertyshelf/Plone/Provisioning/var/blobstorage.tgz already exists and is being overwritten.\n\n [localhost] local: tar xzf blobstorage.tgz\n\n Done.\n Disconnecting from x.x.x.x... done.\n\n.. _`Propertyshelf`: http://propertyshelf.com\n.. _`knife`: http://docs.opscode.com/knife.html\n\nContributors\n============\n\nThomas Massmann, Author\n\nChangelog\n=========\n\n0.1 (2013-12-20)\n----------------\n\n- Added basic deployment and management commands for Plone applications.", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/propertyshelf.fabfile.plone", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/propertyshelf/propertyshelf.fabfile.plone", "keywords": "fabric python plone deployment", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "propertyshelf.fabfile.plone", "package_url": "https://pypi.org/project/propertyshelf.fabfile.plone/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/propertyshelf.fabfile.plone/", "project_urls": { "Download": "http://pypi.python.org/pypi/propertyshelf.fabfile.plone", "Homepage": "https://github.com/propertyshelf/propertyshelf.fabfile.plone" }, "release_url": "https://pypi.org/project/propertyshelf.fabfile.plone/0.1/", "requires_dist": null, "requires_python": null, "summary": "Deploy and manage Propertyshelf Plone applications using Fabric.", "version": "0.1" }, "last_serial": 1832871, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f30c9874d0c9a494800c1a0de650a224", "sha256": "ffb4e47a85e31e878c27e93cd14f224f4507160e5ac9272b46dea36784c4fc9e" }, "downloads": -1, "filename": "propertyshelf.fabfile.plone-0.1.tar.gz", "has_sig": false, "md5_digest": "f30c9874d0c9a494800c1a0de650a224", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9698, "upload_time": "2013-12-20T14:01:29", "url": "https://files.pythonhosted.org/packages/b6/60/6eb1d1dbbface6f466edfdd3d7de4f8d188678de30cbd11b26418e2f850f/propertyshelf.fabfile.plone-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f30c9874d0c9a494800c1a0de650a224", "sha256": "ffb4e47a85e31e878c27e93cd14f224f4507160e5ac9272b46dea36784c4fc9e" }, "downloads": -1, "filename": "propertyshelf.fabfile.plone-0.1.tar.gz", "has_sig": false, "md5_digest": "f30c9874d0c9a494800c1a0de650a224", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9698, "upload_time": "2013-12-20T14:01:29", "url": "https://files.pythonhosted.org/packages/b6/60/6eb1d1dbbface6f466edfdd3d7de4f8d188678de30cbd11b26418e2f850f/propertyshelf.fabfile.plone-0.1.tar.gz" } ] }