<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sachin Jha</title>
    <description>The latest articles on DEV Community by Sachin Jha (@jhasach).</description>
    <link>https://dev.to/jhasach</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F372989%2F6d432402-5edf-434e-a700-6424f4046949.jpeg</url>
      <title>DEV Community: Sachin Jha</title>
      <link>https://dev.to/jhasach</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jhasach"/>
    <language>en</language>
    <item>
      <title>What is a Service Mesh? -the breakout area chat between an Account manager and a Solutions Engineer!</title>
      <dc:creator>Sachin Jha</dc:creator>
      <pubDate>Thu, 30 Apr 2020 18:56:01 +0000</pubDate>
      <link>https://dev.to/jhasach/what-is-a-service-mesh-the-breakout-area-chat-between-an-account-manager-and-a-solutions-engineer-5afd</link>
      <guid>https://dev.to/jhasach/what-is-a-service-mesh-the-breakout-area-chat-between-an-account-manager-and-a-solutions-engineer-5afd</guid>
      <description>&lt;p&gt;❓ "Who is this new kid in town people are talking about, Service Mesh?" -- &lt;code&gt;John asked in a very confused state.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;🤔 "What’s with service mesh? You look, anxious man, what happened?" -- &lt;code&gt;VJ asked.&lt;/code&gt;&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;John&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;an&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;Account&lt;/span&gt; &lt;span class="nx"&gt;Manager&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;VJ&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;Solutions&lt;/span&gt; &lt;span class="nx"&gt;Engineer&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: Things are changing fast, first it used to be those &lt;code&gt;simple applications&lt;/code&gt; and I used to tell them to use a number of virtual machines. Now, it gets difficult when the engineers talk in client architecture review calls!”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: ok 😄&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: What was that, this is serious man? &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: ok-ok,  I’ll explain what is a service-mesh- but I need to start from the time of those &lt;code&gt;Simple applications&lt;/code&gt;; as you have mentioned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: Go ahead, I’m listening!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: Ok, I’ll draw something for you!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--coLnsgrx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gbx5yshv1rvcfwpdqa5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--coLnsgrx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gbx5yshv1rvcfwpdqa5e.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://divante.com/blog/monolithic-architecture-vs-microservices/"&gt;source&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Monolithic&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 

&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;The&lt;/span&gt; &lt;span class="nx"&gt;software&lt;/span&gt; &lt;span class="nx"&gt;built&lt;/span&gt; &lt;span class="nx"&gt;using&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;monolithic&lt;/span&gt; &lt;span class="nx"&gt;approach&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;contained&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
  &lt;span class="nx"&gt;its&lt;/span&gt; &lt;span class="nx"&gt;components&lt;/span&gt; &lt;span class="nx"&gt;are&lt;/span&gt; &lt;span class="nx"&gt;interconnected&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;interdependent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; 

&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;If&lt;/span&gt; &lt;span class="nx"&gt;developers&lt;/span&gt; &lt;span class="nx"&gt;want&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;make&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt; &lt;span class="nx"&gt;changes&lt;/span&gt; &lt;span class="nx"&gt;or&lt;/span&gt; &lt;span class="nx"&gt;updates&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;monolithic&lt;/span&gt; 
  &lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;they&lt;/span&gt; &lt;span class="nx"&gt;need&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;build&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;deploy&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;entire&lt;/span&gt; &lt;span class="nx"&gt;stack&lt;/span&gt; &lt;span class="nx"&gt;at&lt;/span&gt; &lt;span class="nx"&gt;once&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; 

&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;It&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;same&lt;/span&gt; &lt;span class="nx"&gt;thing&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;scalability&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;entire&lt;/span&gt; &lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;not&lt;/span&gt; &lt;span class="nx"&gt;just&lt;/span&gt; 
  &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;modules&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;scaled&lt;/span&gt; &lt;span class="nx"&gt;together&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; 

