How to Install Jenkins and Configure it (A Step-by-Step Guide)

Sauce AI for Test Authoring: Move from intent to execution in minute.|xBack to ResourcesBlogPosted April 1, 2023

How to Install Jenkins and Configure it (A Step-by-Step Guide)

The goal of this get started guide is to help development teams configure Jenkins continuous integration/continuous deployment (CI/CD, or CI) servers and optimize a newly deployed CI substructure.

Documentation

Jenkinsis a flexible, open origin CI server, with C of plugins to support construction, testing, and deployment. This article will walk you through the necessary steps to set up a new.

7 Best Practices for CI/CD Architecture

It ’ s important to project your CI architecture carefully: designing and institute standards for how the software will move to product. It ’ s important to understand the tech lashings involved, as well as your overall finish for the system, and then consider the base. This will enable a stable and restorable CI pipeline.

1. Determine the goal for your CI/CD grapevine

  • What are the overall finish for your CI pipeline?

  • Do you require to be able to ship code to production once every two weeks? On every commit?

  • Is the package a web application, subject of change second-by-second? Is it a complex mobile application, which must undergo Apple/Google reviews every time it embark?

  • What languages, libraries, and dependencies will be used by the teams involved? Will the scheme involve extra maintenance or scalability as a result?

  • Do lives depend on the successful release of your software? Does it essentially affect the revenue of your company?

  • How many projects will need to use the like system? One? 15? 200?

It ’ s important for stakeholders to agree on requirements before you begin planning out substructure.

2. Start planning your Jenkins CI/CD infrastructure

Once you know your overall goals, as well as the tech stacks involved, it ’ s time to start the substructure planning. Make sure to involve your developer, operations, and, as well as. CI/CD system manage all sort of sensitive and hush-hush information, so it is vital to get buy-in and support from everyone regard.

Important to realize is the relationship between a Jenkins Server and its agent nodes. TheServer is the brains of the operation, coordinating the job queue, schedule processes, and tail results. TheNodes do the actual work of action business and sending results back to theServer.

3. Configure your Jenkins CI/CD grapevine

Treat your CI configuration like codification, and do sure changes are captured in you Version Control System. Allowing anyone to make changes–ad hoc and unrecorded–introduces peril, and creates a situation that might prevent easy fixes. By treating configuration-as-code, you cast yourself a lifeline when misunderstanding hap.

Create generic reusable jobs, naming conventions (e.g. jobs and environs variable); continue occupation small—modularization, scalable infrastructure that allows for auto-scaling of agents/nodes.

4. Choose your Jenkins plugins (carefully)

Jenkins has a inclination of commonly used, well-supported plugins it will proffer to install mechanically. However, once you experience a running illustration of Jenkins,.

Be cautious with plugin usage. Plugins are maintained by different team and vendors, and the attention paid to the upkeep can be rattling inconsistent. They change frequently and can become fragile.

If you see a Jenkins plugin you like, ask yourself:

  • Do you actually want it, will you really use it, and how crucial is it to your pipeline?

  • Do you know who made it?

  • Can you bump out how big the community is?

  • Is it easy to see what their motivations are for create the plugin? Is it to help smooth the usage of a puppet or online vendor? Is it alone focused on trying to get you to pay for service you might not need?

Here are a few recommended Jenkins plugins:

  • Git- allows you to integrate GitHub to clone repository (this is one of the suggested plugins available at install)

  • GitHub Pull Request Builder- anatomy pull requests in GitHub and reports result

  • Swarm- enables node to auto-discover nearby Jenkins Server and join it automatically

  • Sauce OnDemand- allows you to mix Sauce Labs with Jenkins

  • Slack Notification- countenance posting of build notifications to a Slack channel

  • ThinBackup- endorse up the orbicular and job-specific configurations receive an upgrade process is important, both for Jenkins versions and for plugins–don & # x27; t test upgrades on the live product CI server. We recommend define up a separate Jenkins test environment to check all new plugins before use a change to your production server.

5. Utilize a configuration direction tool

I extremely suggest habituate a configuration management instrument to automatize the process to achieve speeding, scale, repeatability and consistency. I recommend usingScalr, Chef, Ansible, CircleCI, and Terraform.

6. Use a depositary for CI artifacts

Consider creatingGitHub webhooksfor version control repositories. I recommend usingArtifactory(cloud store) for CI artifacts.

SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses.

7. Set up a substitute Jenkins CI server (fail safe)

Set up a backup process for Jenkins contour. Script a Jenkins job to use thethinBackupplugin or S3 plugin to mail the Jenkins configuration to an Amazon S3 (cloud storage).

