Search

How To Install Jenkins on Windows

Jenkins is a Java based open-source application, which is one of the most popular tools for continuous integration and continuous delivery on any platform.Jenkins is a self-contained server that can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software. It has many plugins for automating almost everything at the infrastructure level. The use of Jenkins has widely increased due to a rich set of functionalities, which it provides in the form of plugins.The Jenkins project has two release lines: Stable (LTS) and regular (Weekly). Depending upon the scenario and need, one can be chosen:Stable (LTS): Long-Term Support (LTS) release baselines are chosen every 12 weeks from the stream of regular releases.Regular releases (Weekly): This delivers bug fixes and new features rapidly (generally weekly) to users and plugin developers who need them.Jenkins can be installed through native system packages, Docker, or even run standalone by any machine with a Java Runtime Environment (JRE) installed.In this tutorial, we will show a step-by-step guide on how to install Jenkins on a Windows platform.AudienceThis document can be referred by anyone who wants to install the latest Jenkins version on Windows.Before proceeding further with the installation, make sure your system satisfies the following requirements:System Requirements for Jenkins InstallationMinimum hardware requirements256 MB of RAM1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a Docker container)Recommended hardware configuration for a small team size4 GB+ of RAM 50 GB+ of drive spaceSoftware requirementsJenkins project performs a full test flow with the following JDK/JREs:JDK / JRE 8 - 64 bitsJDK / JRE 11 - 64 bitsFor more details refer to the Java Requirements official document.Web browserFor more details, you can check  Web Browser Compatibility page.JDK  InstallationBelow are the steps of JDK installation, if not installed initially:STEP 1: Navigate to the website. Scroll to Java SE11 (LTS) and click on JDK Download.STEP 2:  Scroll to Java SE Development kit 11.0.10 and click on Windows x64 Installer.STEP 3: Accept the Licence Agreement and download it.STEP 4: You will be navigated to the Sign in page. If you don't have an account on Oracle, click on create account and proceed with the download.STEP 5: Once downloaded, run the .exe to install JDK by double-clicking it. It might ask for permission before installation. Click on Yes to allow installer to execute. The Welcome Screen comes first.STEP 6: Choose the installation path for jdk and click Ok. We can also choose the default path as well.STEP7: Click on NEXT to start installation. Once it is completed it shows the success message as shown in the image below.It is recommended to restart your system, further click on System Properties and choose Advance System Settings.STEP 8: Choose the Environment Variable and set the User variable by assigning Variable name as JAVA_HOME and variable value as the path where Java is installed:Click on Ok and then Apply.Jenkins InstallationSTEP 1: Navigate to the website and under Jenkins LTS system, click on Windows for the latest Jenkins package (currently it is 2.277.1)STEP 2: Once the jenkins.msi is downloaded, open it and proceed.STEP 3: Choose the Jenkins path.STEP4: For Service logon credentials, choose Logon type as "Run Service as LocalSystem".STEP 5: Choose the port available on the system and test it (recommended is 8080).STEP6: Choose the JDK path and click Next.Click on “Next”STEP 7: Click the "Install" button to start the installation process.STEP8: Please wait till the whole installation is completed.STEP 9: Click on "Finish"  after the installation is completed.STEP 10: You will be redirected to a local Jenkins page by default. If page is not loaded by default, paste the URL http://localhost:8080 , with the chosen port in the browser.After completing the Jenkins installation phase, we will proceed with its configuration set up.STEP 11: For Unlocking Jenkins, copy the password from the file at C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\secrets (shown on screen) and paste it in the Administrator password field. Click on Continue.STEP 12: We can either choose the Jenkins suggested plugins or manually select plugins to install. It’s preferable to choose "install suggested plugins". If not, we can install this later as well.STEP 13: Choose  "Install suggested plugins" and let the plugins install completely.STEP 14: If you choose the Option "Select Plugins to Install", then select the plugins you want to install.STEP 15: Create an admin user account by filling up the details.STEP 16: Click  Save and Finish to complete the Jenkins set up.STEP 17: Click "Start using Jenkins" option.STEP 18: Finally, the default Jenkins page will be shown as below.STEP 19: Once we login as Admin, we can create multiple users for the team by choosing Manage Jenkins >>Manage User   >> Create User; and completing the details.Installing PluginsFor installing plugins, there are basically two methods. One is to directly download from the Available Section of the Manage Plugin.Second, uploading the .hpi file. This method is generally used when an application/software plugin is not available for ready download.Find below the steps for same:Method 1:1. Navigate to the left side menu and choose Manage Jenkins and then Manage Plugins.2. Under the Available section,  enter the name of the plugin in the search bar and click on ‘Install without Restart’.Method 21. Navigate to left side menu and choose Manage Jenkins and then Manage Plugins.2. Under the advanced section, scroll down to the Upload Plugin section.3. Upload the .hpi file for the plugin (you can get the .hpi file from the official website of application/software.)Some known errors during Installation1. Under the Manage Plugin section, sometimes we see error as:There were errors checking the update sites: SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetFor this, certificates need to be installed. Follow the below steps (In Chrome browser):Click on the site icon in the address bar. Then select "Certificate" -> "Details" -> "Export" and save in format "Der-encoded binary, single certificate".Add the keystore file to JVM. Determine the location of cacerts.  <JAVA PATH/cacerts>Import the example.cer file into cacerts using admin access of command linekeytool -import -alias example -keystore "< JAVA PATH/cacerts >" -file example.cerOr, navigate to the Advanced tab in the Manage Plugin section. Scroll to Update site and replace https to http in URL mention.2 . After installation, if Jenkins URL is not loading up and shows below error:There could be a possibility that the JDK version is not correct as per requirement.  To verify, open command prompt and type java --version.  You can use the JDK installation steps mentioned above in Pre-requisites.3. There could be a scenario where we need to configure more than one version of the JDK. In the pipeline, there may be a different environment(prod/qa/pre-prod) running and subsequently requiring different version of JDK. One of the best suited methods is to build the application using the java version which is close to the version used in the prod environment; as a lower JDK version can work with a higher version, but the reverse is not always true.For resolving the issue, we can install JDK version on Jenkins by navigating to Manage Jenkins >> Global Tool Configuration>> Add JDK.We can click on Add Jenkins, provide name and JAVA_HOME. Once the path of JAVA_HOME is entered, Jenkins will validate whether the installation directory exists for the specified JDK versions.Click on Install automatically, and Jenkins will download and install the specified version of the JDK into the tools directory of the Jenkins home directory.After all the settings for configuring the JDK are done, click Save at the bottom of the page to save the configuration.Uninstalling Jenkins from WindowsThere are multiple methods to uninstall Jenkins from Windows.It can be done by using command prompt or using .msi file.  Below are the steps for uninstalling Jenkins and its slave services:METHOD 1: Using command promptSTEP 1: Simply go to the directory where Jenkins is installed.STEP 2: Then open up a cmd in that directory. (cmd in administrator mode is preferable)STEP 3: jenkins.exe uninstall (this name could be different in case of slave Jenkins services like jenkins-slave.exe or something similar. The application will be present in the folder)For Jenkins as services, do the same thing. At the end we can delete the directories (e.g. C:\Program Files (x86)\Jenkins or  wherever Jenkins was installed)METHOD 2: By Using .msi fileSTEP 1: Navigate to the path where the .msi (Windows Installer) file which we used to install Jenkins has been placed. In general, it will be in .zip folder of Download, but it may vary.STEP 2: Double-click the .msi file inside the compressed folder.  Note: Don't extract the file.STEP 3: Since Jenkins is already installed, Windows Installer will give you options to customize it or uninstall it.STEP 4: Choose "Uninstall." optionSTEP 5: Once uninstalled, delete the installation folder (e.g. C:\Program Files (x86)\Jenkins or wherever Jenkins was installed) ConclusionSince Jenkins has been installed and the basic configuration is completed, you can proceed with creating a continuous integration pipeline. If you want to know more about Jenkins, you can check out the Jenkins Certification Training Course and learn about server automation, continuous integration, and configuration tools. You can also check out our other blogs on DevOps.

