ENGLISH

Network Automation with Go: Learn how to automate network operations and build applications using the Go programming language

Book information

Publisher
Packt Publishing
Year
2023
ISBN
1800560923, 9781800560925
Language
english
Format
PDF
Filesize
38 MB (39364730 bytes)
Pages
442\443
Time added
2022-12-14 21:49:57

Description

Understand the world of modern network automation with Go and deepen your knowledge with insights from 10+ experts who have real-world hands-on experience with network automation and/or are using Go for network-related tasks Key FeaturesA comprehensive guide to the world of modern network automationUse Go to build anything from repetitive task automation to complex distributed systemsOver 30 practical, ready-to-use sample programsBook Description Go's built-in first-class concurrency mechanisms make it an ideal choice for long-lived low-bandwidth I/O operations, which are typical requirements of network automation and network operations applications. This book provides a quick overview of Go and hands-on examples within it to help you become proficient with Go for network automation. It's a practical guide that will teach you how to automate common network operations and build systems using Go. The first part takes you through a general overview, use cases, strengths, and inherent weaknesses of Go to prepare you for a deeper dive into network automation, which is heavily reliant on understanding this programming language. You'll explore the common network automation areas and challenges, what language features you can use in each of those areas, and the common software tools and packages. To help deepen your understanding, you'll also work through real-world network automation problems and apply hands-on solutions to them. By the end of this book, you'll be well-versed with Go and have a solid grasp on network automation. What you will learnUnderstand Go programming language basics via network-related examplesFind out what features make Go a powerful alternative for network automationExplore network automation goals, benefits, and common use casesDiscover how to interact with network devices using a variety of technologiesIntegrate Go programs into an automation frameworkTake advantage of the OpenConfig ecosystem with GoBuild distributed and scalable systems for network observabilityWho this book is for This book is for all network engineers, administrators, and other network practitioners looking to understand what network automation is and how the Go programming language can help develop network automation solutions. As the first part of the book offers a comprehensive overview of Go's main features, this book is suitable for beginners with a solid grasp on programming basics. Table of ContentsIntroductionGo BasicsGetting Started with GoNetworking (TCP/IP) with GoNetwork AutomationConfiguration ManagementAutomation FrameworksNetwork APIsOpenConfigNetwork MonitoringExpert InsightsAppendix: Building a Testing Environment Cover Title Page Copyright and Credits Contributors Table of Contents Preface Part 1: The Go Programming Language Chapter 1: Introduction Technical requirements Networking and Go Why Go? Non-technical reasons The future of Go Technical reasons Go for networking Go versus Python Code execution Type system Performance Ease of use Memory management Syntax Failure handling Concurrency Community Installing Go on your computer Windows Mac Linux Summary Further reading Chapter 2: Go Basics Technical requirements What is Go? Go Proverbs Go source code files Packages Go modules Importing packages Comments Names Executing your Go code Running Go programs online The Go Playground The Go Play Space A look into the Future The Go tool Build Run Mod Get Install Fmt Test Env Summary Further reading Chapter 3: Getting Started with Go Technical requirements Go’s type system Basic types Container types User-defined types Arithmetic, comparison, and logical operators Arithmetic operators Logical operators Comparison operators Control flow for loops Conditional statements goto statements Functions Function arguments Error handling Methods Variadic functions Closures Defer Interfaces Network automation example Standard library example Interfaces as contracts Input and output operations The io.Reader interface The io.Writer interface The io.Copy function Composition Decoding and encoding Decoding Encoding Concurrency Goroutines Channels Channels and Timers Shared data access Concurrency caveats Summary Further reading Chapter 4: Networking (TCP/IP) with Go Technical requirements The link layer Network interfaces Ethernet The internet layer The net package The New netip package Working with IP addresses Route lookups The transport layer UDP ping application The application layer Working with an HTTP client Working with an HTTP (server) Summary Further reading Part 2: Common Tools and Frameworks Chapter 5: Network Automation Technical requirements What is network automation? Why network automation exists Bottom-up view Top-down view Automating network operation tasks Configuration management Network state analysis Network audits and reporting Systems approach Closed-loop automation Demo application Summary Further reading Chapter 6: Configuration Management Technical requirements Environment setup Creating the topology Interacting with network devices via SSH Describing the network device configurations Using Go’s SSH package to access network devices Automating routine SSH tasks Interacting with network devices via HTTP Using Go’s HTTP package to access network devices Getting config inputs from other systems via HTTP State validation Checking routing information Validating end-to-end reachability Summary Further reading Chapter 7: Automation Frameworks Technical requirements Ansible Overview of Ansible components Working with Ansible modules Developing an Ansible module Running the playbook Terraform Overview of Terraform components Working with Terraform Developing a Terraform provider Networking providers Other automation frameworks Gornir Consul-Terraform-Sync mgmt Looking into the future Summary Further reading Part 3: Interacting with APIs Chapter 8: Network APIs Technical requirements API data modeling OpenAPI Data modeling Data input Device configuration JSON-RPC Code generation Building configuration Device configuration RESTCONF Code generation Building configuration Device configuration State validation Operational state modeling Operational state processing gRPC Protobuf gRPC transport Defining gRPC services Configuring network devices with gRPC Streaming telemetry from a network device with gRPC Summary Further reading Chapter 9: OpenConfig Technical requirements Device provisioning Set RPC Using gNMI to configure network interfaces Streaming telemetry Subscribe RPC Streaming telemetry processing pipelines with gNMI Event-manager sample program Visualizing the data Network operations Traceroute RPC Path verifier application Summary Further reading Chapter 10: Network Monitoring Technical requirements Data plane telemetry processing Packet capturing Packet filtering Packet processing Generating traffic Debugging Go programs Debugging from an IDE Data plane telemetry aggregation Top talkers Testing Go programs Measuring control plane performance Measuring BGP Update propagation time Event-driven BGP state machine Encoding and decoding BGP messages Collecting and exposing metrics Storing and visualizing metrics Developing distributed applications Summary Further reading Chapter 11: Expert Insights David Barroso Stuart Clark Claudia de Luna Alexis de Talhouët John Doak Roman Dodin David Gee Daniel Hertzberg Marcus Hines Sneha Inguva Antonio Ojea Carl Montanari Brent Salisbury Maximilian Wilhelm Matt Oswalt Further reading Appendix : Building a Testing Environment What is a testing environment? Step 1 – building a testing environment Step 2 – uploading container images Step 3 – iInteracting with the testing environment Launching a virtual network topology Connecting to the devices Destroying the network topology Step 4 – cleaning up of the cloud-hosted environment Further reading Index Other Books You May Enjoy

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF