Tuesday, November 26, 2013

Getting Religion - Salt

Apparently I was on a quest and didn't even know it. Automation is great (essential, even), but at some point you need to wrap your arms around the whole thing. After spending some time with Puppet (and deciding it wasn't for me), I found Chef to be pretty approachable. I like the native versioning of recipes and the hands-free method of creating workstation separate from the master (the fewer hands that touch the master, the better). But there was a definite learning curve to be overcome.

Then I found Salt.

Pure simplicity.

How do I install Salt on CentOS?
yum install salt-master

How do I use Salt to install Apache? 
salt myMinion pkg.install httpd

What about all my webservers? 
salt -N myWebServers pkg.install httpd

Install Apache, pull down the latest version of my code, and restart Apache if the code changes!

my-awesome-app:
  pkg.install:
    - name: httpd
  git.latest:
    - name: http://github.com/awesome/sauce.git
    - target: /var/www/html/awesomesauce
  service:
    - name: httpd
    - enable: True
    - running
    - watch:
      - git: my-awesome-app

And done! Every server. Latest code. Apache keeps up. All in easy to read yaml. 

So simple.

Hell, it even works with Powershell. Fully automated MSSQL installation? Done. Local user management? Easy. I'm confident that, with the proper Salt setup, you can do away with System Center Config Manager. The implications are huge for people willing and able to do it themselves (instead of paying for Microsoft licenses and consultants).

I'm hoping to make some big changes in my environment with Salt. The more work we can get the machine to do, the more time we have to work on more interesting problems. 

No comments:

Post a Comment