This repository has been archived by the owner on Nov 29, 2018. It is now read-only.
/
params.json
1 lines (1 loc) · 5 KB
/
params.json
1
{"note":"Don't delete this file! It's used internally to help with page regeneration.","tagline":"Pythonic server orchestrating based on fabric / cuisine","name":"Revolver","google":"","body":"## About\r\n\r\n*TL;DR Wrapper for [Fabric][] and [Cuisine][] to achieve a clean, simple and\r\nfun to use interface amplified with new high-level functions to quickly \r\norchestrate your servers.*\r\n\r\n***\r\n\r\nLet me introduce you two other awesome tools / libraries, before I try to \r\nexplain the gap [Revolver][] tries to fill. First there is [Fabric][], a very \r\nsmall and low-level wrapper around SSH written in [Python][]. It allows you to \r\nstore a small *fabfile.py* next to your project, where you can define all the \r\nsteps required to automate something via SSH on one to multiple servers (e.g. \r\ninstall and configure your software stack, deploy new versions, ...). \r\n\r\nBut [Fabric][] is *really* low-level and there is a lack of fun. That's the \r\npoint where [Cuisine][] joins the ring, because it's a collection of useful \r\nmethods which really increases your amount of fun and pleasure. Unfortunately \r\nwith some small, but really annoying, differences that are sometimes even \r\nincompatible. Some examples? \r\n\r\n # Fabric\r\n run('apt-get install XYZ', use_sudo=True)\r\n\r\n # Cuisine\r\n with mode_sudo():\r\n run('apt-get install XYZ')\r\n\r\nI really enjoy the contextmanager for running a block as superuser! But \r\n[Cuisine][] didn't patch all commands provided by [Fabric][] (`run()` in the \r\nexample is patched but other commands, like `put()`, aren't and you'll run into \r\nstrange / annoying errors). \r\n\r\nThere is also a different scheme of naming things. [Fabric][] tends to use short \r\nfunction names inside clean namespaces (e.g `fabric.contrib.files.append`). \r\nBut the API of [Cuisine][], on the other hand, follows `<object>_<operation>`\r\n(e.g. `cuisine.file_append`). \r\n\r\nBoth ways are reasonable and I don't wanna blame someone! Don't get me wrong!\r\nI simply want a \"cleaner\" or \"more compatible\" API which I can extend with my\r\nown new functions and keep the level of fun and pleasure high (at least for\r\nme). And the last sentence is a short / good description of what [Revolver][] \r\nis about. Just a \"unification\" wrapper for [Fabric][] and [Cuisine][] with some \r\nnew batteries included.\r\n\r\n## Getting started\r\n\r\nThis project is currently not published to the official python package \r\nrepository but it should be easy to get everything running:\r\n\r\n sudo easy_install https://github.com/michaelcontento/revolver/tarball/master\r\n\r\nOr use the new alternate installer [Pip][]:\r\n\r\n sudo pip install https://github.com/michaelcontento/revolver/tarball/master#egg=revolver\r\n\r\nNow [Revolver][] is installed and ready to use. But I would suggest to \r\nfirst read the documentation from [Fabric][] to get used with the whole \r\nworkflow / principle. After that it should be easy for you to dig into the \r\ncode, discover everything and write your first own `fabfile.py`. \r\n\r\n## Example\r\n\r\nBut for those who want to see fast results, here is a small example \r\n`fabfile.py`.\r\n\r\n # -*- coding: utf-8 -*-\r\n\r\n from revolver import user\r\n from revolver import contextmanager as ctx\r\n from revolver.project import Deployinator\r\n from revolver.core import env\r\n from revolver.tool import php\r\n from revolver.tool import ruby\r\n\r\n env.hosts = ['user@example.com']\r\n\r\n def setup():\r\n php.install(version='5.3.9')\r\n ruby.ensure(version='1.9.2-p290')\r\n user.ensure('own-user', home='/var/own-user')\r\n\r\n def deploy():\r\n with ctx.sudo(username='own-user'):\r\n dp = Deployinator()\r\n dp.run()\r\n\r\n## Contributing\r\n\r\n* Fork this project\r\n* Make your changes (new features, bugfixes, examples, ...)\r\n* Write tests for it \r\n* Be sure that *all other* tests are still green\r\n* Send me a pull request\r\n\r\nToo complicated? You just wanna mess around for yourself? Thats fine! Just \r\nskip everything after step two :)\r\n\r\n## License\r\n\r\n Copyright 2009-2012 Michael Contento <michaelcontento@gmail.com>\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n\r\n [Pip]: http://www.pip-installer.org\r\n [Cuisine]: https://github.com/sebastien/cuisine\r\n [Fabric]: https://github.com/fabric/fabric\r\n [Python]: http://python.org\r\n [Revolver]: https://github.com/michaelcontento/revolver"}