Q71) I want to delete 10 days older log files. How can I?
There is a command in unix to achieve this task find <directory_path> -mtime +10 -name “*.log” -exec rm -f {} \; 2>/dev/null
What is the difference among chef, puppet and ansible?
Q72) How you get the Inventory variables defined for the host?
We need to use the following command
Ansible – m debug- a “var=hostvars[‘hostname’]” localhost(10.92.62.215)
Q73) How you will take backup for Jenkins?
Copy JENKINS_HOME directory and “jobs” directory to replicate it in another server
Q74) How to deploy docker container to aws?
Amazon provides the service called Amazon Elastic Container Service; By using this creating and configuring the task definition and services we will launch the applications.
Q75) I want to change the default port number of apache tomcat. How?
Go to the tomcat folder and navigate to the conf folder there you will find a server.xml file. You can change connector port tag as you want.
Q76) In how many ways you can install the Jenkins?
We can install Jenkins in 3 Ways
• By downloading Jenkins archive file
• By running as a service Java –jar Jenkins.war
• By deploying Jenkins.war to the webapps folder in tomcat.
Q77) How you will run Jenkins job from command line?
We have a Jenkins CLI from there we need to use the curl command curl -X POST -u YOUR_USER:YOUR_USER_PASSWORD http://YOUR_JENKINS_URL/job/YOUR_JOB/build
Q78) How you will do tagging in git?
We have following command to create tags in git
Git tag v0.1
Q79) How can you connect a container to a network when it starts?
We need to use a following command docker run -itd –network=multi-host-network busybox
Q80) How you will do code commit and code deploy in cloud?
• Create a deployment environment
• Get a copy of the sample code
• Create your pipeline
• Activate your pipeline
• Commit a change and update the App.
Comentarios