<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ayush Gupta</title>
    <description>The latest articles on DEV Community by Ayush Gupta (@ayush_gupta_70e4746734c34).</description>
    <link>https://dev.to/ayush_gupta_70e4746734c34</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3123011%2Ff315b61a-9f73-490a-86bd-85a4bb16744d.png</url>
      <title>DEV Community: Ayush Gupta</title>
      <link>https://dev.to/ayush_gupta_70e4746734c34</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ayush_gupta_70e4746734c34"/>
    <language>en</language>
    <item>
      <title>Docker - Basics</title>
      <dc:creator>Ayush Gupta</dc:creator>
      <pubDate>Sun, 05 Oct 2025 14:38:51 +0000</pubDate>
      <link>https://dev.to/ayush_gupta_70e4746734c34/docker-basics-8fo</link>
      <guid>https://dev.to/ayush_gupta_70e4746734c34/docker-basics-8fo</guid>
      <description>&lt;p&gt;&lt;strong&gt;Need for Docker ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose a development team is working on a project and creating an application, now suppose the application is build using different technologies. &lt;/p&gt;

&lt;p&gt;for example - React, Java, Oracle DB &lt;/p&gt;

&lt;p&gt;Now suppose developers are also using different operating system when creating the application&lt;/p&gt;

&lt;p&gt;for example - Windows, Linux, Mac OS&lt;/p&gt;

&lt;p&gt;Now in order to install the technologies like React, Java, Oracle DB in different operating systems, the process may be different.&lt;/p&gt;

&lt;p&gt;for example -&lt;/p&gt;

&lt;p&gt;Installation steps, installation paths, configurations, and versions of technologies, everything may be different&lt;/p&gt;

&lt;p&gt;Now this creates a problem, suppose application is working our system and we are using windows, and now we provide the same code to other developer who is using Mac OS, and now when they tried to run the same code, in their system, it is not working for them. &lt;/p&gt;

&lt;p&gt;Now we have a problem - &lt;/p&gt;

&lt;p&gt;So in order to solve this problem, we will use Docker&lt;/p&gt;

&lt;p&gt;Now let's try to understand what is Docker ?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker&lt;/strong&gt;- &lt;/p&gt;

&lt;p&gt;So as of now we are running the application in our operating system only, for example - Windows or Mac OS&lt;/p&gt;

&lt;p&gt;Now when we use Docker, we will run the application inside a Docker Container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Containers&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;Now in order to run the application inside a Docker Container, we will not be directly putting the Application code, and the required technologies on which this application is built upon in the Docker containers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker Image&lt;/strong&gt;- &lt;/p&gt;

&lt;p&gt;Instead, we will first create a Docker image — which is like a blueprint containing everything we need to run the application (code, libraries, dependencies, configurations, etc.)&lt;/p&gt;

&lt;p&gt;Then, using this Docker image, Docker will create a container — which is a running instance of that image.&lt;/p&gt;

&lt;p&gt;Docker Image → Blueprint&lt;br&gt;
Docker Container → Running instance of that blueprint&lt;/p&gt;

&lt;p&gt;Now let's consider one scenario, is it possible one Docker Container, can have more then one Docker image ?&lt;/p&gt;

</description>
      <category>docker</category>
      <category>containers</category>
      <category>cicd</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>DevOps - Basics</title>
      <dc:creator>Ayush Gupta</dc:creator>
      <pubDate>Sun, 21 Sep 2025 19:23:18 +0000</pubDate>
      <link>https://dev.to/ayush_gupta_70e4746734c34/devops-basics-1gjc</link>
      <guid>https://dev.to/ayush_gupta_70e4746734c34/devops-basics-1gjc</guid>
      <description>&lt;p&gt;Hi Everyone, &lt;/p&gt;

&lt;p&gt;Let's try to understand DevOps&lt;/p&gt;

&lt;p&gt;Suppose we are not using DevOps ?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before DevOps&lt;/strong&gt;- &lt;/p&gt;

