Practical DevOps |
Page 2 of 2
Author: Joakim Verona
Chapter 5 Building the Code Now we look at building the code into binary artifacts. Building may consist of compiling source code, code checking, unit testing, and artifact creation. The chapter acknowledges there are many build systems, but they tend to be language specific, which can lead to duplication of effort. This chapter focuses on using the popular build server called Jenkins – details are provided on its installing, running, and usage. After looking at concerns with build dependencies, the Red Hat Package Manager (RPM) example system is examined. Having a build server facilitates Continuous Integration, submitted code can be built and its quality examined. DevOps aims to make processes faster and easier, fast builds encourage developers to commit changes regularly, highlighting integration errors faster. The build artifacts are stored in a repository. The importance of having sufficient machine resources is noted. Jenkins is used to trigger builds, and delegates the build to a specific builder (e.g. Maven). Timers or polling can be used as triggers, and build jobs can be chained together, this is shown with a helpful diagram. Other build servers are briefly examined. Jenkins can gather and display quality metrics, this together with additional build data is amenable to visualization, and this is briefly discussed. The chapter ends with a brief discussion about taking build errors seriously, and the importance of build process robustness. This chapter provides a useful overview of the build process, and its many features. I felt the chapter lost its way in parts, lacking appropriate linkages between sections. Chapter 6 Testing the Code Including testing within the Continuous Delivery pipeline helps give confidence the code is high quality. The chapter opens with a look at manual testing, before looking at the advantages and disadvantages of test automation. Next, the importance of unit testing is examined, including its support by build systems. JUnit is a framework for defining and running unit tests in Java, its history and terminology are discussed. The importance of mocking (fake stubs) to simulate subsystems (e.g. databases), and the use of test coverage, is outlined. The chapter continues with a brief section on automated integration testing, performance testing, acceptance (end-user) testing, and GUI testing. Useful common tools are given in each case. This is followed by a small section on Test-Driven Development (TDD). The chapter ends with a complete test automation example, showing how to run the automated test, and find a bug. There’s a brief walkthrough of the test implementation. This chapter highlights the importance of testing, and how its automation as part of the Continuous Delivery pipeline, provides easier and faster deployment of changes. Chapter 7 Deploying the Code Having looked at building the code, here we deploy the resultant artifacts. The chapter opens by examining why there are so many deployment systems, before looking at options to deliver packages to a system. The use of virtualization together with its advantages is briefly discussed. The chapter moves on to looking at common deployment tools, including: Puppet, Ansible, PalletOps, Chef, SaltStack, Vigrant, and Docker. Most of these have examples showing command line level of usage, and some tool comparisons are made. The chapter ends with a look at some cloud options. Amazon Web Services (AWS), and Microsoft’s Azure are examined. It’s also possible to use your own internal cloud solution (e.g. OpenStack). This chapter provides a helpful overview of the many deployment systems that exist. The deployment tool usage chart should help you with tool selection. There’s a useful statement about using manual deployment for single server that is rarely updated – both practical and sensible. Chapter 8 Monitoring the Code Monitoring ensures code is running correctly, and provides an early indication of problems. The costs of downtime and its consequences (e.g. loss of credibility) are noted. Various popular monitoring systems are examined, namely: Nagios, Munin, Ganglia, and Graphite. The chapter ends with a look at log handling, often invaluable in tracking errors. There’s a brief look at client-side logging libraries (e.g. Log4j), and the ELK (Elasticsearch, Logstash, and Kibana) stack. This chapter provides a helpful reminder of the importance of monitoring, together with an overview of the more popular monitoring tools. Chapter 9 Issue Tracking This chapter is concerned with tools that help with workflow, especially important for the Agile process. The chapter opens with a discussion about what issue trackers are used for (e.g. bugs, work items), before describing the Kanban method (a board with post-it notes showing current state of work items). Next, some example workflows and issues are given, highlighting typical content. Next, some of the problems that issue trackers can have are discussed (e.g. using multiple types). The chapter ends with a useful overview of several trackers, namely: Bugzilla, Trac, Redmine, GitLab issue tracker, and JIRA. In each case, details of how to download, install and use the tool is given. This chapter provides a useful overview of the importance of issue trackers. The Kanban method should have been described much earlier, since it was first mentioned in chapters 1 and 2. Chapter 10 The Internet of Things and DevOps The Internet of Things (IoT) is an emerging area of technology, this chapter looks at how DevOps can help in its implementation. The chapter opens with a brief overview of IoT, being devices that contain sensors, such devices include: smartwatches, home automation systems, biometric sensors, key-finders etc. It’s expected there will be 21 billion IoT devices by the year 2020. Only towards the end of the chapter does DevOps comes into the picture, describing how it can be used to ‘...to make faster, more correct releases by bringing people working with different disciplines closer together.’ - A great definition! The chapter ends with a useful practical showing an IoT device that connects to a Jenkins server and shows a build status display. While this chapter is interesting, I’m not sure it’s necessary from a DevOps perspective. Conclusion This book aims to provide an introduction to DevOps from a practical perspective, and succeeds. The book is generally easy to read, well written, with useful diagrams, and helpful links to other chapters. The place of DevOps in the various stages of the Continuous Delivery pipeline is described well, and there are plenty of practical example problems and suggested solutions. It’s apparent that some background knowledge of Agile, Scrum, Kanban, Puppet etc is needed to get the most out of the book. It would have been useful to have defined some of these basic terms in Chapter 1, to ensure all readers are at the same assumed level of understanding. Kanban is described in Chapter 9 after being used in the first two chapters. Some chapters, for example Chapter 3, have areas that aren’t cohesive, with subsections appearing without sufficient context or linkage. If you come from a Windows development/admin background you can expect a few more problems reading the text than if you’re from a Unix/Java background. Overall, this is a useful introduction and overview to DevOps. To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.
|
||||||
Last Updated ( Saturday, 30 April 2016 ) |