{ "info": { "author": "John Carr", "author_email": "john.carr@isotoma.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX" ], "description": "Plone on Heroku\n===============\n\n** WARNING ** Currently Plone contains syntax errors (skins aren't valid\npython, why are we calling then .py!!) and heroku really doesn't like that.\nCurrently you can't deploy again after the first successful Plone\ndeployment because of it. I have reported this.\n\n\nYou will require\n----------------\n\n * The heroku tools installed locally and working\n * A verified heroku account\n * A willingness to spend $15 a month for 20GB of Postgres (Plone doesnt\n fit in 5mb).\n\n\nStarting a project\n------------------\n\nWe need to be able to install Plone in a virtualenv and do without any of the\nenvironment building capabilities of buildout. On top of that, the runtime\nenvironment is temporary, so we cant build it manually after the initial push.\n\nIn your requirements.txt::\n\n isotoma.depends.zope2_13_8\n isotoma.depends.plone4_1\n isotoma.plone.heroku\n\nThe first 2 eggs are virtual packages that install 200+ packages in your\nvirtualenv. These are needed because we need to pin the versions of Plone that\nare to be used.\n\nThe third egg provides ``bin/plone`` and ``bin/migrate``. These helpers\nwill dynamically provision their environment as it is required and instance\na site / run migrations.\n\nWe'll be using RelStorage to get cheap persistent storage. We have to use 1.4.2\nover the 1.5.x series in order to avoid the plpgsql requirement it would\nintroduce.\n\nAt the time of writing it *appears* that only Django Python apps get a database\nautomatically. You can get one by adding a folder with an empty settings.py::\n\n django_bait/\n settings.py\n\nYou will need a Procfile so heroku knows how to run a zope instance::\n\n web: ./bin/plone -p $PORT\n\n\nDoing a local build\n-------------------\n\nBuild your virtualenv::\n\n virtualenv .\n ./bin/pip install -r requirements.txt\n\nYou can start a plone instance like this::\n\n ./bin/plone\n\nThat will get you a plone instance running on port 8080. By default it won't\nbe using any data store.\n\n\nAdding your product\n-------------------\n\nYou can quickly create a new product with ZopeSkel::\n\n source bin/activate\n mkdir src && cd src\n pip install zopeskel\n zopeskel plone my.app\n\nThen follow the prompts. Make sure to answer yes to the GenericSetup question.\n\nYou can add your own custom eggs to requirements.txt::\n\n -e src/myapp.app\n\nThe instructions tell you to use ``file:`` prefixes. They lie. Don't.\n\nYour ZCML should be found by z3c.autoinclude.\n\nThen you should be able to install your products throught the ZMI or by using the\nmigrate script described below.\n\n\nDeploying to heroku\n-------------------\n\nMake sure all your changes are committed to your Git repo. Then::\n\n ~/bin/heroku create --stack cedar\n git push heroku master\n\nThen wait. It should just work, if it doesn't its probably a timeout. It takes\na long time to deploy 200+ eggs and heroku probably thinks your deployment has gone\nwrong and times out.\n\nSo edit your requirements::\n\n isotoma.depends.zope2_13_8\n # isotoma.depends.plone4_1\n isotoma.plone.heroku\n\nCommit and push to heroku.\n\nThat will build Zope without Plone, about half of the eggs that needed to be built.\nThen you can uncomment the Plone dependency egg and push again to finish off.\n\nYou should now have a working Plonesite!\n\n\nRe-rooting your portal\n----------------------\n\nBy default your actual site won't be at ``/`` it will be at ``/Plone``. We can fix\nthat with some old school Zope magic - note that the ``migrate`` command can set\nthis up for you automatically.\n\n * In the ZMI, in ``/Plone`` create a SiteRoot object. Default settings are fine.\n\n * In the ZMI, in ``/`` create a DTMLMethod containing::\n\n \n \n \n \n \n \n \n \n\n * In the ZMI, at ``/`` create an AccessRule and point it at the DTMLMethod we\n just created.\n\nNow any requests for ``/foo`` will be handled by ``/Plone/foo`` and any requests\nfor ``/zmi/manage`` will be handled by ``/manage``. Success.\n\n\nThe migrate tool\n----------------\n\nThe migrate script uses the plone setup features of ``isotoma.recipe.plonetools`` to\nautomate setup of your site. It can apply profiles, install products, set properties\nand even call random mutators.\n\nAdd a migrate.cfg to the root of your project::\n\n [main]\n # The id of the Plone Site that is created. Default is Plone.\n site-id = Plone\n\n # The admin user that was created by mkzopeinstance - for us it will almost\n # certainly be admin. Default is admin.\n admin-user = admin\n\n # Whether or not to apply the SiteRoot/AccessRule policy described in the previous\n # section. Default is False.\n rootify = True\n\n # List of products to install on the initial migrate (when ``/Plone`` is created)\n products-initial =\n Products.foo\n\n # List of products to install (or reinstall) every time migrate is run\n products =\n Products.LinguagePlone\n\n # List of GenericSetup profiles to apply the first time migrate is run (when\n # ``/Plone`` is created)\n profiles-initial =\n myapp.policy:initial\n\n # List of GenericSetup profiles to apply every time ``bin/migrate`` is run\n profiles =\n myapp.policy:default\n\nThat one doesn't make any sense, but does show what you can do. To run it locally::\n\n ./bin/migrate -c migrate.cfg\n\nAnd to run against your heroku app::\n\n ~/bin/heroku run ./bin/migrate -c migrate.cfg\n\nThe default is to look for a migrate.cfg in the root of the branch you you don't\nhave to tell it that - you can just ``./bin/migrate``.\n\n\nMaintaining your app\n--------------------\n\nYou can look at your looks with the built in heroku log tool::\n\n ./bin/heroku logs\n\nYou can get an interpreter pointed at your database with the debug command::\n\n ./bin/heroku run ./bin/debug\n\nYou can run a script in your git repo using the run command::\n\n ./bin/heroku run ./bin/run scripts/myscript.py\n\n\nisotoma.plone.heroku\n====================\n\n0.0.0 (2011-09-29)\n------------------\n\n- Initial version", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "zope plone virtualenv foreman", "license": "Apache Software License", "maintainer": null, "maintainer_email": null, "name": "isotoma.plone.heroku", "package_url": "https://pypi.org/project/isotoma.plone.heroku/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/isotoma.plone.heroku/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/isotoma.plone.heroku/0.0.0/", "requires_dist": null, "requires_python": null, "summary": "Tooling for running Plone on heroku in a virtualenv", "version": "0.0.0" }, "last_serial": 793473, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "20db6974de1292e08d5ecab7285b820b", "sha256": "5060d09429557781ef590d3d455eaec57b3da9d4ecf06fbb197bb8b1f2177841" }, "downloads": -1, "filename": "isotoma.plone.heroku-0.0.0.tar.gz", "has_sig": false, "md5_digest": "20db6974de1292e08d5ecab7285b820b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10422, "upload_time": "2011-09-30T00:33:36", "url": "https://files.pythonhosted.org/packages/0f/1c/ed5537e977587b740816e3d54cdce8fbeb7388039b517d9f7e636ba0d65d/isotoma.plone.heroku-0.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "20db6974de1292e08d5ecab7285b820b", "sha256": "5060d09429557781ef590d3d455eaec57b3da9d4ecf06fbb197bb8b1f2177841" }, "downloads": -1, "filename": "isotoma.plone.heroku-0.0.0.tar.gz", "has_sig": false, "md5_digest": "20db6974de1292e08d5ecab7285b820b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10422, "upload_time": "2011-09-30T00:33:36", "url": "https://files.pythonhosted.org/packages/0f/1c/ed5537e977587b740816e3d54cdce8fbeb7388039b517d9f7e636ba0d65d/isotoma.plone.heroku-0.0.0.tar.gz" } ] }