Fabric Python with Cleaner API and Parallel Deployment
tav.espians.com
tav.espians.com
As tswicegood says in another comment, some of these changes (@task, parallelism, etc) aren't unique to Tav's work, so when it comes time to merge we'll draw on the various implementations to see what feels best.
The features unique to his fork will be evaluated like any other contribution and merged in if they fit well and are generally useful (which many seem to be).
The plan right now is post-1.0 (1.0 is scheduled for Pycon or earlier) to round up a lot of major contributions and get them into core, so people like tswicegood don't have to work off of their own forks quite as much :)
https://support.cloudkick.com/Integrating_Fabric_with_Cloudk...
We dog food this for all of our production deployments. For example, when we ship a new version of cloudkick.com, we just run "fab ship", which looks for all servers tagged "cloudkick.com" and runs the appropriate deployment script on each of them.
Tagging can be done through the CK UI, automatically with the agent, or with things like puppet or chef. This allows you to fully automate deployment and other tasks around groups of servers.
As to getting stuff into fabric: a very valid complaint (and one I have myself, since like a lot of people I run my own hacked version of fabric) is that fabric development moves very very slowly. There are several different feature branches in several people's code-bases that could have been released 6 or more months ago. Perhaps if you start pulling other patches that have a lot of functionality complementary to yours, you could have a product good enough to push development on the mainline too (ala gcc/egcs of old...)
Eventually, one hacker comes along — who, having been a Fabric user for a long time, has independently experienced similar needs and finding no decent solution, decides to take on the task of implementing the various features himself — making sure that it's clean, backwards compatible and fully documented. And your response is to accuse him of trying to take credit for other people's work?!
I can understand your frustrations with the pace of Fabric development, but accusing another hacker of taking credit for other people's work simply beggars belief. Even more incredible is that so many people decided to upvote you! For the record, I'm not taking credit for anyone else's work. I came up with the various ideas myself and you can look at the code to see that it's not based on anyone else's work. Thank you.
Procrastination has its benefits I guess, heh. If you fancy them, the css/templates are in https://github.com/tav/blog and the site is run using yatiblog — https://github.com/tav/ampify/blob/master/src/pyutil/yatiblo... — the source is all public domain, so do with it as you please.
As for the difference between independent implementation and code-stealing: I have not and will not accuse you of stealing code. If it came off that way, I apologize.
I will however continue to assume your rooting around other people's work gave you ideas, gave you paths for completion of tasks, and gave you enough working information on reasonable solutions that you can not accurately say you did it by yourself.
Nice strawman, but the subtle difference here is in one case the code was not looked at and talked about and in the other it was.
The little hack on Fabric I use currently takes the opposite approach -- I use an @internal decorator that hides certain functions from the task list but keeps the default Fabric behavior around for anything else. It's just a few lines of codes that mess with a private list Fabric uses to track internal functions:
from fabric.main import _internals
def internal(fn):
_internals.append(fn)
return fn
_internals.append(internal)What I was trying to say in my earlier comment was that I would actually prefer the explicit @task decorator be part of the official Fabric API because it's more clear and, well, explicit. I prefer my @internal decorator as a hack in the meantime because I imagine it's less surprising to someone who might stumble upon my fabfile without any explanation from me.
When the time comes to merge/incorporate them, we will definitely be wanting peoples' opinions on whether they feel the changes would fit into core Fabric :)
I've been using func for parallel deployment to 15 - 20 servers for about a year now, but I have to admit I didn't really do any research into other options at the time. Its written by the guys who wrote yum and cobbler, which are already core to my setup, so it seemed natural to just stay in their ecosystem. Thing is I never hear about anyone else using it, so I'm curious if anyone did more diligence than I and had specific reasons of choosing one or the other.
The only thing i miss is a virtualenv context manager (with virtualenv(blupp):...).
You definitely have something very useful there, from a casual read.
Thanks for checking out the docs and your encouraging words!
It's always encouraging to see new people get involved. It's quite another to see someone relatively new to the community try to go around that community by announcing "new features" for a project they've barely started work on.
Sorry if that comes off a little bitter, but seeing this as the top post on HN today rubbed me the wrong way.
Very nice work all around.
Nice work tav.