DevOps Interview Experience - Fresher

Know What and What not to study to pursue DevOps role as a Freshman

DevOps Interview Experience - Fresher

My Background:

Being in 7th semester and not cracking any major interning in my third year semester break, an opportunity knocked at my door. In the very rare scenario of a company visiting my campus a google form was circulated by TPO office for a company named Pluralsight. It had two roles: Full-Stack, DevOps intern. I choose the full-stack role as I had completed MERN stack and was confident on cracking it.

Suddenly a phone rang after a week, I picked this unknow number and it was from Training and Placement office. They told me that role for full-stack was over and the only option left was to opt for Dev Ops role. It was a bold decision, I panicked for a while and finally choose to go with this option rather than sitting under open sky waiting for an opportunity to land on my lap.

This blog will let you go through my journey and how you can grasp one such opportunity for yourself. I jumped into this new arena engulfing me to every resource I could find to crack "DevOps" in the following weeks. I know how it feels to be from not so prominent campus after cracking JEE only to find yourself being unlucky, but the only smart choice is to carry the journey forward.

Before I reveal the whole process, let me share with you the interview.

Fast-forward to interview...


The Interview Day...

Interviewer:

How are you ? Please give an introduction of yourself so that we can begin with our conversation.

Tips to answer:

After stating your name and branch, switch over to your projects. Try to state your projects about how you practiced SDLC, how you deployed your projects and what problem does it solves.

Linux Commands:

What is chmod command and how is it used?

chmod is a powerful command for managing file permissions in Unix-like systems. Understanding the basics of symbolic and octal notation and using the appropriate options will help you control access to files and directories effectively.

chmod 755 file.txt
# This gives the owner read, write, and execute permissions, 
# and gives the group and others read and execute permissions.
chmod u+rwx,go=rx file.txt
# This grants the owner read, write, and execute permissions and 
# grants the group and others read and execute permissions.

What is #!/bin/bash? can we write #!/bin/sh as well?

In the context of the shebang line, choosing between "#!/bin/bash" and "#!/bin/sh" involves selecting the appropriate interpreter for a script. The former, using Bash, is preferred for its robust feature set and powerful scripting capabilities, making it a versatile and widely used option. Bash's backward compatibility with Bourne shell syntax means it can seamlessly execute scripts written for the Bourne shell. On the other hand, "#!/bin/sh" specifically invites the Bourne shell, which, while less feature-rich than Bash, remains a reliable choice for simpler scripting tasks. Ultimately, the decision hinges on the script's requirements and the desired balance between modern features and classic simplicity.🚀

DevOps and it's significance

What do you mean by Dev-Ops?

DevOps is like a teamwork philosophy for building and running software. It brings developers and operations folks closer, so they work together smoothly. With lots of automation and tools, DevOps helps make software development faster, more reliable, and better. It's all about breaking down barriers, collaborating well, and getting cool software out into the world quickly.

Can you mention tools and tech-stacks used in Dev-Ops?

DevOps relies on a range of tools and technical stacks to streamline software development and operations. For version control, Git is commonly used. Continuous integration benefits from tools like Jenkins, Travis CI, and CircleCI. Configuration management and infrastructure as code are often managed with Ansible and Terraform. Containerization leverages Docker, while Kubernetes orchestrates containers. Continuous deployment/delivery tools include Spinnaker and GitLab CI/CD. For monitoring and logging, Prometheus, Grafana, and the ELK Stack are popular choices. Collaboration and communication tools such as Slack and Microsoft Teams facilitate teamwork. Cloud platforms like AWS, Azure, and Google Cloud provide infrastructure services. Scripting and automation involve Bash and Python, while testing relies on Selenium, JUnit, and TestNG. This assortment of tools collectively forms the DevOps toolchain, enhancing collaboration, automation, and efficiency throughout the software development lifecycle.

Git and GitHub

Look at the tutorial, it shall be enough for cracking all major questions.

#!/bin/bash

# Git Commands

# Clone a Repository
git clone <repository_url>

# Initialize a Repository
git init

# Add Changes to Staging
git add <file(s)>

# Commit Changes
git commit -m "Commit message"

# Check Repository Status
git status

# View Commit History
git log

# Create a Branch
git branch <branch_name>

# Switch to a Branch
git checkout <branch_name>

# Merge Branches
git merge <branch_name>

# Pull Changes from a Remote Repository
git pull origin <branch_name>

# Push Changes to a Remote Repository
git push origin <branch_name>

# Undo Local Changes (Discard Uncommitted Changes)
git checkout -- <file(s)>

# GitHub Commands

# Create a New Repository on GitHub
# (Create a new repository on GitHub first)
git remote add origin <repository_url>
git push -u origin master

