O'Reilly logo

Network Programmability and Automation by Jason Edelman, Matt Oswalt, Scott S. Lowe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Source Control with Git

So far in this book, we’ve shown you lots of ways to add automation to your toolbox, whether via scripting languages like Python (see Chapter 4) or via templating languages like Jinja (see Chapter 6). The increased use of Python-based scripts or Jinja templates means that managing these artifacts (and by artifacts we mean the files that make up these scripts, templates, and other automation tools you’re employing) is very important. In particular, managing the changes to these artifacts has significant value (we’ll explain why shortly).

In this chapter, we’re going to show you how to use a source control tool—that is, a tool that is designed to manage the artifacts you’re creating and using in your network automation processes. The use of a source control tool lets you avoid messy and error-prone approaches like appending date- and timestamps to the end of filenames, and keeps you from running into accidentally deleted or overwritten files.

To start things out, let’s take a closer look at the idea of source control. We’re going to keep the discussion fairly generic for now; we’ll delve into a specific source control tool known as Git later in the chapter. The generic qualities discussed in the next section are not specific to any particular source control tool, however.

Use Cases for Source Control

Simply put, source control is a way of tracking files and the changes made to those files over time (source control is also known as version control ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required