How To Install Jenkins on Windows

2K
How To Install Jenkins on Windows

Jenkins is a Java based open-source application, which is one of the most popular tools for continuous integration and continuous delivery on any platform.

Jenkins is a self-contained server that can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software. It has many plugins for automating almost everything at the infrastructure level. The use of Jenkins has widely increased due to a rich set of functionalities, which it provides in the form of plugins.

The Jenkins project has two release lines: Stable (LTS) and regular (Weekly). Depending upon the scenario and need, one can be chosen:

  • Stable (LTS): Long-Term Support (LTS) release baselines are chosen every 12 weeks from the stream of regular releases.
  • Regular releases (Weekly): This delivers bug fixes and new features rapidly (generally weekly) to users and plugin developers who need them.

Jenkins can be installed through native system packages, Docker, or even run standalone by any machine with a Java Runtime Environment (JRE) installed.

In this tutorial, we will show a step-by-step guide on how to install Jenkins on a Windows platform.

Audience

This document can be referred by anyone who wants to install the latest Jenkins version on Windows.

Before proceeding further with the installation, make sure your system satisfies the following requirements:

System Requirements for Jenkins Installation

Minimum hardware requirements

  • 256 MB of RAM
  • 1 GB of drive space (although 10 GB is a recommended minimum if running Jenkins as a Docker container)

Recommended hardware configuration for a small team size

  • 4 GB+ of RAM 
  • 50 GB+ of drive space

Software requirements

Jenkins project performs a full test flow with the following JDK/JREs:

  • JDK / JRE 8 - 64 bits
  • JDK / JRE 11 - 64 bits

For more details refer to the Java Requirements official document.

Web browser

For more details, you can check  Web Browser Compatibility page.

JDK  Installation

Below are the steps of JDK installation, if not installed initially:

STEP 1: Navigate to the website. Scroll to Java SE11 (LTS) and click on JDK Download.

STEP 2:  Scroll to Java SE Development kit 11.0.10 and click on Windows x64 Installer.

STEP 3: Accept the Licence Agreement and download it.

STEP 4: You will be navigated to the Sign in page. If you don't have an account on Oracle, click on create account and proceed with the download.

STEP 5: Once downloaded, run the .exe to install JDK by double-clicking it. It might ask for permission before installation. Click on Yes to allow installer to execute. The Welcome Screen comes first.

STEP 6: Choose the installation path for jdk and click Ok. We can also choose the default path as well.