# Fork a Repository
# (Click the "Fork" button on GitHub to create a personal copy)
# git clone <your_forked_repository_url>

# Sync Fork with Upstream
# git remote add upstream <original_repository_url>
# git fetch upstream
# git merge upstream/master

# Create a Pull Request
# (After making changes in your fork, create a pull request on GitHub)
# View Pull Requests:
# git fetch origin pull/<pull_request_number>/head:<branch_name>
# git checkout <branch_name>

# Delete a Remote Branch
git push origin --delete <branch_name>

# View Remote URLs
git remote -v

# Configure Upstream Remote
# git remote add upstream <original_repository_url>

# Stash Changes
git stash

# OR
# git stash save "your_message_here"

# List Stashes
git stash list

# Apply the Latest Stash
git stash apply

# Remember to replace placeholder values like <repository_url>, <branch_name>, etc., with actual values as needed.

Here is a basic tutorial about Git and GitHub.

How can we make a Laptop as a Server? RAM, Processor and Storage Choice in a Server.

Transforming a laptop into a server involves key steps to ensure a robust and secure environment. First of all our machine should be switched on 27X7 having stable connection. Then start by selecting appropriate server software, such as Apache or Nginx for web servers and MySQL or PostgreSQL for databases. Choose a Linux distribution like Ubuntu Server or CentOS for its server-friendly features. Following installation, update and upgrade the system to patch vulnerabilities and ensure the latest software versions. Configure the server software by editing relevant files and implementing security measures such as firewalls and secure SSH access. For internet accessibility, configure domain settings, update DNS records, and consider Dynamic DNS (DDNS) if dealing with a dynamic IP. Router configuration is crucial for port forwarding, with common ports like 80 and 443 forwarded for web servers. Comprehensive testing and monitoring, including uptime and performance checks, help ensure the server's reliability. This process, integrating software, security, networking, and monitoring considerations, aligns with DevOps principles of efficiency and collaboration in server management.

I missed some of the key-points but the interviewer was solely interested in my knowledge and basic viewpoint of server i.e. a machine that serves. You need not to remember the exact software for these but the idea is important.

Like when we dual-boot our system, we partition the Storage, the RAM and it also uses our processor. Just read about this analogy more.

Vertical and Horizontal Scaling

Vertical scaling is like giving your computer a decent upgrade. Imagine you have this one computer, and it's doing its best, but you want it to handle more tasks. Vertical scaling steps in like a tech superhero, swooping down to enhance that single machine's power. It's like adding more muscles to make it stronger—upgrading the memory, getting a faster processor, or expanding its storage. This way, your computer becomes a powerhouse, capable of tackling more significant challenges all on its own.

Now, picture a digital superhero squad working together to conquer tasks. That's horizontal scaling for you. Instead of boosting one computer, you're bringing in more teammates, each with its strengths. It's like assembling a group of friends to handle different parts of a project. With horizontal scaling, you add more computers to the team. Each machine takes on a specific role, and together, they tackle the workload efficiently. It's teamwork in the tech world, allowing you to handle larger tasks by dividing and conquering with a crew of computers rather than relying on a single superhero machine.

Kubernetes, Jenkins in Pipeline:

In DevOps, using Kubernetes and Jenkins together makes deploying applications easy. When developers change code, Jenkins checks it, tests it, and puts it into containers. These containers are like packaged apps, and Kubernetes helps put them on servers and manage how many are running. This way, new code can go live without causing problems. It's like a teamwork dance between Jenkins and Kubernetes, making sure everything runs smoothly from code to live app.

After this, I had a few chit-chats and I infer that it was to check whether I paid attention to detail in the conversation or not. A firm handshake and a smile on his face made me more excited about the result.


More Questions asked from the Panel:

Explain how you would handle database schema changes in a continuous delivery pipeline.

In a DevOps pipeline, schema changes can be managed using tools like Flyway or Liqui-base, which provide version control for database changes. These changes can be scripted and incorporated into the overall CI/CD process.

Tower-of-Hanoi.

This is one of the classical questions of recursion. The interviewer just wanted to know your approach and your thinking style. I won't discuss the solution to it here as it is just a google search away.


Focus on Computer Science fundamentals and having a good communication skill is always a plus point to your interview. Besides this, your achievements like Hackathons, Coding Profiles or any other competitions matters and gives a good first impression to the interviewer.

I asked the interviewer about their expectation for the role and he told that a fresher need not to dive deep into technologies like Apache Hadoop or so, only requirement is that he should be able to grasp the things quickly and that if sufficient if his basics are clear.

Thanks for reading this. Let's connect if you found this blog insightful.

Connect on Twitter

Connect on LinkedIn

Connect on GitHub

Â