Topic: System Administration
DevOps and its corresponding technologies have become buzzwords in an industry ripe with change. Cut through the noise by building a solid DevOps foundation in this course. The course begins with a summary of Lean and Theory of Constraints fundamental knowledge that forms the basis for DevOps. Once mastered, together we will write a simple Ansible “infrastructure as code” playbook for network device management. Next, we will manage this new code with version control using git and Github. Once committed to version control and appropriately documented, it’s time to write some test scripts to ensure our playbook works correctly. Finally, we will integrate Travis CI to automatically test our code whenever commits are made.
Participants will learn how to “start small” with Network DevOps and grow their custom solutions in lockstep with their business. The goal is not to focus on advanced technology or features within any individual area, such as Ansible or Github. Instead, this course focuses on the seamless integration and cooperation between these components to create the final, value-added solution. The result is a minimal working NetDevOps solution that is easily copied as a template for all future projects.
What you'll learn-and how you can apply it
- Understand core concepts of Lean production and the Theory of Constraints
- Develop a minimal “infrastructure as code” Ansible project
- Intelligently use version control for configuration management
- Develop a suite of tests to ensure code quality
- Enhance the solution with basic continuous integration (CI)
This training course is for you because...
- Designed for Network Engineers to expand their knowledge beyond simple scripting
- Course is beginner level of difficulty (See prerequisites)
- Course is primarily focused on the integration between components (infrastructure as code development, version control, testing, and CI).
- These topics allow engineers to succeed in the modern world through instructor tie-in of “what” and “why” to achieve business goals within risk tolerance levels.
- Basic Linux knowledge, such as shell familiarity, text editing, and managing SSH keys. Advanced Linux skills are not required.
- No prior experience with Ansible, git, Github, or Travis CI is needed, however it is beneficial
- Access to a modern Linux distribution of any flavor. The author is using an Amazon Linux instance in AWS.
- If you don’t have this experience, you can attend: Attend Learn Linux in 3 Hours. Or watch: Beginning Linux System Administration
- IP connectivity between the Linux station and at least one router. The author is using a few Cisco CSR1000v routers in AWS.
- All devices should be easy to manage (SSH/telnet/console) as we will be moving between devices quickly.
- The Linux machine, at a minimum, needs Internet access, and should have Ansible with Python 2.7 installed.
- Accounts on Github and Travis CI.
- The following repository will be used in the demonstration of this course. Feel free to clone or fork ahead of time: https://github.com/nickrusso42518/slt-netdevops.
About your instructor
Nicholas Russo holds a Bachelor’s of Science in Computer Science from the Rochester Institute of Technology (RIT). His primary programming experience is in C# and Java, but has been programming almost exclusively in Ansible and Python over the past several years. Nick’s day job is an automation-focused network engineer but he loves teaching others about technology. Nick lives in Maryland, USA with his wife, Carla, and daughter, Olivia.
The timeframes are only estimates and may vary according to how the class is progressing
Lean and Theory of Constraints (TOC) (25 min)
- Instructor will quickly review the history of the Lean and TOC movements and explain their relevance to DevOps. Concepts such as flow, pull, value, and waste are discussed. Both manufacturing and networking examples/analogies are used for clarity.
- Participants begin their DevOps foundation by understanding the cultural norms and methods of work accomplishment before diving into the technological components. This foundation helps explain why certain workflows operate the way they do, which are demonstrated later in the course.
Course Overview (25 min)
- Instructor will explain the main technological components that are specifically being used in this course. Specifically, it will include a summary of Ansible, git, Github, and Travis CI. The purpose of this section is to solidly reinforce what we are doing so that the entire class is able to follow the sequence of events that follow.
- Participants will observe (or build themselves) a complete and functional framework for network DevOps using a variety of tools. They will learn how to construct these designs for themselves, creating a solid plan to follow during the implementation phase. Participants will see how these tools, properly integrated, enable the core concepts of flow, pull, and more.
Break (10 min)
Develop Infrastructure-As-Code project (50 min)
- Instructor will create a simple Ansible project from scratch to actively manage the configuration of a virtual router. The project is a minimal working example and does not detail many Ansible knobs, so those unfamiliar with Ansible will be able to follow without issue. This also includes the authoring of a simple README, an important part of any project. The instructors explains all steps when developing the playbook which serves as an Ansible introduction for those entirely unfamiliar.
- Participants should see, at the conclusion of this demonstration, the clear business value of using simple Ansible tools to drastically reduce variation in network configurations, and thus reduce waste. Though basic, participants will have an understanding of infrastructure as code and how it differs from legacy configuration management practiced by many companies.
Break (10 min)
Working with git (50 min)
- Instructor introduces the world’s most popular version control system to date, known as git. Instructor begins with the basic commands used to effectively manage code with a local git repository, and then discusses Github for integration with a remote repository. Intermediate topics like basic branching, merging, pushing, and fetching are covered briefly.
- Participants will go from zero git knowledge to novice level skills using the basic skills needed to maintain a Github project. The real value is seeing the power of version control for maintaing source code and commiting to using it for all future projects.
Break (10 min)
Improving quality with unit tests (30 min)
- Instructor will backtrack to the development phase to add unit tests to our code. Before running our infrastructure playbook on our production routers, it needs to operate correctly and be free from errors. Testing coverage varies greatly between projects, and this demonstration includes a medium level depth and breadth. Thanks to version control, the instructor can “break” the code to demonstrate the value of the tests and quickly revert back.
- Participants will learn how to develop tests for their own code and ideally make it part of their daily work. In conjunction with version control, participants will learn how they can combine git with testing to further improve their code quality. Participants will learn the basic knowledge required to determine which kind of tests make sense for a given project or business goal.
Continuous Integration with Travis CI (30 min)
- With all other components complete and functioning correctly, the instructor adds Travis CI to the solution to provide automated regression testing each time code is committed to the Github repository. This further enables fast feedback and quality at the source, and radiates confidence to anyone interested in consuming open source projects through a “build badge”.
- Participants will have the basic skills to integrate their existing projects with Travis CI, and therefore derive value from having automated testing always available.