Saltstack

In this series of tutorials, we will learn about SaltStack, how to install it and use it to manage our instances, virtual hosts and databases. This way we can easily deploy a webcluster and redeploy it later within just a few minutes.

Introduction to SaltStack SaltStack is an Infrastructure Management, Configuration management and Automated Provisioning system. It contains a number of different components. Some of those components will be explained below. Someone can define states and formulas within salt and have them automatically provisioned.
What are states States (and by extension state files) are a way to express certain states that a machine needs to be in. An example would be if you want to make sure that nginx is installed: nginx: pkg. Read more »

How to deploy a web cluster using SaltStack Getting started: installing SaltStack on the salt master First, you will need a single instance (we typically call it the saltmaster) on the Cyso Openstack Platform. The saltmaster needs to be able to reach the internal (private) IP addresses of the new instances. To install this VM, please follow the tutorials at Create a cloud instance and use Ubuntu when you select an image. Read more »

Installing packages Installing packages using salt is really easy. Let's say you want to install nginx - you can use the following syntax:
nginx: pkg.latest Now, that is already a very simple syntax but - what if you wanted to install a list of packages, all part of the same group of packages? Well, Salt has you covered there as well. Let's say you want a complete php stack (nginx, php5) - You can use the following syntax: Read more »

SaltStack makes managing vhosts and other configuration options very simple - Let's start with a very basic example of managing a file with the following state file: Open the file /srv/salt/vhosts/example.com.sls
/etc/nginx/sites-available/www.example.com.conf: file: - managed - source: salt://files/templates/nginx.conf - template: jinja - context: - domain: example.com /etc/nginx/sites-enabled/www.example.com.conf: file: - symlink - target: /etc/nginx/sites-available/www.example.com.conf This little snippet makes sure that the file, /etc/nginx/sites-available/www.example.com.conf - contains the rendered version of salt://files/templates/nginx.conf. So, how do we make that file? Read more »