Jenkins

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

What is an agent?

Agent specifies the execution point for a particular stage in the pipeline or the entire pipeline itself.

What is the use of JENKINS_HOME directory?

All the settings, logs and configurations are stored in the JENKINS_HOME directory.

What are the ways to configure Jenkins node agent to communicate with Jenkins master?

There are 2 ways to start the node agent - 1. Browser - if Jenkins node agent is launched from a browser, a JNLP (Java Web Start) file is downloaded. This file launches a new process on the client machine to run jobs. 2. Command line - to start the node agent using the command line, the client needs the executable agent.jar file. When this file is run, it launches a process on the client to communicate with the Jenkins master to run build jobs.

Can you start Jenkins using command line? How?

Yes, using jenkins.exe start

Have you run automated tests on Jenkins? How is it done?

Yes. Automated tests can be run through tools like Selenium or maven. Developers can schedule the test runs. Jenkins displays the test results and sends a report to the developers.

How can you secure Jenkins?

(i) Access Control which includes authenticating users and giving them an appropriate set of permissions, which can be done in 2 ways. (a) Security Realm determines a user or a group of users with their passwords. (b) Authorization Strategy defines what should be accessible to which user. In this case, there might be different types of security based on the permissions granted to the user such as Quick and simple security with easy setup, Standard security setup, Apache front-end security, etc. (ii) Protecting Jenkins users from outside threats.

Give a simple use case/scenario to explain how Jenkins works.

- Let us say a developer is working on some code changes and eventually commits them to the repository. - Jenkins server, which constantly checks for changes in the repository, detects the change and pulls the changes to trigger a build. - The build can fail, in which case the developer is informed with reports. - If the build passes, it is deployed on to the test server. - Once the testing is complete, a test report is generated and sent to the developers. This process continues till all the tests are successful, after which code is deployed to production.

How does Jenkins authenticate users?

- The default way is to store user data and credentials in an internal database. - Configure Jenkins to use the authentication mechanism defined by the application server on which it is deployed. - Configure Jenkins to authenticate against LDAP server.

Which commands can be used to start Jenkins manually?

1. (Jenkins_url)/restart: To force restart without waiting for build completion. 2. (Jenkin_url)/safeRestart: Waits until all the build gets completed before restarting.

What are the advantages of Jenkins?

1. Build failures are cached during the integration stage. 2. Notifies the developers about build report status using LDAP (Lightweight Directory Access Protocol) mail server. 3. Maven release project is automated with simple steps. 4. Easy bug tracking. 5. Automatic changes get updated in the build report with notification. 6. Supports Continuous Integration in agile development and test-driven development.

What are the types of pipelines in Jenkins?

1. CI CD pipeline (Continuous Integration Continuous Delivery) 2. Scripted pipeline 3. Declarative pipeline

What are the features of Jenkins?

1. Free open source. 2. Easy installation on various operating systems. 3. Build Pipeline Support. 4. Workflow Plugin. 5. Test harness built around JUnit. 6. Easy upgrades. 7. Rapid release cycle. 8. Easy configuration setup. 9. Extensible with the use of third-party plugins.

Mention some of the important plugins in Jenkins?

1. Gits 2. Maven 2 Project 3. HTML Publisher 4. Copy Artcraft 5. Join 6. Green Balls 7. Amazon EC2 8. Kubernates

Which command is used to start Jenkins?

1. Open Command Prompt 2. From the Command Prompt browse the directory where Jenkins. war resides 3. Run the command given below: D:\>Java -jar Jenkins.war

How Can You Setup Jenkins Jobs?

1. Select new item from the menu. 2. After that enter a name for the job and select free-style job. 3. Then click OK to create new job in Jenkins. The next page enables you to configure your job.

Which CI Tools are used in Jenkin?

1. jenkins 2. GitLab CI 3. Travis CI 4. CircleCI 5. Codeship 6. Go CD 7. TeamCity 8. Bamboo

How do you move or copy Jenkins from an old server to a new one?

All the configurations, settings are stored in the JENKINS_HOME (/var/lib/Jenkins) directory. You should copy the entire home directory to the new server. To do so, you can use the command 'rsync'.

Which Environmental Directives are used in Jenkins?

Environmental Directives is the sequence that specifies pairs of the key-values called Environmental Variables for the steps in the pipeline.

