<?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 Vriksha Shetty on Medium]]></title>
        <description><![CDATA[Stories by Vriksha Shetty on Medium]]></description>
        <link>https://medium.com/@vrikshashetty?source=rss-92ab4cf25e60------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Q7t8iVD3M_oDg4FTRBgpFQ.png</url>
            <title>Stories by Vriksha Shetty on Medium</title>
            <link>https://medium.com/@vrikshashetty?source=rss-92ab4cf25e60------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 10:14:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vrikshashetty/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[Linux Troubleshooting: 10 Essential Commands Every Engineer Should Know]]></title>
            <link>https://medium.com/@vrikshashetty/linux-troubleshooting-10-essential-commands-every-engineer-should-know-d52e52a2d7be?source=rss-92ab4cf25e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/d52e52a2d7be</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[system-administration]]></category>
            <dc:creator><![CDATA[Vriksha Shetty]]></dc:creator>
            <pubDate>Wed, 18 Jun 2025 18:46:02 GMT</pubDate>
            <atom:updated>2025-06-18T18:46:02.261Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Simple, effective commands to help you diagnose and fix common Linux issues</em></blockquote><p>Linux Troubleshooting: 10 Essential Commands Every Engineer Should Know</p><p>If you’ve ever worked with Linux systems — whether in DevOps, cloud engineering, or development — you’ve likely run into a situation where <strong>“something’s broken”</strong> and you’re not sure where to start.</p><p>Over the years, I’ve learned to trust a set of reliable commands and checks to get answers fast.</p><p>Here are 10 <strong>practical troubleshooting steps</strong> (with real commands) to help you go from <em>panic to fix</em>.</p><h3>1. Check System Uptime and Load</h3><pre>uptime<br>top<br>htop</pre><h3>2. Check Disk Space</h3><pre>df -h<br>du -sh /var/*</pre><h3>3. Check Running Processes</h3><pre>ps aux | sort -nk +4 | tail <br>This shows the top memory-consuming processes.<br><br>ps aux --sort=-%cpu | head<br>This shows the top CPU-consuming processes.</pre><h3>4. Check for Zombie or Stuck Processes</h3><pre>ps aux | grep &#39;Z&#39;</pre><h3>5. Inspect System Logs</h3><pre>dmesg | tail<br>journalctl -xe<br>cat /var/log/syslog</pre><h3>6. Check Network Issues</h3><pre>ping google.com<br>curl -I https://example.com<br>netstat -tulpn<br>ss -tuln<br><br>These help you identify:<br>DNS issues<br>Firewall/port binding problems<br>Broken external services</pre><h3>7. Restart Faulty Services</h3><pre>systemctl status nginx<br>sudo systemctl restart nginx<br>Always check the service’s status first, then restart.</pre><h3>8. Check Failed Logins or SSH Issues</h3><pre>lastb<br>cat /var/log/auth.log</pre><h3>9. Diagnose Permission or File Errors</h3><pre>ls -l /path/to/file<br>stat /path/to/file<br></pre><h3>10. When in Doubt, Reboot (But Check First)</h3><pre>who -r<br>uptime -s<br>Check how long the system’s been up. Sometimes, a reboot is the cleanest solution — but always investigate root causes first.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d52e52a2d7be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Devops CI-CD Setup For Beginners]]></title>
            <link>https://medium.com/globant/devops-ci-cd-setup-for-beginners-b185fc981eed?source=rss-92ab4cf25e60------2</link>
            <guid isPermaLink="false">https://medium.com/p/b185fc981eed</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Vriksha Shetty]]></dc:creator>
            <pubDate>Thu, 18 Feb 2021 02:43:28 GMT</pubDate>
            <atom:updated>2021-02-18T02:43:28.712Z</atom:updated>
            <content:encoded><![CDATA[<p>This article talks about infrastructure creation in AWS using Terraform modules (IaaC), building and deploying PHP application with the help of Jenkins (using Publish-Over-SSH plugin) and Ansible .</p><p><strong>Below points are covered in this article:</strong></p><ul><li>Tools Introduction.</li><li>Terraform Installation.</li><li>Let’s start with coding part.</li><li>Devops CICD Setup for PHP application.</li><li>Let’s run the demo !</li><li>Common issues along with troubleshooting steps.</li></ul><h3><strong>Tools Introduction:</strong></h3><p>Terraform is an Infrastructure as a Code tool which helps provision infrastructure and manage it. This tool is cloud agnostic and support some of the famous public cloud vendors (AWS, GCP, Azure, OpenStack, etc.). Here we will be using AWS as the cloud provider.</p><p>Jenkins is a free and open source automation server. It helps automate the parts of software development related to build, test and deploy, facilitating continuous integration and continuous delivery.</p><p>Ansible is an open-source tool for software provisioning, configuration management and application deployment to implement Infrastructure as a Code (IaaC). It runs on many flavors of unix/linux and can be used to configure unix based as well as windows based machines.</p><h3><strong>Terraform Installation:</strong></h3><ol><li>Download Terraform from <a href="https://www.terraform.io/downloads.html">https://www.terraform.io/downloads.html</a> (here we’ve installed windows 64 bit version 14.2 on C:\)</li><li>In-order to run your terraform script from any location setup the path variable as below:</li></ol><p>Go to Control Panel-&gt;System and Security-&gt;System-&gt;Advanced system setting then click on the environment variable and edit path “c:\” where we have extracted our terraform setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/0*8QX3Oyi6wfeC_cEE" /></figure><p>3. Open command prompt type <strong>terraform — version</strong>.</p><ul><li>Terraform Modules:<strong> </strong>We can create modules to reuse code for multiple accounts .</li><li>We will be creating following Modules for Infrastructure setup:</li></ul><p>-EC2: Jenkins server, Ansible, Target Server.</p><p>-OS: Ubuntu</p><p>-RDS: MYSQL</p><p><strong>File structure for this demo :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/0*g0o4kqoMlXwiRjH0" /></figure><p><strong>Provision Jenkins, Ansible, Tomcat and RDS setup using Terraform module</strong>.</p><p>Prerequisites for creating Instance module:</p><ol><li>IAM profile: An IAM profile acts as a container for EC2 instance’s IAM role. If you create EC2 from the console, the console will automatically attach an IAM profile with EC2 role, however while creating through CLI or API, you need to create roles and instance profiles as separate actions.</li><li>IAM Role: It is an IAM identity that you can create in your account which has specific permissions.</li><li>IAM Policy: It defines permission for an action regardless of the method that you use to perform the operation.</li><li>Security Group: It is like a firewall, which defines allow/deny action to the EC2 instance traffic.</li><li>AMI: It is a preconfigured package required to launch an EC2 instance that includes the OS and required software packages etc.</li><li>Userdata: When you launch an instance in Amazon EC2, you have the option of passing user data to the instance that can be used to perform common automated configuration tasks and even run scripts after the instance starts.</li><li>Keyname: It is a set of security credentials that you use to prove your identity when connecting to an instance. Download the key from the console and pass as a variable.</li><li>Instance type: Type of instance to start. Updates to this field will trigger a stop/start of the EC2 instance.</li></ol><h3><strong>Let’s start with coding part:</strong></h3><p><strong>→resource “aws_instance” creates an aws_instance which terraform would refer to as ansiserver.</strong></p><p>→Pass ami and key name as variable that will be defined in vars.tf, instance type will be t2.micro.</p><p>→Under user data pass shell script file location.</p><p>→Tags will create an instance named ansible, associate_public_ip = true is optional which will associate public ip to EC2 instance.</p><pre>resource “aws_instance” “ansiserver” {<br> ami = “${var.ansi_ami_id}”<br> instance_type = “t2.micro”<br> key_name = “${var.keyname}”<br> vpc_security_group_ids = [aws_security_group.ansiserver.id]<br> iam_instance_profile = “${aws_iam_instance_profile.ansi_profile.id}”<br> user_data = file(“C:/Users/Dell/Terraform/files/install_ansible.sh”)<br> associate_public_ip_address = true<br> tags = {<br> Name = “ansible”<br> }<br>}</pre><p><strong>→resource “aws_security_group” will create a security group named “ansiserver” .</strong></p><p>→vpc_id is passed as a variable.</p><p>→While creating the AWS instance, a security group is created initially which attaches the security group id to above instance as vpc_security_group_ids .</p><pre>resource “aws_security_group” “ansiserver” {<br> name = “ansiserver”<br> description = “Allow SSH and Jenkins inbound traffic”<br> vpc_id = “${var.vpcid}”<br> ingress {<br> from_port = 22<br> to_port = 22<br> protocol = “tcp”<br> cidr_blocks = [“0.0.0.0/0”]<br> }<br> ingress {<br> from_port = 8080<br> to_port = 8080<br> protocol = “tcp”<br> cidr_blocks = [“0.0.0.0/0”]<br> }<br> ingress {<br> from_port = 0<br> to_port = 0<br> protocol = “-1”<br> cidr_blocks = [“0.0.0.0/0”]<br> }<br> egress {<br> from_port = 0<br> to_port = 0<br> protocol = “-1”<br> cidr_blocks = [“0.0.0.0/0”]<br> }<br> }</pre><p><strong>→resource “aws_iam_role” will create an IAM role named ansi_role which allows EC2 instances to call AWS services using sts assume role on user’s behalf.</strong></p><p>→IAM role policy attachment as name suggests, attaches policy to ansi_role.</p><p>→Count is Meta-argument which is used to manage several similar objects without writing separate blocks.</p><p>→ In this example we will count the length of variable “ policy arn”, attach AWS managed policy to ansi_role.</p><p>→Count.index is a distinct index number which starts with 0, as we have two arns passed in variable (refer var.tf below) count.index will attach each arns to our role.</p><pre>resource “aws_iam_role” “ansi_role” {<br> name = “ansi_role”</pre><pre>assume_role_policy = &lt;&lt;EOF<br>{<br> “Version”: “2012–10–17”,<br> “Statement”: [<br> {<br> “Action”: “sts:AssumeRole”,<br> “Principal”: {<br> “Service”: “ec2.amazonaws.com”<br> },<br> “Effect”: “Allow”,<br> “Sid”: “”<br> }<br> ]<br>}<br>EOF<br>}<br>resource “aws_iam_role_policy_attachment” “role-attach” {<br> role = aws_iam_role.ansi_role.name<br> count = “${length(var.iam_policy_arn)}”<br> policy_arn = “${var.iam_policy_arn[count.index]}”<br>}<br>resource “aws_iam_instance_profile” “ansi_profile”{<br> name = “ansi_profile”<br> role = “${aws_iam_role.ansi_role.name}”<br>}</pre><p><strong>The final code can be referred on github account:</strong></p><p><a href="https://github.com/vriksha-star/Terraform.git">https://github.com/vriksha-star/Terraform.git</a></p><p>→Similarly, code for other terraform modules such as RDS, Jenkins, Target server can be found in the Github repos under Modules directory.</p><p>→Shell scripts used to create Jenkins, Ansible and target server will be under files folder in Github account.</p><p>Below are the contents of main.tf created under Dev folder, under which the terraform needs to be initialized:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*-BQoNzBiFx2emUdN" /></figure><p><strong>Using Terraform</strong></p><p>→Go to command prompt, scroll towards main folder where modules are defined and perform <strong>terraform init</strong>, you will get an output as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/0*6B16W8Dwc5z_2k1_" /></figure><p>→Execute below commands after terraform init as<br>- terraform-plan (This gives the blueprint about resources)<br>- terraform-apply (This applies the terraform configuration and creates the resources)</p><p>→Once terraform apply is successful, it creates Targetserver-1, Targetserver-2, ansible (controller), Jenkins server and RDS database1 in your AWS account as shown in the below picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/0*6qsjhYMPr_B4y3Up" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/0*GEroVYdx2gVbsz4X" /></figure><h3><strong>Devops CICD Setup for PHP application</strong></h3><p>→Use PHP application from AWS documentation from this <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Tutorials.WebServerDB.CreateWebServer.html">URL</a>, I have kept a copy of it in my GitHub repo.</p><p>→Login to Jenkins Console.</p><p>→Connection between Jenkins to Ansible will be done using Publish-over-ssh, on Jenkins go to manage plugin under <strong>Available</strong> tab add <strong>Publish-over-ssh</strong> plugin and install without restart.</p><p>→Later go to configure systems and add private key from Ansible server using ssh-keygen.</p><p>→Add public key from Jenkins to authorized files on Ansible master and then check the connection.</p><p>→If this doesn’t work add the contents of the .pem key as private key under configure systems.</p><p><strong>Configure Ansible with Jenkins using publish over ssh:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/0*YxDrTlOw6gTBY3Hz" /></figure><p>→Connectivity between Ansible controller and targets can be done by copying the public key from Ansible controller to authorized keys on Ansible target.</p><p>→On ansible controller machine, create file named inventory.txt, add ip address of target machines and create pingtest.yaml playbook with below contents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/0*OLH6vWlKccmioHLS" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/0*rmNj93F3gIqOP-W1" /></figure><p>→After writing playbook, execute command “<strong>ansible-playbook pingtest.yaml -i inventory.txt</strong>” which gives output as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lf7pNwAxgDVsLFDn" /></figure><p><strong>Create an ansible playbook on an ansible controller machine:</strong></p><ul><li>Created file named copyfile.yaml</li></ul><pre>name: Playbook to deploy app on target Server<br>hosts: webserver<br>become: yes<br>become_user: root<br>tasks:<br>  - name: Creates directory<br>    file:<br>       path: /var/www/inc<br>       state: directory<br>       mode: 0777<br>  - name: Creates file<br>    file:<br>       path: &quot;/var/www/inc/dbinfo.inc&quot;<br>       state: touch<br>  - name: Creates Content<br>    copy:<br>      content: |<br>               &lt;?php<br>               define(&#39;DB_SERVER&#39;, &#39;db_instance_endpoint&#39;);<br>               define(&#39;DB_USERNAME&#39;, &#39;tutorial_user&#39;);<br>               define(&#39;DB_PASSWORD&#39;, &#39;master password&#39;);<br>               define(&#39;DB_DATABASE&#39;, &#39;sample&#39;);<br>               ?&gt;<br>   dest: /var/www/inc/dbinfo<br>   mode: 0777<br>  - name: Copy File to ansible target <br>   copy:<br>      src: /home/ubuntu/SamplePHP.php<br>      dest: /var/www/html</pre><p><strong>On Jenkins UI perform below step</strong>:</p><ul><li>Create Freestyle project named “PHP-test” on Jenkins.</li><li>On SCM provide your GIT url:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/0*k_HTpW90HGcMhA8H" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/0*575wio-J2AxUK27l" /></figure><h3>Let’s run the demo</h3><ul><li>Trigger Jenkins build, on browser execute <a href="http://server-public-ip/SamplePHP.php(your">http://ec2-public-ip/SamplePHP.php(your</a> php script name), you will get output as below:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*yFscTiklUDoEVqb1" /></figure><h3><strong>Common issues along with troubleshooting steps:</strong></h3><ol><li>In case of build failure check whether copyfile.yaml is created on an Ansible controller.</li><li>Check build status, if you are getting an unstable issue for Jenkins build check test connection on configure systems.</li><li>Update private ip of target server on RDS security group.</li><li>If you get a mysql connectivity issue check connectivity from target to mysql using “telnet “RDS endpoint” 3306”.</li><li>If you get a db issue check dbinfo.inc whether you have provided right db details on” var/www/inc “ on the target machine.</li></ol><h3><strong>Conclusion</strong></h3><p>This article was meant to share basic understanding of devops ci-cd real time scenario, along with automation steps using Terraform , Jenkins and Ansible modules, we successfully deployed an application with html as frontend, php as backend and mysql db as database.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b185fc981eed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/globant/devops-ci-cd-setup-for-beginners-b185fc981eed">Devops CI-CD Setup For Beginners</a> was originally published in <a href="https://medium.com/globant">Globant</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>