&lt;p&gt;Let's consider we have 2 teams, a development team and an operations team, now suppose the development team has created an application, now in order to run this application we need some infrastructure like servers, database, but this infrastructure is not setup yet, and now the question is who is going to create and setup this infrastructure ? is it going to be our development team only, or do we need to take help from any other team ?&lt;/p&gt;

&lt;p&gt;so in order to solve this problem, we will take help from operations team, who is going to create and setup the infrastructure.&lt;/p&gt;

&lt;p&gt;Now there is a roadblock, operation team will have to wait for development team to create the application first. &lt;/p&gt;

&lt;p&gt;But you must be thinking where are the developers creating this application, I mean since their is no infrastructure has been setup yet right ?&lt;/p&gt;

&lt;p&gt;so the developers are creating the application in there local system only as of now.&lt;/p&gt;

&lt;p&gt;So once the application is working fine in their local environment, they’ll reach out to the operations team and request the necessary infrastructure.&lt;/p&gt;

&lt;p&gt;Let's suppose we started with a testing environment&lt;/p&gt;

&lt;p&gt;for example - two servers and one database.&lt;/p&gt;

&lt;p&gt;After the testing environment is ready, the developers can deploy their application there. &lt;/p&gt;

&lt;p&gt;This allows all the developers to test and run the application together in a shared setup.&lt;/p&gt;

&lt;p&gt;The only problem is operation team has to wait for the development team to create the application first.&lt;/p&gt;

&lt;p&gt;Now, suppose we also need a Production Environment as well. &lt;/p&gt;

&lt;p&gt;In this case, the operations team will again have to wait — not only for the development team to complete the application, but also for the QA team to finish their testing successfully in the testing environment.&lt;/p&gt;

&lt;p&gt;Now this is one approach, here setting up of the infrastructure is done manually only.&lt;/p&gt;

&lt;p&gt;Now let's see an another way of working which will help us in solving the above problem of doing things manually, which is DevOps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DevOps&lt;/strong&gt;- &lt;/p&gt;

&lt;p&gt;In DevOps, we use Infrastructure as Code and CI/CD pipelines. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Infrastructure as Code&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;It means we are writing code and creating scripts or config files to set up and manage servers, networks, databases, and environments instead of doing it manually.&lt;/p&gt;

&lt;p&gt;Let's try to understand this using below examples - &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Suppose we don't use Infrastructure as Code ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this case an operations engineer has to create servers, setup infrastructure manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now suppose we will use Infrastructure as Code ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here we will write code as scripts (in YAML, JSON, or a tool’s language like Terraform or Ansible) that describes the infrastructure. &lt;/p&gt;

&lt;p&gt;and now when we run a command or execute our script, then our infrastructure is created and configured automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CI/CD pipelines&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;As of now we have the infrastructure only, but our application is not deployed yet, so to deploy the application in a particular environment like a Testing or a Production environment, we will use CI/CD pipelines.&lt;/p&gt;

&lt;p&gt;Now let's try to understand the CI/CD pipelines ?&lt;/p&gt;

&lt;p&gt;so as of now in the case of infrastructure as code, we are creating and setting up infrastructure using scripts only and not doing anything manually and similarly in order to deploy an application in that infrastructure, we will use scripts only or we can say we will build CI/CD Pipelines which will deploy our application automatically in the infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CI -  Continuous Integration&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;suppose we have created an application, for now let's consider the code of this application exist in our local system only. &lt;/p&gt;

&lt;p&gt;Now let's suppose we have pushed the code to our remote repository or Github.&lt;/p&gt;

&lt;p&gt;now comes CI, It will be build the code and runs test cases, these test cases are part of the code itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CD -&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;In CD, we are trying to deploy the code in a particular environment like Testing or Production etc. &lt;/p&gt;

&lt;p&gt;now in order to deploy the code or we can say build, we will use two strategies - &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Continuous Delivery&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2. Continuous Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;now let's try to understand both of them &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Continuous Delivery&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;In Continuous Delivery, we will deploy the code in a Testing environment only, then QA team will check how the app is working, before we deploy the same app in the production environment.&lt;/p&gt;

