<?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 Mukesh Vivekanandan on Medium]]></title>
        <description><![CDATA[Stories by Mukesh Vivekanandan on Medium]]></description>
        <link>https://medium.com/@mukeshvivekanandan?source=rss-176903ef128------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zD92zFHa6qAtBhjt.jpeg</url>
            <title>Stories by Mukesh Vivekanandan on Medium</title>
            <link>https://medium.com/@mukeshvivekanandan?source=rss-176903ef128------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:16:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mukeshvivekanandan/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[Beyond the Snap: What a Rubber Band Can Teach Us About the Mind and Human Connection]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">We live much of our daily lives on autopilot, caught in a continuous loop of reaction. When event X occurs, event Y follows automatically&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@mukeshvivekanandan/beyond-the-snap-what-a-rubber-band-can-teach-us-about-the-mind-and-human-connection-59d6e8335cbc?source=rss-176903ef128------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@mukeshvivekanandan/beyond-the-snap-what-a-rubber-band-can-teach-us-about-the-mind-and-human-connection-59d6e8335cbc?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/59d6e8335cbc</guid>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 12:24:46 GMT</pubDate>
            <atom:updated>2026-11-16T12:24:46.558Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The 50-Minute Commute Experiment: What Happens When You Do Absolutely Nothing]]></title>
            <link>https://medium.com/@mukeshvivekanandan/the-50-minute-commute-experiment-what-happens-when-you-do-absolutely-nothing-9e8ade275575?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e8ade275575</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[mindfulness]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[mental-health]]></category>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Tue, 10 Nov 2026 14:30:57 GMT</pubDate>
            <atom:updated>2026-11-10T14:30:57.295Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Unplugging, resisting the urge to scroll, and finding the &quot;non-thinking flow state&quot; on the GO train.</blockquote><p><strong>Introduction</strong><br>Every morning on the 50-minute train ride to Union Station, the ritual is usually the same: podcasts, playlists, books, laptop work, or trying to sleep. Anything to keep the mind occupied and fill the quiet void.</p><p>Today, I decided to try something completely different: doing absolutely nothing.<br>No headphones, no smartphone, no book, no work. Just sitting in my seat, looking out the window, and observing the train car around me.</p><p><strong>The Brain on Autopilot: Uncovering Natural Judgments</strong></p><p>When you stop distracting yourself, you start noticing how your mind operates on default mode.<br>As I sat there looking at people around me, I caught my brain instantly jumping into automatic evaluation mode:<br>Are they well-dressed or poorly dressed?<br>Are they tall or short? Groomed or unkempt? Dark or fair?<br>The endless stream of subtle, continuous micro-judgments kept rolling. It became clear how habitually the mind labels, categorizes, and critiques everything it encounters when left unchecked.</p><p><strong>The Shift: From Judgment to Pure Observation</strong></p><p>The core of today’s experiment was changing that response: moving from active judgment to pure observation.<br>Resisting the Urges: Even though I felt terribly sleepy at times, I actively resisted the impulse to nod off or reach into my pocket for my phone.<br>Being Present: Instead of letting the brain attach stories or opinions to what I saw, I simply observed people and surroundings as they were—non-judgmentally and neutrally.<br>Floating Thoughts: When thoughts or judgments popped up, I let them float by without holding onto them or engaging further.</p><p><strong>Entering the &quot;Non-Thinking&quot; Flow State</strong></p><p>What started as a simple test evolved into an unexpectedly deep experience.<br>By refusing to engage in analytical or judgmental thinking, a subtle shift occurred. The mind entered a quiet, clear &quot;non-thinking flow state&quot;—a zone where you aren’t stuck in internal dialogue, but rather operating in a direct stream of awareness and effortless action.<br>It felt like tuning into a clear, continuous wave of subconscious clarity:<br>Awareness: Spotting the moment the mind wants to wander back into evaluation.<br>Recognition: Noticing the impulse without self-criticism.<br>Reset: Returning gently back to that silent, present baseline.</p><p><strong>Key Takeaway</strong><br>We spend so much of our lives filling every micro-break with input, consumption, or mental critique. Giving yourself permission to sit idle for just 50 minutes opens up a quiet space to observe the mind, step back from automatic judgment, and experience genuine presence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e8ade275575" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Old Man, The Candle, and The Awakening: A Journey Through My Dream]]></title>
            <link>https://medium.com/@mukeshvivekanandan/the-old-man-the-candle-and-the-awakening-a-journey-through-my-dream-bde8d09ce807?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/bde8d09ce807</guid>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Wed, 19 Feb 2025 11:51:06 GMT</pubDate>
            <atom:updated>2025-02-19T11:51:42.175Z</atom:updated>
            <content:encoded><![CDATA[<p>Dreams are mysterious, often leaving us with emotions and symbols that linger long after we wake up. Sometimes, they feel like mere fragments of our imagination, and other times, they feel like messages from a deeper part of ourselves. Last night, I had one such dream that I believe carried a profound meaning—perhaps not just for me, but for anyone on a journey of change and self-discovery.</p><p>The Village and The Old Man<br>It began in a small village, one of those picturesque places where life moves slowly, and traditions hold strong. The air smelled of freshly plowed earth, and farmers went about their day under the golden sun. In the midst of this, I saw an old man struggling with a bullock cart. The cart was heavy, and the oxen strained to pull its weight.</p><p>Feeling a sense of duty, I approached him and offered to help. I suggested something modern—a motorized puller instead of oxen. It would ease his burden, I explained, and we discussed.</p><p>Little did I know that this conversation was not just about a cart.</p><p>The Departure and the Dark Room<br>The next thing I remember, the old man had passed away. I found myself in a dimly lit room, standing beside his still body. An old woman, her face etched with sorrow, wept next to him. The room had two doors—one for entering, one for exiting.</p><p>A Ganesha idol stood in a corner, its presence comforting yet silent. Suddenly, the power went out. Darkness engulfed the room, and I fumbled, searching for a candle, anything to bring back the light.</p><p>Then, something unexpected happened.</p><p>The old man stirred. He opened his eyes, stood up, walked to a wooden trunk, and retrieved a candle. Handing it to me, he looked at me with an expression I could not decode. Then, without a word, he returned to where he lay and drifted back into eternal sleep.</p><p>I stood frozen, candle in hand, the flame reflecting in my wide eyes.</p><p>The Second Awakening<br>Just when I thought the dream had reached its end, I saw another scene unfold. A old woman, now lay lifeless. I stood beside her, my heart heavy with sorrow. I prayed—desperately, with all my heart—for her to wake up. And she did.</p><p>She rolled her eyes, shivered, and slowly returned to life. Relief washed over me. I had witnessed not one but two awakenings.</p><p>And then, I woke up.</p><h3>Decoding the Dream: What It Could Mean<br>Dreams are personal, but they often hold universal messages. Here’s what I believe my dream represented:</h3><p>1. The Old Man and the Bullock Cart: He symbolizes tradition, responsibility, and the weight of the past. My suggestion of a motorized puller represents a desire for progress—an internal struggle between holding onto the old ways and embracing modern solutions.</p><p>2. The Room with Two Doors: It could signify a transition—a space between the past and the future. The presence of Ganesha, the remover of obstacles, suggests that this was not just a moment of loss, but a necessary step toward growth.</p><p>3. The Candle and the Old Man’s Awakening: Darkness often symbolizes confusion or uncertainty. The old man handing me the candle might mean that wisdom from the past still has value, guiding us even as we move forward.</p><p>4. The Old Woman’s Revival: Sometimes, what we believe to be lost can be revived—be it love, relationships, traditions, or personal strength. Her waking up after my prayers felt like a message that faith and perseverance can bring back what we fear is gone forever.</p><p>A Message for Those Who Have Had Similar Dreams<br>If you’ve ever dreamed of death, awakenings, or guiding figures from the past, you’re not alone. These dreams often appear when we stand at the crossroads of change, torn between where we come from and where we are headed. They remind us that even as we move forward, the wisdom of the past is not lost—it simply transforms.</p><p>Perhaps, like me, you too are in a phase of transition, trying to lighten the burdens of tradition while honoring them in a new way. If so, take heart—change is not about abandoning the past but carrying forward its essence in a form that serves you better.</p><p>And if ever you find yourself lost in the dark, remember—the candle is always within reach. Sometimes, you just need to trust that the light will find you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bde8d09ce807" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Mystery of My Dream: A Journey into Symbols and Meaning]]></title>
            <link>https://medium.com/@mukeshvivekanandan/the-mystery-of-my-dream-a-journey-into-symbols-and-meaning-714f8c233517?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/714f8c233517</guid>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Tue, 18 Feb 2025 18:06:59 GMT</pubDate>
            <atom:updated>2025-02-18T18:06:59.420Z</atom:updated>
            <content:encoded><![CDATA[<p>I found myself standing in an unfamiliar place, surrounded by people whose faces I couldn’t recognize. The air was thick with an inexplicable energy, as if something significant was about to unfold. Among the crowd stood a priest-like figure, draped in traditional robes and wearing a turban. His presence was enigmatic, yet oddly comforting.</p><p>As we engaged in conversation, he slowly removed his turban, revealing a mound of sand hidden beneath. Before I could make sense of what I was witnessing, he performed a mesmerizing act—turning the sand into tiny, three-colored snakes. They wriggled in his palm, their colors distinct: black, white, and a shade resembling the sand itself. Without hesitation, he placed one of each color onto my open palm. They didn’t strike or coil aggressively. Instead, they moved gently, making their way toward my fingers. The black and sand-colored ones gravitated toward my index finger, rolling themselves around it as if drawn to its energy.</p><p>I awoke with the vivid memory of this dream lingering in my mind. What did it mean? Was it a message, a warning, or simply a reflection of my subconscious?</p><blockquote>Decoding the Dream: A Glimpse into the Subconscious</blockquote><p>Dreams have long been a source of mystery and interpretation across cultures and philosophies. Carl Jung believed that dreams are a window into the unconscious, revealing symbols that hold personal and universal significance. Looking at my dream through this lens, several key elements stand out.</p><blockquote>The Unknown People: A Reflection of Hidden Aspects</blockquote><p>The presence of strangers in dreams often represents unexplored parts of oneself or external influences we haven’t fully acknowledged. Their anonymity suggests that this journey of understanding is still unfolding.</p><blockquote>The Priest Figure: A Guide or Spiritual Catalyst</blockquote><p>A priest or mystic in a dream can symbolize wisdom, mentorship, or divine intervention. This figure’s act of revealing sand and transforming it could indicate a revelation—something once ordinary (like sand) turning into something powerful and meaningful (snakes).</p><blockquote>Sand: The Fleeting Nature of Time and Knowledge</blockquote><p>Sand is often associated with impermanence, time slipping away, or something intangible. Its presence in the priest’s turban suggests hidden wisdom, perhaps knowledge waiting to be uncovered.</p><blockquote>The Magic of Transformation: Awakening to Change</blockquote><p>The act of turning sand into snakes is one of transformation. It suggests that something in my life is evolving, whether I realize it yet or not. Magic in dreams often represents a shift in perception or an awakening of new potential.</p><blockquote>The Three Snakes: A Balance of Forces</blockquote><p>Each snake’s color holds meaning:</p><p>Black symbolizes mystery, the unknown, or even hidden fears.</p><p>White represents clarity, purity, and new beginnings.</p><p>Sand-colored suggests neutrality, adaptability, or the blending of extremes.</p><p>The fact that the black and sand-colored snakes moved toward my index finger—often associated with leadership, direction, and decision-making—could indicate that these aspects are influencing my ability to take charge of my path.</p><blockquote>What Can This Dream Teach Us?</blockquote><p>Dreams like this invite us to reflect on what’s happening in our lives. Am I standing at a crossroads? Is there a transformation underway that I have yet to fully recognize? While skepticism is healthy, exploring these symbols can provide valuable insight. Even if this dream was just a construct of my subconscious mind processing daily thoughts, it still carries meaning in how I perceive it.</p><p>Dreams are not just random images; they are narratives waiting to be deciphered. Whether a message from the universe or my own mind guiding me, this dream leaves me with one clear realization—change is happening, and I must embrace it with an open palm, just as I did with the snakes.</p><p>What about you? Have you ever had a dream that left you questioning its meaning? Let’s discuss in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=714f8c233517" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Blog 4: Elevate Your Development with Oracle VM VirtualBox & HashiCorp Vagrant]]></title>
            <link>https://medium.com/@mukeshvivekanandan/devops-blog-4-elevate-your-development-with-oracle-vm-virtualbox-hashicorp-vagrant-54255f24577d?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/54255f24577d</guid>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 20:07:30 GMT</pubDate>
            <atom:updated>2023-10-02T20:11:35.612Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Harnessing the full potential of Linux on a Windows laptop can transform your development journey. Imagine seamlessly shifting from writing code on your Windows OS to deploying it on Linux-based servers — without the common pitfalls developers encounter.</p><p>The crux of the challenge? Deploying applications onto actual on-premises servers or into the vast realms of cloud infrastructure. Many organizations maintain stringent restrictions on developer access to these cloud spaces, often leaving them with limited scope to experiment and optimize.</p><p>Enter the dynamic duo: Oracle VM VirtualBox and HashiCorp Vagrant.</p><p>Oracle VM VirtualBox empowers developers to create a Virtual Machine tailored to their preferred Linux distribution, providing a near-native experience. Meanwhile, HashiCorp Vagrant supercharges this process by automating the orchestration of VirtualBox creations.</p><p>For DevOps engineers, this combination is a game-changer. It offers an unparalleled environment for testing sophisticated concepts like clustering. Reflecting on my own experiences, I’ve often encountered roadblocks when wanting to experiment with creating Docker swarm clusters or setting up multi-node Kubernetes clusters.</p><p>But with Oracle VM VirtualBox and HashiCorp Vagrant at your disposal, you have the chance to architect production-ready infrastructure directly on your laptop. The best part? Testing similar structures in the cloud could cost you a pretty penny, but with this duo, you save money while gaining hands-on experience.</p><p>In the evolving world of development, it’s essential to have tools that ensure adaptability, scalability, and flexibility. Dive deep into the Linux world with Oracle VM VirtualBox and HashiCorp Vagrant — your Windows laptop will thank you!</p><h4>What is Oracle VM VirtualBox?</h4><ul><li>Oracle VM VirtualBox is a free software that lets you run multiple operating systems on one machine.</li><li>It creates “virtual” computers within your main computer.</li><li>Great for developers who want to test on different OS without multiple machines.</li></ul><h4>What is HashiCorp Vagrant?</h4><ul><li>HashiCorp Vagrant is a tool that sets up and manages virtual development environments.</li><li>It works with software like VirtualBox to automate virtual machine creation and setup.</li><li>Perfect for those who want consistent and easy-to-replicate development settings.</li></ul><h4>Difference between VirtualBox vs Vagrant?</h4><ul><li>While VirtualBox provides the “virtual” computers, Vagrant manages and sets them up.</li><li>Think of VirtualBox as the land and Vagrant as the builder of houses on that land.</li><li>You can use VirtualBox alone, but Vagrant makes it more efficient and consistent.</li></ul><h4>Architecture</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*XQH18HySnoDkUg1flrTHRQ.png" /></figure><h4>Implementation Steps</h4><ol><li>Install <a href="https://www.vagrantup.com/downloads.html">Vagrant</a>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*6sD9vCnW8sq3sLuLg5W5HQ.png" /></figure><p>2. Install <a href="https://www.virtualbox.org/wiki/Downloads">VirtualBox</a> (or another provider of your choice, but this guide will use Oracle VM VirtualBox).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*FLjPEApxKfKQ5IzbCVfX_Q.png" /></figure><p>3. Initialize a New Vagrant Project:</p><p>If you have git client installed on your machine, use the git bash prompt to execute below commands,</p><pre>mkdir test-environment<br>cd test-environment<br>vagrant init</pre><p>vagrant init initializes and creates sample template with Vagrantfile</p><p>4. Choose a Base Box from Vagrant boxes hub portal <a href="https://app.vagrantup.com/boxes/search">https://app.vagrantup.com/boxes/search</a>:</p><p>For this blog, let’s use the ubuntu/bionic64 box, which is a standard Ubuntu 18.04 LTS (64-bit) box. Modify the generated Vagrantfile to set the box by changing:</p><pre># Change the existing value (base) to ubuntu/focal64<br>config.vm.box = &quot;ubuntu/focal64&quot;</pre><p>5. Setup Port Forwarding and Synced Folders (optional):</p><p>If your development environment runs a server, for example, a web server, you might want to forward ports. Also, you may want to have a directory that syncs between your host machine and the Vagrant VM:</p><pre>config.vm.network &quot;forwarded_port&quot;, guest: 8080, host: 8080<br>config.vm.synced_folder &quot;./project&quot;, &quot;/home/vagrant/project&quot;</pre><p>6. Start and SSH into the Vagrant Box:</p><pre>vagrant up<br>vagrant ssh</pre><p>7. Verify Installation:</p><p>Once inside the VM, you can verify the installations:</p><pre>java -version<br>mvn --version<br>git --version</pre><p>8. Exiting and Managing the VM:</p><ul><li>To exit the SSH session, simply type exit.</li><li>To shut down the VM, use vagrant halt.</li><li>To delete and clean up the VM, use vagrant destroy.</li><li>To restart and re-provision the VM, use vagrant up --provision.</li></ul><p>9. Optional step : Multi-VM Provisioning</p><p>Sample Vagrantfile for creating multiple VMs</p><pre>Vagrant.configure(&quot;2&quot;) do |config|<br>  config.vm.box = &quot;ubuntu/focal64&quot;<br><br>  config.vm.define &quot;node1&quot; do |node1|<br>    node1.vm.box = &quot;ubuntu/focal64&quot;<br>  end<br><br>  config.vm.define &quot;node2&quot; do |node2|<br>    node2.vm.box = &quot;ubuntu/focal64&quot;<br>  end<br>end</pre><p><em>Additional Tip: Hashicorp has created a Vagrantfile generator portal for generating the configuration automatically. You may also give it a try with that, it’s cool! </em><a href="https://vagrantfile-generator.vercel.app/"><em>https://vagrantfile-generator.vercel.app/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54255f24577d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Blog 3: Building a Robust CI/CD Pipeline -From AWS EC2 to Spring Boot with Maven, Docker…]]></title>
            <link>https://medium.com/@mukeshvivekanandan/devops-blog-3-building-a-robust-ci-cd-pipeline-from-aws-ec2-to-spring-boot-with-maven-docker-1c677130c8e0?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c677130c8e0</guid>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Tue, 19 Sep 2023 15:01:12 GMT</pubDate>
            <atom:updated>2023-09-19T17:42:58.714Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Blog 3: Building a Robust CI/CD Pipeline -From AWS EC2 to Spring Boot with Maven, Docker, and Jenkins</h3><p>This blog is focused on setting up CI &amp; CD pipeline for the Maven based Springboot API project.</p><h3>Summary</h3><p><em>Project: Building a Robust CI/CD Pipeline — From AWS EC2 to Spring Boot with Maven, Docker, and Jenkins. Docker In Docker (dind).</em></p><p><em>Outcome: You will be exploring how to startup AWS EC2 instance, Creating custom docker image using Jenkins base image and packaging maven &amp; Docker client along with it, Creating various stages in Jenkinsfile (stages include checkout, compile, test, build, application docker image creation and starting a docker container with a jenkins docker).</em></p><h3>High-Level Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*3Rem0A-9zrufyJslpM8bdw.png" /></figure><h3>Prerequisites</h3><ol><li>AWS Account: Active AWS account for EC2 instance creation.</li><li>GitHub Account: Required for repository management and access tokens.</li><li>Basic Understanding: Familiarity with Jenkins, Docker, Maven, and Spring Boot.</li><li>Local Environment: Maven and Git installed on your local machine.</li><li>Editor: A code editor (like Visual Studio Code) for project management.</li></ol><h3>Steps</h3><p><strong>1. Access AWS Console:</strong></p><p>- Navigate to <a href="https://aws.amazon.com/">https://aws.amazon.com</a> and log in to your AWS account.</p><p>- From the AWS Management Console home, click on “Services” and select “EC2”.</p><p><strong>2. Set Up EC2 Instance:</strong></p><pre>- Click the &quot;Launch Instance&quot; button.<br>- Select the Free Tier Amazon Linux 2 AMI.<br>- Ensure it&#39;s t2.micro for the free tier eligibility.<br>- On the &quot;Configure Security Group&quot; step, create a new security group with the following rules:<br>- Type: SSH, Port: 22, Source: Anywhere.<br>- Type: Custom TCP, Port: 8080 (application), Port:5050 (Jenkins), Source: Anywhere.<br>- Review and launch the instance.</pre><p><strong>3. Install Required Packages:</strong></p><pre>  SSH into your EC2 instance.<br>  sudo yum update -y  #Update the package list<br>  sudo yum install docker git -y #Install Docker and Git<br>  service docker start  #Start the docker service<br>  service docker status #Check Status of the docker service</pre><p><strong>4. Clone the code repository</strong></p><ul><li>Clone the repository that I have created for sample SpringBoot application to print “Hello World” message using /hello endpoint (GET request)</li><li>Create your own repository in your GitHub account.</li></ul><pre>https://github.com/Mukezz/CICDDemoBlog3.git</pre><pre>Using above repo create your own repo under your Github account</pre><pre>Command to clone the repo, </pre><pre>git clone <a href="https://github.com/Mukezz/CICDDemoBlog3.git">https://github.com/Mukezz/CICDDemoBlog3.git</a></pre><p><strong>5. Set Up Docker for Jenkins:</strong></p><p>- Switch to the root user: `sudo su`</p><p>- Create a Dockerfile with the following content:</p><pre>#Retrieve the docker container id<br>PuTTy ssh into the ec2 instance with username ec2-user using your-ec2-ip-address </pre><pre>sudo su                 #sudo as root user</pre><pre>vi Dockerfile           # Creating Dockerfile</pre><p><em>Dockerfile</em></p><p>Below Dockerfile creates a custom image “Docker-in-Docker” which contains Jenkins as base image and installs the docker &amp; maven on top of it to create a custom image “jenkins-maven-docker”. As the goal of this project is to deploy the API code directly as a container, we need a docker client accessible within Jenkins container in order to build the application docker and start the application container within the Jenkins container.</p><pre># Use the official Jenkins image as a base image<br>FROM jenkins/jenkins:lts<br><br># Install necessary packages<br>USER root<br>RUN apt-get update &amp;&amp; \<br>    apt-get install -y apt-transport-https \<br>                       ca-certificates \<br>                       curl \<br>                       gnupg-agent \<br>                       software-properties-common &amp;&amp; \<br>    rm -rf /var/lib/apt/lists/*<br><br># Install Docker CLI<br>RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - &amp;&amp; \<br>    add-apt-repository &quot;deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable&quot; &amp;&amp; \<br>    apt-get update &amp;&amp; \<br>    apt-get install -y docker-ce-cli &amp;&amp; \<br>    rm -rf /var/lib/apt/lists/*<br><br># Install Maven<br>RUN apt-get install -y maven<br><br># Set the environment variable for Maven<br>ENV MAVEN_HOME /usr/share/maven<br>ENV PATH $MAVEN_HOME/bin:$PATH</pre><blockquote>Base Image: Uses the official Jenkins LTS (Long-Term Support) version as the starting point.</blockquote><blockquote>Package Installation: Switches to the root user and updates package repositories. It then installs a set of packages needed for https connections, managing repositories, and curl operations. After installation, it cleans up by removing the package lists.</blockquote><blockquote>Docker CLI Installation: It adds Docker’s official GPG key and sets up Docker’s stable repository for Debian. Following that, it installs the Docker command-line interface (CLI) and cleans up package lists again.</blockquote><blockquote>Maven Installation: Installs Maven, a popular tool for building and managing Java projects.</blockquote><blockquote>Maven Environment Variables: Sets environment variables to ensure that Maven is correctly configured and can be easily accessed from the command line within the container.</blockquote><p><strong>6. Build the Docker image &amp; Start the Container</strong></p><pre>docker build -t jenkins-maven-docker .</pre><ul><li>Run Jenkins using the custom Docker container — docker run command is to start the custom image by exposing the port 5050 (soruce port of the container is 8080). Attaching the volume /var/run/docker.sock from the host to access the docker service which is running on the host instance.</li></ul><pre>docker run -d -p 5050:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock jenkins-maven-docker</pre><p>In summary, above command runs a new detached container from the jenkins-maven-docker image, binding ports 5050 and 50000 on the host to ports 8080 and 50000 in the container, respectively. Additionally, it allows the container to interact with the Docker daemon of the host machine by mounting the Docker socket.</p><p><strong>7. Complete Jenkins Setup:</strong></p><p>Now that we have the Jenkins up and running</p><ul><li>Retrieve the initial admin password from the EC2 instance: `cat /var/jenkins_home/secrets/initialAdminPassword`</li></ul><pre>#How to retrieve the initial admin password password<br><br>1. Login into EC2 instance using PuTTy session<br>2. sudo docker container ls #get the container id from the list of running container<br>3. sudo docker exec -it &lt;CONTAINER_ID&gt; /bin/bash #Login into the container &quot;jenkins-maven-docker&quot;<br>4. cat /var/jenkins_home/secrets/initialAdminPassword<br>5. exit</pre><ul><li>Access Jenkins via `http://&lt;your-ec2-ip&gt;:5050/`.</li><li>Follow the setup wizard: set up an admin user and install the recommended plugins.</li></ul><p><strong>8. Incorporate Jenkins Pipeline</strong></p><p>Create a separate GitHub repository for Jenkinsfile. Create a `Jenkinsfile` at the root of your project. This file will contain the stages and steps for your Jenkins pipeline:</p><p><a href="https://github.com/Mukezz/CICDDemoBlog3/blob/main/Jenkinsfile">https://github.com/Mukezz/CICDDemoBlog3/blob/main/Jenkinsfile</a></p><pre>pipeline {<br>    agent any<br><br>    tools {<br>        maven &#39;Maven_3_8_7&#39;  // Replace &#39;Maven_3_8_7&#39; with the name of your Maven installation in Jenkins<br>    }<br><br>    stages {<br>        stage(&#39;Checkout&#39;) {<br>            steps {<br>                checkout([$class: &#39;GitSCM&#39;, branches: [[name: &#39;*/main&#39;]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: &#39;github-credentials&#39;, url: &#39;https://github.com/Mukezz/CICDDemoBlog3.git&#39;]]]) //Replace git url with yours<br>            }<br>        }<br><br>        stage(&#39;Compile&#39;) {<br>            steps {<br>                script {<br>                    sh &quot;mvn clean compile&quot;<br>                }<br>            }<br>        }<br><br>        stage(&#39;Test&#39;) {<br>            steps {<br>                script {<br>                    sh &quot;mvn test&quot;<br>                }<br>            }<br>        }<br><br>        stage(&#39;Building Jar&#39;) {<br>            steps {<br>                script {<br>                    sh &#39;mvn clean install&#39;<br>                }<br>            }<br>        }<br><br>        stage(&#39;Running Dockerfile to create image&#39;) {<br>            steps {<br>                script {<br>                    sh &quot;docker build -t devops/mukeshblogpost3 .&quot;<br>                }<br>            }<br>        }<br><br>        stage(&#39;Starting the application docker container&#39;) {<br>            steps {<br>                script {<br>                    sh &quot;docker run -d -p 8080:8080 devops/mukeshblogpost3&quot;<br>                }<br>            }<br>        }              <br>    }<br>}</pre><p>This Jenkinsfile instructs Jenkins to:</p><blockquote>Stages: The main tasks the pipeline will execute, broken down into several stages:</blockquote><blockquote>Checkout: Fetches the source code from a GitHub repository named ‘CICDDemoBlog3’ under the YOUR account, using the ‘main’ branch.</blockquote><blockquote>Compile: Runs the Maven compile command to compile the Java source code.</blockquote><blockquote>Test: Executes the Maven test command to run unit tests.</blockquote><blockquote>Building Jar: Uses Maven to clean any previous builds and then installs (builds) the project, creating a JAR file.</blockquote><blockquote>Running Dockerfile to create image: Constructs a Docker image named ‘devops/mukeshblogpost3’ from the current directory’s Dockerfile.</blockquote><blockquote>Starting the application docker container: Launches a Docker container from the ‘devops/mukeshblogpost3’ image, exposing port 8080.</blockquote><p>After creating the `Jenkinsfile`, commit and push it to your GitHub repository.</p><p><strong>9. Dockerfile for creating application image</strong></p><ul><li>Using below Dockerfile create the image, maven build has compiled the jar in the target directory. The same Dockerfile is available in the code repo — <a href="https://github.com/Mukezz/CICDDemoBlog3/blob/main/Dockerfile">https://github.com/Mukezz/CICDDemoBlog3/blob/main/Dockerfile</a></li></ul><pre>FROM eclipse-temurin:11<br>VOLUME /tmp<br>COPY ./target/cidemo*jar app.jar<br>ENTRYPOINT [&quot;java&quot;,&quot;-jar&quot;,&quot;/app.jar&quot;]</pre><blockquote>FROM eclipse-temurin:11<br>This line specifies the base image for the container. The image being used is eclipse-temurin:11, which is an OpenJDK distribution (previously known as AdoptOpenJDK). Specifically, this uses version 11 of the JDK. This means that the container will have Java 11 installed and set up by default.</blockquote><blockquote>VOLUME /tmp<br>Volumes are used to persist data and can also be used for shared data among containers. Here, a volume is created on the path /tmp. This can be useful for temporary storage, cache data, or logs which the application inside the container might generate. By using a volume, the data inside /tmp won&#39;t be lost when the container stops or is deleted.</blockquote><blockquote>COPY ./target/cidemo*jar app.jar<br>This line copies a JAR file from the host&#39;s ./target/ directory into the container. The source path specifies cidemo*jar which will match any JAR file in the ./target/ directory that starts with the name &quot;cidemo&quot;. This is useful if, for example, the exact name of the JAR file might change due to versioning, but you know it will always start with &quot;cidemo&quot;. The JAR file is renamed to app.jar inside the container.</blockquote><blockquote>ENTRYPOINT [&quot;java&quot;,&quot;-jar&quot;,&quot;/app.jar&quot;]<br>When the container starts, it will execute the command specified in the ENTRYPOINT. In this case, it will run the Java application packed inside the app.jar file. The java -jar /app.jar command tells the Java runtime to start the application within the specified JAR file.</blockquote><p><strong>10. Setting up Maven Installation in Jenkins</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/0*9meWuPholzQvXvGc.png" /></figure><p><strong>11. Configure a Jenkins Pipeline Job:</strong></p><p>- In Jenkins, select “New Item” and then choose “Pipeline”.</p><p>- Name your pipeline and then scroll to the “Pipeline” section.</p><p>- Under “Definition”, select “Pipeline script from SCM”. For SCM, choose “Git”, and then provide the URL to your GitHub repository.</p><ul><li>Ensure the path to your `Jenkinsfile` is correctly set.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*ucrs61rGoPpe6a1s.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IOUsDsaAaxpgPhqObSg4kw.png" /></figure><p><strong>12. Trigger Jenkins Job</strong></p><p>Go to your newly created Jenkins job and click “Build Now” to trigger the pipeline. Monitor the execution and, upon successful completion, you’ll see the stages of the pipeline execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7nvtmbRMozxmivaCII5c8g.png" /></figure><p><strong>13. Cleaning up EC2 Instance</strong></p><p>Please make sure to clean up the AWS EC2 instance to avoid any charges on your account. Login to AWS console, goto EC2 and select your instance to terminate.</p><p>Please leave your comments for any questions or clarification</p><p>Follow me on LinkedIn at <a href="https://www.linkedin.com/in/mukesh-vivekanandan/">https://www.linkedin.com/in/mukesh-vivekanandan/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c677130c8e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Blog 2: CI Pipeline setup for Maven-Spring Boot Project with Custom Dockerized Jenkins-Maven…]]></title>
            <link>https://medium.com/@mukeshvivekanandan/devops-blog-2-ci-pipeline-setup-for-maven-spring-boot-project-with-custom-dockerized-jenkins-maven-d41840e8c354?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/d41840e8c354</guid>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Fri, 08 Sep 2023 21:03:44 GMT</pubDate>
            <atom:updated>2023-09-08T21:06:08.989Z</atom:updated>
            <content:encoded><![CDATA[<h3>DevOps Blog 2: CI Pipeline setup for Maven-Spring Boot Project with Custom Dockerized Jenkins-Maven on AWS</h3><p>This blog offers a comprehensive guide to setting up a Jenkins CI pipeline on AWS EC2 instance using Docker and integrating it with a Maven-based Spring Boot application on GitHub. Through detailed steps, readers will learn how to deploy Jenkins inside a Docker container, create a Spring Boot /hello endpoint, and automate builds using a Jenkinsfile, all while maintaining secure access with GitHub personal access tokens.</p><h3>Summary</h3><p><em>Project: CI Pipeline setup for Maven-Spring Boot Project with Custom Dockerized Jenkins-Maven on AWS</em></p><p><em>Outcome: Learn how to create a simple Maven-Spring Boot Project, Spin up EC2 instance, Create Jenkinsfile to checkout, build and test the java project, Create customized Jenkins-Maven image using Dockerfile. Generate the Personal Access Token in GitHub for authentication (to avoid exposing password in configuration)</em></p><p><em>GitHub Repo 1 : Jenkinsfile for the Pipeline to instruct</em></p><p><em>GitHub Repo 2 : Maven-Spring Boot Project</em></p><h3>High-Level Architecture</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*AFhD-0k7LZILFZgYzz97Xg.png" /><figcaption>Building Jenkins Pipeline to checkout maven project, compile/build and unit test</figcaption></figure><h3>Prerequisites</h3><ol><li>AWS Account: Active AWS account for EC2 instance creation.</li><li>GitHub Account: Required for repository management and access tokens.</li><li>Basic Understanding: Familiarity with Jenkins, Docker, Maven, and Spring Boot.</li><li>Local Environment: Maven and Git installed on your local machine.</li><li>Editor: A code editor (like Visual Studio Code) for project management.</li></ol><h3>Steps</h3><p><strong>1. Access AWS Console:</strong></p><p>- Navigate to <a href="https://aws.amazon.com/">https://aws.amazon.com</a> and log in to your AWS account.</p><p>- From the AWS Management Console home, click on “Services” and select “EC2”.</p><p><strong>2. Set Up EC2 Instance:</strong></p><pre>- Click the &quot;Launch Instance&quot; button.<br>- Select the Free Tier Amazon Linux 2 AMI.<br>- Ensure it&#39;s t2.micro for the free tier eligibility.<br>- On the &quot;Configure Security Group&quot; step, create a new security group with the following rules:<br>- Type: SSH, Port: 22, Source: Anywhere.<br>- Type: Custom TCP, Port: 8080, Source: Anywhere.<br>- Review and launch the instance.</pre><p><strong>3. Plan for Jenkins Deployment:</strong></p><ul><li>Instead of installing Jenkins directly on the EC2 instance, opt to run Jenkins inside a Docker container for modularity and scalability.</li></ul><p><strong>4. Install Required Packages:</strong></p><pre>- SSH into your EC2 instance.<br>- Update the package list: `sudo yum update -y`<br>- Install Docker and Git: `sudo yum install docker git -y`</pre><p><strong>5. Set Up Docker for Jenkins:</strong></p><p>- Switch to the root user: `sudo su`</p><p>- Create a Dockerfile with the following content:</p><pre>#Retrieve the docker container id<br>PuTTy ssh into the ec2 instance with username ec2-user using your-ec2-ip-address <br><br>sudo su                 #sudo as root user<br><br>vi Dockerfile           # Creating Dockerfile</pre><p>Dockerfile</p><pre># Use the official Jenkins image as a starting point<br>FROM jenkins/jenkins:lts-jdk11<br><br># Maintainer Info<br>LABEL maintainer=&quot;your-email@example.com&quot;<br><br># Switch to root user to install Maven<br>USER root<br><br># Install Maven<br>RUN apt-get update &amp;&amp; apt-get install -y maven<br><br># Switch back to the Jenkins user<br>USER jenkins<br><br># Set the environment variable for Maven<br>ENV MAVEN_HOME /usr/share/maven<br>ENV PATH $MAVEN_HOME/bin:$PATH<br><br># Copy Jenkins job configurations and other setup configurations if needed<br># COPY jobs/ /var/jenkins_home/jobs/<br><br># Expose the default Jenkins port<br>EXPOSE 8080</pre><p>- Build the Docker image:</p><pre>docker build -t jenkins-maven .</pre><p>- Run Jenkins inside the custom Docker container:</p><pre>docker run -d -p 8080:8080 -p 50000:50000 jenkins-maven</pre><p><strong>6. Complete Jenkins Setup:</strong></p><p>- Access Jenkins via `http://&lt;your-ec2-ip&gt;:8080/`.</p><p>- Retrieve the initial admin password from the EC2 instance: `cat /var/jenkins_home/secrets/initialAdminPassword`</p><p>-Follow the setup wizard: set up an admin user and install the recommended plugins.</p><p><strong>7. Set Up Maven Project on GitHub:</strong></p><p>- Use the Spring Boot Initializr (https://start.spring.io/) with Java 11 and Spring 2.7.15 to initialize a Maven project.</p><p>- Create a `/hello` GET endpoint in your Spring Boot application that returns a “Hello World” JSON response.</p><p>- Implement a unit test for the `/hello` endpoint.</p><ul><li>Initialize a Git repository in your project directory and push the project to a new GitHub repository.</li></ul><pre>If you are unable to follow above steps, feel free to download or clone/fork the same Spring-Maven Project repository<br><br>https://github.com/Mukezz/CIDemoBlog2.git<br><br>Using above repo create your own repo under your Github account</pre><p><strong>8: Incorporate Jenkins Pipeline</strong></p><p>Create a separate GitHub repository for Jenkinsfile. Create a `Jenkinsfile` at the root of your project. This file will contain the stages and steps for your Jenkins pipeline:</p><pre>pipeline {<br>    agent any<br><br>    tools {<br>        maven &#39;Maven_3_8_7&#39;  // Replace &#39;Maven_3_8_7&#39; with the name of your Maven installation in Jenkins<br>    }<br><br>    stages {<br>        stage(&#39;Checkout&#39;) {<br>            steps {<br>                // Assuming you&#39;ve set up a GitHub credential in Jenkins named &#39;github-credentials&#39;<br>                //git branch: &#39;main&#39;,<br>                        credentialsId: &#39;github-credentials&#39;,<br>                        url: &#39;https://github.com/Mukezz/CIDemoBlog2.git&#39;<br>                <br>                checkout([$class: &#39;GitSCM&#39;, branches: [[name: &#39;*/main&#39;]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: &#39;github-credentials&#39;, url: &#39;https://github.com/Mukezz/CIDemoBlog2.git&#39;]]])<br>            }<br>        }<br><br>        stage(&#39;Compile&#39;) {<br>            steps {<br>                script {<br>                    sh &quot;mvn compile&quot;<br>                }<br>            }<br>        }<br><br>        stage(&#39;Test&#39;) {<br>            steps {<br>                script {<br>                    sh &quot;mvn test&quot;<br>                }<br>            }<br>        }<br>    }<br>}</pre><p>This Jenkinsfile instructs Jenkins to:</p><ul><li>Use any available agent to run the pipeline.</li><li>Utilize the specified Maven tool (Maven_3_8_7) for Maven commands.</li><li>Define three stages: Checkout, Clean &amp; Compile, and Run Tests.</li><li>Within each stage, execute the appropriate Maven commands.</li></ul><p>After creating the `Jenkinsfile`, commit and push it to your GitHub repository.</p><p><strong>9: Create a Personal Access Token in GitHub</strong></p><pre>1. Login to GitHub:<br>- Open a web browser and navigate to [GitHub](https://github.com/).<br>- Enter your credentials and log in.<br>2. Navigate to Developer Settings:<br>- Click on your profile picture (top-right corner).<br>- From the dropdown menu, select &quot;Settings&quot;.<br>- In the left sidebar, scroll down and click on &quot;Developer settings&quot;.<br>3. Access Personal Access Tokens:<br>- In the left sidebar of the Developer settings page, click on &quot;Personal access tokens&quot; and &quot;Fine-Grained Personal Token&quot;.<br>4. Generate a New Token:<br>- Click on the &quot;Generate new token&quot; button (top-right of the main pane).<br>5. Set Up Token Details:<br>- Note: Provide a meaningful description for your token to remember its purpose later.<br>- Expiration: Decide on an expiration time for the token. It&#39;s often a good idea to set an expiration if the token serves a temporary purpose.<br>- Select Scopes: Depending on your use-case, you&#39;ll select the appropriate permissions (or &quot;scopes&quot;) for this token. For Jenkins:<br>- Check the `repo` checkbox (This grants full control of private and public repositories).<br>- If you plan to update commit statuses or other administrative tasks, you might need to select additional scopes.<br>6. Generate the Token:<br>- Scroll down and click the &quot;Generate token&quot; button.<br>7. Copy and Store Your New Token:<br>- After generating, GitHub will display the token only once. Make sure to copy the token to a safe location.<br>- If you lose it, you will need to regenerate a new token.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*y1T3n7nvofWVcHUWgispzA.png" /><figcaption>Fine-grained personal access token generation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*2CFlJc-T_kWQZBpGIW4qtg.png" /></figure><p>Now you have a personal access token! For Jenkins, you’ll use this token as the password (with your GitHub username) when setting up credentials.</p><p><strong>11: Configure a Jenkins Pipeline Job:</strong></p><p>- In Jenkins, select “New Item” and then choose “Pipeline”.</p><p>- Name your pipeline and then scroll to the “Pipeline” section.</p><p>- Under “Definition”, select “Pipeline script from SCM”. For SCM, choose “Git”, and then provide the URL to your GitHub repository.</p><ul><li>Ensure the path to your `Jenkinsfile` is correctly set.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/0*dYlZrX99aU5yVoHZ.png" /><figcaption>Screenshot of the Job Creation using the Pipeline option</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*qGJ8CYgja0LzaoOnOnzeew.png" /><figcaption>Screenshot of the pipeline in the configuration job using github Jenkinsfile</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Khg2kQoUptTg_GElYSmZQg.png" /><figcaption>Provide your GitHub Username and Personal Generates Token as password and ID should match with Jenkinsfile credentialsId.<strong> Example ‘github-credentials’</strong></figcaption></figure><p><strong>12: Setting up Maven Installation in Jenkins</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*FeZFr0uGHWjtYEZst1fGZg.png" /><figcaption>Follow the highlights to setup the Maven Installation</figcaption></figure><p><strong>13: Trigger Jenkins Job</strong></p><p>Go to your newly created Jenkins job and click “Build Now” to trigger the pipeline. Monitor the execution and, upon successful completion, you’ll see the stages of the pipeline execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rUwrblgkBJ-66EiKosA6sw.png" /></figure><p>Please comment your questions , feel free me to reach me on LinkedIn for any further clarification on the steps.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d41840e8c354" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevOps Blog 1: CI Jenkins Setup Using AWS EC2 Instance]]></title>
            <link>https://medium.com/@mukeshvivekanandan/devops-blog-1-ci-jenkins-setup-using-aws-ec2-instance-263752d13578?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/263752d13578</guid>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Tue, 05 Sep 2023 12:20:05 GMT</pubDate>
            <atom:updated>2023-09-07T19:49:37.109Z</atom:updated>
            <content:encoded><![CDATA[<p>Equip yourself for seamless Jenkins setup on AWS with our comprehensive guide. Delve into Docker’s efficiency, paired with Jenkins, for a transformative CI experience. Ensure success with our detailed prerequisites and step-by-step walkthrough.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*q01oDe_W0FRI0E2wkeeu6A.png" /><figcaption>Project Architecture</figcaption></figure><h3>Pre-Requisites (Technology Involved)</h3><p>1. AWS Account:</p><p>An active account with Amazon Web Services. If you don’t already have one, you can create it at https://aws.amazon.com/.</p><p>2. Basic AWS Knowledge:</p><p>Familiarity with AWS Management Console and the basics of EC2 (Elastic Compute Cloud).</p><p>3. SSH Key Pair:</p><p>A key pair to securely connect to the EC2 instance. If you don’t have one, AWS will guide you to create one during the EC2 instance setup process.</p><p>4. Linux Proficiency:</p><p>Familiarity with basic Linux commands and the Linux terminal.</p><p>Knowledge on how to use package managers like yum.</p><p>5. Docker Understanding:</p><p>A basic understanding of what Docker is and how it functions.</p><p>Knowledge of essential Docker commands.</p><p>6. Jenkins Awareness:</p><p>A general idea of what Jenkins is and its primary functions, especially if you want to modify or extend the setup later.</p><p>7. GitHub Account:</p><p>An account with GitHub to create repositories and manage your code. Create one at https://github.com/ if needed.</p><p>8. Git Knowledge:</p><p>Basic understanding of Git commands and version control, given the need to integrate Jenkins with a GitHub repository.</p><p>9. Networking Basics:</p><p>Understanding of network concepts, especially ports and security groups, to ensure that the AWS environment is correctly configured.</p><p>10. Security Best Practices:</p><p>While the steps provide a general setup, it’s essential to understand security best practices, especially when dealing with cloud configurations, to safeguard your setups.</p><p>11. Access to a Terminal or SSH Client:</p><p>A terminal on Linux/Mac or software like PuTTY for Windows to connect to your EC2 instance.</p><h3>Steps</h3><p>1. Access the AWS Console:</p><p>Navigate to the AWS Management Console by visiting `https://aws.amazon.com/console/` and sign in using your AWS credentials.</p><p>2. Set Up an EC2 Instance:</p><p>- In the AWS Management Console, select the “EC2” service.</p><p>- Click on “Launch Instance” to initiate the EC2 setup.</p><p>- Choose a free-tier eligible AMI, such as Amazon Linux 2.</p><p>- Create a new security group during setup and add rules to allow inbound traffic on:</p><p>- Port 22 for SSH access.</p><p>- Port 8080 for Jenkins web access.</p><p>Note: While making the instance accessible from anywhere (`0.0.0.0/0`) is convenient for testing, it’s not secure for production.</p><p>3. Opt for Dockerized Jenkins:</p><p>Rather than directly installing Jenkins on the EC2 instance, use Docker. This approach offers easier management, setup, and scalability.</p><p>4. Docker Installation on EC2:</p><p>Once connected to your EC2 instance via SSH using PuTTy:</p><blockquote><strong>sudo yum update -y</strong></blockquote><blockquote><strong>sudo yum install docker -y</strong></blockquote><blockquote><strong>sudo service docker start</strong></blockquote><p>This will install and start the Docker service on your Amazon Linux EC2 instance.</p><p>5. Retrieve Jenkins Docker Image:</p><p>Visit the Jenkins Docker Hub page at `<a href="https://hub.docker.com/r/jenkins/jenkins">https://hub.docker.com/r/jenkins/jenkins</a>` to get details about the Jenkins Docker images. Pull the latest Long Term Support (LTS) Jenkins image using:</p><blockquote><strong>docker pull jenkins/jenkins:lts</strong></blockquote><p>Then, run a Jenkins container with:</p><blockquote><strong>docker run -d -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts</strong></blockquote><p>Note: Additional documentation about Jenkins Docker image is available in <a href="https://github.com/jenkinsci/docker/blob/master/README.md">https://github.com/jenkinsci/docker/blob/master/README.md</a></p><p>6. Jenkins Initial Configuration:</p><ul><li>Access Jenkins via `http://&lt;your-ec2-ip-address&gt;:8080`. Make sure to access the site through the public IP Address.</li><li>Use the initial admin password, which can typically be found in the Jenkins container logs or at `/var/jenkins_home/secrets/initialAdminPassword`.</li></ul><pre>#Command to retrieve the initial password from the container<br><br>#Retrieve the docker container id<br>PuTTy ssh into the ec2 instance with username ec2-user using your-ec2-ip-address <br><br>sudo su                 #sudo as root user<br><br>docker container ls     # Retrieve the container ID<br><br>docker exec -it &lt;containerID&gt; /bin/bash             #ssh into the docker container<br><br>cat /var/jenkins_home/secrets/initialAdminPassword  # retrieve the initial password from container</pre><p>- Proceed with the Jenkins setup: create an admin user and install the recommended plugins for a smooth start.</p><p>7. Git Installation on EC2:</p><p>Git is crucial for code versioning and integration with Jenkins. Install it using:</p><blockquote><strong>sudo yum install git -y</strong></blockquote><p>8. Set Up a GitHub Repository:</p><p>Create a new repository on GitHub. In this repository, add a sample `Jenkinsfile` with a basic pipeline, such as a “Hello World” echo statement.</p><blockquote><strong>#Sample Jenkinsfile</strong></blockquote><blockquote><strong>pipeline {</strong></blockquote><blockquote><strong>agent any</strong></blockquote><blockquote><strong>stages {</strong></blockquote><blockquote><strong>stage(‘Hello’) {</strong></blockquote><blockquote><strong>steps {</strong></blockquote><blockquote><strong>echo ‘Hello World’</strong></blockquote><blockquote><strong>}</strong></blockquote><blockquote><strong>}</strong></blockquote><blockquote><strong>}</strong></blockquote><blockquote><strong>}</strong></blockquote><p>9. Configure a Jenkins Pipeline Job:</p><p>- In Jenkins, select “New Item” and then choose “Pipeline”.</p><p>- Name your pipeline and then scroll to the “Pipeline” section.</p><p>- Under “Definition”, select “Pipeline script from SCM”. For SCM, choose “Git”, and then provide the URL to your GitHub repository.</p><ul><li>Ensure the path to your `Jenkinsfile` is correctly set.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*EcuvSuoYWyb-8okagbtggQ.png" /><figcaption>Screenshot of the Job Creation using the Pipeline option</figcaption></figure><figure><img alt="Screenshot of the pipeline in the configuration job using github Jenkinsfile" src="https://cdn-images-1.medium.com/max/1024/1*mHhSh_ccsdk-xUp6shpNng.png" /><figcaption>Screenshot of the pipeline in the configuration job using github Jenkinsfile</figcaption></figure><p>10. Trigger Jenkins Job:</p><p>Go to your newly created Jenkins job and click “Build Now” to trigger the pipeline. Monitor the execution and, upon successful completion, you’ll see the “Hello World” output from the `Jenkinsfile`.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=263752d13578" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It’s Our Time To Give Back To The Society]]></title>
            <link>https://medium.com/@mukeshvivekanandan/its-our-time-to-give-back-to-the-society-a015489e3322?source=rss-176903ef128------2</link>
            <guid isPermaLink="false">https://medium.com/p/a015489e3322</guid>
            <category><![CDATA[self-improvement]]></category>
            <dc:creator><![CDATA[Mukesh Vivekanandan]]></dc:creator>
            <pubDate>Thu, 23 May 2019 15:26:01 GMT</pubDate>
            <atom:updated>2019-05-23T15:26:01.312Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*D-_XIkwucIsFR8f07Da0Lg.jpeg" /></figure><p>We have taken enough from our society. Grown-up watching others. We have heard a lot of complain about government. But what have we done as an individual to the society? I think it&#39;s our time to give back. It’s our responsibility to give back to the coming generation teens and kids. We are very closer to the next evolution of humankind. Time to upgrade yourself by learning politics around you, especially the world politics around you by having the broad-minded mentality. Let’s just come out of the narrow mind of thinking and start looking at something that is meaningful happening around.</p><p><strong><em>“ Protest doesn’t have to be going on the street or raising the slogan against the authority. Re-define the protest by educating yourself and the future. Do what you can do and just be realistic!”</em></strong></p><p>World politics, Economics, Science, Technology, Farming, etc… Every single department is an essential part of life. Even if one drops the wheels of another side will not rotate. Pick your interest and become a pro. As we say we are educated, we have to be equally responsible.</p><h3>What is holding us back? Distraction? Are we practicing several hours of distraction every day?</h3><p>Yes, I agree! Distractions are there everywhere. Within a span of 15 minutes, you get distracted by Facebook, WhatsApp, Instagram, and what not… The mobile phones are equally giving a pleasure of alcohol. Its another form of dopamine effect to get us into the “Feel-Good Hormone” addiction. Concentrating for 7 seconds in continuous is hard these days, your monkey mind makes sure that you are distracted enough on bananas. Think about millennial kids, how distracted they are, born with mobile phones and play stations. Kids are practicing distractions all day long and losing the ability to think. There is no wonder the AI is going to be smarter than us in the coming days. But how do we take control of yourself? What should we do? There is no debate here about deciding what is right or what is wrong. All I am trying to say is “Are we responsible enough to think futuristic”</p><h3>What should we do now?</h3><p>First and foremost priority in life is TIME. Secondly, overcome the distractions and learn to concentrate. Learn to value your time and start adding meaning to life. Stop running behind the money, realize soon that only so much you can do with money. I understand the fact that money is very important in life but don’t get attached to the objective reality and don’t hack yourself behind the screens. Pursue your dream and educate others to bring along with you. It’s our responsibility to show the next generation on how to add meaning to life and bring true happiness. Bring the change from you and pass it on to the future. <em>Complaining is not a solution to any problem, so just stop complaining about others!</em> If you want to bring the change then <strong><em>“Be the change you want to see the world”</em></strong></p><p>Thanks for sparing your few minutes of time to read this post. Hope the post made some meaning to you. I just put on my personal opinion and thoughts. Comments &amp; Feedbacks are always welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a015489e3322" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>