<?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 HarvinderSingh on Medium]]></title>
        <description><![CDATA[Stories by HarvinderSingh on Medium]]></description>
        <link>https://medium.com/@123heerasingh?source=rss-67654b808629------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*l_8k1je_Z3Ams5uu.jpg</url>
            <title>Stories by HarvinderSingh on Medium</title>
            <link>https://medium.com/@123heerasingh?source=rss-67654b808629------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 11:35:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@123heerasingh/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[Optimizing Docker Images: Reduce Size & Improve Security ]]></title>
            <link>https://123heerasingh.medium.com/optimizing-docker-images-reduce-size-improve-security-a8a2252ace6d?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8a2252ace6d</guid>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Tue, 11 Feb 2025 16:14:20 GMT</pubDate>
            <atom:updated>2025-02-11T16:14:20.793Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduction</p><p>Docker images are the backbone of modern containerized applications, but if not optimized, they can become bloated, slow, and vulnerable. In this article, we’ll cover:</p><p>✅ Best practices to reduce Docker image size<br>✅ Common issues caused by large images<br>✅ Secure image creation techniques<br>✅ Practical code snippets to implement these strategies</p><p>By the end, you&#39;ll be able to create lean, efficient, and secure Docker images.</p><p>---</p><p>1️⃣ Why Does Docker Image Size Matter?</p><p>A large Docker image leads to:</p><p>❌ Slow deployments → Large images take longer to pull/push.<br>❌ High storage costs → More disk space is required.<br>❌ Security vulnerabilities → Unused libraries increase the attack surface.<br>❌ Resource-heavy containers → Wastes memory and CPU.</p><p>🚀 Ideal Docker Image Size</p><p>Small apps (static binaries): &lt;50MB</p><p>Medium apps: 100–200MB</p><p>Large apps: &lt;500MB (avoid crossing this limit)</p><p>Let’s now optimize our Docker images!</p><p>---</p><p>2️⃣ Best Practices to Reduce Docker Image Size</p><p>1. Use Minimal Base Images</p><p>A good starting point is to replace heavy OS images (ubuntu, debian) with lighter alternatives.</p><p>🚀 Better Alternatives:<br>| Heavy Image | Lightweight Alternative | |------------|------------------------| | ubuntu (100MB+) | alpine (~5MB) | | python:3.9 (920MB) | python:3.9-alpine (~45MB) | | node:latest (990MB) | node:18-alpine (~30MB) |</p><p>Example: Using Alpine Instead of Ubuntu</p><p># Avoid this (large size)<br>FROM python:3.9</p><p># Use this (smaller &amp; optimized)<br>FROM python:3.9-alpine</p><p>&gt; Note: Alpine is lightweight but may require additional libraries since it uses musl instead of glibc.</p><p>---</p><p>2. Use Multi-Stage Builds</p><p>Instead of including unnecessary build tools in the final image, use multi-stage builds to keep it lean.</p><p>Example: Multi-Stage Build for a Go App</p><p># Stage 1: Build the app<br>FROM golang:1.18 AS builder<br>WORKDIR /app<br>COPY . .<br>RUN go build -o myapp</p><p># Stage 2: Create a lightweight runtime image<br>FROM alpine:latest<br>COPY --from=builder /app/myapp /myapp<br>ENTRYPOINT [&quot;/myapp&quot;]</p><p>✅ The final image contains only the compiled binary, making it much smaller.</p><p>---</p><p>3. Exclude Unnecessary Files (.dockerignore)</p><p>Docker copies everything in the project directory unless you tell it otherwise. Use a .dockerignore file to exclude unwanted files.</p><p>Example .dockerignore File</p><p>node_modules <br>.git <br>__pycache__/ <br>logs/</p><p>✅ This prevents unnecessary files from bloating the image.</p><p>---</p><p>4. Minimize Image Layers</p><p>Each RUN statement creates a new layer, increasing image size. Combine commands to reduce layers.</p><p>Bad Practice (Creates Multiple Layers)</p><p>RUN apt-get update<br>RUN apt-get install -y curl<br>RUN rm -rf /var/lib/apt/lists/*</p><p>Optimized Approach (Single Layer)</p><p>RUN apt-get update &amp;&amp; apt-get install -y curl &amp;&amp; rm -rf /var/lib/apt/lists/*</p><p>✅ Fewer layers = smaller, faster images</p><p>---</p><p>5. Use Distroless or Scratch Images</p><p>If your application doesn’t require an OS, use distroless or scratch.</p><p>Using scratch for Go Apps (Zero Dependencies, Ultra Small Size)</p><p>FROM scratch<br>COPY myapp /<br>ENTRYPOINT [&quot;/myapp&quot;]</p><p>✅ Final size? Just a few MBs!</p><p>---</p><p>3️⃣ Common Issues with Large Docker Images</p><p>🚨 1. Slow Image Pulls &amp; Deployments</p><p>Fix: Reduce image size by using alpine, multi-stage builds, and .dockerignore.</p><p>🚨 2. &quot;Out of Memory (OOMKilled)&quot; Error</p><p>Fix: Large images consume more RAM. Optimize dependencies and memory allocation.</p><p>🚨 3. Security Vulnerabilities in the Image</p><p>Fix: Use trusted base images and scan for vulnerabilities.</p><p>---</p><p>4️⃣ Secure Docker Image Best Practices</p><p>1. Use Trusted Base Images</p><p>Always use official, verified images.</p><p>🚨 Avoid:</p><p>FROM random-repo/python:3.9</p><p>✅ Use instead:</p><p>FROM python:3.9-alpine</p><p>&gt; Tip: Check image trustworthiness on Docker Hub.</p><p>---</p><p>2. Run as a Non-Root User</p><p>By default, containers run as root, which is a security risk.</p><p>Add a Non-Root User in Dockerfile</p><p>RUN adduser -D myuser<br>USER myuser</p><p>✅ This prevents privilege escalation attacks.</p><p>---</p><p>3. Scan Images for Vulnerabilities</p><p>Use Trivy or Docker Scan to detect vulnerabilities in your images.</p><p>Scan an Image with Trivy</p><p>trivy image my-image:latest</p><p>Scan an Image with Docker Scan</p><p>docker scan my-image</p><p>✅ Regular scans prevent security breaches.</p><p>---</p><p>4. Sign &amp; Verify Images</p><p>Ensure image authenticity with Cosign.</p><p>Sign an Image</p><p>cosign sign my-image:latest</p><p>Verify an Image</p><p>cosign verify my-image:latest</p><p>✅ This prevents tampering and ensures only trusted images are used.</p><p>---</p><p>5️⃣ Conclusion</p><p>By following these best practices, you can:<br>✅ Reduce image size → Faster deployments, lower storage costs<br>✅ Improve security → Fewer vulnerabilities, safer runtime<br>✅ Optimize performance → Lighter, faster containers</p><p>🚀 TL;DR: Key Takeaways</p><p>1️⃣ Use Alpine or Distroless base images<br>2️⃣ Apply Multi-Stage Builds to keep the final image small<br>3️⃣ Ignore unnecessary files with .dockerignore<br>4️⃣ Combine commands to minimize layers<br>5️⃣ Use Non-Root Users for security<br>6️⃣ Regularly scan images for vulnerabilities<br>7️⃣ Sign and verify images for authenticity</p><p>Smaller &amp; secure Docker images = Faster, Safer, and Cheaper Deployments! 🚀</p><p>---</p><p>💬 What’s your go-to Docker optimization trick? Drop a comment below! 🚀</p><p>#Docker #DevOps #Cloud #Security #Kubernetes #Containers</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8a2252ace6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[K-means clustering and its usage…]]></title>
            <link>https://123heerasingh.medium.com/k-means-clustering-and-its-usage-6234ed443a23?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/6234ed443a23</guid>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Wed, 07 Sep 2022 08:24:04 GMT</pubDate>
            <atom:updated>2022-09-07T08:24:04.881Z</atom:updated>
            <content:encoded><![CDATA[<p>In this world of towering growth of artificial intelligence and technology, Data plays a very crucial role. All the algorithms are being curated around data only. The very first thing in AI is machine learning, in which the computers are trained on a certain set of data known as dataset, and this dataset after several iterations and trainings helps in generation of a ml model, which is further used to solve the problems for which it was build.</p><p>The Learnings of the Machine depend upon the data itself, there are 3 types of learnings: Supervised learning, Unsupervised learning and Reinforcement learning. In supervised learning the data we have is labeled and self explanatory. In Unsupervised learning the data is unlabeled but the algorithms used are designed to find out some patterns in the dataset and try to segregate or map data in different groups. In Reinforcement learning the ai device learns from its actions.</p><p>K-Means Clustering is a clustering algorithm, which falls under the category of Unsupervised Learning. It tries to understand the data pattern and clusters it into K number of groups.</p><figure><img alt="K means credits: https://www.altoros.com/blog/using-k-means-clustering-in-tensorflow/" src="https://cdn-images-1.medium.com/max/640/0*GHxKDUmfoUp_tjPM.gif" /><figcaption>K-means Clustering src:<a href="https://www.altoros.com/blog/using-k-means-clustering-in-tensorflow/">https://www.altoros.com/blog/using-k-means-clustering-in-tensorflow/</a></figcaption></figure><p>K-means clustering can be used in almost every domain, ranging from banking to recommendation engines, cyber security, document clustering to image segmentation. It is typically applied to data that has a smaller number of dimensions, is numeric, and is continuous.</p><p>k-means clustering is one of the commonly used clustering algorithms in cyber security analytics aimed at dividing security related data into groups of similar entities, which in turn can help in gaining important insights about the known and unknown attack patterns. This technique helps a security analyst to focus on the data specific to some clusters only for the analysis. To improve performance, k-means can exploit the triangle inequality to skip many point-center distance computations, without affecting the clustering results. Using this analytics many malwares and attacks can be prevented and help in the safeguarding of the system and important information from being hacked.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6234ed443a23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run a Graphical UI application or a program on a Docker container?]]></title>
            <link>https://123heerasingh.medium.com/how-to-run-a-graphical-ui-application-or-a-program-on-a-docker-container-549b495b12f1?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/549b495b12f1</guid>
            <category><![CDATA[vimal-daga]]></category>
            <category><![CDATA[harvinder-singh]]></category>
            <category><![CDATA[environmental-variables]]></category>
            <category><![CDATA[docker-with-gui]]></category>
            <category><![CDATA[networking]]></category>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Fri, 28 Jan 2022 14:53:32 GMT</pubDate>
            <atom:updated>2022-01-28T14:53:32.797Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/299/0*RAdICM2A6CLKOLUI" /></figure><p>Generally docker is used to run servers or some specific purpose containers, but in some exceptional cases where we want to run a gui application like a web browser like firefox, wire-shark or a text editor like gedit or any libre office tool or any thing like that. Then, how do we get the display access for that container?</p><p>Before we find out a solution for this, let us understand the functioning of a docker container. Whenever we run a docker container it opens or gives us a terminal for that container if we ask for the terminal using(-it) option with our run command. Now this container is nothing but a normal program like any other programs or applications we run on our OS, but the difference is that it is loaded in different namespace and it feels like we are using or interacting with a new system altogether. So, when we want to attach any volume or drive to our container we just simply mount it using -v option, or when we want to copy a from our system we can do that using environmental variables, similarly when we want to use display for a gui supporting container we use environmental variable DISPLAY.</p><p>Now lets move towards our solution…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*va1opcv7GddFMXPjV9XPpQ.png" /><figcaption>1. Dockerfile for ur docker image (fire)</figcaption></figure><p>&gt; docker build -t fire .</p><p>&gt; docker run -it — rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix/ — net=host fire</p><p>&gt; Now you can try installing and running any of the GUI app like firefox, gedit etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Fv-t02WPNe6MG4eJ93D1Q.png" /><figcaption>firefox running inside a container.</figcaption></figure><p>This is how we can use GUI docker containers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=549b495b12f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OSPF and Dijkstra Algorithm…]]></title>
            <link>https://123heerasingh.medium.com/ospf-and-dijkstra-algorithm-79eac8e0dd57?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/79eac8e0dd57</guid>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Thu, 15 Jul 2021 18:16:48 GMT</pubDate>
            <atom:updated>2021-07-15T18:16:48.685Z</atom:updated>
            <content:encoded><![CDATA[<p>Working on through the internet has made our lives so much easier, the wires, cables, modems, or routers are installed in our homes or workplaces and are a very basic thing we want in our routine life. This might not grab everyone’s attention, but when you get into the research of how all this works, you get to know how the wires take your data to the routers and then to the servers. Data travels in the form of electrical signals as packets in electronic medium and in the form of light in optical fibre cables, the charged and uncharged ion indicates the binary data, higher bit is 1 and lower is 0. But when it comes to a wireless network the data travels in form of waves, crest represents higher bit, and trough represents lower bit.</p><p>Routers/ISPs connect through wires and help you to reach out to any site you want, ex.<a href="http://www.google.co.in/"> www.google.co.in</a>. Your home router takes you to your Internet Service Provider, and further your ISP tries to figure out which path to choose to reach out to the site you want. But in some cases you are in a network setup where your device (laptop or a mobile phone) connects to a switch, and the switch further connects to a router and the process continuous, or in a case you want to connect to a device connected to the same network but different subnet (example, different labs in a college or different departments at a workplace belong to the organization’s network but connect belong to different subnets, Company net — 10.0.0.0/24 and subnet1–192.160.10.0/24, subnet 2- 192.168.20.0/24). Some standards and algorithms are used to perform this action. OSPF is one of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/0*eAdOcj4iL22OFeLq" /></figure><p>Open Shortest Path First (OSPF) is an open link state routing protocol. OSPF routers learn the entire network topology for their “area” (the portion of the network they maintain routes for, usually the entire network for small networks). OSPF routers send event-driven updates. If a network is converged for a week, the OSPF routers will send no updates. OSPF has far faster convergence than distance vector protocols such as RIP. Internally OSPF used Dijkstra Algorithm to achieve the shortest path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/234/0*V9C1fX0oIHo0vHk8" /></figure><p>Suppose you are on router 0 network and want to send data packets to the device marked as number 6. The ospf will take the help of dijkstra algo and will help you to find the shortest path, which can be seen in the image. The algo works using the concept of weights which here in the ospf is the distance or number of intermediates it will meet while transmitting data. We need to maintain two sets, one set contains routers/switches included in the shortest path graph, another set includes routers/switches not yet included in the shortest path graph. At every step of the algorithm, we find a switch/router which is in the other set (set of not yet included) and has a minimum distance from the source.</p><p>I hope you found it informative.</p><p>Thanks for reading. 😄</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79eac8e0dd57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MongoDB: A Case Study…]]></title>
            <link>https://123heerasingh.medium.com/mongodb-a-case-study-ec5bb412f2fb?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec5bb412f2fb</guid>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Sat, 10 Jul 2021 19:33:33 GMT</pubDate>
            <atom:updated>2021-07-10T19:33:33.748Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*MHk1sURUZaqzlKW3ta8bYA.png" /></figure><p>In this data-driven world, every application we use is wielding data in some or another way. In order to store, retrieve, apply, analyze, and study the data, we require a way to structure our data, so we employ databases.</p><p>Databases are an organized way of keeping our data. Based upon Structure or way of storing data category, we can divide DBs into two major categories:</p><ol><li>SQL Databases.</li><li>NoSQL Databases.</li></ol><p>The SQL databases require a fixed schema that can store data where only fixed or specific fields are there. For example, any MCQ kind of exam. MySQL, Maria DB, MSSQL, are some of SQL based DBs. In NoSQL kind of DBs, there is a dynamic schema, i.e, like in some forms we have extra options other than the fixed structure example, add another contact number. NoSQL is Not Only SQL but more than SQL. MongoDB, Girraffe, Aurora, Cassendra are some example of NoSQL DB.</p><p>Mongo DB is a document oriented database. It is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.</p><p>Organisations like Uber, Lyft, Delivery Hero, LaunchDarkly, Stack, HENNGE K.K, Accenture ,CircleCI, GAP, Google, are some amonst the users of MongoDB. Let us have a look at how GAP is using Mongo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/324/1*-eHe4X-i7HRKrm3BUyTqCw.png" /></figure><p>GAP’s purchase order management system esures evolving quickly to consumer’s taste. Gap uses MongoDB for a wide range of supply chain systems, including various master data management, inventory and logistics functions, including purchase order management. Even something simple like a purchase order can have a huge impact on a company like Gap. A purchase order is a rich business object that contains various pieces of information (item type, color, price, vendor information, shipping information, etc.). A purchase order at Gap can be an order to a vendor to produce a certain article of clothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*Bgxg56SJzPhTlxEX.jpg" /></figure><p>Gap fulfils some objectives with the help of mongo, Collecting Money From Happy Customers, Square Pegs, Round Holes And Purchase Orders, Enabling Supply Chain Agility By Improving Developer Productivity, MongoDB As An “Extreme Enabler Of Agile Development”.</p><p>Not in months. Or weeks. But rather each day the development team was able to show the business what that feature might look like because of MongoDB’s flexibility.</p><p>“Software is ultimately about people,” leaders at Gap insists, and giving developers software like MongoDB that they love to use makes them happy, productive and agile.</p><p>Thank you.</p><p>Read more at — <a href="https://www.mongodb.com/blog/post/enabling-extreme-agility-gap-mongodb?c=7310eb88f8">https://www.mongodb.com/blog/post/enabling-extreme-agility-gap-mongodb?c=7310eb88f8</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec5bb412f2fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenShift Industry Use Cases…]]></title>
            <link>https://123heerasingh.medium.com/openshift-industry-use-cases-5aed905fb3b7?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/5aed905fb3b7</guid>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Wed, 07 Jul 2021 17:49:47 GMT</pubDate>
            <atom:updated>2021-07-07T17:49:47.615Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*KdZpdQxmxHcEX_YSFMIE9g.png" /></figure><p>RHOCP(Red Hat Open Container Platform), or Red Hat Open Shift is a PaaS(Platform as a Service) offered by Redhat. It is an on-premises PaaS, built on top of Kubernetes(k8s) and uses container technology like Docker(earlier), CRI-O(now).</p><p>Two phases are involved in RHOCP, Build Config (BC) and Deploy Config (DC). In BC, your code is fetched from the SCM tool and further you are asked to select the environment for the same. and a container image is built using this code and env. In the DC phase, Pods and Deployments are configured and your complete application is ready and deployed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*AgbcL9LapRpUjXF6waR0fQ.png" /></figure><p>OC has wide usage in the IT industry, some of the brands using it are, Volks Wagen, AirBus, Porsche informatic, Aviva, Medlife etc.</p><p>Lets see How Volks Wagen uses OpenShift.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-lK_z5GJI8Gx_8pIhbNqig.png" /></figure><p>Volks Wagen has developed an innovative virtual test environment for its vehicles. Several scenarios or environments are created and managed in order to test the smart software used inside the car. All these Scenarios are completely automated using different cases and deployments in the open shift container platform.</p><p>VW was able to back a position in Red Hat Innovation Awards 2021, this is the recent concept where Volks Wagen innovatively made the use of openshift to solve such a usecase.</p><p>Watch the complete video — <a href="https://www.youtube.com/watch?v=HIkJHlMWAdY">https://www.youtube.com/watch?v=HIkJHlMWAdY</a></p><p>Thank You.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5aed905fb3b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jenkins in the Industry…]]></title>
            <link>https://123heerasingh.medium.com/jenkins-in-the-industry-24f92a348f80?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/24f92a348f80</guid>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Wed, 07 Jul 2021 13:41:43 GMT</pubDate>
            <atom:updated>2021-07-07T13:41:43.506Z</atom:updated>
            <content:encoded><![CDATA[<p>#How is Jenkins used in the industry</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*hzF2_DiFMRDLHYZzF8Pe_w.png" /></figure><p>Jenkins is an open-source software automation tool, which helps you to implement the DevOps culture in your work. It allows you to fetch your code or different parts of your code available on the internet generally on an SCM tool like Github, set up an environment for running those chunks, integrate the parts of code, runs, tests, packages, and finally deploys your application or any other task you want to do.</p><p>It helps you create a CI/CD pipeline. Continuous Integration — fetch, build, run, test, fix errors/add something(plan), repeat. Continuous Delivery or Deployment — release(after successful pass in test), deploy/deliver, operate, monitor, repeat.</p><p>Who Uses Jenkins? Facebook, Netflix, Udemy, 4Linux, Alcatel-Lucent, Amadeus, Atmel, Avid Basis Tecnologia da Informação S.A.,BCZ.com, Bigpoint and alot more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*ZuoHgLIWn1e4yd6-qE9oEg.png" /></figure><p>Let us have a look at how Netflix uses Jenkins.</p><ul><li>Code is built and tested locally using Nebula.</li><li>Changes are committed to a central git repository</li><li>A Jenkins job executes Nebula, which builds, tests, and packages the application for deployment</li><li>Builds are “baked” into Amazon Machine Images (AMI)</li><li>Spinnaker pipelines are used to deploy and promote the code change.</li></ul><p>Build → Integrate → Bake → Deploy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*pkarlTICkDSi8djGZAdypQ.png" /></figure><p>As Netflix is also a prime user of Amazon’s AWS, It Runs its servers on top of AWS instances and uses images to build an environment for running the Applications.</p><p>Thanks…. Hope You liked it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24f92a348f80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AMAZON-AWS SQS: Use Case]]></title>
            <link>https://123heerasingh.medium.com/amazon-aws-sqs-use-case-aec8b50a1953?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/aec8b50a1953</guid>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Tue, 06 Jul 2021 18:24:35 GMT</pubDate>
            <atom:updated>2021-07-06T18:24:35.467Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*Ui8qde4kpF-t8tjHNK7iVA.png" /></figure><p>A Message queue is a term given to a software, tool or an application which helps two or more microservices, processes, or threads to communicate or share some data amongst themselves, commonly termed as inter process communication. It uses a queue the process communication. For example, a process or a microservice running frontend asks for some kind of prediction, the js connects to the backend program running a machine learning model also, if there is a requirement of any kind of data retrieval from the db all of it is managed by MQ. Some of the common used message ques are RabbitMQ, Apache Active MQ, Zero MQ AWS SQS, Azure Scheduler etc.</p><p>This blog describes Amazon AWS Simple Queue Services (SQS).</p><p>SQS by AWS offers a secure, affordable, highly available and durable hosted queues, which helps in integrating and decoupling distributed software systems. It offers common constructs such as dead-letter queues and cost allocation tags. It provides a generic web services API that you can access using any programming language that the AWS SDK supports. Different queues used are standard queues and FIFO queues.</p><p>Organizations using SQS are BMW, Red Bus, NASA, Capital One and a lot more. Lets See how BMW uses AWS services, and especially SQS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*RUxWgTr4Qb0n0Psks9KejQ.png" /></figure><p>BMW as a brand believes that disruption leads to new opportunities, so they exclaim that, usage of more software and services need to be used in the cars, Cloud solutions augment the BMW’s IT infrastructure. Agile and real time innovation, deep personalization and engagement. Learning Maps are an example for usage of cloud and sqs services. The sensor used in BMW 7series sends data to the cloud and after processing the programs running on the cloud(aws) dynamically updates the the digital Map, which creates a better and a faster routes not only for the driver but for the entire fleet running on that route. This may also help in autonomous driving cars. So all the ipc are governed using Simple Queue Services. The data sent by the sensor goes to the queue, the AI program works on that geo location provided by the sensor after consuming it from the Queue. Furthermore, the map data is processed and sent to the mq connecting the gps and maps in the car.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*fkRTqldYOppHGV6tbJ6zRQ.png" /><figcaption>src. <a href="https://aws.amazon.com/solutions/case-studies/bmw/">https://aws.amazon.com/solutions/case-studies/bmw/</a></figcaption></figure><p>This way BMW Uses Amazon SQS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aec8b50a1953" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create your own ansible role…]]></title>
            <link>https://123heerasingh.medium.com/how-to-create-your-own-ansible-role-da013658dfb4?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/da013658dfb4</guid>
            <category><![CDATA[vimal-daga]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[ansible-playbook]]></category>
            <category><![CDATA[ansible-roles]]></category>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Wed, 02 Jun 2021 14:30:00 GMT</pubDate>
            <atom:updated>2021-06-02T14:30:00.916Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*3kFfd2E8pOu92ixx" /></figure><p><strong>An Ansible</strong> role is a set of tasks to configure a host to serve a certain purpose like configuring a service. <strong>Roles</strong> are defined using YAML files with a predefined directory structure. A role directory structure contains directories: defaults, vars, tasks, files, templates, meta, handlers.</p><p>Creation and setup of your own Ansible Role in a RHEL system.</p><p>Step 1: Install system roles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*FZp0PxQXD_xIYlY2LSP8DA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*7IjssCU153X1tqxbcoVqAg.png" /></figure><p>Step 2: To create your own roles configure your ansible.cfg file located in /etc/ansible/ansible.cfg as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/114/1*w4ma79pBxorm632QShI1IQ.png" /></figure><p>Step 3: Initiate your Role</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*XlfJUAXiK-Ny3etqN6sgHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*1r9TeXI7g4mC8lmHbvk9TQ.png" /></figure><p>Step 4: Get into the directory and look for the main.yml file for writing tasks for your role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*b3QOSL2XOYQhsDEz3yJ0eA.png" /></figure><p>Step 5: Write your tasks in the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*cpvzq_ga3RjuDYA7XDd7fA.png" /><figcaption>Apache Webserver Role</figcaption></figure><p>Step 6: Create the file for running your role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*PtSLJnfUDCfyXvUqWPyoLQ.png" /><figcaption>any playbook</figcaption></figure><p>Step 7: Run the file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*_23dzSxDrzEDAVBNsLh3qA.png" /></figure><p>Step 8: Result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*Hku4AraczTMhFMQpiXk3Ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*kcRboP4higJnzWhE80di7w.png" /></figure><p>THANKS …</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da013658dfb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handlers in Ansible…]]></title>
            <link>https://123heerasingh.medium.com/handlers-in-ansible-2801353a357?source=rss-67654b808629------2</link>
            <guid isPermaLink="false">https://medium.com/p/2801353a357</guid>
            <category><![CDATA[ansible-playbook]]></category>
            <dc:creator><![CDATA[HarvinderSingh]]></dc:creator>
            <pubDate>Thu, 01 Apr 2021 10:55:22 GMT</pubDate>
            <atom:updated>2021-04-01T10:55:22.515Z</atom:updated>
            <content:encoded><![CDATA[<p>Suppose that you are managing the Ansible Controller Node and setting up web-servers (apache webserver). You already have some Managed Nodes running that server and overnight your site gets hyped and you get great incoming traffic, which your server nodes are not able to handle, So you are advised to set up the same server in new managed nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wdYzgViBypsJcFDdCezk4Q.png" /></figure><p>You run the following Ansible Playbook after adding the IPs of new nodes in your inventory file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*Cgv5cj1JQSmnJSUYZGUmWg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*lkVVl_y0Nm0HNi4gsi3XIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*tmAlovM8-Tb9LdUiEKw2UQ.png" /></figure><p>Result… the clients using older Servers will have to face a minor downtime, which is not acceptable.</p><p>So in order to avoid such a case, “Handlers” can come into play and can save your reputation. Just modify the Playbook like the following one. This playbook will only run restart the server if there is some change in your site’s design i.e in the copy module, otherwise, it won’t hamper the site on already running servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*1EuWzSuTHngwLl_QNoDmFA.png" /><figcaption>Httpd, using Handlers</figcaption></figure><p>In this scenario only when there is any update in the copy module, only in that case the server will be restarted and not everytime you run your playbook.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2801353a357" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>