37,19 €
Develop a base for DevOps culture by implementing Continuous Integration and Continuous Delivery including automated builds, unit test execution, packaging, and static code analysis with Jenkins 2
If you are a Jenkins novice or beginner with a basic or no understanding of Continuous Integration, then this is the book for you. Beginners in Jenkins will get quick hands-on experience and gain the confidence to explore the use of Jenkins further.
In agile development practices, developers need to integrate their work frequently to fix bugs or to create a new feature or functionality. Jenkins is used specifically for Continuous Integration, helping to enforce the principles of agile development. This book focuses on the latest and stable release of Jenkins (2.5 and later), featuring the latest features, such as Pipeline as Code, the new setup experience, and the improved UI. With the all-new Pipeline as Code feature, you will be able to build simple or advanced pipelines easily and rapidly, hence improving your teams' productivity.
This book begins by tackling the installation of the necessary software dependencies and libraries you'll need to perform Continuous Integration for a Java application. From there, you'll integrate code repositories, applications, and build tools for the implementation of Continuous Integration.
Finally, you will also learn how to automate your deployment on cloud platforms such as AWS and Microsoft Azure, along with a few advanced testing techniques.
This book provides simple, step-by-step instructions, taking you from start to finish in accomplishing real-world Continuous Integration and Continuous Delivery tasks.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 100
Veröffentlichungsjahr: 2017
BIRMINGHAM - MUMBAI
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2015
Second edition: June 2017
Production reference: 1280617
ISBN 978-1-78847-106-0
www.packtpub.com
Author
Mitesh Soni
Copy Editor
Saafis Editing
Reviewers
Stefan Lapers
Devin Young
Javier Delgado
Project Coordinator
Shweta H Birwatkar
Commissioning Editor
Vijin Boricha
Proofreader
Safis Editing
Acquisition Editor
Divya Poojari
Indexer
Mariammal Chettiyar
ContentDevelopmentEditor
Deepti Thore
Graphics
Tania Dutta
Technical Editor
Sneha Hanchate
Production Coordinator
Nilesh Mohite
Mitesh Soni is an avid learner with 10 years' experience in the IT industry. He is an SCJP, SCWCD, VCP, IBM Urbancode, and IBM Bluemix certified professional. He loves DevOps and cloud computing and he also has an interest in programming in Java. He finds design patterns fascinating. He believes "a picture is worth a thousand words."
He occasionally contributes to etutorialsworld.com. He loves to play with kids, fiddle with his camera, and take photographs at Indroda Park. He is addicted to taking pictures without knowing many technical details. He lives in the capital of Mahatma Gandhi's home state.
Mitesh has authored the following books with Packt:
DevOps Bootcamp
Implementing DevOps with Microsoft Azure
DevOps for Web Development
Jenkins Essentials
Learning Chef
"I've missed more than 9,000 shots in my career. I've lost almost 300 games. 26 times, I've been trusted to take the game-winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed."-Michael Jordan.
I've always thanked a lot of people who have been instrumental in contributing to my life's journey up to now, but I guess it's time to really acknowledge that One person who has been with me as long as I can remember.
With this book, I would like to thank the one and only invisible yet omnipresent Almighty. We share a mutual love and hate relationship and I really value it. You were always there equally during my good and bad times and without you, I wouldn't have made it this far!
Last but not the least, I want to thank all who taught me how to love myself, first!
Stefan Lapers started his career almost 20 years ago as an IT support engineer and quickly grew into Linux/Unix system engineering and software development.
Over the years he accumulated experience deploying and maintaining hosted application solutions while working for great customers such as MTV, TMF, and many more. In more recent years, he was involved in multiple development projects and their delivery as a service on the internet.
In his spare time, he enjoys his family and building/flying RC helicopters.
Devin Young graduated with a BS in sports management from Ohio State University and somehow wound up working as a software engineer shortly afterwards. He specializes in DevOps and site reliability and is particularly fond of automation and real-time applications.
He grew up as a competitive jump roper, leading him to create the mobile app RopeRacer, which was launched on iOS in March 2015. The app has become a success in the world of jump rope and is now used in tournaments around the United States.
Devin is currently an MBA candidate at the TCU Neeley School of Business.
Javier Delgado is an automation fanatic, continuous tasks (inspection, testing, delivery), evangelist, and perpetual new-knowledge addict.
He works as DevOps and Jenkins internal information well at Stratio Big Data Inc.
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1788471067.
If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Exploring Jenkins
Introduction of Jenkins 2
Features
Installation of Jenkins 2
Jumpstart tour of the Jenkins dashboard
Configuration settings in Jenkins
Overview of the CI/CD pipeline
Summary
Installation and Configuration of Code Repository and Build Tools
Overview of Jenkins
Installing Java and configuring the environment variables
Installing Java on Windows 10
Installing Java on CentOS
Configuring environment variables
Installing and configuring Ant
Configuring Ant in Windows
Configuring Ant in CentOS
Installing Maven
Configuring Ant, Maven, and JDK in Jenkins
First job in Jenkins
Installing and configuring the Git repository on CentOS
Creating a new build job in Jenkins with Git and GitHub
Eclipse and Jenkins integration
Summary
Managing Code Quality and Notifications
Jenkins 2.x integration with Sonar 6.3
Quality Gate plugin
Email notifications on build status
Summary
Continuous Integration with Jenkins
Dashboard View plugin
Creating and configuring a build job for a Java application with Ant
Creating and configuring a build job for a Java application with Maven
Summary
Continuous Delivery - Implementing Automated Deployment
An overview of Continuous Delivery and Continuous Deployment
Installing Tomcat
Deploying a war file from Jenkins to Tomcat
Deploying a WAR file from Jenkins to AWS Elastic Beanstalk
Deploying a war file from Jenkins to Microsoft Azure App Services
Summary
Continuous Testing - Functional and Load Testing with Jenkins
Functional testing with Selenium
Load testing with Apache JMeter
Summary
Build Pipeline and Pipeline as a Code
Build Pipeline
Upstream and downstream jobs
Overview of pipeline as a code
Pipeline as a code - implementation
Promoted builds
Summary
Managing and Monitoring Jenkins
Managing Jenkins master and slave nodes
Monitoring Jenkins with JavaMelody
Managing job-specific configurations - backup and restore
Managing disk usage
Build job-specific monitoring with the Build Monitor plugin
Audit Trail plugin-overview and usage
Workspace Cleanup plugin
Conditional Build Step plugin
EnvInject plugin
Summary
Security in Jenkins
User management
Role-based security
Project-based security
Summary
Jenkins has been used specifically for Continuous Integration over the years. Continuous Integration systems are a vital part of Agile teams because they help enforce the principles of Agile development.
Jenkins, a continuous build tool, enables Agile teams to focus on work and innovations by automating the build, artifact management, and deployment processes, rather than worrying about manual processes. However, the release of Jenkins 2.0 and later versions are focused on Continuous Delivery.
Jenkins is an open source automation server. Continuous Integration is a significant part of DevOps culture and hence many open source and commercial tools for Continuous Delivery utilizes Jenkins for a complete product.
DevOps is a buzzword in 2015 and for coming years as per Market trends by various research firms. Continuous Integration is a significant part of DevOps culture and hence the trend to use Jenkins will increase in future. If Continuous Integration is the base, then Continuous Delivery is the topping. Jenkins supports and focus more on end-to-end automation of application life cycle management system.
Chapter 1, Exploring Jenkins, describes in detail the basics of Continuous Integration and an overview of Jenkins. It describes the recent growth of importance of Continuous Integration as a practice to cultivate DevOps culture. This chapter also describes the installation and configuration of Jenkins. We are going to take a whistle-stop tour through some of the key features of Jenkins, and plugin installation as well.
Chapter 2, Installation and Configuration of Code Repositories and Build Tools, describes in detail how to prepare the runtime environment for application life cycle management and configure it with Jenkins - the open source continuous integration tool. It will cover how to integrate Eclipse and Jenkins, so builds can be run from Eclipse as well.
Chapter 3, Managing Code Quality and Notifications, will cover how to integrate static code analysis behavior into Jenkins. Code quality is an extremely vital feature that impacts on applications' effectiveness and by integrating it with Sonar, users get insights into problematic portions of code. This chapter also covers email notifications on build status.
Chapter 4, Continuous Integration with Jenkins, describes in detail how to create and configure build jobs in Java, how to run build jobs, unit test cases using Ant, and Maven build tools. It covers all aspects of running a build to create a distribution file or war file for deployment.
Chapter 5, Continuous Delivery - Implementing Automated Deployment, provides insights into how functional testing and load testing can be performed and how they can be integrated with Jenkins to adopt the Continuous Testing practices of DevOps culture.
Chapter 6,
