330 karma · joined May 4, 2012
Another useful tool is pt-slave-restart which will limp you along and skip replication errors automatically until you can repair the problem.
Also, let me tell you, IV Benadryl is some good shit...
Your example is great to illustrate why configuration management is so powerful.
Most importantly, your example will upgrade the package to the latest version every time you run it (which is probably not what you intended, but maybe it is). I'm sure there is an idempotent command for each of apt, yum, ports, homebrew, etc, but I have better things to do with my time than figure that all out.
In puppet your command would be:
package { 'foo': ensure => installed } # or 'latest'
What if you also have RedHat servers? Now you need to figure out the right yum command to use to perform the equivalent. Or your developers Macs? Homebrew. Chef/Puppet are aware of the environment they run in and install appropriate packages using the appropriate package management script with minimal alteration to the underlying recipe.For RedHat systems, it would be:
package {'foo' : ensure => installed }
On a Mac, it would be: package {'foo' : ensure => installed }
On that Arch Linux machine that your devs are running, it would be: package {'foo' : ensure => installed }
Now, let's throw some dynamism into the mix...What if you want to build an haproxy configuration file that pulls the list of hosts from an authoritative source? Do you "just" build it up from scratch every time and replace the file on every run of your script? With chef/puppet, you can pull that information in from your node classifier using the same query for dev, staging, and production and have the same recipe work for multiple environments. In some environments, the haproxy config has now changed, so I want to tell haproxy to reload. But in other environments, the config stayed the same, so I don't want it to reload. The file and service don't get touched if they didn't change.
What if a service has multiple files associated with it that when one or multiple of them change, you have to restart or reload the service? You don't want to restart each service every time one of the multiple files changes, so you end up having to build a queue to handle the service notifications.
Say I've got a few dozen users on my hosts and someone leaves. Which is easier - writing a purge script which knows how to purge the user from all environments that you support, or this...
user { 'joe' :
...
ensure => absent
...
}
I'm certain that that you can do these things with fabric scripts, but by the time you have, you've either written your own configuration management tool (which is unlikely to be as robust as chef or puppet) or you have a hodgepodge of unmaintainable scripts. YOU SUCK JONES
Mr. Jones proceeded to make this into a lesson about the importance of commas. YOU SUCK, JONES
and YOU, SUCK JONES
have wildly different meanings.To those that I work with...don't worry. I always wear pants. But don't expect me to want to video chat with you too early in the morning. :)
I sit at my desk a lot less, but work a lot more. I'm one of those people that simply cannot solve complex problems while sitting at a desk. Because I'm not beholden to butt-in-the-chair syndrome, I am free to spend an hour or more going for a walk, visiting a local coffee shop, or taking a bath so I can think and problem solve before typing into a console. As a result, my work takes less time and requires fewer revisions than when I was sitting in a chair at an office.
The down side...I'm always at work. In order to create the separation I have to make sure to leave the laptop upstairs in the office or else I'll just keep working at the kitchen counter.
Onsite Employee: "Hey, got a second?" Me: "Yep" Video chat commences
It's a horrible work habit to get into to interrupt someone like that, but sometimes it's necessary. Plus, sometimes it's nice to just chitchat with your coworkers, just like you would in an office setting.
The bottom line is, I'm good at my job and if you're not willing to let me work remotely, you are welcome to discriminate based on geographic presence and eliminate 90% of qualified employees and I'll just go work for the increasing number of enlightened companies that have figured that they can get better talent by making telecommuting a reasonable option. Not all awesome engineers live within a commutable distance to a major metropolitan hub.
"it's the wrong tool" is an opinion and it is unsupported by history. It many cases, it's exactly the right tool and users are given the power to control the level of strictness they they require. Want to allow GROUP BYs that don't include all non-aggregate columns? Sure, you can do that. Or not. Want MySQL to accept what you give it and throw warnings instead of errors? Yep, you can do that, too. Or not.
The defaults are bad. No one will defend that. They are also easy to change. A privilege level allowing/denying the ability to change the sql_mode would be a welcome addition, also. Yet, MySQL is a capable tool that does some things really well, something things not so well, and some things terribly. Just like every other product out there. It is a tool. It works well for many, but not all cases. Apparently, you find it inadequate for your particular needs. I get that. You shouldn't use it.
SET sql_mode = 'STRICT_ALL_TABLES';
http://dev.mysql.com/doc/refman/5.5/en/server-sql-mode.html#...Yes, it's not default. Yes, it can be overridden. Yes, that bothers a lot of people.
Another thing that is often overlooked is tiered slaves in conjunction with logical replication for adding OLAP to an OLTP infrastructure. This allows you to have additional reporting data on slaves that is not present on the master and along with real-time replication, eliminating or simplifying nightly batch processing. This also allows you to keep a very small working set available on the master database with slaves that contain the full archive. In conjunction with BLACKHOLE tables, this can be very powerful.