&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;With&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;monolithic&lt;/span&gt; &lt;span class="nx"&gt;architecture&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt; &lt;span class="nx"&gt;can&lt;/span&gt; &lt;span class="nx"&gt;be&lt;/span&gt; &lt;span class="nx"&gt;difficult&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;adopt&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; 
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;technology&lt;/span&gt; &lt;span class="nx"&gt;stack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nx"&gt;you&lt;/span&gt; &lt;span class="nx"&gt;want&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;use&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;platform&lt;/span&gt; &lt;span class="nx"&gt;or&lt;/span&gt; 
  &lt;span class="nx"&gt;framework&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;you&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="nx"&gt;ll&lt;/span&gt; &lt;span class="nx"&gt;have&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;rewrite&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;entire&lt;/span&gt; &lt;span class="nx"&gt;solution&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Microservices&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;The&lt;/span&gt; &lt;span class="nx"&gt;microservice&lt;/span&gt; &lt;span class="nx"&gt;software&lt;/span&gt; &lt;span class="nx"&gt;architecture&lt;/span&gt; &lt;span class="nx"&gt;allows&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;system&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;be&lt;/span&gt; &lt;span class="nx"&gt;divided&lt;/span&gt; 
  &lt;span class="nx"&gt;into&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;smaller&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;individual&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;independent&lt;/span&gt; &lt;span class="nx"&gt;services&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; 

&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;Each&lt;/span&gt; &lt;span class="nx"&gt;service&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;flexible&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;robust&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;composable&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;complete&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; 
  &lt;span class="nx"&gt;They&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;autonomous&lt;/span&gt; &lt;span class="nx"&gt;processes&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;communicate&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;one&lt;/span&gt; &lt;span class="nx"&gt;another&lt;/span&gt; 
  &lt;span class="nx"&gt;through&lt;/span&gt; &lt;span class="nx"&gt;APIs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; 

&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;Each&lt;/span&gt; &lt;span class="nx"&gt;microservice&lt;/span&gt; &lt;span class="nx"&gt;can&lt;/span&gt; &lt;span class="nx"&gt;be&lt;/span&gt; &lt;span class="nx"&gt;implemented&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;different&lt;/span&gt; &lt;span class="nx"&gt;programming&lt;/span&gt; 
  &lt;span class="nx"&gt;language&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;different&lt;/span&gt; &lt;span class="nx"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Almost&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt; &lt;span class="nx"&gt;infrastructure&lt;/span&gt; &lt;span class="nx"&gt;can&lt;/span&gt; 
  &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;container&lt;/span&gt; &lt;span class="nx"&gt;which&lt;/span&gt; &lt;span class="nx"&gt;holds&lt;/span&gt; &lt;span class="nx"&gt;services&lt;/span&gt; &lt;span class="nx"&gt;encapsulated&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nx"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; 

&lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;Since&lt;/span&gt; &lt;span class="nx"&gt;these&lt;/span&gt; &lt;span class="nx"&gt;containers&lt;/span&gt; &lt;span class="nx"&gt;can&lt;/span&gt; &lt;span class="nx"&gt;be&lt;/span&gt; &lt;span class="nx"&gt;operated&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nx"&gt;parallel&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;existing&lt;/span&gt; 
  &lt;span class="nx"&gt;infrastructure&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;easier&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;maintain&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: Although, when you have independent services or units there are a couple of things that you need to take care of.&lt;/p&gt;

&lt;h4&gt;
  
  
  Challenges with the microservices architecture:
&lt;/h4&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;……
Service discovery
Load balancing
Fault tolerance
Distributed tracing
Telmetrics
Security (mTLS, policies, patches)
Independently releasable
Service contracts
……
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: Yeah, I know that. Ok, not all of it 😄 but I know, and isn’t the container-based implementations like &lt;code&gt;Kubernetes&lt;/code&gt; solves them?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: Oh, that’s impressive man 😉&lt;/p&gt;

&lt;p&gt;Yes, that's correct. Kubernetes is a very capable platform that has been well proven in production deployments of container applications. It provides a rich networking layer that brings together service discovery, load balancing, health checks, and access control in order to support complex distributed applications.&lt;/p&gt;

&lt;p&gt;These capabilities are more than enough for simple applications and for well‑understood, legacy applications that have been containerized. They allow you to deploy applications with confidence, scale them as needed, route around unexpected failures and implement simple access control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: Ok, that makes sense. So, if I’m running a simple application or even a complex application, &lt;code&gt;Kubernetes&lt;/code&gt; is more than enough to handle things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: Partially yes! So only when the applications become more complex individually, it puts an overall burden on the application developer and operations team to accommodate it! &lt;/p&gt;

