16 ms·
A configuration management system for computers that are pets, not cattle
- turtleyacht 4y agoA replacement for "pets, not cattle" could be "goldfish, not trout" [0]. Due to certain beliefs around the latter. Has that come up for anyone? Maybe unique to us? [0] Not my idea. Source: a colleague.
- zenbit 4y agoI like to say "farmed, not gardened" as a veggie alternative to "cattle, not pets". As in "containers are farmed, not gardened". No idea if that sounds right to a native speaker, though.
- OJFord 4y agoMade sense to me until you said 'containers', which I immediately read as container plants (approximately always gardened, never farmed) instead of in the runtime sense.
- zenbit 4y agoAppreciate your feedback! I can totally see how you would read it that way. Maybe "servers should be farmed, not gardened" would be less ambiguous. Server farms have been a thing for a long time after all.
- turtleyacht 4y agoThank-you for the suggestion of vegetables. It makes sense to me as a native speaker. If I had to clarify with folks, I'd open with the idea of server "farms" (Microsoft IIS) and then talk about "gardens" as custom setups.
- sweetheart 4y agoThe alternative you provide is still speciesist to a degree. I like the suggestion in a sibling comment to this one which avoids referring to any animals, though.
- turtleyacht 4y agoI like the veggie idea, too. I'm adding it to my synonym phrase bank!
- hnarn 4y agoI use salt stack, and with all its warts I think it works just fine for environments with "pets". The idea is of course that in theory, you should be able to re-deploy any system as it's nothing but a collection of "states", but it works just as well for patching, maintaining and upgrading existing systems that never move. I don't have much experience with Ansible or the other popular configuration management alternatives, but I don't imagine they are much different in this respect.
- wkdneidbwf 4y agogive me this for mac os please. my home-rolled dotfiles repo is ok, but id really love some config management system that’s not ansible that i could use to bootstrap my workstations. i used to write a lot of chef and generally like ruby, but i can’t make heads or tails of whatever progress chef is. mostly seems like chef as an oss tool is dead. anybody got something else they like to configure their mac os systems with?
- thenipper 4y agoPyinfra supports home brew: https://docs.pyinfra.com/en/latest/operations/brew.html https://docs.pyinfra.com/en/latest/operations/brew.html I’ve thought about using it to set up my machines/machines at work but haven’t gone down that road yet.
- okasaki 4y agoWhat's wrong with ansible?
- candiddevmike 4y agoSame, I looked all over the project and couldn't find a reason for using it vs Ansible.
- 1MachineElf 4y agoDepending on your needs, one advantage over Ansible is lack of Python dependency.
- nanozuki 4y agoToo heavy, too complex and too slow. Although ansible can be used in local machine, but it is design for multiple remote machine. For example, if you want copy a config file to target, you must use some tools like `scp` or do some hacking. And it's much slow than shell script, and the print in stdio is ugly. (because it's design for running in 100 machines in one time.) Ansible also had a steep learning curve, and redhat did not prepare a good beginner's manual for it. Searching the web there is only the experience of people who have used it for years, each with their own way of writing. There are no best practices for getting started easily.
- ms4720 4y agoHave you looked at salt?
- morelisp 4y agoI've used masterless salt for managing pet hosts, and the experience was pretty good (though I also already had experience using salt on a 30ish node cluster). However, these days it would be the only reason I would have Python installed on some of them. Avoiding that dependency management would definitely be a selling point.
- throwamon 4y agoI might just be biased by selective attention, but it seems like more and more of these are popping up lately. I feel like we will eventually recognize a variant of Greenspun's Tenth Rule as common wisdom: > Any sufficiently complicated build system or configuration management system contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Nix. (Although to be honest it might make more sense to replace "Nix" with "Guix"...)
- whalesalad 4y agowas going to say the same thing - but for ansible. an inventory file is literally a static list of pets in its simplest form, and with some simple convention you could have a directory per-host with any playbooks required. plus you have docs, community modules, etc.
- Annatar 4y agoAnsible is like a fifth wheel on a car, since all of the configuration can be done inside of OS packages, and orchestration can be done via SSH (which is exactly how Ansible does it). Put those two together and Ansible is a solution to a non-existent problem.
- bak3y 4y agoI'd much rather use Ansible to configure a fleet of identical systems (either all at once or over time) than SSH and configure by hand thanks.
- Annatar 4y agoNot by hand! With configuration packages in OS-native format! 1. When a system comes in, it is scanned and entered into the asset management database, which then triggers a process to enter the scanned MAC address into the DHCP, by generating a new DHCP configuration package. 2. the previous version of the DHCP configuration package is upgraded with the new DHCP configuration package. 3. the system is hooked up to the network and powered on. 4. the firmware is permanently reconfigured to boot in this order: 1. HD0 2. HD1 3. network. 5. since HD0 and HD1 are not bootable, the system boots from the network, whereby the infrastructure automatically provisions it with the standard runtime platform, which consists solely of packages in OS-native format, including configuration packages which configure things which all servers have in common. 6. as part of the automatic installation, the server is automatically installed with additional configuration packages based on which profile it is in, turning it into a specific application server. 7. the server comes up after automatic installation, and reports back to the infrastructure that it is ready to serve. NEVER by hand!
- COGlory 4y agoInteresting. Almost like a declarative configuration scheme.
- freedinosaur 4y agoThis seems more approachable than NixOS/Guix, which I see as state or the art for declarative hosts. https://discourse.nixos.org/t/documentation-team-flattening-the-learning-curve/20003 https://discourse.nixos.org/t/documentation-team-flattening-... aims to flatten the learning curve for NixOS.
- 1MachineElf 4y agoI love the concepts behind NixOS as well as Guix. I've tinkered with both, and Nix has served the daily driver role for multiple computers of mine. One advantage this has over Nix is a simpler build toolchain. For some, that advantage may be quite useful. Even more so for the sh-based configuration management tool, rest[0], submitted several days ago. While Guix is similar to Nix in it's higher amount of build dependencies, in theory, Guix's bootstrapping is at least elegant in comparison. [0] https://news.ycombinator.com/item?id=33387081 https://news.ycombinator.com/item?id=33387081
- dfee 4y agoI’ve been reading the pills (tutorials) and it’s actually been pretty nice. You just have to realize it’s more complicated than mapping JSON <> YAML. https://nixos.org/guides/nix-pills/ https://nixos.org/guides/nix-pills/
- JamesSwift 4y agoYes it is more advanced, but actually if you just think of the nix configuration language as an advanced JSON then that goes a long way in making it feel a lot less awkward IMO. Attrsets are basically JSON objects, and your final configuration is basically a huge, merged attrset.
- fny 4y agoI just use Fabric and shell scripts. It works, and its not complicated.
- pjz 4y agoI use etckeeper for this, along with a cron entry to put the currently-installed set of packages into a file (/etc/packages.installed). Thus rebuilding becomes: base-install, pull /etc, reinstall-packages, re-checkout /etc.
- yegle 4y agoPets vs cattle: https://cloudscaling.com/blog/cloud-computing/the-history-of-pets-vs-cattle/ https://cloudscaling.com/blog/cloud-computing/the-history-of...
- lamontcg 4y ago> The idea behind Pets is that Configuration Management of individual hosts shouldn’t be harder than administering the system by hand. Just administer it by hand and back it up.
- djrobstep 4y agoVery unhealthy attitude. Why shouldn’t things be easily configurable from scratch?
- lamontcg 4y agoWell I have 25 years of experience with configuration management, including over 10 years having lead the development of one of the major tools in the space, and I don't waste time doing configuration management on my laptop, I just back it up. You can go ahead and do configuration management of your laptop if that gives you enjoyment, but it is entirely over the top to say that is an "unhealthy attitude".
- djrobstep 4y agoThat is exactly the problem. It doesn’t give me enjoyment. But why shouldn’t it?
- kesor 4y agoEveryone can go and waste their time in whichever way they like. Some people like gardening, although they will never get to "sell produce" at the vegetables market. That doesn't mean gardening is bad, it just means they enjoy it and enjoy wasting their time doing gardening. Other people just go and buy vegetables at the supermarket that were grown at commercial farming. Same with doing configuration management on your laptop, if you really want to enjoy it, go for it. For most people its a complete waste of time and a useless activity compared to the alternative, which is changing the few files you need changing by hand, and backing it up to solve the "lost my work" problem.
- Annatar 4y ago
- matai_kolila 4y agoI dunno, I just feel like in my time playing pretend DevOps, I've just ended up learning how to use Terraform/Puppet/Ansible/whatever and now all of my infra actually is cattle, even though I think 9 out of 10 devs in my shoes would have gone the pets route. It was some extra work to set up, but now I feel supremely confident in the hardiness of the infra, and can scale it at will with some small tweaks. Is it perfect? Heck no! But I know for a fact when I go the "pets" route it ends up being more work in the end for me than just biting the bullet and learning a new tool. I just like knowing stuff! I enjoy diving in and getting my hands dirty learning the "best" way to handle a use case, or at least setting things up to be well understood if I ever have to pass it off to someone else more qualified than me.
- gyulai 4y agoGreat use of metaphor to make a complex and subtle technical concept into a readily-understood one-liner.
- soulofmischief 4y agoPets, not cattle is the general mantra for configuration management systems. Personally I use Ansible for fleet management.
- gyulai 4y ago> Pets, not cattle is the general mantra for configuration management systems. Oh, I didn't realize it was in widespread use. But still. Someone thought of it, and it's great use of language.
- soulofmischief 4y agoTotally agree, it's the kind of sentence which immediately imparts of knowledge and gives you a lot to chew on.
- mananaysiempre 4y agoOr rather the other way around (usually, though not here)?
- soulofmischief 4y agoDefinitely the other way around, whoops!
- lexandstuff 4y agoYou mean Cattle, not Pets is the general mantra, right? Or have things changed a lot since I was last doing Ops?
- soulofmischief 4y ago
- pabs3 4y agoI just use Debian packages containing config files for maintaining pets.
- kasabali 4y agoThis is the underrated way.
- qwerty456127 4y agoIs it common for computers "that are pets, not cattle" to run Debian-like (APT) and RedHat-like (YUM)? I would use all kinds except these.
- erebeee 4y agoShameless plug but here how I manage my personal servers with K3s (kubernetes) https://news.ycombinator.com/item?id=33406938 https://news.ycombinator.com/item?id=33406938 I stopped using configuration management a while ago for my servers because they are too complex and fragile for a sporadic usage. My main issue is that you need to use them daily in order to keep them working and for you to keep muscle memory. For a time I tried to restrict myself to only Debian package, but with the time I felt like it was too restrictive, and not enough flexible. I also tried Nix and really liked it, but my main issue was me having to google every time I wanted to make a change due to config file/package being awful to write/remember. Maybe you will take a different path, but for personal usage, configuration management is really a waste of time imho, the frequency at which you will touch files will be low, and your tool/setup will become outdated before you realize it. And nowaday everything run inside a container, so you will have to adapt your tool to manage docker/podman/docker-compose at some point
- Izkata 4y ago> I also tried Nix and really liked it, but my main issue was me having to google every time I wanted to make a change due to config file/package being awful to write/remember. I just use it package-management-style with "nix-env" instead of using the whole configuration language. Pretty simple and easy to remember.
- notyourday 4y agoIn reality there are three classes of systems: * pets * cattle * betsy[0][1] The problem is that configuration management systems think everything is either cattle or pets. [0] Betsy is a special cow. She will also be slaughtered, so she is not a pet, but she needs to be taken care of in a special way, so she is not a cattle. [1] When the herd becomes large, you get joahna. joahna is like betsy, but not exactly like betsy so she needs a care and feeding slightly different than the betsys.
- zellyn 4y agoIf you like this, be sure to check out bundlewrap. It's a little more complex, but I think things like templates are actually useful.
- charlesrocket 4y agoI would never install linux on my pet. Strict BSD diet.