Enroll in Selenium Training

Jenkins provides certain admin-level configurations that can be set and configured as per the needs of various projects, teams, and users. Few of these are settings that help in managing Jenkins as a tool and few of them are tools or statistics which help in monitoring the health of the Jenkins server and its nodes. Subsequently, in this article, we will understand the details of all these configurations and also will learn how we can manage Jenkins for various configurations, plugins, tools, and statistics, by covering the details under the following topics:

  • How to manage Jenkins configurations?
  • What options does the System Configuration section provide to manage Jenkins?
    • What are System Configurations in Jenkins?
    • Similarly, what are Global Tool Configurations in Jenkins?
    • What are Plugins Configurations in Jenkins?
    • Also, what are Nodes Configurations in Jenkins?
  • What options does the Security section provide to manage Jenkins?
    • What are the Configure Global Security options in Jenkins?
    • Similarly, what are the Manage Credentials options in Jenkins?
    • What are the Configure Credential Providers options in Jenkins?
  • What options does the Status Information section provide to manage Jenkins?
    • Also, what is the System Information section in Jenkins?
    • What is the System Log section in Jenkins?
    • What is the Load Statistics section in Jenkins?
    • Similarly, what is the About Jenkins section in Jenkins?
  • What options does the Tools and Actions section provide to manage Jenkins?
    • What is the Reload Configuration from Disk option in Jenkins?
    • Also, what is the Jenkins CLI option in Jenkins?
    • What is the Script Console in Jenkins?
    • Similarly, what is Prepare for Shutdown option in Jenkins?

How to manage Jenkins configurations?

Manage Jenkins is one of the most prominent sections of Jenkins, that allows the admin users to configure various settings and plugins in Jenkins. When you are logged in as an Admin user, you can navigate to the various sections to manage Jenkins, by following the steps mentioned below:

Step 1: Firstly, go to Jenkins dashboard and click on "Manage Jenkins " highlighted below:

Click on Manage Jenkins

Step 2: Secondly, as soon as we click on Manage Jenkins, we will redirect towards Manage Jenkins Page as shown below:

Manage Jenkins page

This page has all the options related to various configurations and settings related to:

  1. System Configuration
  2. Security
  3. Status Information
  4. Troubleshooting
  5. Tools and Actions

Subsequently, let's understand the details of all these options in the following sections:

What options does the System Configuration section provide to manage Jenkins?

The System Configuration section talks about the configuration aspects of Jenkins. Additionally, these configurations are related to system-level, tool level, plugins level as well as nodes level. The following figure shows the various configurations available under this section:

System Configuration settings in Jenkins

Subsequently, let's understand the details of all these sub-sections:

What are System Configurations in Jenkins?

The Configure System option will provide various options to set global settings and paths. Moreover, these settings can be different for different users and depending on various plugins installed. The table below shows a basic list of settings that can be configured under this section:

Configuration Details
Home directory By default, Jenkins stores/ keeps all of its data in this directory on the file system. Moreover, you can click on the (? ) sign on the right top corner to check various options to update this path.
Maven Project Configuration This section provides various global options related to maven settings. Additionally, this will be available once the Maven plugin has been installed.
Jenkins Location This section provides the option to configure the Jenkins URL and the System Admin e-mail address.
Serve resource files from another domain Jenkins serves many files that untrusted users create, such as files in project workspaces or archived artifacts. Moreover, when no resource root URL is defined, Jenkins will serve these files with the HTTP header Content-Security-Policy ("CSP" ). By default, it is set to a value that disables many modern web features to prevent/ avoid cross-site scripting (XSS ) and other attacks on Jenkins users accessing these files. If the resource root URL is defined, Jenkins will redirect requests for user-created resource files to URLs starting with the URL configured here. Moreover, these URLs will not set the CSP header, allowing JavaScript and similar features to work.
Global properties These are various global properties related to wiping out the node, environment variables, and locations of various tools.
Pipeline Speed/Durability Settings This setting allows users to change the default durability mode for running Pipelines. In most cases, this is a trade-off between performance and the ability for running pipelines to resume after unplanned Jenkins outages.
Usage Statistics For any project, it's critical to know how the software is used, but tracking usage data is inherently difficult in open-source projects. Additionally, anonymous usage statistics address this need. When enabled, Jenkins sends information to the Jenkins project at regular intervals. Also, the Jenkins project uses this information to set development priorities.
GitHub This section provides various options related to GitHub Server, API, and other GitHub plugin settings.
E-mail Notification This section provides various configurations related to the email SMTP server and other details.