&lt;p&gt;&lt;code&gt;[Security, monitoring, and traffic management]&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Your&lt;/span&gt; &lt;span class="nx"&gt;code&lt;/span&gt; &lt;span class="nx"&gt;should&lt;/span&gt; &lt;span class="nx"&gt;just&lt;/span&gt; &lt;span class="nx"&gt;focus&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;business&lt;/span&gt; &lt;span class="nx"&gt;logic&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;not&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;infrastructure&lt;/span&gt; &lt;span class="nx"&gt;part&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Let discuss a few of the challenges:
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Service discovery:
&lt;/h3&gt;

&lt;p&gt;Say, now you have moved your Monolithic into Microservices. Each microservice would be running on a different virtual machine (VM) with its own application and named with an IP address and a port number. &lt;/p&gt;

&lt;p&gt;How do you think service discovery will happen? You can’t hardcode the values, as in a cloud environment that’s not a permanent state. A simple machine restart or VM failure might make that not so optimum solution.&lt;/p&gt;

&lt;p&gt;Hence, you need something like a service registry to take care of this problem. In simple terms, a service registry would be the boss, and every service when it comes up has to register itself to the registry.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FrsrXLEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q28br5v9opq6sil90zue.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FrsrXLEp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q28br5v9opq6sil90zue.png" alt="Service Discovery Eureka"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the following example, say if the &lt;code&gt;Driver Management&lt;/code&gt; service wants to talk to &lt;code&gt;Passenger Management&lt;/code&gt; service it’s gonna send a “lookup” request to the “service registry”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gSYByNQG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bhlhhdh18fauyv8e7y31.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gSYByNQG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bhlhhdh18fauyv8e7y31.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Problems:
1. Service registry (Server): is a standalone application now, 
and needs your attention to manage it- potentially across availability zones (AZs).

2. Single point of failure. 

3. You will have to add libraries to all the services and write code for them.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Canary/Rolling deploys:
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Rolling&lt;/span&gt; &lt;span class="nx"&gt;deploys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You want to roll out a new version update of your service. In this case, you will make sure you have two identical production environments working in parallel, with different versions.&lt;/p&gt;

&lt;p&gt;At the right time here, you want to switch traffic from v1.0 to v.1.1. If there is an issue after v1.1 becomes live, traffic can be routed back to v1.0. All the time you are making sure that services are up and behind the scenes, you are doing an update. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GcXIa8-m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6svkiq4ackh7xr61kpw3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GcXIa8-m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6svkiq4ackh7xr61kpw3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Canary&lt;/span&gt; &lt;span class="nx"&gt;deploys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It works on very similar principles, and goes as- let’s say we have updated a feature and want to test it only for 5% of the clients. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/mostlyjason/intro-to-deployment-strategies-blue-green-canary-and-more-3a3"&gt;Jason Skowronski&lt;/a&gt; explains:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;With the canary deployment, you deploy a new application code in a small part of the production infrastructure. Once the application is signed off for release, only a few users are routed to it. This minimizes any impact.&lt;/p&gt;

&lt;p&gt;With no errors reported the new version can gradually roll out to the rest of the infrastructure.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Security&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How do you ensure services are talking on &lt;code&gt;HTTPS&lt;/code&gt;? How do you make sure certificates rotation: renewing/replacing after 30 days is taken care.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Network policies/whitelisting&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transparent patching&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;VJ: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;So, to rephrase it, each challenge described above puts a burden on the application developer and operations team to accommodate it! &lt;/p&gt;

&lt;p&gt;Individually, the burdens are light because the solutions are well understood, but the weight accumulates. &lt;/p&gt;

&lt;p&gt;Eventually, organizations running large‑scale, complex applications might reach a tipping point where enhancing the application service-by-service becomes too difficult to scale.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: That makes complete sense! So, can I call Service Mesh as:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Do it for me and reduce the overhead on my application developers?&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: You are fast man! 🚀&lt;/p&gt;

&lt;h4&gt;
  
  
  In a nutshell, the answer is &lt;code&gt;yes&lt;/code&gt;.
&lt;/h4&gt;

