Chapter 1 What is Network Automation?

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 28

Microsoft Team Foundation Server (TFS)

“Share code. Track work. Ship software” is Microsoft’s slogan for TFS. TFS is “the integrated server suite of developer tools for professional teams” providing advanced source code management. TFS covers the entire application lifecycle and can be used to develop automated builds and scheduled releases thus creating the CI/CD pipeline. TFS features include: work center, code repositories, build, test, and release capabilities. TFS has native Git support and Ansible extensions are available in the Microsoft Marketplace.

Work

TFS has a dynamic work center for cross team collaboration and item tracking. As new changes, feature requirements, or code refactoring needs arise, work items can be added to the board. Using this centralized repository members of cross functional teams can be assigned, track progress, or complete work items. Working branches can be created directly from these work items allowing code development to begin immediately and then tracked for status.

Code

Repositories are kept under TFS code along with a file explorer, branch explorer, repository history and pull request information. It is recommended to keep natural network environments in separate repositories (lab, production, development). Branches are available for comparison and tracking versions. Pull requests have an entire workflow capability and are used to merge working branches into the master branch. RBAC and approvals for pull requests into the master branch should be implemented. The master branch should be protected in TFS, thus preventing direct development in this branch, further enforcing the strategy.

Continuous Integration / Continuous Delivery (CI/CD) In the context of network automation, continuous integration (CI) and continuous delivery (CD) implies full network automation of tasks. This pipeline should be abstracted as an orchestrated chain of automated actions and events based on intent. Through the build – test – release cycle, CI/CD can be achieved. CI enables distributed software development across many teams. Small but frequent incremental changes are continuously integrated into the master branch. CD then automatically deploys these changes to the production network.

Build A build is a software product in its final, consumable form. While builds are not a necessary part of using Ansible for network automation, they can be used to perform CI/CD. When creating a build in TFS Ansible playbooks can be executed as tasks as part of the build. Network reconnaissance playbooks, are completely harmless to execute automatically, and can run every time a pull request merges code into the master branch. Pull requests can trigger automated builds which in turn trigger Ansible playbooks. This is the CI in the CI/CD pipeline.