Polat, Engin | Mastering Go for DevOps | E-Book | www.sack.de
E-Book

E-Book, Englisch, 370 Seiten

Reihe: Packt Publishing

Polat, Engin Mastering Go for DevOps

Master building, automating, and scaling cloud infrastructure with Go
1. Auflage 2025
ISBN: 978-1-83702-732-3
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection

Master building, automating, and scaling cloud infrastructure with Go

E-Book, Englisch, 370 Seiten

Reihe: Packt Publishing

ISBN: 978-1-83702-732-3
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection



Mastering Go for DevOps shows you how to harness Go to build production-ready tools, from interactive CLIs to observability integrations and custom Terraform providers.
Mastering Go for DevOps takes a hands-on approach, teaching you how to create robust CLI applications, develop RESTful APIs and gRPC services, and integrate monitoring solutions with Prometheus. You'll extend Terraform with custom providers, write comprehensive unit and integration tests using the Terraform SDK, and automate your testing in CI/CD pipelines with GitHub Actions.
You'll also explore cloud-native development by integrating Go applications with AWS and Azure SDKs and deploying serverless functions with AWS Lambda and Azure Functions. Whether you're building automation scripts or distributed systems, this book equips you with the skills to streamline and scale your infrastructure operations.
By the end of this book, you'll know how to build Go-based DevOps tools, automate infrastructure provisioning, and create cloud-native systems ready for real-world deployment.

Polat, Engin Mastering Go for DevOps jetzt bestellen!

Weitere Infos & Material


Preface


Go has rapidly become one of the most important programming languages in the DevOps world. Designed at Google with simplicity, concurrency, and performance in mind, Go offers the perfect combination of speed, readability, and robustness, qualities that align perfectly with the needs of modern cloud-native systems and automation workflows.

In the world of DevOps, we deal with distributed systems, microservices, automation scripts, container orchestration, and CI/CD pipelines on a daily basis. Many of these systems demand highly efficient and reliable tooling; this is where Go shines. From building blazing-fast CLI utilities to developing scalable backend services, Go has become the go-to language for many DevOps practitioners and platform engineers.

In this book, we will move into DevOps-focused patterns, building tools for automation, creating APIs, and integrating with cloud services.

We will explore how to do the following:

  • Build production-ready CLI tools for DevOps workflows
  • Work with REST and gRPC APIs for cloud infrastructure automation
  • Write concurrent and parallel applications that handle large-scale workloads
  • Integrate Go with Kubernetes, Docker, Terraform, and GitHub Actions
  • Develop monitoring, logging, and observability tools

Along the way, you’ll see real-world examples of Go being used to solve infrastructure and operations challenges, from building custom Kubernetes operators to creating deployment automation systems.

This book is not just about learning Go; it’s about mastering Go for the unique challenges and opportunities within DevOps. Whether you’re coming from a systems administration background, a cloud engineering role, or software development, you’ll learn how to leverage Go to create tools and systems that are fast, maintainable, and tailored for modern infrastructure.

Who this book is for


This book is for DevOps engineers, SREs, platform engineers, and developers who want to build powerful tools and services using Go in a DevOps context. A basic understanding of DevOps practices, cloud platforms, and containerized environments will help you get the most out of this book. Familiarity with at least one programming language is recommended, but you don’t need to be a Go expert; we’ll get you there.

What this book covers


, , introduces you to creating effective and user-friendly CLI applications, covering command parsing, argument handling, output formatting, and practical examples to build flexible CLIs.

, , explains how to build executable binaries for multiple platforms and create Docker images to simplify deployment across environments.

, , explores setting up Prometheus and Grafana, instrumenting Go code to expose metrics, and implementing alerting and monitoring strategies.

, , dives into designing custom metrics exporters, implementing counters, gauges, and histograms, and ensuring accuracy and performance of exported data.

, , covers creating API servers, handling requests and responses, managing routing and middleware, and consuming external APIs.

, , introduces defining service contracts with Protocol Buffers, setting up gRPC servers and clients, implementing streaming, and best practices for microservices communication.

, , explains Terraform’s provider model, implementing CRUD operations, and managing resource state to extend Terraform with Go.

, , teaches you how to write effective tests for provider CRUD operations, mock API calls, and use Terraform SDK testing tools.

, , guides you through generating provider documentation, writing clear resource docs, versioning, changelogs, and publishing providers to Terraform Registries.

, , shows how to integrate testing into CI/CD workflows with tools such as GitHub Actions, run tests automatically, generate reports, and manage failures.

, , demonstrates how to use the AWS SDK to interact with services such as S3 and EC2, handling uploads, instance management, and scaling cloud resources.

, , covers setting up authentication, working with Azure Storage and Virtual Machines, and managing Azure resources programmatically.

, , introduces creating, deploying, and managing Lambda functions, configuring triggers, and integrating with AWS services for event-driven applications.

, , focuses on building and deploying Azure Functions, setting up triggers and bindings, and integrating with Azure services such as Storage and Event Hubs.

To get the most out of this book


To follow along with the examples in this book, you’ll need a working Go development environment and some basic tools commonly used in DevOps.

Before you begin, make sure you have the following:

  • Go installed: You can download it from https://go.dev/dl. The book uses Go version 1.25 or later.
  • A code editor: Visual Studio Code with the Go extension is recommended for editing, running, and debugging Go code.
  • Git: To clone repositories and manage source code.
  • Terraform: Needed for the Terraform chapters if you want to run the examples yourself.

You should be comfortable using the command line, editing configuration files, and running shell commands.

All examples are written to be self-contained, so you can copy, modify, and run them directly on your own machine. The code samples are designed to work on Linux, macOS, and Windows.

Whenever you see commands that include variables or file paths, adjust them to match your own environment.

Finally, remember that this book is hands-on—the best way to learn Go for DevOps is by writing and running code yourself. Don’t hesitate to experiment with the examples, extend them, or adapt them to your own projects.

Conventions used


There are a number of text conventions used throughout this book.

: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: “Go allows us to run tests that are conditionally compiled based on tags using the flag in the command.”

A block of code is set as follows:

Any command-line input or output is written as follows:

Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Click Add service account token, provide a name, and copy the token shown.”

Warnings or important notes appear like this.

Tips and tricks appear like this.

Get in touch


Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book or have any general feedback, please email us at and mention the book’s title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you reported this to us. Please visit http://www.packt.com/submit-errata, click Submit Errata, and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit http://authors.packt.com/.

Free Benefits with Your...




Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.