&lt;p&gt;At a high level, a service mesh ensures communication between containerized application infrastructures. It provides features such as &lt;code&gt;traffic routing, load balancing, service discovery, encryption, authentication, and authorization&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Brian “Redbeard” Harrington, principal product manager at Red Hat, describes service mesh as a mash-up of several better-known technologies:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A service mesh is a set of software components that act as the “glue” for a set of independent applications. The goal of the mesh is to guarantee secure communications between each application and be able to redirect traffic in the event of failures. &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Often the features of a service mesh look like a mash-up between a load balancer, a web application firewall, and an API gateway.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://enterprisersproject.com/article/2019/6/service-mesh-plain-english"&gt;source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: Let’s say initially we had services (Service A and Service B) directly talking to each other. Now, a  program called &lt;code&gt;Sidecar&lt;/code&gt; is installed with each service, and they sit where the services sit- can be a container or a VM.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xGp-GKMS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ptu5v8zxslwa31ypqdyz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xGp-GKMS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ptu5v8zxslwa31ypqdyz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Service A will now talk to sidecar and will act as a proxy or hiding factor for service A. It's the sidecar's responsibility now to talk to other service’s sidecars. &lt;/p&gt;

&lt;p&gt;All these sidecars will be managed by a program called the &lt;code&gt;Control Tower&lt;/code&gt;. It is responsible for sending all those instructions about service discovery, networking policies, load balancing, etc. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1Q-QcfR1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/36t3qxhfrs1mme7lgd3i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1Q-QcfR1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/36t3qxhfrs1mme7lgd3i.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hence, control tower and sidecar implementation takes care of all those heavy lifting and offloads all the burden from your “application code”- and that's the logic behind &lt;code&gt;Service Mesh&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let's look at some actual implementation of Service Mesh. The available projects in the market are:&lt;/p&gt;

&lt;h2&gt;
  
  
  Istio, Linkerd and Consul
&lt;/h2&gt;

&lt;p&gt;This is how an actual very close architecture of &lt;code&gt;Istio&lt;/code&gt;- looks like. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QVDFMTX2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gky96ha13glc36ffn0np.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QVDFMTX2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gky96ha13glc36ffn0np.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: Until now it was fine, although that architecture! 😕&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: (Interrupting)&lt;/p&gt;

&lt;p&gt;Na, don't get confused- the logic is the same. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Envoy&lt;/code&gt;: is a project that's actually the &lt;code&gt;Sidecar&lt;/code&gt; we talked about. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Control Plane&lt;/code&gt;: is just divided into 3 different services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Istio-Manager ||  Mixer || Istio-Auth
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;You can read about the full architecture, and what each of the components does &lt;a href="https://istio.io/docs/ops/deployment/architecture/"&gt;here&lt;/a&gt;!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Istio&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="nx"&gt;main&lt;/span&gt; &lt;span class="nx"&gt;features&lt;/span&gt; &lt;span class="nx"&gt;are&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

&lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="nx"&gt;Automatic&lt;/span&gt; &lt;span class="nx"&gt;load&lt;/span&gt; &lt;span class="nx"&gt;balancing&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nx"&gt;HTTP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;gRPC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;TCP&lt;/span&gt; &lt;span class="nx"&gt;traffic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="nx"&gt;Fine&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;grained&lt;/span&gt; &lt;span class="nx"&gt;control&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;traffic&lt;/span&gt; &lt;span class="nx"&gt;behavior&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;rich&lt;/span&gt; &lt;span class="nx"&gt;routing&lt;/span&gt; &lt;span class="nx"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="nx"&gt;Traffic&lt;/span&gt; &lt;span class="nx"&gt;encryption&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;service&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;to&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;service&lt;/span&gt; &lt;span class="nx"&gt;authentication&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;strong&lt;/span&gt; 
&lt;span class="nx"&gt;identity&lt;/span&gt; &lt;span class="nx"&gt;assertions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="nx"&gt;Fleet&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;wide&lt;/span&gt; &lt;span class="nx"&gt;policy&lt;/span&gt; &lt;span class="nx"&gt;enforcement&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;

&lt;span class="o"&gt;--&lt;/span&gt; &lt;span class="nx"&gt;In&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;depth&lt;/span&gt; &lt;span class="nx"&gt;telemetry&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;reporting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: That was a lot of information man, however, I’m glad that I've got something here 😄. &lt;/p&gt;

&lt;p&gt;In a nutshell again:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Your code should just focus on business logic, and not the infrastructure part!"&lt;/p&gt;

&lt;p&gt;"Eventually, organizations running large‑scale, complex applications might reach a tipping point where enhancing the application service-by-service becomes too difficult to scale, that's where a service mesh can help you!"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: Correct, you got it, man! &lt;/p&gt;

