<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Serakhi Amine on Medium]]></title>
        <description><![CDATA[Stories by Serakhi Amine on Medium]]></description>
        <link>https://medium.com/@serakhi.amine?source=rss-8f0bb9efadb5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NXMSlaF8oOvCzIOE</url>
            <title>Stories by Serakhi Amine on Medium</title>
            <link>https://medium.com/@serakhi.amine?source=rss-8f0bb9efadb5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 17:37:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@serakhi.amine/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Saltstack: The open source road to Event Driven Infrastructure — part 1: Installation]]></title>
            <link>https://medium.com/@serakhi.amine/saltstack-the-open-source-road-to-event-driven-infrastructure-part-1-installation-be63e921041f?source=rss-8f0bb9efadb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/be63e921041f</guid>
            <category><![CDATA[saltstack]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ansible]]></category>
            <dc:creator><![CDATA[Serakhi Amine]]></dc:creator>
            <pubDate>Tue, 19 Nov 2019 20:17:50 GMT</pubDate>
            <atom:updated>2019-11-19T20:58:03.062Z</atom:updated>
            <content:encoded><![CDATA[<h3>Saltstack: The open source road to Event Driven Infrastructure — part 1: Installation</h3><p>As introduced in my first <em>post</em>, Saltstack is a python based solution well known for being easily installed.</p><p>Saltstack that is designed around the concept of IT infrastructure run by events, SaltStack is a complex composition of several complementary modules, including:</p><ul><li><strong><em>salt:</em></strong> Execution modules of administrative tasks!</li><li><strong><em>salt-mine:</em></strong> the information shared between masters and minions.</li><li><strong><em>salt-states:</em></strong> Continuous Configuration Management Module.</li><li><strong><em>salt-cloud:</em></strong> Cloud Agnostic module in charge of the standardization of requests for supply and release of infrastructure servers.</li><li><strong><em>salt-orchestration:</em></strong> Orchestration module of dependent mechanisms.</li><li><strong><em>salt-reactor:</em></strong> Event reaction module.</li><li><strong><em>salt-API:</em></strong> REST API for interfacing with the ecosystem.</li></ul><p>So this post will be detailing the process of the installation of Salt Master and Salt Minion, and also present the event bus that insures the communication between all Saltstack components;</p><h3><em>Global Architecture:</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ikYZbER9xyS6_3EM" /></figure><h3><strong><em>Installation on CENTOS7:</em></strong></h3><p>At the time of writing, Saltstack latest version is 2019.2.2. I always prefer using the previous version in production environment, so in the following steps i will be installing the 2018.3 version. Also, in an enterprise context, i advice you to have RedHat Family Operating Systems since Redhat assures 10 years of support for its Major Versions.</p><p>First, we need to setup the installation prerequisites, and for that Saltstack needs python to be installed.</p><p>I- Installation of Python from source:</p><blockquote>1. Install gcc, openssl-devel and bzip2-devel libraries :</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/0*_bNxuHUyWW1JL9_Z" /></figure><blockquote>2. Download Python3 Source :</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/0*57n6kdYDxQbDTQMy" /></figure><blockquote>3. Python3.7 installation :</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/0*kwdQdK9EC759pmmh" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*BlZq_f-ruXSJ449X" /></figure><p>II- Installation of Salt packages :</p><blockquote>1. Set up Saltstack repository (Python3 saltstack) :</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0KUY1qKwiSASxw5r" /></figure><blockquote>2. Installation of salt-master 2018.3</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/0*EL0-qloPuGZFoq-i" /></figure><blockquote>3. Installation of salt-minion 2018.3</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*fmyIc-cbiUnRfeFiUGLyTw.png" /></figure><p><em>Here is an installation script for salt-minion:</em></p><blockquote><em>#!/bin/bash</em></blockquote><blockquote><em>yum install gcc openssl-devel bzip2-devel -y</em></blockquote><blockquote><em>curl wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz — output python37.tgz</em></blockquote><blockquote><em>tar xvf python37.tgz</em></blockquote><blockquote><em>cd Python-3.7.2.tgz</em></blockquote><blockquote><em>./configure — enable-optimizations; make altinstall</em></blockquote><blockquote><em>yum install https://repo.saltstack.com/py3/redhat/salt-py3-repo-2018.3.el7.noarch.rpm -y</em></blockquote><blockquote><em>yum install salt-minion -y</em></blockquote><blockquote><em>systemctl enable salt-minion”</em></blockquote><p><strong>Configuration</strong>:</p><p>In order to configure the communication the minions with the master, we need first to modify the minion configuration file ‘/etc/salt/minion’ as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/0*nV8DMqnmdqTiSZsW" /></figure><p>Also we have to accept the salt-minion key on the salt master, with salt-key -A:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/0*ge24xvE_-L--5EhI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/0*Y_VakHoRsTpDSfrQ" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nFpvP6etXYOi6IDc" /></figure><p>After configuration, we have this simplified communication diagram between salt-master and salt-minion, the communication happens through the Event Bus, the following screenshot is an example of an event sent by minion2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4tw6MYEa6FAeDFl1l8-B6Q.png" /><figcaption>Example of Saltstack Event</figcaption></figure><p>When salt-master send an event to request an execution from a TARGET; A job is set up as an event, and the target response is also an event with return. So let’s ask from minion1 to tell us about its hostname:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*cRww5pXFw2spDcxYDPYrmw.png" /></figure><p>In the Event Queue we identify Three Events:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*tCWmrhawGj3nNlEWaegAVg.png" /></figure><ul><li><em>First Event: is an event that describes the Minions targeted by the request, here only minion1 is in the list of the targeted minions,</em></li><li><em>Second Event: is a schedule of a of a new job on the targeted minons (Minion1) to execute function : “cmd.run” with the argument ‘hostname’,</em></li><li><em>Third Event: describes the result of the execution with the status.</em></li></ul><p>All of this illustrates that with Salt, everything is an Event. And the objective is to manage the infrastructure by reacting to Events. In the Next post, i will discuss a little bit more the targetting and salt state system.</p><p>Please follow and clap if you like the article. Thank you for your time</p><blockquote>Our everyday choices shape the World.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be63e921041f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Saltstack: The open source road to Event Driven Infrastructure.]]></title>
            <link>https://medium.com/@serakhi.amine/saltstack-the-open-source-road-to-event-driven-infrastructure-403b871f170e?source=rss-8f0bb9efadb5------2</link>
            <guid isPermaLink="false">https://medium.com/p/403b871f170e</guid>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[infrastructure-management]]></category>
            <category><![CDATA[saltstack]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Serakhi Amine]]></dc:creator>
            <pubDate>Sat, 16 Nov 2019 17:46:21 GMT</pubDate>
            <atom:updated>2019-11-16T17:49:12.723Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a first of many stories to tell and describe my own experience with Saltstack, I feel that we lack simple and clear documentation of Saltstack technology; tht is why in this story, i will try to interduce the different modules of Saltstack.</p><blockquote><strong>What is Saltstack?</strong></blockquote><p>Designed around the concept of IT infrastructure run by events, SaltStack is a complex composition of several complementary modules, including:</p><ul><li><strong><em>salt:</em></strong> Execution modules of administrative tasks!</li><li><strong><em>salt-mine:</em></strong> the information shared between masters and minions.</li><li><strong><em>salt-states:</em></strong> Continuous Configuration Management Module.</li><li><strong><em>salt-cloud:</em></strong> Cloud Agnostic module in charge of the standardization of requests for supply and release of infrastructure servers.</li><li><strong><em>salt-orchestration:</em></strong> Orchestration module of dependent mechanisms.</li><li><strong><em>salt-reactor:</em></strong> Event reaction module.</li><li><strong><em>salt-API:</em></strong> REST API for interfacing with the ecosystem.</li></ul><p>Saltstack is a python based solution. From an architectural overview, we identify two implementation of the stack :</p><ul><li>One Master (or Masters) and Minions (Linux and Windows).</li><li>Minions only (Linux and Windows), called <strong><em>masterless</em></strong> architecture.</li></ul><p>The role of the master is to initiate requests in the Event Bus shared with the minions; A minion listens to all events in the Bus, and executes the instructions that are linked to it.</p><p>The following image illustrates how we can implement saltstack for a production environment :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uvGFNb8anhWE7Jr5whJUQw.png" /><figcaption><strong>Saltstack architecture example</strong></figcaption></figure><p>In this diagram above we have some examples of usage of different saltstack modules:</p><ul><li><em>Commands 1 &amp; 2 are issued within salt executor module, we can </em><strong><em>target</em></strong><em> specific minions to execute specific tasks.</em></li><li><em>All minions share its informations with each other through salt mine.</em></li><li><em>Salt-cloud allows to create infrastructure defined as a code in a file called a map (YAML Format).</em></li><li><em>Salt Reactor and orchestrator Listens and Reacts to events with predifined tasks definded in a SLS File (YAML Format).</em></li><li><em>Salt state: send a series of tasks as an SLS file (Yaml Format) that concerned minions will be executing.</em></li><li><em>Salt-API interacts with other tools.</em></li></ul><p>As stated earlier this is an introduction, so please keep in mind that i will be publishing more detailed posts of each use case;</p><p>In the Next post, i will be explaining how to install saltstack and what caracterize Salt Minion and Salt Master.</p><p>Thank you for reading, dont forget to follow and recommand if you enjoyed the article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=403b871f170e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>