&lt;p&gt;Now in this case of Continuous Delivery, the deployment to a production environment will be done manually only.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Continuous Deployment&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;In Continuous Delivery, Everything is done automatically, first to Testing environment and then to production as well.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cicd</category>
      <category>jenkins</category>
      <category>linux</category>
    </item>
    <item>
      <title>Bash Scripting - Basics</title>
      <dc:creator>Ayush Gupta</dc:creator>
      <pubDate>Sat, 13 Sep 2025 20:07:03 +0000</pubDate>
      <link>https://dev.to/ayush_gupta_70e4746734c34/bash-scripting-basics-37b2</link>
      <guid>https://dev.to/ayush_gupta_70e4746734c34/bash-scripting-basics-37b2</guid>
      <description>&lt;p&gt;Hi Everyone,&lt;/p&gt;

&lt;p&gt;Lets try to work with the Bash Scripting now.&lt;/p&gt;

&lt;p&gt;In the previous post we have created only a .sh file and mention the shebang statement as #!/bin/bash which tells us that we are using Bash shell.&lt;/p&gt;

&lt;p&gt;Lets try to use the features which Bash Shell may provide to us.&lt;/p&gt;

&lt;p&gt;lets create a .sh file once and give it a name hello.sh &lt;/p&gt;

&lt;p&gt;but you may be thinking how do we create this .sh file ?&lt;/p&gt;

&lt;p&gt;we can use a text editor which is a part of Linix&lt;/p&gt;

&lt;p&gt;for example -  vi text editor &lt;/p&gt;

&lt;p&gt;in our terminal we can type -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vi hello.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;now vi text editor will be open for us, but we will not be able to add anything as of now, first we need to go into the insert mode, by pressing "i" button in your keyboard, after that it will show us that we are in insert mode and now we can start editing the hello.sh file&lt;/p&gt;

&lt;p&gt;as discussed in previous post, first we need to add the shebang statement to tell what shell we are using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Lets create a simple script, that will print "Hello World" when we execute it
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

echo "Hello World"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;as of now we have added above 2 lines , one is shebang statement and second is echo "Hello World"&lt;/p&gt;

&lt;p&gt;but we have a roadblock, before executing the hello.sh file, we need to save this hello.sh file and come out from the text editor right ?&lt;/p&gt;

&lt;p&gt;in order to do that, we need to do following - &lt;/p&gt;

&lt;p&gt;press escape -&amp;gt; press shift + :wq -&amp;gt; press enter&lt;/p&gt;

&lt;p&gt;here w - write or save the file, and q - quit &lt;/p&gt;

&lt;p&gt;now we are out from the vi text editor&lt;/p&gt;

&lt;p&gt;lets see how to run or execute our script now, and regarding this we need to follow the following way of executing the script&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./hello.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;but it may still not work, due to permissions &lt;/p&gt;

&lt;p&gt;so we need to change the permissions first using following&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod +x hello.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here we are just giving executable permission to our hello.sh file to user, group and others, means everyone can execute our hello.sh file or script &lt;/p&gt;

&lt;p&gt;now lets follow same -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./hello.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we will get - &lt;/p&gt;

&lt;p&gt;Hello World&lt;/p&gt;

</description>
      <category>bash</category>
      <category>linux</category>
      <category>automation</category>
      <category>devops</category>
    </item>
    <item>
      <title>Terminal vs Shell vs Bash vs Bash Scripting</title>
      <dc:creator>Ayush Gupta</dc:creator>
      <pubDate>Sat, 13 Sep 2025 19:52:25 +0000</pubDate>
      <link>https://dev.to/ayush_gupta_70e4746734c34/bash-scripting-5064</link>
      <guid>https://dev.to/ayush_gupta_70e4746734c34/bash-scripting-5064</guid>
      <description>&lt;p&gt;Hi Everyone,&lt;/p&gt;