&lt;p&gt;Now, have your coffee and let me go- I have an architecture review call with one of our potential clients. 😉&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;John&lt;/strong&gt;: Ok, talk to their non-tech folks like this and they would love you!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VJ&lt;/strong&gt;: 😊 I’ll see. Although, you look happy now! 😄&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: This was just me story-telling, and representing this in a form that is easier to understand. This is in no way a full implementation or covers how to use service mesh. &lt;/p&gt;

&lt;p&gt;I will continue to share insights in a phased-out manner. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;📓 You can read this on my personal blog as well: &lt;a href="https://sachcode.com/tech/tea-time-chat-service-mesh"&gt;https://sachcode.com/tech/tea-time-chat-service-mesh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[More Topics]-&lt;a href="https://sachcode.com/"&gt;https://sachcode.com/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  References and Motivation:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://istio.io/docs/concepts/what-is-istio/"&gt;https://istio.io/docs/concepts/what-is-istio/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://istio.io/docs/ops/deployment/architecture/"&gt;https://istio.io/docs/ops/deployment/architecture/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Save your time, have these advanced Linux commands in your cheatsheet!</title>
      <dc:creator>Sachin Jha</dc:creator>
      <pubDate>Mon, 27 Apr 2020 19:50:51 +0000</pubDate>
      <link>https://dev.to/jhasach/save-your-time-have-these-linux-commands-in-your-cheatsheet-3o6f</link>
      <guid>https://dev.to/jhasach/save-your-time-have-these-linux-commands-in-your-cheatsheet-3o6f</guid>
      <description>&lt;p&gt;🐚 I describe Shell with words &lt;code&gt;omnipresence&lt;/code&gt; or &lt;code&gt;has ubiquity&lt;/code&gt;. Quick filtering or command chaining is like magic and gives us more powers, with Pipe ("|") and CLI utilities like sed, awk, grep, etc.&lt;/p&gt;

&lt;p&gt;📓 Hence, if you are related to Linux and Server troubleshooting in any way, and that involves your day to day work. Here is some quick reference to command-line know-hows:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: This is Part 1, just a quick reference guide that I've had in my cheatsheet for server troubleshooting. The list I have is exhaustive, so I will keep things simple and continue to share insights in a phased-out manner.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;---&lt;/span&gt;&lt;span class="nx"&gt;Super&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;powers&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="nx"&gt;ps&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;SSH&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;Removing&lt;/span&gt; &lt;span class="nx"&gt;files&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;Grep&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;Find&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;Sudo&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;SSL&lt;/span&gt;
&lt;span class="o"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  # SSL
&lt;/h2&gt;

&lt;p&gt;With &lt;code&gt;curl's&lt;/code&gt; insecure option we can filter the output and get only the &lt;code&gt;Server certificate&lt;/code&gt; information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;curl&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;insecure&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;v&lt;/span&gt; &lt;span class="nx"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//www.sachcode.com 2&amp;gt;&amp;amp;1 | \&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;awk&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;BEGIN { cert=0 } /^&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s1"&gt;* Server certificate:/ { cert=1 } &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s1"&gt;
&amp;gt;  /^&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s1"&gt;*/ { if (cert) print }&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;Server&lt;/span&gt; &lt;span class="nx"&gt;certificate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;   &lt;span class="nx"&gt;subject&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=*&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sachcode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;   &lt;span class="nx"&gt;start&lt;/span&gt; &lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Mar&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt; &lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;05&lt;/span&gt; &lt;span class="mi"&gt;2020&lt;/span&gt; &lt;span class="nx"&gt;GMT&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;   &lt;span class="nx"&gt;expire&lt;/span&gt; &lt;span class="nx"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Jun&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt; &lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;05&lt;/span&gt; &lt;span class="mi"&gt;2020&lt;/span&gt; &lt;span class="nx"&gt;GMT&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;   &lt;span class="nx"&gt;common&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sachcode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;   &lt;span class="nx"&gt;issuer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;Let&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;s Encrypt Authority X3,O=Let&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="nx"&gt;Encrypt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;C&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;US&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;Connection&lt;/span&gt; &lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;host&lt;/span&gt; &lt;span class="nx"&gt;www&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sachcode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt; &lt;span class="nx"&gt;intact&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  # ps(processes status)
&lt;/h2&gt;

