Book Image

DevOps for Web Development

By : Mitesh Soni
Book Image

DevOps for Web Development

By: Mitesh Soni

Overview of this book

The DevOps culture is growing at a massive rate, as many organizations are adopting it. However, implementing it for web applications is one of the biggest challenges experienced by many developers and admins, which this book will help you overcome using various tools, such as Chef, Docker, and Jenkins. On the basis of the functionality of these tools, the book is divided into three parts. The first part shows you how to use Jenkins 2.0 for Continuous Integration of a sample JEE application. The second part explains the Chef configuration management tool, and provides an overview of Docker containers, resource provisioning in cloud environments using Chef, and Configuration Management in a cloud environment. The third part explores Continuous Delivery and Continuous Deployment in AWS, Microsoft Azure, and Docker, all using Jenkins 2.0. This book combines the skills of both web application deployment and system configuration as each chapter contains one or more practical hands-on projects. You will be exposed to real-world project scenarios that are progressively presented from easy to complex solutions. We will teach you concepts such as hosting web applications, configuring a runtime environment, monitoring and hosting on various cloud platforms, and managing them. This book will show you how to essentially host and manage web applications along with Continuous Integration, Cloud Computing, Configuration Management, Continuous Monitoring, Continuous Delivery, and Deployment.
Table of Contents (16 chapters)
DevOps for Web Development
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface

Installing Jenkins


Jenkins provides us with multiple ways to install it for all types of users. We can install it on at least the following operating systems:

  • Ubuntu/Debian

  • Windows

  • Mac OS X

  • OpenBSD

  • FreeBSD

  • openSUSE

  • Gentoo

  • CentOS/Fedora/Red Hat

One of the easiest options I recommend is to use a WAR file. A WAR file can be used with or without a container or web application server. Having Java is a must before we try to use a WAR file for Jenkins, which can be done as follows:

  1. Download the jenkins.war file from https://jenkins.io/ .

  2. Open command prompt in Windows or a terminal in Linux, go to the directory where the jenkins.war file is stored, and execute the following command:

    java - jar jenkins.war
    

  3. Once Jenkins is fully up and running, as shown in the following screenshot, explore it in the web browser by visiting http://localhost:8080.:

  4. By default, Jenkins works on port 8080. Execute the following command from the command-line:

    java -jar jenkins.war --httpPort=9999
    

  5. For HTTPS, use the following...