37 · Introducing Network Programmability網路可程式化簡介

Network Automation and Programmability網路自動化與可程式化

There is currently a major industry shift away from the CLI as the primary way to interface with a network device. Network automation is taking shape with the rise of application programming interfaces (API)s that exist on network devices and software-defined network (SDN) controllers. Although the motto is "the API is the new CLI," the truth is that the use of GUIs is diminishing too with the rise of APIs and automation.

業界目前正出現一項重大轉變,逐漸擺脫以 CLI 作為與網路裝置互動的主要方式。隨著存在於網路裝置與軟體定義網路(software-defined network,SDN)控制器上的應用程式介面(application programming interface,API)興起,網路自動化正逐漸成形。雖然業界流傳「API 就是新的 CLI」這句話,但事實上,隨著 API 與自動化的興起,GUI 的使用率也正在下降。

Several important APIs and technologies are used to create robust programmatic interfaces to network devices:

有幾項重要的 API 與技術,用於為網路裝置建立穩健的程式化介面:

  • Representational State Transfer (REST) APIs表述性狀態傳輸(Representational State Transfer,REST)API
  • Network Configuration Protocol (NETCONF)網路設定協定(Network Configuration Protocol,NETCONF)
  • REST Configuration Protocol (RESTCONF)REST 設定協定(REST Configuration Protocol,RESTCONF)
  • "Yet Another Next Generation" (YANG) models (not an API, but a modeling language to create models that are used by the APIs)「Yet Another Next Generation」(YANG)模型(並非 API,而是一種建模語言,用於建立 API 所使用的模型)
  • gRPC remote procedure callgRPC 遠端程序呼叫

The networking devices are the last pieces of the puzzle. They need to support one or more of the mentioned methods to be easily adopted. Cisco is already on a mission to make every device API-enabled in every product family. Today APIs exist on Cisco Network Devices such as the Nexus 9000, Cisco Catalyst 9000 switches or the controller platforms like Cisco Catalyst Center, etc.

網路裝置是這塊拼圖的最後一塊。它們需要支援上述一種或多種方法才能被輕易採用。Cisco 已致力於讓每個產品家族中的每台裝置都支援 API。如今,API 已存在於 Cisco 網路裝置上,例如 Nexus 9000、Cisco Catalyst 9000 交換器,或是控制器平台如 Cisco Catalyst Center 等。

The CLI is not going away anytime soon. It is a reliable way to interact with network devices, and using the CLI via SSH or via the serial console is required for advanced troubleshooting. Furthermore, network automation systems can use SSH to communicate with network devices, especially when the device is older or when the tool itself has not been updated to use a device’s API.

CLI 短期內不會消失。它是與網路裝置互動的可靠方式,透過 SSH 或序列主控台使用 CLI,對於進階疑難排解仍是必要的。此外,網路自動化系統也可以使用 SSH 與網路裝置通訊,特別是在裝置較舊,或工具本身尚未更新以支援裝置 API 的情況下。

Beyond APIs

超越 API

It is important to understand that APIs are simply enablers. Although they are the foundation of next-generation automation, it is important to have a holistic view of operations and how to use those device APIs within the life cycle of the network itself.

重要的是要理解,API 只是促成因素。雖然它們是新一代自動化的基礎,但也必須以全局角度看待維運工作,並思考如何在網路自身生命週期中運用這些裝置 API。

A few key trends are emerging within the network industry, including development and operations (DevOps), Open Source, and the rise of automatable test infrastructure.