&lt;p&gt;Sort by the &lt;code&gt;highest CPU utilization&lt;/code&gt; in ascending order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;ps&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;aux&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;pcpu&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;less&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Sort by the &lt;code&gt;highest Memory utilization&lt;/code&gt; in ascending order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;ps&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;aux&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;pmem&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;less&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Print all processes running as &lt;code&gt;Root&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;ps&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;U&lt;/span&gt; &lt;span class="nx"&gt;root&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;u&lt;/span&gt; &lt;span class="nx"&gt;root&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Show process tree of all PIDs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;ps&lt;/span&gt; &lt;span class="nx"&gt;auxwf&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Show all process info and hierarchy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;ps&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;efH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Find top running processes by highest memory and CPU usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;ps&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;eo&lt;/span&gt; &lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;ppid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="nx"&gt;mem&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="nx"&gt;cpu&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="o"&gt;=-%&lt;/span&gt;&lt;span class="nx"&gt;mem&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;head&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;ps&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;eo&lt;/span&gt; &lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;ppid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="nx"&gt;mem&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="nx"&gt;cpu&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="o"&gt;=-%&lt;/span&gt;&lt;span class="nx"&gt;cpu&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;head&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  # SSH
&lt;/h2&gt;

&lt;p&gt;Generate generic ssh key pair:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;ssh&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;keygen&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;q&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt; &lt;span class="nx"&gt;rsa&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;f&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="sr"&gt;/.ssh/&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;N&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;C&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  # Removing files
&lt;/h2&gt;

&lt;p&gt;Remove files &lt;code&gt;over 30 days old&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;find&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;mtime&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nx"&gt;xargs&lt;/span&gt; &lt;span class="nx"&gt;rm&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;rf&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Remove files &lt;code&gt;older than 7 day&lt;/code&gt; starting with 'backup':&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;find&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;f&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;backup*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;mtime&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;exec&lt;/span&gt; &lt;span class="nx"&gt;rm&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  # Grep
&lt;/h2&gt;

&lt;p&gt;Look through all files in current dir for word “foo”:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;grep&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;R&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;foo” .
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;View last ten lines of output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;grep&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;C&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;invalid view source” /var/log/info.log
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Display line number of message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;grep&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;pattern&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  # Find
&lt;/h2&gt;

&lt;p&gt;Exclude directories in find:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;find&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;tmp&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;not&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;tmp&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;dir&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;prune&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;o&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  # Sudo
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;To check sudo access for a user!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Method 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;sudo&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;l&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;U&lt;/span&gt; &lt;span class="nx"&gt;sachcode&lt;/span&gt; 
&lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="nx"&gt;sachcode&lt;/span&gt; &lt;span class="nx"&gt;may&lt;/span&gt; &lt;span class="nx"&gt;run&lt;/span&gt; &lt;span class="nx"&gt;the&lt;/span&gt; &lt;span class="nx"&gt;following&lt;/span&gt; &lt;span class="nx"&gt;commands&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ALL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;ALL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Method 2: Another way to find out if a user has sudo access is by checking if the said user is member of the sudo group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;groups&lt;/span&gt; &lt;span class="nx"&gt;sachcode&lt;/span&gt;
&lt;span class="nx"&gt;sachcode&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;sachcode&lt;/span&gt; &lt;span class="nx"&gt;wheel&lt;/span&gt; &lt;span class="nx"&gt;docker&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Method 3: list all sudo users of your system&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nx"&gt;$&lt;/span&gt; &lt;span class="nx"&gt;genet&lt;/span&gt; &lt;span class="nx"&gt;group&lt;/span&gt; &lt;span class="nx"&gt;sudo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Read more about me: &lt;a href="https://sachcode.com/"&gt;https://sachcode.com/&lt;/a&gt;&lt;br&gt;
Reference on my website: &lt;a href="https://sachcode.com/tech/linux-troubleshooting-cheatsheet/"&gt;https://sachcode.com/tech/linux-troubleshooting-cheatsheet/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>productivity</category>
      <category>programming</category>
      <category>bash</category>
    </item>
    <item>
      <title>Python 3 for System Administrators: The Plot!</title>
      <dc:creator>Sachin Jha</dc:creator>
      <pubDate>Sun, 26 Apr 2020 19:25:27 +0000</pubDate>
      <link>https://dev.to/jhasach/python-3-for-system-administrators-the-plot-3gdm</link>
      <guid>https://dev.to/jhasach/python-3-for-system-administrators-the-plot-3gdm</guid>
      <description>&lt;h4&gt;
  
  
  📓 Shell or Python? Should I replace my Shell scripts with Python?
&lt;/h4&gt;