Consequently, let's now understand the next set of System Configurations available under the manage Jenkins section:

What are Global Tool Configurations in Jenkins?

The Global tool configurations is another sub-section under the System Configuration option. Subsequently, in this section, we can define configurations as well as installation information regarding global tools that we want to integrate with Jenkins like Maven, JDK, Git, Gradle as well as Ant. The table below shows a basic list of settings that can be configured under this section:

Configuration Details
Maven Configuration This section provides various options to configure and install a specific version of Maven.
JDK Configuration This section provides various options to configure and install a specific version of JAVA.
Git Configuration This section provides various options to configure and install a specific version of Git.
Gradle Configuration This section provides various options to configure and install a specific version of Gradle.
Ant Configuration This section provides various options to configure and install a specific version of Ant.

This is just a subset of tools and their corresponding configurations. This list will extend depending on various tools/plugins installed in Jenkins.

What are Plugins Configurations in Jenkins?

The Manage Plugins section provides options to add, remove, update, enable, or disable the third-party plugins used in Jenkins that can help us to extend the functionality of Jenkins. Consequently, there are four options available on this page, as shown below:

Plugin Options under Manage Jenkins

Where,

  1. Updates: This section shows all the installed plugins for which new versions are available, that can be installed as an update.
  2. Available: This section shows various plugins that can be installed on a need basis and are not currently installed.
  3. Installed: This section shows a list of all the installed plugins and their versions.
  4. Advanced: This section provides the option to install a new plugin by uploading a ".hpi" file.

So, we can use any of the options mentioned above to add, update, and edit any of the supported plugins in Jenkins.

What are Nodes Configurations in Jenkins?

The manage nodes section provides the capabilities to Add, Remove, Control, and Monitor the various nodes that Jenkins runs jobs on. Moreover, it lists various nodes that are registered with the Jenkins server and are available for executing the jobs on that.

Manage nodes section

We can also add new nodes by clicking on the "New Node" link in the left menu. Also, we can edit/update the settings of a specific node by clicking on the gear icon against each of the nodes. So, this way we can manage various nodes associated with the Jenkins server.

Subsequently, let's now understand the details of the "Security Section" under the manage Jenkins section:

What options does the Security section provide to manage Jenkins?

Jenkins is used on various scales, considering from a personal machine on the intranet to the huge servers that are connected to the internet. Depending on its implementation, Security becomes it's important part and is kind of a must so as the installation and implementation are secured enough.

From Jenkins version 2.0, most of the security features are by default enabled to provide strict security in Jenkins. However, Jenkins administrator can disable these features according to project/team requirements. The following figure shows the various Security options available under the "manage Jenkins" section:

Security Options in Manage Jenkins Section

Let's learn the various security options available under the Security section in Jenkins.

What are the Configure Global Security options in Jenkins?

The "Configure Global Security" section provides various options that help in defining who is allowed to access/use the system. Additionally, it provides the following options for various security-related settings:

Configuration Head
Authentication This section provides various options using which Authentication can be enabled on the Jenkins Server. A few of those options can be authentication using LDAP, User/Group database, Jenkin’s user database, etc.
Authorization This section provides the options to configure the level of authorization on the Jenkins server. A few of the options can be Matrix-based security, Project-based Matrix Authorization Strategy, Legacy mode, Logged-in users can do anything, etc.
Markup Formatter This specifies the text formatting that will be implemented for the inputs.
Agents Jenkins uses a TCP port to communicate with agents connected inbound. As it's hard for firewalls to secure a random port, you can instead specify a fixed port number and configure your firewall accordingly.
CSRF Protection If an HTTP proxy sits between your browser client and your Jenkins server and you receive a 403 response when submitting a form to Jenkins, checking this option may help.
Hidden security warnings This section allows you to suppress warnings, applicable to your Jenkins configuration, provided by the updates sites. If you do, they won’t be shown by the Update Site Warnings administrative monitor.
API Token This section provides the option of how the API token should be generated.
SSH Server Jenkins can act as an SSH server to run a subset of Jenkins CLI commands. Here you can also specify the TCP/IP port number for the SSH Server.
.

So this way we can configure various security-related options in Jenkins and make it more secure.

What are the Manage Credentials options in Jenkins?

