DevOps Questions PDF
Document Details
Tags
Summary
This document contains DevOps questions and answers, covering topics like configuring Jenkins, using Java and static code analysis tools (like SonarQube). Practical examples and code snippets are included.
Full Transcript
DEVOPS 1.So in the same way as part of your project Sonar cube is being replaced by a different static code analysis tool as a Jenkin administrator. Like where should you? Delete the sonar cube configuration and configure the new tool that will be implemented shortly. Answer: manage Jenkins a...
DEVOPS 1.So in the same way as part of your project Sonar cube is being replaced by a different static code analysis tool as a Jenkin administrator. Like where should you? Delete the sonar cube configuration and configure the new tool that will be implemented shortly. Answer: manage Jenkins and then go for global tool configuration 2.So which is being deployed by Java developers so and place the dot war file like dot war file in the Nexus repository. So there is an reposit Nexus repository name called Nexus. War file has to be placed in that. as a DevOps engineer will be using Jenkin to build the Java applications. In our current projects, we'll be using a like Jenkins to build the Java applications. So which is being developed by the Java developers and to place the.war file in the Nexus repository? Which build tool must be installed on the Jenkins server? Answer: MAVEN 3.So which of the following statement or incorrect? A. a Jenkin file can only be written in declarative pipeline syntax. B. scripted pipeline is a more recent feature of Jenkin pipeline C. in scripted pipelines in text node locked to the core work throughout the entire pipeline Answer: A & B 4. After inspecting the output of the previous jobs, if the previous job or other work is successful, the 11 team L1 team begins the subsequent job. So what Jenkin option you should select under built additional projects under post build actions. Answer: Trigger only if the build is stable 5. Git has been introduced like it has been added into your project as in version control system. So to make it easier for the developers to change and test the code to the production code. So as a Jenkin administrator, what option does on the project configuration page on the pipeline will be selected to tell Jenkin the URL of a specific Git lab code repository. So as a Jenkin administrator, which option on the project configuration page or the pipeline will you select to tell the URL of a specific GitLab code repository? o Answer: changing on the pipeline script from SCM of the configuration management on the pipeline script will change it. 6. Your company will automate all Jenkin jobs that are currently manually triggered in the coming week. All jobs triggers will take place at the same time as a manual triggers. The element team is currently manually starting five Jenkin jobs in your project at 6:00 AM every day. How will you use con expressions to automate these? Like those build jobs, how we will do it? Answer: 06*** 7. James has been tasked with developing engine can job that will check the code repository every minute to see if there has been any new commits. So every minute the code has to be checked if there is any new commits, so the job will be triggered. If your new commit occurs so whenever there is a new commit occurs like, the job will get automatically triggered. What is the appropriate con execution in this situation, and what option should be selected under build triggers? Answer: Cron Expression: ***** Build Triggers: Poll SCM (will ensure Jenkins polls the repository for new commits) 8. SonarQube will provide your project with a novel static code analysis technique. As a result, it is your responsibility to properly and mandatory connect the SonarQube server to the Jenkin tool so that Jenkin can detect the sonar QUBE and Sonar cube can perform the static code analysis. What prerequisites must be met before configuring Jenkin with the Sonar cube server via manage Jenkin secure like configuration system. So what precise must be met before configuring Jenkin with the SonarQube server by manage Jenkins configure system? Answer: Name, Server URL and Server authentication. 9. So Jenkins installation fails when attempting to install it on a raw server as part of a new project of your company. So while you're installing your Jenkin so it's getting failed on your server like. You have been tasked with quickly investigating and finding a solution, so you are asked to find a solution for it quickly. So after performing the necessary troubleshooting, you discovered that Java is not installed, so Java is not installed inside of your Jenkin. So that's the reason why it's not getting installed. So as a result you have Java installed on that server, but you have Java in that server already installed. So in order for this to work, you must also specify JDK as the Java installation path in Jenkins configuration. So you have a Jenkins configuration where you need to specify JDK inside of it. So what name should be entered into the ad JDK field of Jenkins global configuration tool? Answer: JAVA_HOME 10. In which programming language Jenkin tool can be designed? Answer: Java -------------------------------------------------------------------------------------------------------------------------------------------------------- PYTHON 1. Give the output of the following : print(list(map(lambda first, second : first.upper()+str(second), ['aaa', 'bbb', 'ccc'], [1,2,3]))) ['AAA1', 'BBB2', 'CCC3'] 2."Give the output of the following code : def f() : a = '' print(a, end=' ') def g() : try : f() finally : print('finally', end=' ') try : g() except : print('except', end=' ')" finally except 3. "Give the output of the following list comprehension : l = [x[:2] for x in 'welcome to python programming'.split()] print(l)" ['we', 'to', 'py', 'pr'] 4. "Choose the correct statement for the following code : fin = open('data') fout = open('data', 'w') fout.write('abcd') fout.flush() print (fin.read())" The code runs without errors and prints abcd 5."After executing the following code : s = {x**2 for x in range( -3, 3)} what will be the elements in ‘s’ ?" 0, 1, 4, 9 6. What does the Thread.join() method do? Waits for the thread on which join is performed, to finish 7. "Which of the following comprehensions will generate the same list as : [x for x in range(1,50) if '5' in str(x) and not x%5]" [x for x in range(5, 50, 10)] 8. "Consider the following : def f(a, b) : a=10 b=10 x = 'abcd' y = [1,2,3,4] f(x,y) print(x, y) What is the output of the above :" abcd [1, 10, 3, 4] 9. "What is the output of the following : def foo(): try: print(1, end=' ') finally: print(2, end=' ') print(3) foo()" 1 2 3 10. "For the following code : L= [12, 12.21, 'aaaa', (2, 1), 'ss'] L = 'abcd' print (L) pick the correct option :" runs successfully displaying : ['abcd', 12.21, 'aaaa', (2, 1), 'ss'] 11. "What will be the output of the following code snippet? def func(x, lst=[]): lst.append(x) return lst print(func(1)) print(func(2))" [1, 2] 12. What will be the output of the following code? print(2 * 3 + 4) 10 13. "Which of the following data types is mutable in Python? List 14. How do you write a single-line comment in Python? # 15. What does the len() function do in Python? Returns the number of elements in a list ------------------------------------------------------------------------------------------------------------------------------------------------------------ AWS A user has launched an EBS backed EC2 instance. The user has rebooted the instance. Which of the below mentioned statements is not true with respect to the reboot action? The instance runs on a new host computer A user is displaying the CPU utilization, and Network in and Network out CloudWatch metrics data of a single instance on the same graph. The graph uses one Y-axis for CPU utilization and Network in and another Y-axis for Network out. Since Network in is too high, the CPU utilization data is not visible clearly on graph to the user. How can the data be viewed better on the same graph? On the Graphed metrics tab of the Metric window of the Cloudwatch select the Y axis that plots CPU Utilization data. A user has launched an EBS backed instance with EC2-Classic. The user stops and starts the instance. Which of the below mentioned statements is not true with respect to the stop/start action? The Elastic IP remains associated with the instance A user has launched multiple EC2 instances for the purpose of development and testing in the same region. The user wants to find the separate cost for the production and development instances. How can the user find the cost distribution? The user should use Cost Allocation Tags and AWS billing reports A user has launched an RDS postgreSQL DB with AWS. The user did not specify the maintenance window during creation. The user has configured RDS to update the DB instance type from micro to large. If the user wants to have it during the maintenance window, what will AWS do? AWS will select the default maintenance window if the user has not provided it A system admin is trying to understand the Auto Scaling activities. Which of the below mentioned processes is not performed by Auto Scaling? Reboot Instance A user has created a VPC with public and private subnets using the VPC wizard with NAT instance. The user has not launched any instance manually and is trying to delete the VPC. What will happen in this scenario? It will not allow to delete the VPC since it has a running NAT instance A user has created a Cloudformation stack. The stack creates AWS services, such as EC2 instances, ELB, AutoScaling, and RDS. While creating the stack it created EC2, ELB and AutoScaling but failed to create RDS. What will Cloudformation do in this scenario? Rollback all the changes and terminate all the created services A user has configured a SSL listener at ELB as well as on the back-end instances. Which of the below mentioned statement is correct with regard to ELB and SSL integration? ELB will intercept the request to add the cookie details if sticky session is enabled A user has launched an EC2 instance from an instance store backed AMI. The infrastructure team wants to create an AMI from the running instance. Which of the below mentioned credentials is not required while creating the AMI? AWS login ID to login to the console A user has setup an EBS backed instance and attached 2 EBS volumes to it. The user has setup a CloudWatch alarm on each volume for the disk data. The user has stopped the EC2 instance and detached the EBS volumes. What will be the status of the alarms on the EBS volume? Insufficient Data A user has created a public subnet with VPC and launched an EC2 instance within it. The user is trying to delete the subnet. What will happen in this scenario? It will not allow the user to delete the subnet until the instances are terminated A user is using a small MySQL RDS DB. The user is experiencing high latency due to the Multi AZ feature. Which of the below mentioned options may not help the user in this situation? Take a snapshot from standby Replica A user has created a VPC with CIDR 10.0.0.0/24. The user has created a public subnet with CIDR 10.0.0.0/25 and a private subnet with CIDR 10.0.0.128/25. The user has launched one instance each in the private and public subnets. Which of the below mentioned options cannot be the correct IP address private IP. assigned to an instance in the public or private subnet? 10.0.0.255 A user is launching an instance, he is prompted to add Tags to the instance. Which of the following option is not true about the tags? The maximum value of the tag key length is 64 unicode characters You are managing the AWS account of a big organization. The organization has more than 1000+ employees and they want to provide access to the various services to most of the employees. Which of the below mentioned options is the best possible solution in this case? Attach an IAM role with the organization’s authentication service to authorize each user for various AWS services A user has launched an EC2 instance from an instance store backed AMI. The infrastructure team wants to create an AMI from the running instance. Which of the below mentioned steps will not be performed while creating the AMI? Define the AMI launch permissions A user has created an ELB with Auto Scaling. Which of the below mentioned offerings from ELB helps the user to stop sending new requests traffic from the load balancer to the EC2 instance when the instance is being deregistered while continuing in-flight requests? ELB connection draining A user is trying to understand the ACL and policy for an S3 bucket. Which of the below mentioned policy permissions is equivalent to the WRITE ACL Permission on a bucket? s3:DeleteObject Your client is planning to setup infrastructure on AWS for the Christmas sales. The client is planning to use Auto Scaling based on the schedule for proactive scaling. What specific suggestion would you offer to the client? In AWS Management Console you can schedule autoscaling group to anyfuture date. But if you use CLI you can schedule autoscaling group only up to30 days in advance. A user is trying to setup a recurring Auto Scaling process. The user has setup one process to scale up every day at 8 am and scale down at 7 PM. The user is trying to setup another recurring process which scales up on the 1st of every month at 8 AM and scales down the same day at 7 PM. What will Auto Scaling do in this scenario? Auto Scaling will throw an error since there is a conflict in the schedule of two separate Auto Scaling Processes A user has configured CloudWatch monitoring on an EBS backed EC2 instance. Which of the below mentioned metrics will always show a 0 value? DiskReadBytes You have both production and development instances running in a single VPC. It is required to ensure that people responsible for the development instances do not have access to work on production instances for better security. Which of the following would be the best way to accomplish this using policies? Define the tags on the Development and production servers and add a condition to the IAM Policy which allows access to specific tags. ------------------------------------------------------------------------------------------------------------------------------------------------------------ Azure You set up Office 365 to use the additem.com user credentials, 60 users connections to mailbox in Microsoft Exchange online, or configured. The 60 users must log into that mailbox using Azure MFA. Only connections to the exchange online mailbox must be impacted by the fix. What a what about your your do in this four options? From the multi-factor authentication page, configure the Multi-Factor Auth status for each user From Azure Active Directory admin center, create a conditional access policy From the multi-factor authentication page, modify the verification options From the Azure Active Directory admin center, configure an authentication method -From the multi-factor authentication page, configure the Multi-Factor Auth status for each user you intend to set up 3 virtual machines in Azure with a name of VM1 VM2 VM3. A web app called App One will be hosted by the virtual machines. If a single Azure data center goes offline, you must make sure that at least two virtual machines are still accessible. What exactly should you use? all three virtual machines in a single Availability Zone all virtual machines in a single Availability Set each virtual machine in a separate Availability Zone each virtual machine in a separate Availability Set - each virtual machine in a separate Availability Zone you need to add in custom domain name to Azure AD. You need to ensure that Azure can verify the domain names.Which type of DNS record should you create? MX(Mail Exchange) NSEC( PTR(used for reverse DNS lookups) RRSIG(signature purposes) -MX adatum.com is the name of the Azure DNS zone. You own a sub domain called research.edu.com needs to be assigned in Azure to a different DNS server. So what should you do? Create an NS record named research in the adatum.com zone. Create a PTR record named research in the adatum.com zone. Modify the SOA record of adatum.com. Create an A record named *.research in the adatum.com zone. - Create an NS record named research in the adatum.com zone. you have a deployment template name template one that is used to deploy 20 Azure Web apps. You need to identify what to deploy before your web app. One App Service plans one Azure Traffic Manager five Azure Application Gateways one Azure Application Gateway -One App Service plans which Azure feature enables you to transit like sorry. Which assures or future enables you to transition data between different tires in storage account. So you intend to use an Azure resource manager template to install a number of Azure virtual machines running Windows Server 2019 and virtual in an VM scale set one of the VM has been deployed.You must make sure that NGC inx is available on each one. So what should you use that is using an custom script extension? AzVMDscConfiguration cmdlet Azure Application Insights Azure Custom ScriptExtension the New-AzConfigurationAssignement cmdlet - Azure Custom ScriptExtension