STEP7: Click on NEXT to start installation. Once it is completed it shows the success message as shown in the image below.

It is recommended to restart your system, further click on System Properties and choose Advance System Settings.

STEP 8: Choose the Environment Variable and set the User variable by assigning Variable name as JAVA_HOME and variable value as the path where Java is installed:

Click on Ok and then Apply.

Jenkins Installation

STEP 1: Navigate to the website and under Jenkins LTS system, click on Windows for the latest Jenkins package (currently it is 2.277.1)

STEP 2: Once the jenkins.msi is downloaded, open it and proceed.

STEP 3: Choose the Jenkins path.

STEP4: For Service logon credentials, choose Logon type as "Run Service as LocalSystem".

STEP 5: Choose the port available on the system and test it (recommended is 8080).

STEP6: Choose the JDK path and click Next.

Click on “Next”

STEP 7: Click the "Install" button to start the installation process.

STEP8: Please wait till the whole installation is completed.

STEP 9: Click on "Finish"  after the installation is completed.

STEP 10: You will be redirected to a local Jenkins page by default. If page is not loaded by default, paste the URL http://localhost:8080 , with the chosen port in the browser.

After completing the Jenkins installation phase, we will proceed with its configuration set up.

STEP 11: For Unlocking Jenkins, copy the password from the file at C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\secrets (shown on screen) and paste it in the Administrator password field. Click on Continue.

STEP 12: We can either choose the Jenkins suggested plugins or manually select plugins to install. It’s preferable to choose "install suggested plugins". If not, we can install this later as well.

STEP 13: Choose  "Install suggested plugins" and let the plugins install completely.

STEP 14: If you choose the Option "Select Plugins to Install", then select the plugins you want to install.

STEP 15: Create an admin user account by filling up the details.

STEP 16: Click  Save and Finish to complete the Jenkins set up.

STEP 17: Click "Start using Jenkins" option.

STEP 18: Finally, the default Jenkins page will be shown as below.

STEP 19: Once we login as Admin, we can create multiple users for the team by choosing Manage Jenkins >>Manage User   >> Create User; and completing the details.

Installing Plugins

For installing plugins, there are basically two methods. One is to directly download from the Available Section of the Manage Plugin.

Second, uploading the .hpi file. This method is generally used when an application/software plugin is not available for ready download.

Find below the steps for same:

Method 1:

1. Navigate to the left side menu and choose Manage Jenkins and then Manage Plugins.

2. Under the Available section,  enter the name of the plugin in the search bar and click on ‘Install without Restart’.

Method 2

1. Navigate to left side menu and choose Manage Jenkins and then Manage Plugins.

2. Under the advanced section, scroll down to the Upload Plugin section.

3. Upload the .hpi file for the plugin (you can get the .hpi file from the official website of application/software.)

Some known errors during Installation

1. Under the Manage Plugin section, sometimes we see error as:

There were errors checking the update sites: SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

For this, certificates need to be installed. Follow the below steps (In Chrome browser):

  • Click on the site icon in the address bar. Then select "Certificate" -> "Details" -> "Export" and save in format "Der-encoded binary, single certificate".
  • Add the keystore file to JVM. Determine the location of cacerts.  <JAVA PATH/cacerts>
  • Import the example.cer file into cacerts using admin access of command line
    keytool -import -alias example -keystore "< JAVA PATH/cacerts >" -file example.cer

Or, navigate to the Advanced tab in the Manage Plugin section. Scroll to Update site and replace https to http in URL mention.

2 . After installation, if Jenkins URL is not loading up and shows below error:

There could be a possibility that the JDK version is not correct as per requirement.  

To verify, open command prompt and type java --version.  

You can use the JDK installation steps mentioned above in Pre-requisites.

3. There could be a scenario where we need to configure more than one version of the JDK. In the pipeline, there may be a different environment(prod/qa/pre-prod) running and subsequently requiring different version of JDK. One of the best suited methods is to build the application using the java version which is close to the version used in the prod environment; as a lower JDK version can work with a higher version, but the reverse is not always true.

For resolving the issue, we can install JDK version on Jenkins by navigating to Manage Jenkins >> Global Tool Configuration>> Add JDK.

We can click on Add Jenkins, provide name and JAVA_HOME. Once the path of JAVA_HOME is entered, Jenkins will validate whether the installation directory exists for the specified JDK versions.

Click on Install automatically, and Jenkins will download and install the specified version of the JDK into the tools directory of the Jenkins home directory.

After all the settings for configuring the JDK are done, click Save at the bottom of the page to save the configuration.

Uninstalling Jenkins from Windows

There are multiple methods to uninstall Jenkins from Windows.

It can be done by using command prompt or using .msi file.  

Below are the steps for uninstalling Jenkins and its slave services:

METHOD 1: Using command prompt

STEP 1: Simply go to the directory where Jenkins is installed.

STEP 2: Then open up a cmd in that directory. (cmd in administrator mode is preferable)

STEP 3: jenkins.exe uninstall (this name could be different in case of slave Jenkins services like jenkins-slave.exe or something similar. The application will be present in the folder)

For Jenkins as services, do the same thing. At the end we can delete the directories (e.g. C:\Program Files (x86)\Jenkins or  wherever Jenkins was installed)

METHOD 2: By Using .msi file

