5 ms·
I just use fabric. I just start writing code to provision/configure the machine for the role in question and don't stop until I have something that can reliabl
by heretohelp 14y ago
I just use fabric.
I just start writing code to provision/configure the machine for the role in question and don't stop until I have something that can reliably take a blank-slate server and have it rolling by the end of the function.
Easiest way to do devops I've seen yet. I didn't care for chef/puppet/cfengine.
Particularly since I can cherry-pick servers for testing pretty easily with fabric before I run the code against the rest of the machines.
- dredmorbius 14y agoURL? Not a particularly searchable term.
- vineet 14y agohttp://fabfile.org/ http://fabfile.org/ Seems to be down right now though.
- dredmorbius 14y agoAccording to the Internet Archive, it hasn't been online since roughly 2009.
- vineet 14y agoThey are up right now.
- dredmorbius 14y agoIndeed they are. Thanks.
- StavrosK 14y agoThey definitely have, I've been visiting it a lot lately, when I was writing my own deployment script. Also, you need this too: https://github.com/sebastien/cuisine/ https://github.com/sebastien/cuisine/
- heretohelp 14y agohttp://pypi.python.org/pypi/Fabric/0.9.0 http://pypi.python.org/pypi/Fabric/0.9.0 Edit: The primary weakness of my approach is that for convenience's sake, I rely heavily on apt-get. So hypothetically I'm tied to the debian family. (we use Ubuntu LTS of a couple different versions) Strictly speaking this disadvantage is unnecessary, you could do all from-source builds using fabric if you wanted. Didn't seem like a constructive use of my time though. Sample task in my fabfile: https://gist.github.com/3086836 https://gist.github.com/3086836 I'll let you guess from the function name what it does. The magic word of devops is "idempotence".
- dredmorbius 14y agoI had a modest epiphany some weeks back thinking about server configuration management: if you want to manage configurations on a given node (to use Chef lingo), it's best to work within a system that facilitates and/or encourages this. For a number of reasons, Debian (or faithful derivatives) comes closest to this of any platform I've encountered. That said: fabric appears to be little more than a multi-system aware task runner. Somewhat like dsh (distributed ssh / dancer's shell): http://www.netfort.gr.jp/~dancer/software/dsh.html http://www.netfort.gr.jp/~dancer/software/dsh.html ... or like Capistrano, as the Debian package description suggests (modulo installing Rails). There's a bad pimp joke around "idempotence" waiting to be made. Your task here would seem to install Oracle's Java 7 HostSpot JVM. How do you get around the licensing question(s) (or is that what the "-y" is for)?
- heretohelp 14y agoThat's what the -y is for. > fabric appears to be little more than a multi-system aware task runner. And C is little more than a portable assembler ;)
- dredmorbius 14y agoFair enough. I'm not trying to be trite, just reading what I see.
- jdf 14y ago
- cwp 14y agoI did the same thing. What's nice about the Phoenix approach is that you start with a known state (base Ubuntu install or whatever) and end with a known state (running your setup) and completely ignore all other possible states. A tool like chef or puppet has to have a lot of complexity around examine a node, determine what state it's in and figure out how to get it to the desired state. I also use boto in my fabfile, so that I can run a single command to launch an EC2 instance, install & configure software on it, save an AMI and terminate the instance. It's a like having a Makefile that compiles machine images: > fab build:<role> <region> I wouldn't go as far as Fowler's "disable the shell" idea, but it doesn't take much discipline to do all significant changes by building new AMIs.
- heretohelp 14y agoI don't believe in AMIs.
- cwp 14y agoYou mean you don't believe in making your own AMIs? I don't see how you could run an instance without an AMI.
- heretohelp 14y agoI mean I don't believe in AMIs. You seem to think I'm an Amazon customer.
- cwp 14y agoNo. I'm an Amazon customer. If you prefer some other IaaS, fine. The point is that fabric can drive both the virtualization API and the actual set up of servers over SSH. I have a fake region called "dev" that runs the build against a vmware image on my local machine. It could work with Softlayer or Joyent or Rackspace or CloudFoundry or whatever. Fabric and an IaaS provider is a really nice way to implement the PheonixServer pattern.
- gizzlon 14y agoI'm curious, would acquiring/hacking your fabrick "admin" machine give me access to all your servers?
- heretohelp 14y agoThere is no "fabric machine" and you'd have to have my ssh keys to use the fabric scripts against my hardware.
- viraptor 14y agoDo you have a large number of servers or just smallish deployments? Fabric is cool, but at some point the pull model starts to be better than push. You probably don't want to actually wait at the console and try to spot errors when deploying 100+ nodes - and this is where chef/puppet is actually nice.
- heretohelp 14y agoSmallish. I'm not trying to solve problems I don't have.
- StavrosK 14y agoI decided to use Fabric as well, because then I could just use apt to install packages, which strikes me as a far superior way than building everything from source. However, it took me days to complete the script and make it moderately reusable (and completely idempotent and able to handle different configurations), and it still doesn't do as much as I want it to. For example, I just noticed that Ansible[1] can tell whether a change needs to restart a service (e.g. if a config file changed) and only then do it. That's pretty useful, but my script can't really handle it. [1] http://ansible.github.com/examples.html http://ansible.github.com/examples.html