&lt;p&gt;&lt;code&gt;It’s debatable!&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;That’s what &lt;code&gt;Nick&lt;/code&gt;, who has been a mentor for &lt;code&gt;Ajay&lt;/code&gt;, added. &lt;/p&gt;

&lt;p&gt;It certainly depends, whether you work in Sysadmin, Cloud operations, DevOps, or SRE. But that love for Shell would always be there. We all started with it and it’s the glue! &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ajay&lt;/strong&gt;: But isn’t Shell scripts slow? In addition, it lacks data structure and gets highly complex with long scripts. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nick&lt;/strong&gt;: Maybe, but that’s not the point 😄 There are day-to-day tasks that can be performed in both, say checking application ports, starting/stopping the server, checking the resources consumption/load, backing up your database and exporting it to object storage.&lt;/p&gt;

&lt;p&gt;🐍 &lt;code&gt;Python&lt;/code&gt; is clean, it feels like writing pseudocode. In other words, it’s easier to write and maintain, provides better error handling, can perform OOP (object-oriented programming), and the best part is argument parsing and modules. &lt;/p&gt;

&lt;p&gt;🐚 &lt;code&gt;Shell&lt;/code&gt; is something that we all have started with, hence I describe it with words “omnipresence” or “has ubiquity”. Quick filtering or command chaining with Pipe ("|") and CLI utilities like sed, awk, grep, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pyZ43b-a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8e9muvqd4v7kj8kcc4yt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pyZ43b-a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8e9muvqd4v7kj8kcc4yt.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ajay&lt;/strong&gt;: Awesome, let me give it a shot; it would certainly help to add new skills to my knowledge bank, at the very least. &lt;/p&gt;

&lt;p&gt;Hence, &lt;code&gt;Ajay&lt;/code&gt;- who has been a sysadmin all the while writing scripts in shell, just wants to try Python and see how he can make use of both to add more efficiency to his day-to-day work.&lt;/p&gt;

&lt;p&gt;So, this is &lt;code&gt;Ajay’s&lt;/code&gt; review on Linux academy’s course for Python which he found out while browsing the internet and it simply said: “Learn or start only with modules and structure that would be useful for you as Sysadmin and not the whole Python at once!”&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ajay&lt;/em&gt; can be any person who has spent a good time with shell, and not specially sysadmin. So this is for anyone who just wants to add an element to fun to work and has been wanting to learn Python for a long time!&lt;/p&gt;

&lt;p&gt;The entire story/review can be found with the following link, it was a bit long to add here!&lt;/p&gt;

&lt;p&gt;Review: &lt;a href="https://sachcode.com/tech/linux-academy-review-system-administrators-python/"&gt;https://sachcode.com/tech/linux-academy-review-system-administrators-python/&lt;/a&gt;&lt;br&gt;
Acloudguru:  &lt;a href="https://acloudguru.com/"&gt;https://acloudguru.com/&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Note: This is in no way a connection or recommendation from me to try only Linux Academy; I just loved the course and this was an honest review. 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It contains the use-case on who this course is for, my experience on the operations side, and some key takeaways. Each section’s outcome(s), and the overall links to codes, as well as entire Python projects-repos on GitHub that came out as learning.&lt;/p&gt;

&lt;p&gt;Some of the fun exercise(s) and key outcomes- snip!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Project:
We have many database servers that we manage, and we want to create a 
single tool that we can use to easily back up the databases to either 
AWS S3 or locally. We would like to be able to:

&amp;gt; Specify the database URL to backup.
&amp;gt; Specify a “driver” (local or s3)
&amp;gt; Specify the backup “destination”. This will be a file path for local 
and a bucket name for s3.
&amp;gt; Depending on the “driver”, create a local backup of the database or 
upload the backup to an S3 bucket.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/linuxacademy/content-python-for-sys-admins/tree/master/pgbackup"&gt;https://github.com/linuxacademy/content-python-for-sys-admins/tree/master/pgbackup&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Usage:
..............
Pass in a full database URL, the storage driver, and destination.
S3 Example w/ bucket name:
$ pgbackup postgres://bob@example.com:5432/db_one --driver s3 backups

Local Example w/ local path:
$ pgbackup postgres://bob@example.com:5432/db_one --driver local \
/var/local/db_one/backups/dump.sql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🖊️ &lt;a href="https://sachcode.com/"&gt;https://sachcode.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>python</category>
      <category>bash</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
