New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External fabric utility library #461
Comments
|
There's Ronan Amicel's library at https://github.com/ronnix/fabtools Recently discussed on Fab-user mailing list. |
|
Added fabtools to the list. |
|
I've been putting my Fabric utilities in https://github.com/ddbeck/bolt (docs). |
|
Bolt added |
|
yet another one: |
|
Can also include, |
|
Don't exactly fit, but they use Fabric: |
|
Updated the list with the additional mentions. |
|
Here are my initial thoughts from reviewing these; they're colored a bit by my current needs at work but I'm trying to keep a general eye too. Specifically, my goal is to have a contrib/external contrib lib with very platform/intent agnostic primitives like Chef's "Resources". Install package, create/tweak file, upload rendered template, etc. Things like "install an Apache/Gunicorn/Celery stack" are IMO better left out of any "blessed" library, probably instead on a recipe/snippet site a la #99. I'm doing the usual -1/-0/+0/+1 voting on these. I will probably update/edit this comment as I go, apologies if any responses become outdated.
So the +1'd items IMHO deserving of further scrutiny:
|
|
Due to popular demand, the Chef-like layer in fabtools has been renamed "require", deprecating the original "icanhaz" name... :) |
|
Fantastic, Fabtools has some really good stuff in it. I am glad it will have a more official looking API, I mean, we aren't Ruby hackers... :) |
|
Nothing wrong with Ruby per se, of course. I love Ruby*, I just find the average Rubyist's overt emphasis on zany bullshit to be off-putting at times. LOL GUYS LOOK HOW WACKY WE ARE !!!!1!11!!one ZOMG WE ARE ARTISTES On track: I'm going to start doing Actual Crap at work this week which means I'll be taking some of these out for a spin. I'm still not sure if I'm going to start some new repo that liberally grabs bits n pieces from all over, or take one of them and use that as a base or what. Also not sure what @wraithan had in mind on his side, I'm just being motivated by pragmatism over here. * seriously, I actually find it a moderate amount more "fun"/speedy-to-dev in than even Python. If the community were a little more grown up (and actually maintained any software past its OOH SHINY period) I'd probably have jumped ship instead of remaining a polyglot. |
|
Wanna make a repo for this and start hacking on it. So we need a name. Oh boy! I love/hate naming shit. A brainstorm, focusing on "stuff you use fabric to create" (versus the "stuff used to make fabric" ideas I had for what became boringly-but-appropriately
Alternately, "fabric patterns" or "types of fabric", such as the already-taken
My personal faves: |
|
tartan but I like brocade too since it'd be amusing to just put how bro'ey we
On Thu, Dec 15, 2011 at 1:26 PM, Jeff Forcier
|
|
@tswicegood mentioned he feels a meta-package importing a number of other independent packages works best. I assume because it would make it easier to target changes (i.e. it's an extension of the same reason this package is intended to be distinct from Fabric proper.) I disagree, mostly on the grounds that that would create a really big headache/overhead re: project maintenance, compatibility, release schedules, etc; and that such a headache would outweigh the benefits of being able to release patches for the individual components. I also am not sure that it would be easy to decide how to split things up. Will wait for Travis' actual comment though. |
|
FYI, I've said this one Twitter and I'll say it here. Unless this package is a meta package for installing specific other packages, I'm -1 on this. I shouldn't be forced install pyyaml, jinja2, django, or anything else just to get at one part of this that adds a few simple tasks for restarting Nginx on remote machines. Going the meta package route means that those who are ok installing the kitchen sink can easily do that, but those who want more granular control have that capability. Without that, you either install Fabric has a lot of external dependencies already, creating a secondary package for extra tasks that follows that pattern is wrong and harmful toward the community as a whole. Developers new to Python are going to follow the patterns they see successful projects using. Django, Fabric, and company are promoting the idea that you should have a large package that installs everything. Or at least several larger packages instead of dozens of smaller ones. Regarding actual headache involved with releases, that would be minimal. All of the packages are developed independently, and the As for figuring out what gets in, it's simple: pull requests on the main file that change the |
|
@tswicegood: my intent was never for the additional dependencies to be required; they should be like how they are in Fabric, where attempts to import are wrapped in Let me know if something in the plans above contradicts this, I might be forgetting something. But right now the Jinja and Django integration in So somebody wanting to use a single simple function in this package would On the general "large package vs smaller packages" front, I acknowledge your point for how the smaller-packages-plus-meta-package setup could work. However I'm still unconvinced that the additional overhead and complexity is worth it:
I also think that we could always revisit this decision later if it does get "too" large or unwieldy to develop/release. It feels easier to go in that direction, than to start out with the complex option and try to consolidate if my fears became reality. Travis, I think it would help if you articulated exactly what is wrong with the single-package approach, aside from the dependencies issue which I addressed up top. That sounded like your main gripe but I suspect it may be more general? If anybody else wants to pitch in, please do. |
|
My 2c as an end user: I'd rather have something batteries-included. If it includes a little extra crap, so be it. I'd rather know it is going to just work. |
|
Discussion ended up back in IRC again, whoops. @tswicegood's main points:
My rebuttal:
Travis' personal interest in this kind of project appears to be largely aligned with Fabric as a local task runner, which is where many more of the local Python dependencies come into play. I think that would work great as another third-party library, a sibling to Patchwork. So I am overriding his complaint for now, and totally open to refactoring the project at a later date if the dependencies/versioning problem becomes obviously painful. I've registered Then the hacking begins! |
|
I was too busy earlier to take part in the discussion, but I am also +1 on a non-metapackage. I don't care about having to install a few dependencies. The significant projects where I would really like a tool like this already have 20-40 dependencies. Likely with overlap with what this would depend on if we add in any additional dependencies. Once this is up I'll try to pull out all of the good tidbits from my work code base to improve it with anything we have that is useful. |
|
Wrong button... |
|
Hi there, great discussion! Author of one of the +0 packages is here. Before releasing django-fab-deploy I also examined most of other packages that existed at that time (about a year ago) and none of them had clear compatibility promises + if my memory does not fail only 1 of them had some tests (unit-style, not integrational-style) - this was woven. For such critical task as deployment this was a non-starter. Even if django-fab-depoy has API that is not very polished (it is originally based on older pre-1.0 version of fabric and so there is a lot of bikeshedding + API is intentionally function-based and this can turn some developers away) I know that it works (and not only for me) because it is tested before each release against VMs with all of supported OS versions and has 90%+ test coverage: this indeed helped to find a bunch of subtle bugs and wrong implications, especially in how commands work together and how OSes differ from each other. So in my experience the hard part is not the API and abstractions but making scripts reliable, portable, independent but compatible with each other; one must trust her deployment tool and I think that's why there are so many custom scripts and everyone is reinventing the wheel again and again - without clear contract, compatibility information (with OSes and other scripts) and tests it is very often easier to start from scratch and build custom script that will definitely work in given environment. btw, as for mentioned Django optional dependency - django-fab-deploy doesn't require local django and doesn't use it, it just have a django-minded docs and some defaults that make sense for django projects so I don't think requirements bloat would be the serious issue. |
|
It's not on par with these packages, but my https://github.com/veselosky/otto-webber might have some useful tidbits. Feel free to pilfer from it if you find anything useful. Unfortunately I have not had time to work on it lately due to $work (which is forcing me to learn Puppet, so I don't know when I'll get back to it either). |
|
I think that profab is probably too specific to of much interest in the list you're compiling, but here's the link anyway. |
|
Another challenger has appeared! Specifically, Revolver which attempts to wrap both Fabric and Cuisine and (in the really quick glance I gave it) put a relatively granular high level API on top, including smoothing over some of Fabric's design warts. So based on that it's probably competition/inspiration for Patchwork; it should probably be added to the list-of-four we have going right now re: stuff to look at when coming up with Patchwork's API. |
|
Don't think I actually mentioned here but I stuck up a GH repo for this and it has some real basic proto stuff in it. Currently using Fab 1 to get actual work done, but my hope is to get Fab 2 in shape so Patchwork 1.0 can use that instead. We'll see. Might end up branching it. |
|
fabtools seems an excellent abstraction layer for common tasks on top of Fabric. Nevertheless, wouldn't be also nice to have a complete, more complex recipes (I am lending a Chef term here) repository e.g. "LAMP server" etc? Plus, it would probably require an appropriate recipe manager (like apt, pip, npm etc). These user-contributed out-of-the-box solutions would probably make Fabric a more attractive deployment solution. |
|
@georgepsarakis That's like a stage 2/3 goal - though to be honest I've never wanted Fabric to actually get too far into config management territory because there's a plethora of other tools that do that much better (Chef, as you mentioned, also Puppet/CFengine/Ansible/Salt). Orchestration type tasks remains the niche Fabric excels at, IMO. My hope is that Fab 2 will be extensible enough folks can still make such recipe-like structures and share them easily, at any rate. |
|
Any updates on this or pointers to relevant discussion? I'd love to see some relatively "lower" level stuff get included in contrib or a more standardized 'extras' library. For instance, package management stuff is a place where I end up repeating myself all over the place. It would be great to have from fabric.api import sudo
from fabric.context_managers import shell_env
def install(packages, assume_yes=True):
"""
Install packages via apt.
"""
if not isinstance(packages, str):
packages = ' '.join(packages)
with shell_env(DEBIAN_FRONTEND='noninteractive'):
if assume_yes:
sudo('apt-get install -y %s' % packages)
else:
sudo('apt-get install %s' % packages)
def update():
# And so on...Would pull requests for something like that be accepted for contrib? Is something more abstract desirable? |
|
This is still on my mind, especially as Invoke and Fabric 2 develop - e.g. Fabric 2 does away with the contrib tree from 1.x, and given that both local and remote use cases have the same needs re: code sharing, that needs figuring out too. Presently, there's just two repos for the two, https://github.com/fabric/patchwork and https://github.com/pyinvoke/invocations but there is certain to be issues re: overlap (e.g. running things like aforementioned package management locally vs remotely). Ideally those will all be solvable with the solution to #98 in 2.0, which right now looks like "rely on the abstract base command-running API, then hand it the appropriate local-or-remote context". Needs hands-on work to solidify, which again may be soon. |
|
Come across this thread, while the discussion has taken a different path from the initial issue, I though it would still be relevant to dump this one to the initial cake -> https://github.com/pyBookshelf/bookshelf |
There has been lots of discussion about this, but nothing that has become a canonical standard or even a listing of all interest(ed|ing) libraries.
A goal of this is to enumerate all of the libraries, then the features of said libraries. Finally, we will try to come to a consensus on a library to use as a launch board and pump the willing talent of the community that uses Fabric into to hopefully come out with a library that we can use as a base instead of copying and pasting out of each other's scripts or reinventing the same wheel over and over again.
If you have a library of fabric utils, or know of one that isn't listed here, please comment and add it to the list. If you are the owner of one of these libs and would like to work together on this project, regardless of if your lib is the chosen golden child (though participation certainly makes it more likely) please join us on irc.freenode.net in the #fabric channel.
The text was updated successfully, but these errors were encountered: