ebook img

DevOps for the Desperate: A Hands-On Survival Guide PDF

186 Pages·2022·3.463 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview DevOps for the Desperate: A Hands-On Survival Guide

DEVOPS BASICS FOR D O E V P S F O R ENGINEERS AND ADMINS IN CRISIS MODE T H E D E S P E R AT E D E V If you’re a software engineer, developer, or sys admin • Automate and test a host-based fi rewall O A H A N D S - O N S U R V I V A L G U I D E who needs to get up to speed with DevOps quickly, • Use Docker to containerize applications and P this book covers the basics you need to thrive in a Kubernetes for orchestration modern application stack. S • Build a monitoring stack and troubleshoot problems This book’s fast-paced, hands-on examples will provide and performance issues F B R A D L E Y S M I T H the foundation you need to start performing common O DevOps for the Desperate is a practical, no-nonsense DevOps tasks. You’ll explore how to implement guide to get you up and running quickly in today’s R Infrastructure as Code (IaC) and config uration full-stack infrastructure. management (CM)—essential practices for designing T secure and stable systems. You’ll take a tour of ABOUT THE AUTHOR H containerization and set up an automated continuous Bradley Smith has been a DevOps and software delivery (CI/CD) pipeline that builds, tests, and E engineer for more than 20 years at many startups, deploys code. You’ll dig into how to detect a system’s local governments, and businesses of varying sizes. D state and alert on it when things go sideways. He’s solved countless technical challenges during E You’ll learn how to: his career, and he’s built and trained many DevOps, SRE, and software engineering teams. He graduated S • Create and provision an Ubuntu VM with Vagrant from the University of Massachusetts Lowell and now P and Ansible resides in Denver, Colorado. E • Manage users, groups, and password security R Coverage includes Ansible, • Set up public key and two-factor authentication Docker, Kubernetes, and more... A over SSH T E THE FINEST IN GEEK ENTERTAINMENT™ S www.nostarch.com M $29.99 ($39.99 CDN) IT H “I LIE FLAT.” This book uses a durable binding that won’t snap shut D E V O P S F O R T H E D E S P E R A T E A Hands-on Survival Guide Bradley Smith San Francisco DEVOPS FOR THE DESPERATE. Copyright © 2022 by Bradley Smith. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. First printing 26 25 24 23 22     1 2 3 4 5 ISBN-13: 978-1-7185-0248-2 (print) ISBN-13: 978-1-7185-0249-9 (ebook) Publisher: William Pollock Managing Editor: Jill Franklin Production Editor: Paula Williamson Developmental Editor: Jill Franklin Cover Illustration: Gina Redman Interior Design: Octopod Studios Technical Reviewer: Quentin Hartman Copyeditor: Doug McNair Compositor: Happenstance Type-O-Rama Proofreader: Jamie Lauer For information on distribution, bulk sales, corporate sales, or translations, please contact No Starch Press, Inc. directly at [email protected] or: No Starch Press, Inc. 245 8th Street, San Francisco, CA 94103 phone: 1-415-863-9900 www.nostarch.com Library of Congress Cataloging-in-Publication Data Names: Smith, Bradley (Software engineer), author. Title: DevOps for the desperate : a hands-on survival guide / Bradley Smith. Description: San Francisco, CA : No Starch Press, Inc., [2022] | Includes index. Identifiers: LCCN 2021060922 (print) | LCCN 2021060923 (ebook) | ISBN 9781718502482 (paperback) | ISBN 9781718502499 (ebook) Subjects: LCSH: Computer software--Development--Management. | Software engineering--Management. Classification: LCC QA76.76.D47 S567 2022 (print) | LCC QA76.76.D47 (ebook) | DDC 005.1068--dc23/eng/20220111 LC record available at https://lccn.loc.gov/2021060922 LC ebook record available at https://lccn.loc.gov/2021060923 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. This book is for all the engineers slogging through on call. About the Author Bradley Smith is a director of infrastructure and resides in Denver, Colorado. He has been an engineer for more than 20 years at many startups and businesses, large and small. He has built, trained, and been a member of numerous DevOps, SRE, and software engineering teams. A Boston native, Bradley graduated from the University of Massachusetts Lowell. About the Technical Reviewer Quentin Hartman has been living and breathing DevOps since before it had a name. He loves the tech, but more than that, he loves seeing how DevOps practices make software and the lives of people who build it better. Over the course of his nearly 25-year career in technology, Quentin has worked in public education, higher education, nonprofits, and private businesses with anywhere from 3 to 300,000 employees. He has managed telecom systems, datacenters, and public and private clouds. He has acted as a sysadmin, a DBA, a network engineer, an incident responder, and a leader. This broad experience has given him an especially strong foundation in DevOps, which has been his primary focus since 2012. Wherever Quentin is, he puts people before tech and is only really happy when he’s working on a social-impact mission using open source tools. Quentin lives near Denver, Colorado, with his family. He can often be found building things, cooking, and wandering in the woods. He can be reached as qhartman on many platforms, includ- ing Mastodon.social, Twitter, and LinkedIn. BRIEF CONTENTS Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv PART I: I NFRASTRUCTURE AS CODE, CONFIGURATION MANAGEMENT, SECURITY, AND ADMINISTRATION . . . . . . . . . . . .1 Chapter 1: Setting Up a Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Chapter 2: Using Ansible to Manage Passwords, Users, and Groups . . . . . . . . . . . . . . . . .13 Chapter 3: Using Ansible to Configure SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 Chapter 4: Controlling User Commands with sudo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37 Chapter 5: Automating and Testing a Host-Based Firewall . . . . . . . . . . . . . . . . . . . . . . . . .49 PART II: C ONTAINERIZATION AND DEPLOYING MODERN APPLICATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59 Chapter 6: Containerizing an Application with Docker . . . . . . . . . . . . . . . . . . . . . . . . . . .61 Chapter 7: Orchestrating with Kubernetes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77 Chapter 8: Deploying Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95 PART III: OBSERVABILITY AND TROUBLESHOOTING . . . . . . . . . . . . . . . .107 Chapter 9: Observability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109 Chapter 10: Troubleshooting Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.