What are the basic requirements for installing Jenkins?

For installing Jenkins you need the following system configuration: 1. Java 7 or above. 2. Servlet 3.1 3. RAM ranging from 200 MB to 70+ GB depending on the project build needs. 4. 2 MB or more of memory.

What is Flow Control in Jenkins?

In Jenkins, flow control follows the pipeline structure (scripted pipeline) that are being executed from the top to bottom of the Jenkins file.

What is Jenkins?

Jenkins is a free open source Continuous Integration tool and automation server to monitor continuous integration and delivery. It is written in Java. It is known as an automated Continuous Delivery tool that helps to build and test the software system with easy integration of changes to the system. Jenkins follows Groovy Scripting. Also, it enables developers to continuously check in their code and also analyze the post-build actions. The automation testers can use to run their tests as soon as the new code is added or code is modified.

How Can Create A Backup And Copy Files In Jenkins?

Jenkins saves all the setting, build artifacts and logs in its home directory, to create a back-up of your Jenkins setup, just copy this directory. You can also copy a job directory to clone or replicate a job or rename the directory.

What is Kubernetes? How can you integrate Jenkins with Kubernetes?

Kubernetes is a container orchestration tool. With Kubernetes, one can create multiple container instances to achieve more fault tolerance. You can use the Kubernetes deploy plugin to use it with Jenkins for continuous deploy.

How can you use a third-party tool in Jenkins?

Let us say we want to use the third-party tool Node. - First make sure Node is installed. - Though the Jenkins admin console, install the Jenkins plugin for node. - Go to manage in the admin console and configure the settings on the Tools tab. - You can add any configured nodeJS tool to your build job in a pipeline For different third-party tools, the procedure may vary slightly, because of the difference in configuration settings.

Do you know about cloud computing? How can Jenkins fit into a cloud computing environment? Explain with an example.

Let us take the example of AWS cloud service. Cloud computing services use the CI/CD model so that they can push their work to the customers and constantly receive feedback. Jenkins is used to automating the CI/CD pipelines. For example, a lot of Jenkins plugins are available for many of the AWS services like Amazon EC2 and ECS.

What is the solution if you find a broken build for your project?

Open console output for the build and check if any file change has missed. OR Clean and update your local workspace to replicate the problem on the local system and try to resolve it (In case you couldn't find out the issue in the console output).

What are Parameters in Jenkins?

Parameters are supported by the Agent section and are used to support various use-cases pipelines. Parameters are defined at the top-level of the pipeline or inside an individual stage directive.

How will you define Post in Jenkins?

Post is a section that contains several additional steps that might execute after the completion of the pipeline. The execution of all the steps within the condition block depends upon the completion status of the pipeline.

What is Agent Directive in Jenkins?

The Agent is the section that specifies the execution point for the entire pipeline or any specific stage in the pipeline. This section is being specified at the top-level inside the pipeline block.

What syntax does Jenkins use to schedule build job or SVN polling?

The cron syntax. Cron syntax is represented using five asterisks each separated by a space. The syntax is as follows - [minutes] [hours] [day of the month] [month] [day of the week]. Example, if you want to set up a cron for every Monday at 11.59 pm, it would be 59 11 * * 1

What is Jenkinsfile?

The text file where all the definitions of pipelines are defined is called Jenkinsfile. It is being checked in the source control repository.

What is a backup plugin? Why is it used?

This is a useful plugin that backs up all the critical settings and configurations to be used in the future. This is especially useful when there is a failure so that we don't lose the settings.

How can You Clone a Git Repository via Jenkins?

To create a clone repository via Jenkins you need to use your login credentials in the Jenkins System. To achieve the same you need to enter the Jenkins job directory and execute the git config command.

What are Triggers?

Trigger in Jenkins defines the way in which the pipeline should be executed frequently. PollSCM, Cron, etc are the currently available Triggers.

Let us say, you have a pipeline. The first job was successful, but the second failed. What should you do next?

You can restart the pipeline from the point where it failed by doing 'restart from stage'.

how to deploy an application to a Kubernetes Cluster using the Jenkins Pipeline?

refer to link and thoroughly read https://medium.com/containerum/configuring-ci-cd-on-kubernetes-with-jenkins-89eab7234270


Set pelajaran terkait

Pre-Lectura Terminos literarios en Lazarillo de Tormes

View Set