&lt;p&gt;Let's try to understand some useful concepts in Linux OS&lt;/p&gt;

&lt;p&gt;we will start with the terminal &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Terminal&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;we can consider, a terminal is a place or a GUI interface, where we can type our commands, and when we hit enter, we can see the output of the commands.&lt;/p&gt;

&lt;p&gt;Now let's see, what happens when we hit enter after typing a command ?&lt;/p&gt;

&lt;p&gt;you may be thinking, either the command will work and give us the desired output or it will fail and give us the error ?&lt;/p&gt;

&lt;p&gt;but who is actually executing these commands ? and after execution how the output of the command is actually showing in the terminal window ?&lt;/p&gt;

&lt;p&gt;In simple terms the commands are actually executing by the &lt;strong&gt;kernel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;but its not like when we type a command in the terminal and hit enter and that command will reach kernel and kernel is able to execute it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shell&lt;/strong&gt; -&lt;/p&gt;

&lt;p&gt;It is actually the shell who is taking the commands from terminal and sending it the kernel for execution, and once command is executed, Kernel is going to send the output back to the shell and now shell is going to show it to the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Terminal -&amp;gt; Shell -&amp;gt; Kernel 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's consider a scenario, what if a command doesn't exist or there is a syntax error in our command, so in this case will the Shell, still going to send the command to the Kernel ?&lt;/p&gt;

&lt;p&gt;so in the above scenario the shell is going to search first, and if the command doesn't exist, it will not send the command to kernel for execution, and we will simply get error as following -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash: command_name: command not found
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bash&lt;/strong&gt;-&lt;/p&gt;

&lt;p&gt;Now there are other types of Shells also, who are just reading the commands from Terminal and sending it to the Kernel for execution.&lt;/p&gt;

&lt;p&gt;and the most common Shell is &lt;strong&gt;Bash&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bash Scripting&lt;/strong&gt; - &lt;/p&gt;

&lt;p&gt;So as of now we are typing the commands one at a time and when we hit enter, Shell is reading the command from terminal and sending to Kernel for execution right ?&lt;/p&gt;

&lt;p&gt;now let's consider an example - &lt;/p&gt;

&lt;p&gt;suppose you have 10 commands to follow to install some package in a server and you have to follow all the commands in a sequence, one way is to do it manually, which means we are going to type a command and hit enter, and once it is completed, we have to type the second command and hit enter .. continue&lt;/p&gt;

&lt;p&gt;so as you can see in above scenario, we are typing each command manually, and then waiting for it also before completing and typing the next command and finally our package is installed in the server.&lt;/p&gt;

&lt;p&gt;But now we have a roadblock, suppose we have 5 servers also, and in all the 5 servers, we have to install the same package, so shall we follow the same steps again and again in all the 5 servers ?&lt;/p&gt;

&lt;p&gt;To solve this problem, we will be using &lt;strong&gt;Bash Scripting&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Let's see how to create a script ?&lt;/p&gt;

&lt;p&gt;we need put all the 10 commands which we were following manually in a file as following - &lt;/p&gt;

&lt;p&gt;hello.sh &lt;/p&gt;

&lt;p&gt;here "hello" is the name of the file, ".sh" is the file extension&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash

echo "Hello World"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's consider we have put all the 10 commands in out hello.sh file, now all we need to do is, is to run or execute this file using following way -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./hello.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now Shell will read this file line by line, and start sending the commands we have written in each line to the kernel for execution, until it has done reading all the lines of the file.&lt;/p&gt;

&lt;p&gt;Now as you can see, we are not evening typing the commands in terminal also, we have just put all the commands in a file, Shell itself, is doing all the work automatically, now to solve the problem of installing the same package in all the 5 server, all we need to do is run the same script in all the 5 servers, that's all. &lt;/p&gt;

&lt;p&gt;so using Bash Scripting we are able to automate the process of installing our packages in our servers.&lt;/p&gt;

</description>
      <category>bash</category>
      <category>automation</category>
      <category>devops</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