How to Set Up and Configure a Jenkins Master Server

Once Jenkins has been instal, you ’ ll motive to customize and tweak it to match your squad ’ needs.

Install and manage Jenkins plugins

Now is the clip to install the Jenkins plugins you take before. Here ’ s how:

Steps

  1. Navigate to Jenkins Web Interface & gt;Login as Admin & gt; Manage Jenkins & gt; Manage Plugins & gt; Available (Tab)

  2. Select the checkbox for all the plugins you need to install.

  3. Select Download now and install after restartat the rear of the page.

  4. After Jenkins finishes restarting, the installed plugins will look underManage Plugins & gt; Installed (Tab).

Configure system settings

The Configure System page contain different configuration categories, and serves as the main area for major changes to how the system work.

Steps

  1. Navigate toManage Jenkins & gt; Configure System

  2. Set the number of executors to 0. You don ’ t want the Jenkins waiter to fulfill jobs itself. The admin server should only orchestrate jobs, and shouldn ’ t do the work of a node

  3. Under Globular Properties, select the checkbox forEnvironment Variables.

  4. Set the environment variable (e.g., SLACK_TOKEN, SAUCE_ACCESS_KEY).

Jenkins Environment Variables

Configure global scope

By default, all Jenkins users are admins. We recommend enabling LDAP or SSO, which allows you to use a shared corporate service to validate users. Users can log into Jenkins with their common fellowship login credentials. Your IT team can assist you set this up.

Steps

  1. Navigate toManage Jenkins & gt; Configure Global Security

  2. Under Security Realm, select LDAP from the drop-down menu:

Configure Jenkins Global Security

3. Enter the details for the LDAP Server (talking to your IT team if necessary):

Security Realm LDAP

4. Select matrix-based security from theAccess Control (Authorization) section.

Access Control

5. As you can see, matrix-based security gives you ultra fine-grain control over what your users have access to, give you multiple manner to secure your system.

Matrix Based Security

Add and Configure Node (Agent)

There are multiple ways to add and configure aNode, or a group of node (usually called a Node farm). The farm will treat the literal work of downloading the source code, compile it, box it, running the tests, and deploying it to a test environment (or, if you ’ re really on top of things, directly to production!).

For this example, we will be setting up a really simpleNode on the same machine as theServer, though we recommend setting up newNodes on freestanding machines (or ideally, in the cloud).

Steps

  1. Check that the new Node isONLINE.

  2. Navigate to Jenkins Web Interface & gt;Login as Admin & gt; Manage Jenkins & gt; Manage Nodes and Clouds

  3. Click New Node

  4. Fill in theNode name, selectPermanent Agent, then clickCreate.

  5. Fill in all the fields, make sure to occupy in theRemote Directory(a required battleground). Check the box forUse WebSocket. The WebSocket option creates a sort of mesh network for efficient communication between theServer and the Nodes, and may not work in all configurations.

  6. Click Save

  7. The Node will not be up and scat quite yet–you ’ ll see the new node with a red X in the Status column. This is expected.

  8. If you click on theNode, it will lead you to a blind showing a curl command you can execute on the command-line. This will part theNode, and attach it to theJenkins Server.

Curl Command for Jenkins Node

9. Execute this bid, then go back to the Manage Nodes and Clouds blind of Jenkins, and you should see that the red X is no longer there:

Once you ’ re conversant with the process, have a look at theSwarmplugin for negociateNodesin a more scalable way.

The build consequence and reports are store on theJenkins Server, and artifacts should e'er end up in artifact storage (i.e.JFrog Artifactory), and not on the Jenkins Server.

Go Time! Ready to Create a CI Pipeline

Now that Jenkins is configured, you ’ re ready to orchestrate or maintain a CI pipeline. I recommend insure out the Jenkins certificationGetting Started with Pipelineto create and deploy your first CI pipeline.

CI Pipeline Jenkins

Wrapping Up

This clause is think to assist you identify the basic settings and recommended best practices for, and then get a glance of the overall architecture you should be shooting for in order to create a solid build system your team can count on with high confidence. Check out the Sauce Labs support to.

Marcus Merrell

Test Strategist

Published:
Apr 1, 2023
Jump to content

7 Best Practices for CI/CD Architecture

How to Set Up and Configure a Jenkins Master Server

Create a CI Pipeline

Share this post
Copy Share Link

Head over to our Dr. or get in touch to learn more

Why stop here?

LinkedIn
© 2026 Sauce Labs Inc., all right reserved. SAUCE and SAUCE LABS are registered trademarks owned by Sauce Labs Inc. in the United States, EU, and may be registered in other jurisdictions.
robot
quote

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free