Technical Details: How to Install and Use the New Zowe zDevOps Jenkins Plugin
Meet the Zowe zDevOps Jenkins plugin — our new Mainframe DevOps plugin that solves many of the problems with existing tools. With it:
- You will build CI/CD pipelines in Mainframe faster, simple, and easier
- Experienced Mainframe developers can automate many of their routine processes
- New Mainframe developers can use modern tools like Jenkins on Mainframe
- Everyone can build code, run tests, and deploy on Mainframe — automatically, in minutes
- You will save a minimum of 2 hours per day through automation
To deliver these benefits, our new Zowe tool offers a suite of powerful features from a single solution, including:
- A secure and modern connection between Jenkins and the Mainframe using z/OSMF REST APIs
- Functionality based on Zowe Kotlin SDK methods, including JCL jobs submissions, downloads, allocations, writing to the dataset, and log collection upon completion
- Multiple connections to various Mainframes, including a z/OS Connections List where you can save all systems and login credentials, and secure them under the Jenkins Credentials manager
- Fast execution and functional extensibility through our agentless solution
- Integration with the larger Zowe ecosystem
All delivered through a free, native Jenkins solution that is easy to install, configure, and use.
To learn more about the benefits our new plugin delivers — and our plans for building more plugins in 2023 — click here.
To follow a detailed, step-by-step technical explanation of how to install and use our new plugin, keep reading.
How to Install and Use Zowe zDevOps Jenkins Plugin: Step-by-Step
Before you can implement CI/CD into your DevOps Mainframe process, you first need to properly install or prepare Jenkins Server and install and configure the Zowe zDevOps Jenkins plugin. To do so, you need to follow nine simple steps:
- Planning
- Installing and Configuring Jenkins Server
- Installing the Zowe zDevOps Jenkins Plugin
- Configuring the Zowe zDevOps Jenkins Plugin
- Write Code (in COBOL, PL/I, or HLASM)
- Prepare Your Code for Git with Commit and Push
- Prepare CI/CD Pipeline (via Jenkinsfile or Jenkins Freestyle jobs)
- Prepare an Automated Pipeline for Further Launch
- Sit Back, Relax, Watch the Automation, and Enjoy!
You will find the latest and most up-to-date documentation on installation, configuration and usage examples in the github repository, or on the https://github.com/zowe/zowe-zdevops-jenkins-plugin plugin page.
For now, let’s look at each step in greater depth.
Step 1 — Planning
First, you must create a plan for how you will use your new plugin. You must define:
- Your goals and objectives for the plugin (and your new CI/CD process)
- What problems and bottlenecks might stop you from achieving your goals
- What the architecture looks like for your current infrastructure and processes — where, what, and how it works — and how this will change with your new plugin
- What you need to add to your infrastructure and processes to achieve your goals and objectives
- Who your stakeholders are, what their current processes look like, what their ideal processes look like, and what “quick wins” they want to achieve
- How you might seek outside help to ensure your project is a success (e.g. at IBA Group we can provide you with a helpful framework to rapidly launch).
By performing this detailed planning, you will be able to avoid problems during your transformation and increase the chances of undertaking a successful project.
Step 2 — Installing and configuring Jenkins
After you complete your planning, you’ll be ready to get started.
To begin, you need to have a Jenkins server installed. Jenkins is an open-source automation server that provides hundreds of plugins to help build, deploy, and automate many different projects. Jenkins works very well with Mainframe, and will act as the backbone to create your fully automated CI/CD pipeline in z/OS.
If you haven’t installed a Jenkins server yet, you can do so easily. Jenkins is a free tool available on a range of platforms including Docker, Linux, and Windows. Just click here, select your platform, and get started.
If you need additional help installing and configuring Jenkins, you can follow this guide, or you can reach out to IBA and we’ll help walk you through the key steps.
Step 3 — Installing the Zowe zDevOps Jenkins Plugin
Once you’ve installed and configured a Jenkins server, it’s easy to find and install your zDevOps Jenkins Plugin. Here’s what you do.
- Log into Jenkins
- Follow this file path, “Manage Jenkins” -> “Manage Plugins” -> “Available (tab)”
- This will open a search bar, to find available plugins
- In the search bar, enter “zdevops plugin”
- Find it in the list, and select it
- Click on “Download now and install after restart”
- Click on “Restart Jenkins when installation is complete and no jobs are running”
- Now — if it’s convenient — restart Jenkins
- Once you do, the plugin will be installed and ready to go!
Step 4 — Configuring the Zowe zDevOps Jenkins Plugin
Next, you will need to configure your new plugin before you use it. Here’s how:
- Follow this file path, “Manage Jenkins” -> “Configure System”
- Scroll down and find the panel named “z/OS Connection List”
You will use this setting to add all of the necessary z/OS systems, and to configure access to them. By doing so, you will save every z/OS system address, username, and password in one place — that’s protected by Jenkins Credentials Manager — and make it faster, easier, and more convenient to navigate your various systems and accounts.
Step 5 — Write Code (in COBOL, PL/I, or HLASM)
Your plugin is now ready for use. You’ve done everything necessary to prepare your environment, and set the stage for automation. All you have to do is write the program you need for z/OS (or use already existent code) — using Cobol, PL/1, or even HLASM — in a convenient IntelliJ IDEA IDE, and the Zowe Explorer plugin will guide you through development and testing.
Step 6 — Prepare Your Code for Git with Commit and Push
After you have written, debugged, and tested your code — and ensured it’s ready to be deployed in production — all you have to do is commit the code changes, and push them to your Git repository. (If you are using the IntelliJ IDEA IDE connected to Git, this is a no brainer. More on this later in this article.)
Once you’ve pushed your code, the developer’s work is done. All they have to do is monitor the work as it automatically moves through the Jenkins pipeline.
Step 7 — Prepare CI/CD Pipeline (via Jenkinsfile or Jenkins Freestyle jobs)
To do so, you can use the Zowe zDevOps Jenkins plugin in two ways. You can use freestyle jobs, or you can use calling methods through the pipeline code.
When you first use the plugin — and are getting used to how it functions — it’s best to use Jenkins freestyle jobs. This approach offers a user-friendly interface with input fields, provides examples and tips, and is ideal for beginners and simple automations.
An example of a Jenkins freestyle job is z/OS Submit Job, or any methods available in the “Build Step” dropdown list.
When you are ready to produce more advanced automations, we recommend using Jenkins pipelines or multi-branch pipelines. This approach is ideal for complex and advanced automations, and implements the main DevOps principle — infrastructure as code, where the pipeline is written in declarative syntax).
This method allows you to store Jenkins files with pipeline code in version control systems (like GitHub and GitLab). There, your pipeline code can’t be lost, and you will gain all of the general benefits of these version control systems.
Step 8 — Prepare an Automated Pipeline for Further Launch
Now, you’re ready to build your automated pipeline. To do so:
- Use declarative syntax of the Zowe zDevOps Jenkins plugin methods for your Mainframe automation
- Add all of the required stages, steps, and other methods of pipeline execution that you need
- Connect your pipeline to the git repository using a git-webhook; this will automatically start the pipeline on a specific action in the git repository (e.g. push, pull request, comment, etc.)
The Zowe zDevOps Jenkins plugin makes all of this easy. However, it’s possible you might run into an issue, or a complication, or something that just isn’t working for you. If that happens, then contact us at IBA and we’ll be happy to get you through the issue.
Once you complete all of the above, you will have prepared everything on the Jenkins side. The rest of the work will be carried out in the IntelliJ IDEA.
Below is an example of a simple Jenkins declarative syntax pipeline (Jenkinsfile). This will download the source code of the program from the git, upload it to the ZOS, run it on the system, wait for its execution, and get the return code and the program execution log.
Pipeline code:
You can find more hints and tips at the public git repository where IBA Group Mainframe developers share their scripts to help other Mainframe developers in their daily work:
https://github.com/IBA-Mainframe-dev/Global-Repository-for-Mainframe-Developers
Step 9 — Sit Back, Relax, Watch the Automation, and Enjoy It!
The git-webhook will automatically launch the Mainframe code deployment Jenkins pipeline. All the developer needs to do is monitor the automated deployment process directly in IntelliJ IDEA using a Jenkins IntelliJ plugin. This will display all of the necessary information about the running pipeline and its real-time execution log, and will let the developer know on the progress of the pipeline progression and any issues that might arise.
How to Use Plugin to Build a Full Mainframe DevOps Ecosystem
Our new Zowe zDevOps Jenkins plugin is powerful on its own, but it works even better as part of a new ecosystem of plugins. Each of these plugins extends the capabilities of our new Zowe zDevOps Jenkins plugin, and tackles a crucial step in building a modern, automated approach to Mainframe.
If you are interested in our Zowe zDevOps Jenkins plugin, then we strongly recommend you check out two other plugins — IBA Group developed IntelliJ IDEA Zowe Explorer plugin and IntelliJ IDEA Jenkins Control plugin.
Let’s look at both in a little more depth.
The IntelliJ IDEA Zowe Explorer plugin provides a modern interface for Mainframes. It replaces the Mainframe’s traditional black-and-green screen with a modern, visual, drag-and-drop interface that offers a single toolbar and structured trees. This plugin:
- Makes it simple and easy to interact with the Mainframe
- Reduces complexity and brings a modern interface to Mainframe
- Improves Mainframe’s user experience and makes it more accessible
- Modernizes Mainframe, and connects it with other modern development tools
Further, with this plugin you will be able to:
- Use it inside of the IntelliJ platform and the Jenkins Control plugin
- Build an extensible, adaptable, open-source solution for Mainframe DevOps
- Easily access z/OS datasets, USS files, and JES entries
- Enjoy continuous, active maintenance and support
- Tap into the broader Zowe ecosystem
You can learn more about this plugin by reading this, or access it by clicking here.
The Jenkins Control plugin is based on the existing Jenkins Control plugin, but extends its functionality and focuses it on Mainframe DevOp’s unique needs.
This plugin connects to the Jenkins server, displays all available pipelines, including their real-time statuses and execution logs. It also lets you run pipelines and jobs when you’d like.
Working with this plugin is easy. Just install it and connect it to your Jenkins server, and you can see, run, and monitor your pipelines within your console in real-time.
Ultimately, this pipeline simplifies the developer’s life. It lets them write their code and deploy it to a test environment or production without going to Jenkins. Instead, they can see and manage everything in the IntelliJ IDE.
Take the Next Step
At IBA Group, we build these Mainframe DevOps tools for you and your teams. We are very open to any and all feedback you might have, and we’re here to provide as much support as you need to get up and running with our tools.
To join us on this journey, take the right next step:
- Access our new plugin here and more documentation here.
- Read an explanation of our new plugin’s benefits and our 2023 plans.
- Leave a comment below to share any ideas and suggestions that might build a more modern, accessible, and enjoyable Mainframe DevOps experience.
Or, if you would either like to be part of one of our projects, or if you need assistance bringing any of our plugins or processes to life in your environment — reach out today for a free consultation.
Learn more:
If you enjoyed this blog check out more Zowe blogs here. Or, ask a question and join the conversation on the Open Mainframe Project Slack Channel #zowe-explorer-intellij, #zowe-explorer, #zowe-cli, #zowe-dev, #zowe-user, or #zowe-onboarding. If this is your first time using the Open Mainframe Slack Channel register here.