top of page

DEVOPS ON AWS Interview Questions - 6

Updated: Sep 13, 2022



Q51) I want to get the information from file which consists of the word “GangBoard”

grep “GangBoard” filename


Q52) I want to search the files with the name of “GangBoard”

find / -type f -name “*GangBoard*”


Q53) Write a shell script to print only prime numbers?



prime.sh

echo "1"

i=3 j=300 flag=0 tem=2

echo "1"while [ $i -ne $j ] do temp=`echo $i` while [ $temp -ne $tem ] do temp=`expr $temp - 1` n=`expr $i % $temp` if [ $n -eq 0 -a $flag -eq 0 ] then flag=1 fi done

if [ $flag -eq 0 ] then echo $i else flag=0 fi

i=`expr $i + 1` done



Q54) How to pass the parameters to the script and how can I get those parameters?


Scriptname.sh parameter1 parameter2

I will use $* to get the parameters.


Q55) What is the default file permissions for the file and how can I modify it?


Default file permissions are : rw-r—r—

If I want to change the default file permissions I need to use umask command ex: umask 666


Q56) How you will do the releases?


There are some steps to follow.

• Create a check list

• Create a release branch

• Bump the version

• Merge release branch to master & tag it.

• Use a Pull request to merge the release merge

• Deploy master to Prod Environment

• Merge back into develop & delete release branch

• Change log generation

• Communicating with stack holders

• Grooming the issue tracker


Q57) How you automate the whole build and release process?


• Check out a set of source code files.

• Compile the code and report on progress along the way.

• Run automated unit tests against successful compiles.

• Create an installer.

• Publish the installer to a download site, and notify teams that the installer is available.

• Run the installer to create an installed executable.

• Run automated tests against the executable.

• Report the results of the tests.

• Launch a subordinate project to update standard libraries.

• Promote executables and other files to QA for further testing.

• Deploy finished releases to production environments, such as Web servers or CD

manufacturing.

The above process will be done by Jenkins by creating the jobs.


Q58) I have 50 jobs in the Jenkins dash board , I want to build at a time all the jobs


In Jenkins there is a plugin called build after other projects build. We can provide job names over there and If one parent job run then it will automatically run the all other jobs. Or we can use Pipe line jobs.


Q59) How can I integrate all the tools with Jenkins?


I have to navigate to the manage Jenkins and then global tool configurations there you have to provide all the details such as Git URL , Java version, Maven version , Path etc.


Q60) How to install Jenkins via Docker?


The steps are:

• Open up a terminal window.

• Download the jenkinsci/blueocean image & run it as a container in Docker using the following docker run command:(

https://docs.docker.com/engine/reference/commandline/run/)

• docker run \ -u root \ –rm \ -d \ -p 8080:8080 \ -p 50000:50000 \ -v jenkins-

data:/var/jenkins_home \ -v /var/run/docker.sock:/var/run/docker.sock \ jenkinsci/blueocean

• Proceed to the Post-installation setup wizard (https://jenkins.io/doc/book/installing/#setup-

wizard)

• Accessing the Jenkins/Blue Ocean Docker container docker exec -it jenkins-blueocean bash

• Accessing the Jenkins console log through Docker logsdocker logs <docker-container-

name>Accessing the Jenkins home directorydocker exec -it <docker-container-name> bash

Recent Posts

See All

Comments


bottom of page