STEP 1: Navigate to the path where the .msi (Windows Installer) file which we used to install Jenkins has been placed. In general, it will be in .zip folder of Download, but it may vary.

STEP 2: Double-click the .msi file inside the compressed folder.  

Note: Don't extract the file.

STEP 3: Since Jenkins is already installed, Windows Installer will give you options to customize it or uninstall it.

STEP 4: Choose "Uninstall." option

STEP 5: Once uninstalled, delete the installation folder (e.g. C:\Program Files (x86)\Jenkins or wherever Jenkins was installed) 

Conclusion

Since Jenkins has been installed and the basic configuration is completed, you can proceed with creating a continuous integration pipeline. If you want to know more about Jenkins, you can check out the Jenkins Certification Training Course and learn about server automation, continuous integration, and configuration tools. You can also check out our other blogs on DevOps.

KnowledgeHut

KnowledgeHut

Author

KnowledgeHut is an outcome-focused global ed-tech company. We help organizations and professionals unlock excellence through skills development. We offer training solutions under the people and process, data science, full-stack development, cybersecurity, future technologies and digital transformation verticals.
Website : https://www.knowledgehut.com

Join the Discussion

Your email address will not be published. Required fields are marked *

Suggested Blogs

How to Install Kubernetes on Windows

Kubernetes is a container-based platform for managing cloud resources and developing scalable apps. It is widely regarded as the most common platform for automating, deploying, and scaling the entire cloud infrastructure. The platform runs on all major operating systems and is the most widely used open-source cloud tool.  Kubernetes can scale your entire infrastructure, monitor each service's health, act as a load balancer, and automate deployments, among other things. You can deploy your pods (docker containers) and services across the cloud by installing and configuring as many nodes (clusters) as you want.Let’s get started. We will guide you through the complete roadmap on how to install Kubernetes for Windows users. This tutorial will show you how to set up Kubernetes and deploy the official web GUI dashboard, which will allow you to manage and monitor everything. PrerequisitesFor installing Kubernetes in your system, here are a few prerequisites that need special attention. The hardware and software requirements are discussed below:Hardware requirementsMaster node with at least 2 GB memory. (Additional will be great)Worker node with 700 MB memory capacity.Your Mouse/Keyboard (monitor navigation)Software requirementsHype-VDocker DesktopUnique MAC addressUnique product UUID for every nodeEnsuring that there is a full range of connectivity between all the machines in the cluster is a must.Installation ProcedureStep 1: Install & Setup Hyper-VAs we all know, Windows has its virtualization software, known as Hyper-V, which is essentially VirtualBox on steroids. Hyper-V allows you to manage your virtual machines (VMs) using either the free Microsoft GUI tool or the command line. It's simple to enable Hyper-V, but first, make sure your PC meets the following requirements:Your operating system should be Windows 10 (Enterprise, Pro, or Education), withAt least 4GB of RAM and CPU Virtualization support, though you should double-check that it's turned on in your BIOS settings.You can disable or enable features like Hyper-V that may not be pre-installed when Windows is installed. Always keep in mind that some of the features require internet access to download additional Windows Update components.To enable Hyper-V on your machine, follow the steps below:1. Open the Control Panel.2. Select Programs from the left panel.3. Next, go to Programs and Features, then Turn Windows Features On or Off.4. Examine Hyper-V and the Hypervisor Platform for Windows.5. Select OK.Your system will now begin installing Hyper-V in the background; it may be necessary to reboot a few times until everything is properly configured. Don't hold your breath for a notification or anything! Verify that Hyper-V is installed successfully on your machine by running the following command as Administrator in PowerShell:Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-VOnce the state is shown as Enabled for above command in Power shell, we are good to go.Step 2: Download Docker for Windows and install it.Kubernetes is a container orchestration system built on top of Docker. It is essentially just a tool for communicating with Docker containers and managing everything at an enterprise level. Simply go to install Docker and click to Get Docker Desktop for Windows (stable).Windows users can use Docker Desktop.Docker Desktop for Windows is a version of Docker optimized for Windows 10. It's a native Windows application that makes developing, shipping, and running dockerized apps simple. Docker Desktop for Windows is the fastest and most reliable way to develop Docker apps on Windows, as it uses Windows-native Hyper-V virtualization and networking. Docker Desktop for Windows can run Docker containers on both Linux and Windows.Installation of Docker DesktopLet us take a look on the different steps involved in installing docker desktop.Double-click Docker for Windows Installer to run the installer.Docker starts automatically once the installation is complete. Docker is running and accessible from a terminal, as indicated by the whale in the notification area.Run Try out some Docker commands in a command-line terminal like PowerShell!  Run the Docker version to check the version.Run Docker run hello-world to verify that Docker can pull and run images.Boom!As long as the Docker Desktop for Windows app is running, Docker is accessible from any terminal. The Docker whale in the taskbar has a setting button that can be accessed from the UI.For a detailed step by step installation guide with screenshot, visit the blog - How to Install Docker on Windows, Mac, & Linux: A Step-By-Step GuideWARNING: FOLLOW THE INSTRUCTIONS BELOW! If Docker was successfully installed but you can't find its tray icon, you'll need to restart your computer. Check the official troubleshooting guide here if the issue persists. Step 3: Install Kubernetes on Windows 10Docker includes a graphical user interface (GUI) tool that allows you to change some settings or install and enable Kubernetes.To install Kubernetes, simply follow the on-screen instructions on the screen:1. Right-click the Docker tray icon and select Properties.2. Select "Settings" from the drop-down menu.3. Select "Kubernetes" from the left panel.4. Check Enable Kubernetes and click "Apply"Docker will install additional packages and dependencies during the installation process. It may take between 5 and 10 minutes to install, depending on your Internet speed and PC performance. Wait until the message 'Installation complete!' appears on the screen. The Docker app can be used after Kubernetes has been installed to ensure that everything is working properly. Both icons at the bottom left will turn green if both services (Docker and Kubernetes) are running successfully and without errors.Example.Step 4: Install Kubernetes DashboardThe official web-based UI for managing Kubernetes resources is Kubernetes Dashboard. It isn't set up by default. Kubernetes applications can be easily deployed using the cli tool kubectl, which allows you to interact with your cloud and manage your Pods, Nodes, and Clusters. You can easily create or update Kubernetes resources by passing the apply argument followed by your YAML configuration file.Use the following commands to deploy and enable the Kubernetes Dashboard.1. Get the yaml configuration file from here.2. Use this to deploy it. kubectl apply -f .\recommended.yaml3. Run the following command to see if it's up and running.:kubectl.exe get -f .\recommended.yaml.txtStep 5: Access the dashboardThe dashboard can be accessed with tokens in two ways: the first is by using the default token created during Kubernetes installation, and the second (more secure) method is by creating users, giving them permissions, and then receiving the generated token. We'll go with the first option for the sake of simplicity.1. Run the following command PowerShell (not cmd)((kubectl -n kube-system describe secret default | Select-String "token:") -split " +")[1]2. Copy the generated token3. Runkubectl proxy.4. Open the following link on your browser: http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/5. SelectToken & paste the generated token6. Sign InFinallyYou'll be able to see the dashboard and your cloud resources if everything is set up correctly. You can then do almost all of the "hard" work without having to deal with the CLI every time. You may occasionally get your hands dirty with the command line, but if you don't understand Docker and Kubernetes or don't have the time to manage your own cloud, it's better to stick with some PaaS providers that can be quite expensive.Kubernetes Uninstallation ProcessThe procedures for uninstalling cert-manager on Kubernetes are outlined below. Depending on which method you used to install cert-manager - static manifests or helm - you have two options.Warning: To uninstall cert-maneger, follow the same steps as you did to install it, but in reverse. Whether cert-manager was installed from static manifests or helm, deviating from the following process can result in issues and potentially broken states. To avoid this, make sure you follow the steps outlined below when uninstalling.Step 1: Before continuing, make sure that all user-created cert-manager resources have been deleted. You can check for any existing resources with the following command:$ kubectl get Issuers,ClusterIssuers,Certificates,CertificateRequests,Orders,Challenges --all-namespacesAfter you've deleted all of these resources, you can uninstall cert-manager by following the steps outlined in the installation guide.Step 2: Using regular manifests to uninstall.Uninstalling from a regular manifest installation is as simple as reversing the installation process and using the delete command.kubectl.2. Delete the installation manifests using a link to your currently running version vX.Y. Z like so:$ kubectl delete -f https://github.com/jetstack/cert-manager/releases/download/vX.Y.Z/cert-manager.yamlStep 3: Uninstalling with Helm.1. Uninstalling cert-manager from a Helm installation is as simple as reversing the installation process and using the delete command on both the server and the client. kubectl and helm.$ helm --namespace cert-manager delete cert-manager2. Next, delete the cert-manager namespace:$ kubectl delete namespace cert-manager3. Finally, delete the cert-manger  CustomResourceDefinitions using the link to the version vX.Y.Z you installed:$ kubectl delete -f https://github.com/jetstack/cert-manager/releases/download/vX.Y.Z/cert-manager.crds.yamlThe namespace is in the process of being terminated.The namespace may become stuck in a terminating state if it is marked for deletion without first deleting the cert-manager installation. This is usually because the APIService resource is still present, but the webhook is no longer active and thus no longer reachable.4. To fix this, make sure you ran the above commands correctly, and if you're still having problems, run:$ kubectl delete apiservice v1beta1.ConclusionIn this tutorial, we have explained in detail how to install Kubernetes with Hyper-V. Also, we have tackled what requirements we need, both in terms of the software and hardware. We have explained how to install Hyper-V and Docker on Windows 10.   It is important to note that the fundamental difference between Kubernetes and Docker is that Kubernetes is meant to run across a cluster and Docker is meant to run through nodes.   Kubernetes is also more extensive than Docker Swarm and is meant to coordinate a cluster of nodes at scale in production in an efficient manner. Each software is crucial to having a smooth installation process.   We finally looked at how to install and uninstall Kubernetes.
1686
How to Install Kubernetes on Windows