The Manage Credentials section provides the options to create and store global credentials that can be used in various Jenkins build jobs. This is one way to secure the credentials, so as for the users only the key is accessible which they can directly use in their corresponding jobs.

  1. First, when you will click on the "Manage Credentials " option, it will show the Credentials Page as shown below:

Credentials Store in Jenkins

  1. Secondly, click on the "Jenkins" option, which shows the store name in which the credentials are stored. Subsequently, it will open the Domains page, as shown below:

Domain for Credentials Store

  1. Thirdly, click on the Domain "Global credentials " and it will show the credentials page. As there are not credentials added to the store, so it will show an empty page as shown below:

Global Credentials Page in Jenkins

  1. Fourthly, click on the "Add credentials " link to add new credentials. It will open the page with the following options:

Create Credentials in Jenkins

  1. Fifthly, select the "Kind " and  "Scope" for the newly created credentials from the values highlighted below:

Credentials Type in Jenkins

Credentials Scope in Jenkins

  1. Sixthly, after that specify the values of other fields as highlighted below:

Credentials values in Jenkins

  1. Seventhly, this will create a new credential under the Jenkins scope, that can be accessed using the ID of the credential.

So, this way we can create and manage Credentials in Jenkins, which can be accessed in various jobs and nodes based on the scope for which they are being defined.

What are the Configure Credential Providers options in Jenkins?

These options allow configuring which all Credentials Providers are allowed on the Jenkins Server. Moreover, when you click on this option on the "Manage Jenkins" page. By default, it will show that all the providers and all types of credentials are allowed, as shown below:

Default Credential Providers in Jenkins

You can allow specific types of Providers and Credential types, by selecting the including/excluding values from the corresponding dropdowns and selecting the corresponding checkboxes as highlighted below:

IncludingExcluding Credential providers in jenkins

So, this way as Admins, we can allow all types of Credentials providers that can be used by the Jenkins server, and then users will be able to create Credentials of only allowed types.

What options does the Status Information section provide to manage Jenkins?

This section is more of a monitoring section, which provides various kinds of details about the Jenkins servers and nodes. The following figure shows a basic view of what all types of information can be accessed under this section:

Status information section in Manage jenkins

Let's understand the various kind of details that all these sections provide?

What is the System Information section in Jenkins?

The System Information section is used to gather information regarding all system properties related to Java, information about environment variables like which type of environment variables are currently used in Jenkins, information regarding user like under which user Jenkins is running, information about plugins like which plugin is enabled as well as information regarding memory usage in the graphical form.

We can go to this section after clicking on "System Information"  under the Status Information section on the Manage Jenkins page. It will show all the System Properties as highlighted below:

System information section

So, with the help of this section, we can extract the system information related to Java, environment variables, plugins as well as memory usage.

What is the System Log section in Jenkins?

The System Log section is used to view the Jenkins log files. If any failure occurs then these logs play a vital role in debugging. The System Log section provides us the information of all Jenkins logs. Moreover, we can go to this section after clicking on "System Log"  under the Status Information section on the Manage Jenkins page. For seeing Jenkins related logs, click on the "All Jenkins Logs"  link highlighted below:

system Log screen

As soon as we click on the "All Jenkins Logs" link, we can see the Jenkins related logs.

Jenkins log

So, this way we can access the logs of the Jenkins server.

What is the Load Statistics section in Jenkins?

As we know that Jenkins is capable to handle concurrent builds so it is required to observe the load that Jenkins is bearing during the execution of builds. It is also required to observe how the build queue is working and after how much time builds are going to be executed from the build queue. From the infrastructure perspective, we need to observe how many builds that build queue can handle as well as how many concurrent builds can execute at a time. To get all these above requirements, Jenkins provides a section named Load Statistics in which we can see the graphical representation to show the above functionalities.

We can go to this section after clicking on "Load Statistics"  under the Status Information section on the Manage Jenkins page.

Load statistics Section

So as soon as we will run our jobs on concurrent builds, we can see the load performance here in graphical form.

What is the About Jenkins section in Jenkins?

This section depicts the information about Jenkins version, its license information, its dependencies upon 3rd party libraries, information about static resources regarding license as well as dependency information for plugins. We can go to this section after clicking on "About Jenkins"  under the Status Information section on the Manage Jenkins page.

About Jenkins Section

So, that's all for this section. Let's move to the next section i.e. Tools and Actions.

What options does the Tools and Actions section provide to manage Jenkins?

