Quiz – DevOps /5 Time is up!! Jenkins 1 / 5 You are required to use PMD and FindBugs as a part of static code analysis in your Jenkins pipeline. So where exactly you will add PMD and FindBugs plugins configuration in your project? a. pom.xml b. dependency.xml c. version.xml d. build.xml You need to add PMD and FindBugs plugin configuration under the plugins section of your projects pom.xml file then you can execute maven pmd and FindBugs command to complete the static code analysis. 2 / 5 You have been given a task to move the existing Jenkins job from one server to another. From the following steps select the correct order to complete this task. Make a copy of already created Jenkins job Copy the related job directory slide a job from one installation to another Create clone of a job directory by a different name Renaming a existing job by rename a directory a. 3-1-2-4 b. 2-1-3-4 c. 3-2-1-4 d. 2-1-4-3 Steps to move the existing Jenkins job from one server to another: Copy the related job directory slide a job from one installation to another Make a copy of already created Jenkins job Create clone of a job directory by a different name Renaming a existing job by rename a directory 3 / 5 User has started creating Jenkins pipeline where user has already added plugins for source code management and code build. Now user is looking for plugin that can effectively test the application and integrate with Jenkins pipeline. Among the following options select the appropriate answer. a. Maven b. ANT c. SVN d. JUnit The JUnit plugin integrates with Jenkins pipeline and provides a publisher that consumes XML test reports generated during the builds and provides graphical and web UI visualization of the historical test results. 4 / 5 You have installed Jenkins in your local machine successfully now you need to run Jenkins. Which command you will use to run Jenkins from command line? a. java -war jenkins.jar b. java -jar jenkins.jar c. java -jar jenkins.war d. java -war jenkins.war java -jar jenkins.war is the command used from command line to run Jenkins application. This command will start jetty servlet engine which hosts the Jenkins application. 5 / 5 User have created microservices based application and as per the client’s requirement, application will be deployed in containers. Among the following options which Jenkins plugin user should user to complete the requirement? a. Bamboo b. ANT c. Docker d. GIT User need to use Docker plugin in Jenkins pipeline to deploy microservices based application in the containers. Docker plugin use a Docker host to dynamically provision a docker container as a Jenkins agent node. Your score is The average score is 29% 0% Exit /5 Time is up!! Docker 1 / 5 You are using DOCKER service scale command to manage the traffic on application containers. Among the following options, what are the limitation of docker service scale command in DOCKER swarm mode? a. DOCKER service scale command only scale down the services b. DOCKER service scale command only scale up the services c. DOCKER service scale command can only scale one service at a time d. You can only apply DOCKER service scale command on replicated services Only replicated services can be scaled UP or DOWN to the desired number of replicas using DOCKER service scale command. This command works with the Swarm orchestrator: docker service scale SERVICE=REPLICAS [SERVICE=REPLICAS...] 2 / 5 Among the following options, select the command which is used to connect the network to the running container? a. docker connect b. docker network connect c. docker join network d. docker network join docker network connect is the command which is used to connect the network to the running container. You can run command: docker network connect multi-host-network container2 3 / 5 You have been assigned a task to host your company's event blog using WordPress and MySQL database on a 30 active nodes swarm cluster. You need to make sure that one task of MySQL database service is deployed on each active node in the swarm cluster. From the following options, select commands to achieve this task? a. None of the above b. docker service create --name MySQL --mode global MySQL docker service create --name WordPress --replicas=30 WordPress c. docker service create --name MySQL -- global MySQL docker service create --name WordPress --replicas=30 WordPress d. docker service create --name MySQL --config global MySQL docker service create --name WordPress --replicas=30 WordPress For replicated services, user need to specify the number of replica tasks for the swarm manager to schedule onto active nodes in the cluster. Whereas, in case of global service, the scheduler places one task of service on each active node of the cluster. As asked in this question, to deploy one task of MySQL service on each active node, we need to deploy MySQL service as "global service" by setting the service mode to "--mode global". 4 / 5 Select whether the below statement is correct or not? "Choice of storage mount options can affect the representation of data in the container." a. True b. False Data within the container is exposed as either directory or individual files in containers file system. So, the type of storage mount (volume, bind or tmpfs) does not have any control on data's representation. To differentiate among the storage mounts: volume, bind mount, and tmpfs, user need to check the location where these mounts store container's data on the host system. 5 / 5 Whether Docker Secrets are available for standalone containers and swarm services ? a. True b. False Docker secrets are only available to swarm services, not to standalone containers. To use this feature, consider adapting your container to run as a service. Your score is The average score is 16% 0% Exit /5 Time is up!! Kubernetes 1 / 5 For setting up the Kubernetes cluster, you need to install Kubernetes inside the master and worker nodes. Select the ways to install Kubernetes? a. All of the above b. kops c. kubeadm d. minikube You can install Kubernetes using kubeadm, kops, minikube, etc. kubeadm - It is a generic tool to set up the Kubernetes cluster. It is designed to have all Kubernetes components in one place regardless of where you are running them. Kops - It is used to install Kubernetes on AWS. It is used to create, upgrade, delete highly available Kubernetes clusters using a command line. Minikube - it is a great tool to run Kubernetes locally using a single-node Kubernetes cluster inside LINUX VM. 2 / 5 You have been assigned a task to create a Kubernetes deployment to deploy an apache server named 'apache-image' on two pods using port number 80. Among the following options, choose the correct command for this deployment? a. kubectl deploy apache-image --image=admin/apache-image --replicas=2 --port=80 b. kubectl deploy apache-image --image=admin/apache-image --pods=2 --port=80 c. kubectl run apache-image --image=admin/apache-image --replicas=2 --port=80 d. kubectl run apache-image --image=admin/apache-image --pods=2 --port=80 kubectl run --image= --replicas= --port= - this command is used to create kubernetes deployment. To deploy apache server named as 'apache-image' on two pods using port number 80 use command: kubectl run apache-image --image=admin/apache-image --replicas=2 --port=80 3 / 5 "ClusterIP service takes care of internal routing of Kubernetes cluster, and it is automatically created for Kubernetes cluster." Select whether the above statement is correct or not? a. True b. False ClusterIP service is used to provide network connectivity with the Kubernetes cluster, and it is used to make service reachable within the cluster. The drawback of using the ClusterIP service is that you cannot reach the service from outside the cluster. 4 / 5 You have hosted containerized application using Kubernetes. Among the following options, select the Kubernetes controllers? (Select 2) a. deployment b. namespace c. rolling update d. replicaset Replicaset and deployment are the Kubernetes controllers: replicaset - it checks how many pod replicas should be running, and it supports the set-based selector. Deployment - it manages the deployment of the replica set. It also has the capability to update the replica set and roll back it to the previous version. 5 / 5 You have hosted your application microservices on containers using DOCKER and KUBERNETES. Among the following options, where exactly Kubernetes cluster data is stored? a. Kube apiserver b. Volumes c. Kubelet d. etcd Etcd in Kubernetes is a highly-available key-value store used to store Kubernetes cluster data. Etcd is consistent; it also maintains a copy of stores across all Kubernetes clusters on distributed servers. Your score is The average score is 24% 0% Exit