<?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>Forem: Sunil Vijay</title>
    <description>The latest articles on Forem by Sunil Vijay (@sunilvijay).</description>
    <link>https://forem.com/sunilvijay</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%2F353843%2Fced5bb55-b209-4b92-be68-9ec78fdc9ab5.png</url>
      <title>Forem: Sunil Vijay</title>
      <link>https://forem.com/sunilvijay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/sunilvijay"/>
    <language>en</language>
    <item>
      <title>Drilling down kubernetes cheat sheet</title>
      <dc:creator>Sunil Vijay</dc:creator>
      <pubDate>Wed, 20 Jan 2021 20:27:29 +0000</pubDate>
      <link>https://forem.com/sunilvijay/drilling-down-kubernetes-cheat-sheet-2f83</link>
      <guid>https://forem.com/sunilvijay/drilling-down-kubernetes-cheat-sheet-2f83</guid>
      <description>&lt;p&gt;&lt;em&gt;Hey dev people out there, it's been a longtime since writing a blog so thought of starting this 2021 with some useful resources on kubernetes. Hope you benefit out of it&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Kubernetes 🎺
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Kubernetes is a platform for managing containerised workloads. kubernetes orchestrates computing, networking, and storage to provide a seamless portability across infrastructure providers.&lt;/em&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;em&gt;This particular blog is based on noobs for kube commands and operations. Also this can be used as a quick handbook for k8s.&lt;/em&gt;
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpy3hpme5c5pl5qfcf4a1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpy3hpme5c5pl5qfcf4a1.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I'm putting deployment in a simple sentence to understand. Basically deployment is something will specify how many replicas should we run inside the Kubernetes cluster. Also that's a way to handle HA clusters [ High Availability ]. By just writing a yaml file you can deploy a deployment. Will show you some sample. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzxjfgag2j6qj5f58vwz8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzxjfgag2j6qj5f58vwz8.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Image source: matthewpalmer
&lt;/h6&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get deploy
kubectl get deploy -o wide 
kubectl get deploy -o yaml 
kubectl describe deploy
kubectl edit deploy [ deployment.name ] -n [ namespace.name ]
kubectl run redis-app --image=redis --replicas=4 --port=6943
kubectl delete deployment [ deployment.name ] -n [ namespace.name ]
kubectl scale --replicas=5 deployment/redis-app
kubectl rollout status deployment/redis-app
kubectl rollout history deployment/redis-app
kubectl rollout pause deployment/redis-deployment, resume
kubectl rollout undo deployment/redis-deployment
kubectl expose deployment/redis --type=NodePort -n [ namespace.name ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Service
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes Service is an abstraction which defines a logical set of Pods and a policy by which to access them – sometimes called a micro-service. Something like DNS where you can expose your application to outside world. This divides into 2, so called NodePort / Cluster IP. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn3iterk8eu0afulyh415.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fn3iterk8eu0afulyh415.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Image source: matthewpalmer
&lt;/h6&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get svc 
kubectl get svc -o wide 
kubectl get svc -o yaml 
kubectl get svc -show-labels
kubectl describe svc
kubectl get services –sort-by=.metadata.name
kubectl delete pods,services -n [ namespace.name ]
kubectl get endpoints -A 
kubectl get service redis-service -o go-template='{{.spec.clusterIP}}’
kubectl get service nginx-service -o go-template='{{(index .spec.ports 0).port}}’
kubectl patch svc redis-service -p '{"spec": {"type": "LoadBalancer"}}'
kubectl expose service/redis-svc --type=LoadBalancer -n [ namespace.name ]
kubectl port-forward svc/redis-master 6379:6379
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Nodes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Node is nothing but the host machine where your pod runs !
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get nodes
kubectl get nodes -o wide 
kubectl get nodes -o yaml 
kubectl get nodes --selector=[label_name] 
kubectl get nodes -o json 
kubectl describe nodes 
kubectl top nodes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pods
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pods in Kubernetes are the cube box which comprised with the docker containers. When a pod gets deployed you'll have a unique IP address for that pod. Also as like all, pod can also be defined in yaml file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get pods 
kubectl get pods -o wide 
kubectl get pods -o yaml 
kubectl get pods --show-labels 
kubectl top pod --all-namespaces
kubectl edit pod [pod.name] -n [namespace.name]
kubectl get pods --field-selector status.phase=Running
kubectl get pods | grep -e ContainerCannotRun -e Pending -e Unknown -e Error
kubectl get pods –sort-by=’.status.containerStatuses[0].restartCount’
kubectl get pods -o=’custom-columns=PODS:.metadata.name,Images:.spec.containers[*].image’
kubectl get pods nginx -o yaml --export &amp;gt; nginx_pod_info.yaml 
kubectl get pods –sort-by=’.status.containerStatuses[0].restartCount’
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Namespace
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Namespaces in kube is like separate blocks where your deployment is isolated for easier to deploy and delete. By default kubernetes will create 3 namespaces: Kube-system, Kube-public, default.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get namespace 
kubectl get namespace [ namespace-name ] -o yaml 
kubectl describe namespace [ namespace-name ] 
kubectl edit namespace [ namespace-name ]
kubectl get events --all-namespace 
kubectl get events -sort-by=.metadata.creationTimestamp
kubectl -n [ namespace-name ] delete po,svc,deploy --all
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Logs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sometimes we might need to check why the pods are getting failed, so we need to check the logs of the pods deployed with the below commands.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl get events
kubectl get events -n default 
kubectl get events -w 
kubectl exec -it -n “$ns” “$podname” – sh -c “echo $msg &amp;gt;&amp;gt;/logs/poderror.log”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Labels
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Labels can be used to organize and select subsets of objects. They are often used for example to identify releases (beta, stable), environments (dev, prod), or tiers (frontend, backend).
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl label pods redis-master owner=sunil
kubectl label pods redis-master owner-   #this command is to remove label
kubectl label [node.name] disktype=ssd
kubectl label [pod.name] env=prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Service Account
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl edit sa [service.account.name]
kubectl delete sa [service.account.name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Some kube maintenance command
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl cordon [node.name]
kubectl uncordon [node.name]
kubectl drain [node.name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Taint
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kubectl taint [node.name] [taint.name]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Kube-shell terminal for faster insight
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;These days kube-shell terminal made me more comfy on resolving k8s conflicts and faster retrieval of cluster information. Not sure this can be used on client premises [Security Approval Needed]. But make use of it on your local system. Hope this would save your time in typing commands and not to view my blog again&lt;/em&gt; xD &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftvtzw2ns1k6xbnmor7o6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftvtzw2ns1k6xbnmor7o6.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⏬ &lt;a href="https://github.com/cloudnativelabs/kube-shell" rel="noopener noreferrer"&gt;Download kube-shell click here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Hacks
&lt;/h2&gt;

&lt;h4&gt;
  
  
  To list all the images which is present inside the cluster
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbkxj2fxghg2enad2icrp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbkxj2fxghg2enad2icrp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;em&gt;Also I'm including this video, trust me it'll be fun to watch and easy to understand&lt;/em&gt; 😅
&lt;/h5&gt;

&lt;h6&gt;
  
  
  Thanks Matt Butcher &amp;amp; Bailey Beougher for this video.
&lt;/h6&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/4ht22ReBjno"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>linux</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Script to clean out files in dir and have a note of deleted files in deleted_files.log</title>
      <dc:creator>Sunil Vijay</dc:creator>
      <pubDate>Thu, 06 Aug 2020 04:21:53 +0000</pubDate>
      <link>https://forem.com/sunilvijay/script-to-clean-out-files-in-dir-and-have-a-note-of-deleted-files-in-deletedfiles-log-2741</link>
      <guid>https://forem.com/sunilvijay/script-to-clean-out-files-in-dir-and-have-a-note-of-deleted-files-in-deletedfiles-log-2741</guid>
      <description>&lt;p&gt;Today we'll discuss some scenarios in bash scripting. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem Statement:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let's say I have a directory in my Linux driver name called movies. And I'm downloading a film from the torrent &lt;em&gt;daily&lt;/em&gt; to relax. So in an average round, my machine would have a bottleneck of disk space. So I need to delete my old files which were downloaded past 2 days ago. And also I need to delete files and copy the name and date of the deleted files in a log file for my later check what has been deleted.&lt;br&gt;
i.e) /home/user/movies/&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: take this just as an example and implement it in any kinda scenario. &lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;Also, Discuss some of your thoughts in comments, if I'm wrong, suggest some best practices. Ideas are always welcome. Thanks in advance....  &lt;/p&gt;

</description>
      <category>bash</category>
      <category>devops</category>
      <category>help</category>
    </item>
    <item>
      <title>Cheat sheet for Linux Hacking 😅</title>
      <dc:creator>Sunil Vijay</dc:creator>
      <pubDate>Thu, 23 Jul 2020 14:12:40 +0000</pubDate>
      <link>https://forem.com/sunilvijay/cheat-sheet-for-linux-hacking-5b8h</link>
      <guid>https://forem.com/sunilvijay/cheat-sheet-for-linux-hacking-5b8h</guid>
      <description>&lt;p&gt;Good eve fellow folks, Just came across this image in internet today wanted to share with you all. Just benefit out of it. Happy Hacking 😅&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqm0ovmhoxfcaq105t9vq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqm0ovmhoxfcaq105t9vq.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>linux</category>
      <category>security</category>
    </item>
    <item>
      <title>What kind of maintenance has to be done for servers ?</title>
      <dc:creator>Sunil Vijay</dc:creator>
      <pubDate>Tue, 21 Jul 2020 18:12:03 +0000</pubDate>
      <link>https://forem.com/sunilvijay/what-kind-of-maintenance-has-to-be-done-for-servers-5dng</link>
      <guid>https://forem.com/sunilvijay/what-kind-of-maintenance-has-to-be-done-for-servers-5dng</guid>
      <description>&lt;p&gt;I Basically do some sanity check beginning of month for all these 3 servers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App server 🖥️&lt;/li&gt;
&lt;li&gt;Web server 🌐&lt;/li&gt;
&lt;li&gt;Database server 🗄️&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Asked in an interview&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now would like to know how you categories you maintenance based upon these 3 servers. There is something I need to know, maintenance done in different manner for these 3. Like if your app machine runs a Java server the update process and maintenance is very easy. But in case of your db server requires some care. &lt;/p&gt;

&lt;p&gt;Thanks in advance folks.🥰😇👍🏼&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>devops</category>
      <category>linux</category>
      <category>help</category>
    </item>
    <item>
      <title>A day as DevOps Engineer in a Startup.</title>
      <dc:creator>Sunil Vijay</dc:creator>
      <pubDate>Fri, 17 Jul 2020 10:39:38 +0000</pubDate>
      <link>https://forem.com/sunilvijay/a-day-as-devops-engineer-in-a-startup-4ehf</link>
      <guid>https://forem.com/sunilvijay/a-day-as-devops-engineer-in-a-startup-4ehf</guid>
      <description>&lt;p&gt;Hello Fellow folks, Since too many people ask my daily routine, triggered me to write up this post. I'm not very much experienced as DevOps but would like to share my thoughts. &lt;/p&gt;

&lt;p&gt;Trust me, I picked up DevOps just in random. Feeling lucky to be here as a DevOps Engineer. Sometimes I even call myself DevOps Kid. Proud moments hahahaha....  😃 &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Age is just a number, Your skill matters.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Okay now, let me take you to a walk around of my daily routine. 🏃&lt;/p&gt;

&lt;p&gt;My day begins at 7 am. A small jog would be fine to refresh me. sightseeing literally 👀&lt;/p&gt;

&lt;p&gt;Getting into the office 🏢 at 10 am morning, Just look around and a morning chill talks with office colleagues. Maybe we can call it as &lt;em&gt;Networking&lt;/em&gt; 🎭&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m9kJgGoV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/blog.zricks.com/wp-content/uploads/2016/09/Microsoft-Gurgaon-Office-Pics-14.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m9kJgGoV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i1.wp.com/blog.zricks.com/wp-content/uploads/2016/09/Microsoft-Gurgaon-Office-Pics-14.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10.30 AM&lt;/strong&gt; &lt;br&gt;
Checking my mails, Let me see what's up for me today. And reading some blog to keep me updated. I would suggest everyone to do this. This makes me more confident to start my day. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The more you learn, The more you expose yourself to the world&lt;/em&gt; 🔆&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;11.00 AM&lt;/strong&gt;&lt;br&gt;
Standup meeting with the Product Team. To make things clear between DevOps and developers. Discussing where to Optimise the product. Trying to be Professional throughout this meeting. 😬&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11.30 AM&lt;/strong&gt; &lt;br&gt;
Doing some sanity checks in all the servers in different staging areas. Then check all the instances are performing without any flaw and below my alert threshold level. With the help of some tools like "Some Monitoring Tools". If anything goes wrong then straight away go to the respective logs. Kinda &lt;em&gt;Troubleshooting&lt;/em&gt;  work with some coffee. ☕ &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.00 PM&lt;/strong&gt; &lt;br&gt;
Its time for some delicious South Indian meal with vada payasam, getting into the dining area with smiling faces.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;2.00 PM&lt;/strong&gt; &lt;br&gt;
Then now back to work with a drowsy feeling hahahahaha, Ok jokes apart. Opening Chatbox to check any issues pop-up. Then to work on that and update the issue fix to developers. Sometimes due to some heavy traffic in this time range from 2pm to 5pm. We may have work on Web servers. And again some troubleshooting work inside Database servers. Just to keep a word here, &lt;em&gt;DataOps&lt;/em&gt; also have to be handled by DevOps Team. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.00 PM&lt;/strong&gt;&lt;br&gt;
Go for a cup of coffee with teammates, again kinda &lt;em&gt;tech talks&lt;/em&gt; in this coffee break. 🍻&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.20 PM&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Time to code with some newbie skills 💣&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7-mXU3QK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.unsplash.com/photo-1510915228340-29c85a43dcfe%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26w%3D1000%26q%3D80" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7-mXU3QK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.unsplash.com/photo-1510915228340-29c85a43dcfe%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26w%3D1000%26q%3D80" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Come back to the desk and start working with some automation scripts. Literally playing with python and bash scripting. Then Uploading all the scripts to servers &amp;amp; test run the scripts. for safer side use webhooks in the script to get messages(slack) once the cronjob is done. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.30 PM&lt;/strong&gt;&lt;br&gt;
Before signing off work, Have a cross-check the work done today. And Scheduling meeting for tomorrow with developers and check all the tickets has been closed with proper comments. Any new requirements placed by developers like new framework or new stack installation in server, this is the proper idle time to work on it. Less server traffic, Ease of work. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: My work schedule may vary day by day. Some times my work environment would be even more challenging depending on the tasks.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;6.00 PM&lt;/strong&gt;&lt;br&gt;
Time to leave the office with some work satisfaction... &lt;br&gt;
Traveling to home sweet home 🚕&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.45 PM&lt;/strong&gt; &lt;br&gt;
Put your office stuff aside and its time for some mandatory walk at the terrace with fresh air. and some exercise too. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zMzmT4pl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6cc1wg6t92txidi2na6o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zMzmT4pl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6cc1wg6t92txidi2na6o.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7.30 PM&lt;/strong&gt; &lt;br&gt;
Watch Netflix Series by preparing dinner 🍗 🍝 🍕&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9.00 PM&lt;/strong&gt;&lt;br&gt;
Trust me, late 9 is the right time to work on some DB side issues or upgrade process. You won't be disturbed with any kinda issue. stretch your legs in your own bed and start listening to some music and start your rolling Update for Database or whatever. Don't forget to place this process inside the screen(tool) in the terminal, so that the progress can be checked in the morning when you reach the office. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;DevOps mantra, Don't be in a hurry, keep things smooth in running&lt;/em&gt; 🎷 &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;11.00 PM&lt;/strong&gt;&lt;br&gt;
Some instagraming and get back to sleep. Sweet dreams Fellow folks. 🌛 &lt;/p&gt;

</description>
      <category>devops</category>
      <category>workstations</category>
      <category>career</category>
    </item>
    <item>
      <title>New Launch AWS CoPilot</title>
      <dc:creator>Sunil Vijay</dc:creator>
      <pubDate>Tue, 14 Jul 2020 05:46:03 +0000</pubDate>
      <link>https://forem.com/sunilvijay/new-launch-aws-copilot-56jb</link>
      <guid>https://forem.com/sunilvijay/new-launch-aws-copilot-56jb</guid>
      <description>&lt;p&gt;AWS has launched copilot, Its a container service integrates with Elastic Container Service. The copilot actually works like, You write a single docker file, and Copilot manages code push, build and launch in ECS. An automatic CI/CD pipeline is created by simply pushing to a Git Repository. By just providing your container Copilot handle high availability deployments and load balancer creation and configuration. And also future upgrades in copilot is Provision storage for your services. &lt;/p&gt;

&lt;p&gt;The Copilot has been focused on 3 main parts like &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Application&lt;/li&gt;
&lt;li&gt;Environment &lt;/li&gt;
&lt;li&gt;Service&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Follow the steps below to play around with AWS Copilot,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-Lo&lt;/span&gt; /usr/local/bin/copilot https://github.com/aws/copilot-cli/releases/download/v0.1.0/copilot-darwin-v0.1.0 &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
  &lt;span class="nb"&gt;chmod&lt;/span&gt; +x /usr/local/bin/copilot &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
  copilot &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, you'll see something like this in your terminal. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CSUHvrGT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://d2908q01vomqb2.cloudfront.net/fe2ef495a1152561572949784c16bf23abb28057/2020/06/24/copilot-help.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CSUHvrGT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://d2908q01vomqb2.cloudfront.net/fe2ef495a1152561572949784c16bf23abb28057/2020/06/24/copilot-help.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then now lets UP a simple Dockerfile which has a Nginx web server in it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; nginx:alpine&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="s"&gt; 80&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . /usr/share/nginx/html&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the basic Dockerfile, it says the container to build an image called Nginx from Docker HUB. And expose 80 port for Nginx. Then Copy some basic HTML file to the container.&lt;/p&gt;

&lt;p&gt;So when you run &lt;code&gt;copilot init&lt;/code&gt; you'll something in your terminal like this. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iOGG_lpn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://d2908q01vomqb2.cloudfront.net/fe2ef495a1152561572949784c16bf23abb28057/2020/06/24/optimized-copilot-init.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iOGG_lpn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://d2908q01vomqb2.cloudfront.net/fe2ef495a1152561572949784c16bf23abb28057/2020/06/24/optimized-copilot-init.gif" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So here what happens is like, the CoPilot will find my Dockerfile and prompt for a few questions, That's it, BINGO... &lt;/p&gt;

&lt;p&gt;CoPilot offers a Log section to view what happens in it.&lt;br&gt;
just by typing &lt;code&gt;copilot svc logs --follow&lt;/code&gt;, This is how it looks like. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6J8EZuhC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://d2908q01vomqb2.cloudfront.net/fe2ef495a1152561572949784c16bf23abb28057/2020/06/24/copilot-service-logs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6J8EZuhC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://d2908q01vomqb2.cloudfront.net/fe2ef495a1152561572949784c16bf23abb28057/2020/06/24/copilot-service-logs.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;2 Seconds, That's how long it takes a pit crew in F1 racing to get Four tyres off and on. what's your excuse now? Be productive and save time. &lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>aws</category>
      <category>docker</category>
      <category>container</category>
      <category>devops</category>
    </item>
    <item>
      <title>DevOps best practices for setting up recovery points in infrastructure.</title>
      <dc:creator>Sunil Vijay</dc:creator>
      <pubDate>Wed, 29 Apr 2020 05:34:33 +0000</pubDate>
      <link>https://forem.com/sunilvijay/devops-best-practices-for-setting-up-recovery-points-in-infrastructure-486h</link>
      <guid>https://forem.com/sunilvijay/devops-best-practices-for-setting-up-recovery-points-in-infrastructure-486h</guid>
      <description>&lt;p&gt;One of the challenges with automating deployment is the cut-over itself, taking software from the final stage of testing to live production. You usually need to do this quickly in order to minimize downtime. The blue-green deployment approach does this by ensuring you have two production environments, as identical as possible. At any time one of them, let's say blue for the example, is live. As you prepare a new release of your software you do your final stage of testing in the green environment. Once the software is working in the green environment, you switch the router so that all incoming requests go to the green environment - the blue one is now idle.&lt;/p&gt;

&lt;p&gt;Blue-green deployment also gives you a rapid way to rollback - if anything goes wrong you switch the router back to your blue environment. There's still the issue of dealing with missed transactions while the green environment was live, but depending on your design you may be able to feed transactions to both environments in such a way as to keep the blue environment as a backup when the green is live. Or you may be able to put the application in read-only mode before cut-over, run it for a while in read-only mode, and then switch it to read-write mode. That may be enough to flush out many outstanding issues.&lt;/p&gt;

&lt;p&gt;The two environments need to be different but as identical as possible. In some situations they can be different pieces of hardware, or they can be different virtual machines running on the same (or different) hardware. They can also be a single operating environment partitioned into separate zones with separate IP addresses for the two slices.&lt;/p&gt;

&lt;p&gt;Once you've put your green environment live and you're happy with its stability, you then use the blue environment as your staging environment for the final testing step for your next deployment. When you are ready for your next release, you switch from green to blue in the same way that you did from blue to green earlier. That way both green and blue environments are regularly cycling between live, previous version (for rollback) and staging the next version.&lt;/p&gt;

&lt;p&gt;An advantage of this approach is that it's the same basic mechanism as you need to get a hot-standby working. Hence this allows you to test your disaster-recovery procedure on every release. (I hope that you release more frequently than you have a disaster.)&lt;/p&gt;

</description>
      <category>devops</category>
      <category>deployment</category>
      <category>bluegreen</category>
      <category>disasters</category>
    </item>
  </channel>
</rss>