The Tools and Actions section depicts information regarding how can we reload configuration from disk, how can we use the available commands in Jenkins through the command-line tool, information regarding script console as well as how can we shut down Jenkins safely. The following figure shows the various options under this section:

Tools and Actions Subsections on Manage jenkins

Let's understand for what purposes, these sub-sections can be used?

What is the Reload Configuration from Disk option in Jenkins?

The Reload configuration from the Disk option discards/ rejects all the loaded data in memory and reload everything from the file system. It is useful when we modified config files directly on disk.

Jenkins stores all its system and configuration related data in the form of XML files, and these XML files are stored in the Jenkins home directory. Apart from that Jenkins also stores all build histories. So, if we are planning to move our build jobs from one Jenkins instance to another Jenkins instance or if we are planning to archive our old build jobs then we need to add or remove the respective job directories to Jenkins' build directory.

We can click on "Reload Configuration from Disk"  under the Tools and Actions section on the Manage Jenkins page.

Reload configuration from disk

When we click on the above option, Jenkins will show a pop-up for confirmation of loading the configurations from disk, and on accepting the popup, it will load the configurations and will restart Jenkins to implement those configurations.

What is the Jenkins CLI option in Jenkins?

Jenkins provides/ offers a command-line interface that allows users and administrators to access Jenkins from a script or shell environment. We can access this command-line interface over SSH or with the Jenkins CLI client or with the help of a JAR  file distributed with Jenkins.

To achieve this, we need to download "jenkins-cli.jar"  and run it as follows:

java -jar jenkins-cli.jar -s http://localhost:8080/ -webSocket help

We can reach this option after clicking on "Jenkins CLI"  under the Tools and Actions section on the Manage Jenkins page.

Jenkins CLI section

Here, we can see a list of available commands displayed. With the help of these commands, we can access different types of features via the command-line tool.

What is the Script Console in Jenkins?

The Script Console feature is used to run the groovy script on the server. Jenkins provides a Groovy script console which allows us to run Groovy scripts within the Jenkins master runtime or in the runtime on agents. We can reach this section after clicking on "Script Console"  under the Tools and Actions section on the Manage Jenkins page.

Script Console section

For running the script and seeing the result, put the groovy script in the console window and click on the Run button. As soon as we will click on the Run button, we can see results displayed under the Results section. For example, I am taking below a simple groovy script for demo purpose:

println(Jenkins.instance.pluginManager.plugins)

Now let's see the results:

Groovy Script result

so, we can see the results of the script run in the Result section in the above image.

What is Prepare for Shutdown option in Jenkins?

We use the Prepare for Shutdown option to shut down Jenkins safely. When we click on Prepare for shutdown option then it stops executing new builds and then it will shut down the Jenkins safely. Also, it will wait for the completion of the execution of the current builds.

Jenkins shutdown message

As soon as we will click on Prepare for shutdown option, we will be redirected to the Jenkins dashboard page in which the message is showing like "Jenkins is going to shut down"  like in the above image.

Key Takeaways:

  • Jenkins management option uses Jenkins management feature apart from configuration feature.
  • In the Configure system, we can set home directory, system message, no of executors, usage option, quite period, Jenkins URL, environment variables as well as setting regarding email notification.
  • In Global tool configuration, we can define configurations as well as installation information regarding global tools that we want to integrate with Jenkins like Maven, JDK, Git, Gradle as well as Ant.
  • The Manage Plugins section adds, removes, updates, enables, or disables the third-party plugins used in Jenkins that can help us to extend the functionality of Jenkins.
  • Manage Nodes section manages nodes features according to our builds.
  • Configure global security section mostly defines the authentication as well as authorization features in Jenkins.
  • Manage users section create, delete, or modify users in Jenkins.
  • The System Information section gathers information regarding system properties, environment variables, user and plugin information as well as memory usage.
  • The System Log section views the Jenkins log files.
  • About Jenkins section depicts the information about Jenkins version, its license information, its dependencies upon 3rd party libraries, information about static resources regarding license as well as dependency information for plugins.
  • Reload configuration from disk option discards all the loaded data in memory and reload everything from the file system.
  • Jenkins CLI depicts information regarding available commands that can be executed by the command-line tool.
  • Script console feature runs the groovy script on the server.
  • Prepare for shutdown option shuts down Jenkins safely.
Jenkins Configuration
Jenkins Configuration
Previous Article
Jenkins Build Jobs
Jenkins Build Jobs
Next Article

Similar Articles

Feedback