網路產業目前正興起幾項重要趨勢,包括開發與維運(DevOps)、開源(Open Source),以及可自動化測試基礎架構的興起。

  • DevOps: DevOps is a cultural trend to promote and develop methods that improve speed and agility in the deployment, maintenance, and continual improvement of systems and infrastructure. This cultural trend is driving better configuration and automation tools for network engineers. Networking professionals can learn through the DevOps movement, how developers have been using DevOps tools like Git, Docker, and Ansible to name just a few.DevOps:DevOps 是一種文化趨勢,旨在推廣並發展方法,以提升系統與基礎架構在部署、維護與持續改善方面的速度與敏捷性。這股文化趨勢正推動網路工程師使用更完善的設定與自動化工具。網路專業人員可透過 DevOps 運動,學習開發人員如何運用 Git、Docker 與 Ansible 等 DevOps 工具,這裡僅列舉幾項。
  • Open Source: Within the DevOps movement, many of the tools are open source. However, the companies that support open-source projects may offer commercial versions or support for the software. For example, Git is open source, but there are commercial offerings like GitHub, BitBucket, and GitLab. The beneficial combination of open source and DevOps as the foundation for next-generation operations lowers the barrier to entry for developers and network engineers to use open-source software.開源(Open Source):在 DevOps 運動中,許多工具都是開源的。不過,支援開源專案的公司可能提供商業版本或軟體支援服務。例如,Git 是開源的,但市面上也有 GitHub、BitBucket 與 GitLab 等商業產品。開源與 DevOps 的良好結合,作為新一代維運的基礎,降低了開發人員與網路工程師使用開源軟體的門檻。
  • Test Infrastructure: Cisco Modeling Labs (CML) is a foundational component in automation because it can be used for QA (Quality Assurance) and testing. Although it is ideal to have a dedicated physical lab, it is sometimes cost-prohibitive. Cisco Modeling Labs allows you to create virtualized network devices to perform automatic testing before deploying to production. CML can be integrated into an automation pipeline since it is also an API library.測試基礎架構:Cisco Modeling Labs(CML)是自動化中的一項基礎元件,因為它可用於 QA(品質保證)與測試。雖然擁有一個專用的實體實驗室是理想做法,但有時成本過高。Cisco Modeling Labs 讓你能建立虛擬化的網路裝置,在部署到正式環境前執行自動化測試。由於 CML 本身也是一個 API 函式庫,因此可以整合到自動化管線中。

As you progress on your network automation journey, keep in mind that you are concerned with more than an API or a single tool. Learning about DevOps provides an opportunity to rethink end-to-end network operations. These discussions will help you to see new possibilities and how network engineers can apply the DevOps movement to Network Operations. The time for Network DevOps is here, and it is exciting to think about how DevOps will change the future of network engineering in the years to come.

在你邁向網路自動化的過程中,請記住你所關注的不僅是單一 API 或工具。學習 DevOps 提供了一個重新思考端到端網路維運的機會。這些討論將幫助你看見新的可能性,並了解網路工程師如何將 DevOps 運動應用於網路維運。網路 DevOps 的時代已經來臨,未來幾年 DevOps 將如何改變網路工程的樣貌,令人期待。

Cisco Network Automation and Programmability

Cisco 網路自動化與可程式化

Cisco has an extensive product portfolio, from core networking to the data center to the cloud, as well as security to collaboration and the Internet of Things (IoT).

Cisco 擁有廣泛的產品組合,從核心網路、資料中心到雲端,還涵蓋安全性、協作以及物聯網(Internet of Things,IoT)。

For years, Cisco has been working to ensure that every platform and product has an API to enable programmability and automation.

多年來,Cisco 一直致力於確保每個平台與產品都具備 API,以支援可程式化與自動化。

As you continue down the path of network automation, it is critical to be aware of high-value workflows that can be automated across technology silos and platforms. In an enterprise each technology space often has a dedicated team or silo, but the workflows and tasks span multiple siloed teams. Even though you may not manage the firewalls or voice and collaboration systems, it is important to consider the impact of automating those systems as you interface with the security and collaboration teams because they may not be prepared. Changes in workflow and the implementation of network automation should be thoughtful and well planned with good communication between siloed teams. The DevOps culture will make you reconsider how you handle inter-team communications and collaboration.

在你持續邁向網路自動化的過程中,關注能跨技術領域與平台實現自動化的高價值工作流程至關重要。在企業中,每個技術領域通常都有專屬團隊或部門,但工作流程與任務往往橫跨多個這類團隊。即使你並不負責管理防火牆或語音與協作系統,考量自動化這些系統對安全性與協作團隊的影響仍然很重要,因為他們可能尚未做好準備。工作流程的變動以及網路自動化的實施,應審慎規劃,並在各部門團隊間保持良好溝通。DevOps 文化將促使你重新思考如何處理跨團隊的溝通與協作。

Which two options are not a network API? (Choose two.)以下哪兩項不是網路 API?(選擇兩項。)