Kubernetes is a container-based platform for manag... Read More

How To Install Jenkins on Ubuntu

Jenkins is a Java-built open-source Continuous Integration (CI) and CD platform. Basically, Jenkins builds software projects, checks and deploys them. This is one of the most practical programming tools you can master, and today we will show you how Jenkins is installed on Ubuntu 18.04. Use this powerful tool to activate your VPS server!Jenkins is loved by teams of all sizes, for different language projects like Java, Ruby, Dot Net, PHP etc. Jenkins is a platform that is autonomous, and can be used on Windows, Linux or any other operating system.  Prerequisites Hardware Requirements: RAM- 4 GB (Recommended) Storage- more than 50 GB of Hard Disk Space (Recommended)        Software Requirements: Java: Java Development Kit (JDK) or Java Runtime Environment (JRE).  Web Browser: Any browser such as Google Chrome, Mozilla Firefox, Microsoft Edge. Operating System: An Ubuntu 18.04 server installed with a non-root sudo user and firewall. For help in the planning of production capability of a Jenkins installation see Choosing the right hardware for Masters. Why Use Jenkins? You need to consider continuous integration (CI) and continuous delivery (CD) to understand Jenkins: Continuous integration – the practice of continuous production combined with the main industry.  Continuous delivery – the code is constantly delivered to an area after the code is ready for delivery. It could be for production or staging. The commodity is supplied to a consumer base that can provide QA or inspection by customers. Developers update the code regularly in the shared repository (such as GitHub or TFS). Improvements made in the source code are made at the end of the day, making it difficult to identify the errors. So, Jenkins is used here. Once a developer changes the repository, Jenkins will automatically enable the build and immediately warn you in the event of an error (Continuous Integration CI). Installation Procedure: Step 1: Install Java Skip to the next section if you have Java already installed on your system. To check, please run the following command in the terminal: java --version Jenkins needs Java for running, but it doesn't include certain distributions by default, and Java versions of Jenkins are incompatible. Multiple Java implementations are available to you. OpenJDK is currently the most popular one, which we will use in this guide. Being an open-source Java application, Jenkins requires the installation of OpenJDK 8 on your system. The apt repositories can directly access OpenJDK 8. The installation of OpenJDK from standard repositories is recommended. Open and enter the following in the terminal window: $ sudo apt update  $ sudo apt install openjdk-8-jdk The download and installation will be requested. Press the "Y" button and press the Enter button to finish the process. Java 8 will be installed on your system. We are ready to download Jenkins package now as we have our requirements ready! Step 2: Install Jenkins The default Ubuntu packages for Jenkins are always behind the current version of the project itself. You may use the project-maintained packages to install Jenkins to take advantage of the newest patches and features. 1. add the framework repository key: $ wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add  The device returns OK when the key is inserted. 2. Next, link the repository of Debian packages to the sources.list of the server: $ sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' 3. When both are in place, upgrade to apt to use the new repository: $ sudo apt update 4. Install Jenkins: $ sudo apt install jenkins Now we're going to start the Jenkins server, as Jenkins and its dependencies are in place. Step 3: Start Jenkins 1. You can start Jenkins using systemctl: $ sudo systemctl start jenkins 2. As systemctl does not display performance, you can use the status command to check that Jenkins has successfully launched: $ sudo systemctl status jenkinsIf all went well, the start of the performance should demonstrate that the service is active and ready to boot: Output: jenkins.service - LSB: Start Jenkins at boot time     Loaded: loaded (/etc/init.d/jenkins; generated)     Active: active (exited) since Sat 2021-04-17 00:34:17 IST; 26s ago       Docs: man:systemd-sysv-generator(8)    Process: 17609 ExecStart=/etc/init.d/jenkins start (code=exited, status=0/SUCC As Jenkins is running, so adjust the firewall rules to complete our further setup of Jenkins from the web browser. Step 4: Opening the Firewall 1. Jenkins works by default on port 8080, so let's open the port with ufw: $ sudo ufw allow 8080  2. Check ufw’s status: $ sudo ufw status You will see that traffic from anywhere is permitted to port 8080. Output: Status: active  To                         Action      From  --                         ------      ----  8000                       ALLOW       Anywhere                    CUPS                       ALLOW       Anywhere                    27017                      ALLOW       Anywhere                    27017                      ALLOW       192.168.1.10                8080                       ALLOW       Anywhere                    8000 (v6)                  ALLOW       Anywhere (v6)               CUPS (v6)                  ALLOW       Anywhere (v6)               27017 (v6)                 ALLOW       Anywhere (v6)               8080 (v6)                  ALLOW       Anywhere (v6) 3. If the firewall is inactive, the following commands will allow OpenSSH and turn it back on: $ sudo ufw allow OpenSSH  $ sudo ufw enable We can finish the initial configuration with Jenkins installed and our firewall configured. Note: If you decide to continue to use Jenkins, use a Nginx Reverse Proxy at Ubuntu 18.04 to configure Jenkins with SSL when your exploration has been completed to protect your passwords and any sensitive system or product information sent between the machine and the server in plain text. Step 5: Setting Up Jenkins 1. To set up installation, visit Jenkins on its default 8080 port with your server domain name or IP address: http://your_server_ip_or_domain:8080 You should see the Unlock Jenkins screen, which displays the initial password's location:2. You can use the cat command to display the password: $ sudo cat /var/lib/jenkins/secrets/initialAdminPassword 3. Copy the alphanumeric terminal 32-character password and paste into the Administrator Password field, then click Continue. Output: 0aaaf00d9afe48e5b7f2a494d1881326 The following screen shows the ability to install or select certain plugins: 4. We will click on the option to install proposed plugins to start the installation process immediately. 5. When the installation is done, the first administrative user will be prompted. You can save this step and use your initial password to continue as an Admin. However, we will take some time to create the user. The Jenkins default server is NOT encrypted to prevent data from being protected. Use the Nginx Reverse Proxy on Ubuntu 18.04 to configure Jenkins with SSL. This protects the information of users and builds transmitted through the web interface. 6. You will see a configuration instance page, which asks you to confirm your Jenkins instance's URL of choice. Confirm either your server's domain name or the IP address of your server.  7. Click Save and Finish once you have confirmed the relevant information. A confirmation page will show you that "Jenkins is ready!"  Hit Start using Jenkins button and it will take you to the Jenkins dashboard.  Congratulations! You have completed the installation of Jenkins. Step 6: Creation of New Build Jobs in Jenkins: The freestyle job is a highly versatile and user-friendly choice. It's easy to set up and many of its options appear in many other build jobs. For all projects, you can use it. Follow the following steps: You have to login to your Jenkins Dashboard by visiting2) Create New item: Click on the New Item on the left-hand side of the dashboard.3) Fill the project description: You can enter the job details as per your need.4) Source Code Management: Under source code management, enter the repository URL.You can also use a Local repository. 5) Build Environment: Now in the Build section, Click on the “Add build Setup” Select "Execute Windows batch command".Now, add the java commands. In this article, we have used javac HelloWorld.java and java HelloWorld.   6) Save the project: Click Apply and save the project. 7) Build Source Code and check its status: Click on “Build Now” on the left-hand side of the screen to create the source code. 8) Console Output: Select the build number and click on “Console Output” to check the status of the build run. When it shows success, it means that we have successfully run the HelloWorld program from the cGitHub Repository. In case of failure, you can check the job logs by clicking on failure icon and debug the root cause.Uninstall Jenkins Follow the instructions to uninstall Jenkins: $ sudo apt-get remove jenkins Uninstall Jenkins: $ sudo apt-get remove --auto-remove jenkins Purging your data: $ sudo apt-get purge jenkins or you can use: $ sudo apt-get purge --auto-remove jenkins Conclusion: Installing Jenkins on Ubuntu is really that easy. Jenkins has a low learning curve and so you can start to work with it as quickly as possible. In the above article we have learned how to install Jenkins in an Ubuntu machine where all the steps are explained clearly. In case you want to learn more about the core concepts of Jenkins Jobs, Pipelines, Distributed System, Plugins, and how to use Jenkins in depth you can enroll for our course Jenkins Certification Course. 
5377
How To Install Jenkins on Ubuntu

