Chapter 3 How to Automate the Network?

For diagrams, tables, or exact code formatting, .

JOHN W. CAPOBIANCOPRINTED PAGE 54

 Ansible.  Git.  VS Code.  Connectivity to TFS through TCP ports 8080 / 8443.  Connectivity to network devices management IP via SSH (TCP port 22). Modern Network Development Lifecycle (NDLC)

With new tools comes new processes and procedures. Below is a high-level overview of the modern NDLC using all the tools introduced above. This includes a simple branching strategy. The organization should decide on its own branching strategy, for example, a new branch for every change, no long-lived branches, and no branching beyond two branches. For now, we will adopt a new branch per change approach with one level of branching.  Create a repository specific to the environment in TFS:

o Examples include: Production, Lab, Development.

 Create a master branch:

o The master branch will be what is considered tested, approved, current, golden configurations

and code. o Never develop or make changes directly inside the master branch. o Use Git commits and pull requests to merge changes into the master branch. o Playbooks should be executed from the master branch.

 Create a working branch:

o All changes performed in working branch. o Playbook tested and validated possibly with check mode and verbosity. o Changes understood. o Commits from local repository made often to ensure TFS version updates often.

o Prevents local work from being lost. o Ensures ability to collaborate on branches. o Pull request to merge changes into master branch.

o An entire workflow can be created from the pull request. o Various QA and approvals. o Changes merged successfully into master branch.

 Clone repository locally:

o git clone o Brings the repository down to a local Windows or Linux machine. o Extremely portable provided Linux and Ansible are installed.

 Change to working branch:

o git checkout o VS Code GUI to change into new working branch.

 Make changes:

o Modify existing files. o Create new files.