Interview Question: Topper
Interview Question: Topper
Interview Question: Topper
Interview Question
Ans : These days, the market window of products has reduced drastically.
We see new products almost daily. This provides a myriad of choices to
consumers but it comes at a cost of heavy competition in the market.
Organizations can not afford to release big features after a gap.
They tend to ship off small features as releases to the customers at regular
intervals so that their products don't get lost in this sea of competition.
In order to achieve the above points and thereby achieving seamless product
delivery, DevOps culture acts as a very useful tool.
©Topperworld
Due to these advantages, multi-national companies like Amazon and Google
have adopted the methodology which has resulted in their increased
performance.
Ans : SSH stands for Secure Shell and is an administrative protocol that lets
users have access and control the remote servers over the Internet to work
using the command line.
SSH is a secured encrypted version of the previously known Telnet which was
unencrypted and not secure. This ensured that the communication with the
remote server occurs in an encrypted form. ©Topperworld
©Topperworld
This involves certain policies, techniques, procedures, and tools for
evaluating change proposals, managing them, and tracking their progress
along with maintaining appropriate documentation for the same.
The following diagram gives a brief idea about what CM is all about:
©Topperworld
Ans : Configuration management (CM) helps the team in the automation of
time-consuming and tedious tasks thereby enhancing the organization’s
performance and agility.
©Topperworld
Based on the above flow, we can have a brief overview of the CI process.
⚫ Developers regularly check out code into their local workspaces and work
on the features assigned to them.
⚫ Once they are done working on it, the code is committed and pushed to
the remote shared repository which is handled by making use of effective
version control tools like git.
⚫ The CI server keeps track of the changes done to the shared repository
and it pulls the changes as soon as it detects them.
⚫ The CI server then triggers the build of the code and runs unit and
integration test cases if set up.
⚫ The team is informed of the build results. In case of the build failure, the
team has to work on fixing the issue as early as possible, and then the
process repeats.
©Topperworld
Q 8. Why is Continuous Integration needed?
This also allows the development team to detect and fix errors at the initial
stage as each and every commit to the shared repository is built
automatically and run against the unit and integration test cases.
©Topperworld
Ans : Continuous Testing (CT) is that phase of DevOps which involves the
process of running the automated test cases as part of an automated
software delivery pipeline with the sole aim of getting immediate feedback
regarding the quality and validation of business risks associated with the
automated build of code developed by the developers.
Using this phase will help the team to test each build continuously (as soon
as the code developed is pushed) thereby giving the dev teams a chance to
get instant feedback on their work and ensuring that these problems don’t
arrive in the later stages of SDLC cycle.
©Topperworld
©Topperworld
➢ Planning:
➢ Development:
• This phase allows for automation of code validation, build, and testing.
This ensures that the changes are made properly without development
environment errors and also allows the identification of errors at an
initial stage.
• Tools like Jenkins, circleCI, etc are used here.
©Topperworld
©Topperworld
➢ Deployment:
➢ Operations:
➢ Monitoring:
DevOps tries to reduce the gap between the developers and the operations
team for the effective launch of the product.
©Topperworld
©Topperworld
©Topperworld
Continuous Deployment Continuous Delivery
Similarly, there are multiple myths surrounding DevOps which can contribute
to antipatterns, they are:
©Topperworld
©Topperworld
Benefits of Memcached:
⚫ In case of failure, the data is lost as it is neither a persistent data store nor
a database.
⚫ It is not an application-specific cache.
⚫ Large objects cannot be cached.
©Topperworld
Q 16. What are the various branching strategies used in the version
control system?
©Topperworld
➢ Feature branching
➢ Task branching
• Here, each task is maintained in its own branch with the task key being
the branch name.
• Naming the branch name as a task name makes it easy to identify what
task is getting covered in what branch.
➢ Release branching
• This type of branching is done once a set of features meant for a release
are completed, they can be cloned into a branch called the release
branch. Any further features will not be added to this branch.
• Only bug fixes, documentation, and release-related activities are done
in a release branch.
• Once the things are ready, the releases get merged into the main
branch and are tagged with the release version number.
• These changes also need to be pushed into the develop branch which
would have progressed with new feature development.
©Topperworld
Q 17. Can you list down certain KPIs which are used for gauging the
success of DevOps?
Ans : KPIs stands for Key Performance Indicators. Some of the popular KPIs
used for gauging the success of DevOps are:
Ans : Resilience Testing is a software process that tests the application for
its behavior under uncontrolled and chaotic scenarios. It also ensures that
the data and functionality are not lost after encountering a failure.
©Topperworld
Q 20. Can you differentiate between continuous testing and
automation testing?
This is the process of executing all This is a process that replaces manual
the automated test cases and is testing by helping the developers create
done as part of the delivery test cases that can be run multiple times
process. without manual intervention.
This process focuses on the This process helps the developer to know
business risks associated with whether the features they have developed
releasing software as early as are bug-free or not by having set of
possible. pass/fail points as a reference.
©Topperworld
The flow is as follows:
©Topperworld
Ansible Developers Operations QA Business/Clients
Challenges
Operations Quality
team would Assurance team
Developers Clients worry
require uniform would require to
tend to focus a about getting
technology keep track of
lot of time on the products to
that can be what has been
tooling rather the market as
used by changed in the
than delivering soon as
different feature and
the results. possible.
skillset groups when it has been
easily. changed.
Need Developers
Quality
need to Operation team
Assurance team Clients need to
respond to need a central
need to focus on create a
new governing tool
reducing human competitive
features/bugs to monitor
error risk as advantage for
and scale the different
much as their products in
efforts based systems and its
possible for bug- the market.
on the workloads.
free product.
demand.
©Topperworld
Ansible Developers Operations QA Business/Clients
⚫ Controlling machines
⚫ Nodes
For this to work, Ansible is installed on controlling machine using which the
nodes are managed by means of using SSH. The location of the nodes would
be specified and configured in the inventories of the controlling machine.
Ansible does not require any installations on the remote node servers due its
nature of being agentless. Hence, no background process needs to be
executed while managing any remote nodes.
©Topperworld
©Topperworld
Ans : AWS stands for Amazon Web Services and it is a well known cloud
provider. AWS helps DevOps by providing the below benefits:
Ans : The project can be developed by following the below stages by making
use of DevOps:
©Topperworld
Q 26. Can you explain the “Shift left to reduce failure” concept in
DevOps?
Ans : In order to understand what this means, we first need to know how the
traditional SDLC cycle works. In the traditional cycle, there are 2 main sides -
⚫ The left side of the cycle consists of the planning, design, and
development phase
⚫ The right side of the cycle includes stress testing, production staging,
and user acceptance.
In DevOps, shifting left simply means taking up as many tasks that usually
take place at the end of the application development process as possible
into the earlier stages of application development. From the below graph,
we can see that if the shift left operations are followed, the chances of
errors faced during the later stages of application development would
greatly reduce as it would have been identified and solved in the earlier
stages itself.
©Topperworld
©Topperworld
⚫ Work side by side with the development team while creating the
deployment and test case automation. This is the first and the obvious
step in achieving shift left. This is done because of the well-known fact
that the failures that get notices in the production environment are not
seen earlier quite often. These failures can be linked directly to:
⚫ Both the dev team and the operations teams are expected to take
ownership to develop and maintain standard procedures for deployment
by making use of the cloud and the pattern capabilities. This aids in giving
the confidence that the production deployments would be successful.
⚫ Usage of pattern capabilities to avoid configurational level inconsistencies
in the different environments being used. This would require the dev team
and the operation team to come together and work in developing a
standard process that guides developers to test their application in the
development environment in the same way as they test in the production
environment.
Ans : Post Mortem meetings are those that are arranged to discuss if certain
things go wrong while implementing the DevOps methodology. When this
meeting is conducted, it is expected that the team has to arrive at steps that
need to be taken in order to avoid the failure(s) in the future.
©Topperworld
©Topperworld
Ans : Sudo stands for ‘superuser do’ where the superuser is the root user
of Linux. It is a program for Linux/Unix-based systems that gives provision to
allow the users with superuser roles to use certain system commands at
their root level.
Ans : Jenkins follows the master-slave architecture. The master pulls the
latest code from the GitHub repository whenever there is a commitment
made to the code. The master requests slaves to perform operations like
build, test and run and produce test case reports. This workload is
distributed to all the slaves in a uniform manner.
Jenkins also uses multiple slaves because there might be chances that
require different test case suites to be run for different environments once
the code commits are done.
©Topperworld
©Topperworld
This also involved increased cost in hiring and managing multiple people
ranging from network engineers to hardware technicians to manage the
infrastructural tasks. The major problem with the traditional approach was
decreased scalability and application availability which impacted the speed
of request processing. Manual configurations were also time-consuming and
in case the application had a sudden spike in user usage, the administrators
would desperately work on keeping the system available for a large load.
This would impact the application availability.
IaC solved all the above problems. IaC can be implemented in 2 approaches:
©Topperworld
Q 31. What is ‘Pair Programming’?
The blue environment would indicate the old version of the application
whereas the green environment would be the new version.
©Topperworld
©Topperworld
In this pattern, the team has to ensure two identical prod environments but
only one of them would be LIVE at a given point of time. Since the blue
environment is more steady, the LIVE one is usually the blue environment.
Ans : It is also referred to as cache stampede which can occur when huge
parallel computing systems employing caching strategies are subjected to
very high load.
It is referred to as that event that occurs when the cache expires (or
invalidated) and multiple requests are hit to the website at the same time.
The script can be used to run other tools like linters and perform sanity
checks on the changes that would be committed into the repository.
©Topperworld
The following snippet is an example of one such script:
#!/bin/sh
files=$(git diff –cached –name-only –diff-filter=ACM | grep
‘.py$’)
if [ -z files ]; then
exit 0
fi
unfmtd=$(pyfmt -l $files)
if [ -z unfmtd ]; then
exit 0
fi
echo “Some .py files are not properly fmt’d”
exit 1
The above script checks if any .py files which are to be committed are
properly formatted by making use of the python formatting tool pyfmt.
If the files are not properly formatted, then the script prevents the changes
to be committed to the repository by exiting with status 1.
©Topperworld
©Topperworld
Q 35. How can you ensure a script runs every time repository gets
new commits through git push?
➢ Pre-receive hook: This hook is invoked before the references are updated
when commits are being pushed. This hook is useful in ensuring the scripts
related to enforcing development policies are run.
➢ Update hook: This hook triggers the script to run before any updates are
actually made. This hook is called once for every commit which has been
pushed to the repository.
➢ Post-receive hook: This hook helps trigger the script after the updates or
changes have been accepted by the destination repository. This hook is
ideal for configuring deployment scripts, any continuous integration-
based scripts or email notifications process to the team, etc.
©Topperworld
ABOUT US
➢ Our Vision
❖ Our vision is to create a world where every college student can easily
access high-quality educational content, connect with peers, and achieve
their academic goals.
❖ We believe that education should be accessible, affordable, and engaging,
and that's exactly what we strive to offer through our platform.
❖ Education is not just about textbooks and lectures; it's also about forming
connections and growing together.
©Topperworld
❖ TopperWorld encourages you to engage with your fellow students, ask
questions, and share your knowledge.
❖ We believe that collaborative learning is the key to academic success.
©Topperworld
“Unlock Your
Potential”
With- Topper World
Explore More
topperworld.in
Follow Us On
E-mail
topperworld.in@gmail.com