Jenkins is a Java-built open-source Continuous In... Read More

How to install Jenkins on a Mac

Jenkins is a Java-built open-source Continuous Integration (CI) and Continuous Deployment (CD) platform. Basically, Jenkins builds software projects, checks and deploys them. This is one of the most practical programming tools you can master, and today we will show you how to install Jenkins on your macOS, and how to use this powerful tool to activate your VPS server. VPS copies a dedicated server environment in a shared server.Jenkins is loved by teams of all sizes, for different language projects like Java, Ruby, Dot Net, PHP etc. Jenkins is a platform that is autonomous, and can be used on Windows, Mac or any other operating system.In this article, we will learn how to install Jenkins on Mac OS.Why Use Jenkins?To understand Jenkins, you will need to consider continuous integration (CI) and continuous delivery (CD):Continuous integration – the practice of continually merging the working copies of developers with the main repository.Continuous delivery – constantly delivering the code to an area once it is ready for delivery. It could be for production or staging. The commodity is supplied to a consumer base that can provide QA or inspection by customers.Developers update the code regularly in the shared repository (such as GitHub or TFS). Improvements made in the source code are made at the end of the day together, making it difficult to identify the errors. To avoid this, Jenkins is used here.Once a developer changes the repository, Jenkins will automatically enable the build and immediately warn you in the event of an error (Continuous Integration CI).We can also automate the post-construction tests with Jenkins (unit test, success test, acceptance test). Jenkins will conduct these tests and produce a report whenever progress is achieved (Continuous Delivery CD).Why is Jenkins so popular?Easy to use – simple, intuitive, and visually appealing user interfaceExtensibility – Jenkins is highly versatile and easy to adapt to your requirements. With various functionalities, there are thousands of open-source Plugins.Jenkins supports various version control systems, code indicators, notifiers, user interface adaptations, and more!How does Jenkins work?As a WAR archive and as an Installer package, Jenkins is distributed as a Homebrew package, an image in the Docker and as source code for the main operating systems. Most of the source code is in Java and contains several Groovy, Ruby, and Antlr files.You can run the Jenkins WAR on a Java application server such as Tomcat on your own or as a servlet. In any event, the web user interface is created and calls to its REST API are accepted.When you first run Jenkins, you create a long random password for the administrative user, which you may paste in your first webpage to unlock the installation.PrerequisitesWe will be going to run multiple jobs on Jenkins, so we need some proper configurations.Hardware Requirements:Minimum requirement:RAM– 256 MB Storage- 1 GB of Hard Disk Space For small teams(recommended):RAM- 4 GB Storage- more than 50 GB of Hard Disk Space Software Requirements:The following list shows the minimum software requirements:Java: Java Development Kit (JDK) or Java Runtime Environment (JRE). Web Browser: Any browser such as Google Chrome, Mozilla Firefox, Microsoft Edge, SafariOperating System: macOSInstallation ProcedureWe will discuss two ways to install Jenkins on your macOS:Using Homebrew packageUsing DockerInstall Jenkins using HomebrewStep1: Install HomebrewYou can install Homebrew with the following command:$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"You can check the Homebrew installation using:$ brew  -–versionStep 2: Install JavaSkip to the next section if you have Java already installed on your system.Being an open-source Java application, Jenkins requires the installation of OpenJDK 8 on your system. The apt repositories can directly access OpenJDK 8.The installation of OpenJDK from standard repositories is recommended. Open and enter the following in the terminal window:$ brew install javaStep 3: Install JenkinsAfter Homebrew has been installed, it is required to execute the command that downloads and installs the latest version of Jenkins' Long-Term Support (LTS).$ brew install jenkins-ltsStep 4: Start the Server:You can run the following command to start the Jenkins server finally.$ brew services start jenkins-ltsThe above command will start the Jenkins server soon. The port will be 8080. You can check it by visiting Jenkins on its default 8080 port with your server domain name or IP address: http://localhost:8080/Step 5: Unlock Jenkins:The Unlock Jenkins screen displays the initial password's location:Use the cat command to display the password:$ cat In this case,$ cat /Users/ijs/.jenkins/secrets/initialAdminPasswordCopy the 32-character password and paste it into the Administrator Password field, then click Continue.We will discuss the steps to complete the setup process at the end in the section How to configure Jenkins?Install Jenkins using DockerStep 1: Install DockerIt's pretty easy to install Docker on Mac. It has a file with the .dmg graphical installer. Docker Engine, CLI client, Compose, Kitematic and Docker Machine, provided for installation.1. Download Docker from install docker desktop. You will get a .dmg file  2. Click on the .dmg file and it will ask you to move the Docker app to the Application Folder.3. Once the Docker icon has been dragged to the Applications folder, double-click the Docker icon and you will be asked if you want to open the App. Click on yes, to open Docker installer.4. Click on the Next button and after this, it will ask you to install tools and will ask your permissions to proceed:5. Now, you will see the Docker icon on the toolbar, which means that Docker is starting on your system.Step 2: Run the Jenkins Docker imageAfter installation and set-up of Docker, you can run the following command to install Jenkins:$ docker run -p 8080:8080 -p 50000:50000 -v ~/jenkins_home:/var/jenkins_home jenkins/jenkins:ltsThis command will download Jenkins' current version of Long-Term Support (LTS) and spin a new Docker container. This might take time for installation.Step 3: Get the installation password:You will be asked for the administrator password and you will also see the location where you can find it when you visit Jenkins on its default 8080 port with your server domain name or IP address: http://localhost:8080/We can refer to the steps above for the location of the password.How to Configure Jenkins?After the installation of Jenkins, we have to configure Jenkins to make it ready.Step 1: Install PluginsJenkins has many plugins that can integrate with open-source project. The next move requires the installation of suitable plugins as per your requirement.  You can easily add or delete plugins later.  As of now we can simply install the suggested plugins.Jenkins is currently the leading open-source automation server for all types of development work with around 1600 plugins. These 1,600 plug-ins cover five fields: platforms, UI management, management of source code, and build management most commonly.Now, you have to create an admin user account. Make sure you note down the username and password as they would be needed later.Step 3: Jenkins URL ConfigurationThe last step is to configure the URL for the server.Click Save and Finish once you have confirmed the relevant information. A confirmation page will show you that "Jenkins is ready!"Finally, click on Start using Jenkins and you will see a dashboard.How to start and stop Jenkins?When you install Jenkins using HomebrewRun the following command to stop the Jenkins server:$ brew services stop jenkins-ltsRun the following command to restart the server again:$ brew services restart jenkins-ltsWhen you install Jenkins using DockerTo stop Jenkins, go to the terminal window where the Docker container was started and enter command + C. This will stop the Docker container from running and also stop Jenkins.If you need to restart Jenkins, execute the same command that you used while installing Jenkins.How to Uninstall Jenkins on Mac?Jenkins is an automation platform focused on servers and is usually concerned with security. Jenkins also requires add-ons for projects written in languages other than Java. These additional components normally bloat Jenkins. Follow the steps to see how to uninstall Jenkins on Mac when you're having trouble or notice that Jenkins doesn't work on Mac.If you have installed Jenkins using Homebrew then you should run the following commands to uninstall Jenkins:$ brew uninstall jenkins --force $ brew cleanupLearn more about the core concepts of Jenkins Jobs, Pipelines, Distributed System, Plugins with Jenkins Certification Course.ConclusionInstalling Jenkins on mac is very easy. Jenkins has a low learning curve and you can start to work with it as quickly as possible.There are some popular alternatives to Jenkins. One of these tools is Zuul, which does not allow broken code to integrate into your main branch, with various gate configurations like inter-project testing, cross-project dependencies and testing in parallel.In this tutorial, you have learnt to install Jenkins using the packages provided by the project. You have started the server, opened the firewall, and created an administrative user. You can now begin to explore Jenkins!
3443
How to install Jenkins on a Mac

Jenkins is a Java-built open-source Continuous Int... Read More