Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers
Total Page:16
File Type:pdf, Size:1020Kb
Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers First Published: 2016-11-01 Last Modified: 2021-07-30 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 USA http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883 THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS. THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY. The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California. NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE. IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. All printed copies and duplicate soft copies of this document are considered uncontrolled. See the current online version for the latest version. Cisco has more than 200 offices worldwide. Addresses and phone numbers are listed on the Cisco website at www.cisco.com/go/offices. Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: https://www.cisco.com/c/en/us/about/legal/trademarks.html. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1721R) © 2016–2021 Cisco Systems, Inc. All rights reserved. Changes to This Document This table lists the technical changes made to this document since it was first released. Table 1: Changes to This Document Date Summary July 2021 Republished for Cisco IOS XR Release 7.4.1 August 2019 Republished for Cisco IOS XR Release 7.0.1 March 2018 Republished for Cisco IOS XR Releases 6.4.1 and 6.3.2. September 2017 Republished for Cisco IOS XR Release 6.3.1. July 2017 Republished for Cisco IOS XR Release 6.2.2. November 2016 Republished for Cisco IOS XR Release 6.1.2. December 2015 First release for Cisco IOS XR Release 6.0.0. • To receive timely, relevant information from Cisco, sign up at Cisco Profile Manager. • To get the business impact you’re looking for with the technologies that matter, visit Cisco Services. • To submit a service request, visit Cisco Support. • To discover and browse secure, validated enterprise-class apps, products, solutions and services, visit Cisco Marketplace. • To obtain general networking, training, and certification titles, visit Cisco Press. • To find warranty information for a specific product or product family, access Cisco Warranty Finder. Cisco Bug Search Tool Cisco Bug Search Tool (BST) is a web-based tool that acts as a gateway to the Cisco bug tracking system that maintains a comprehensive list of defects and vulnerabilities in Cisco products and software. BST provides you with detailed defect information about your products and software. © 2016–2021 Cisco Systems, Inc. All rights reserved. CONTENTS Changes to This Document vii CHAPTER 1 New and Changed Feature Information 1 New and Changed Application Hosting Features 1 CHAPTER 2 Getting Started with Application Hosting 3 Need for Application Hosting 3 Deep Dive Into Application Hosting 4 Application Hosting on the Cisco IOS XR Linux Shell 5 Accessing the Third-Party Network Namespace on Cisco IOS XR Linux Shell 6 Accessing Global VRF on the Cisco IOS XR Linux Shell 11 Getting Started with Using Vagrant for Application Hosting 15 Accessing Global VRF on the Cisco IOS XR Linux Shell by Using a Vagrant Box 16 Applying Bootstrap Configuration to Cisco IOS XR by Using a Vagrant Box 20 CHAPTER 3 Accessing the Networking Stack 27 Communication Outside Cisco IOS XR 27 East-West Communication for Third-Party Applications 29 CHAPTER 4 Hosting Applications on IOS XR 31 Types of Application Hosting 31 Native Application Hosting 32 Setting Up the Build Environment 34 Creating a Native Build Environment Using QEMU Hypervisor 34 Creating a Cross-Build Environment Using the SDK Shell Script 34 Building Native RPMs 36 Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers v Contents Running iPerf as a Native Application 38 Container Application Hosting 40 Running iPerf as a Container Application 42 Using Docker for Hosting Applications on Cisco IOS XR 44 Using Vagrant for Hosting Applications 45 Setting up an Application Development Topology By Using Vagrant 46 Deploying an Application Development Topology by Using Vagrant 48 Hosting a Wind River Linux (WRL7) Application Natively By Using Vagrant 52 Hosting an Application within a Linux Container (LXC) by Using Vagrant 58 Installing Docker on Cisco IOS XR By Using Vagrant 72 CHAPTER 5 Hosting Applications Using Configuration Management Tools 75 Using Chef for Configuring Cisco IOS XR 75 Installing and Configuring the Chef Client 76 Creating a Chef Cookbook with Recipes 78 Using Puppet for Configuring Cisco IOS XR 79 Installing and Configuring the Puppet Agent 81 Creating a Puppet Manifest 82 CHAPTER 6 Use Cases: Application Hosting 85 Running a Telemetry Receiver in a Linux Container (LXC) 85 Use Cases on Vagrant: Container Application Hosting 89 OSPF Path Failover by Running iPerf with Netconf on Vagrant 90 Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers vi Changes to This Document This table lists the technical changes made to this document since it was first released. Table 2: Changes to This Document Date Summary July 2021 Republished for Cisco IOS XR Release 7.4.1 August 2019 Republished for Cisco IOS XR Release 7.0.1 March 2018 Republished for Cisco IOS XR Releases 6.4.1 and 6.3.2. September 2017 Republished for Cisco IOS XR Release 6.3.1. July 2017 Republished for Cisco IOS XR Release 6.2.2. November 2016 Republished for Cisco IOS XR Release 6.1.2. December 2015 First release for Cisco IOS XR Release 6.0.0. Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers vii Changes to This Document Changes to This Document Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers viii CHAPTER 1 New and Changed Feature Information This section lists all the new and changed features for the Application Hosting Configuration Guide. • New and Changed Application Hosting Features, on page 1 New and Changed Application Hosting Features This section describes the new and changed application hosting features for Cisco IOS XR. Application Hosting Features Added or Modified Table 3: New and Changed Features Feature Description Introduced/Changed in Where Documented Release No new features were None Release 6.5.2 NA added. No new features were None Release 6.6.2 NA added. No new features were None Release 7.0.1 NA added. No new features were None Release 7.4.1 NA added. Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers 1 New and Changed Feature Information New and Changed Application Hosting Features Application Hosting Configuration Guide for Cisco ASR 9000 Series Routers 2 CHAPTER 2 Getting Started with Application Hosting This section introduces application hosting and the Linux environment used for hosting applications on the Cisco IOS XR Operating System. • Need for Application Hosting, on page 3 • Deep Dive Into Application Hosting, on page 4 • Application Hosting on the Cisco IOS XR Linux Shell, on page 5 • Getting Started with Using Vagrant for Application Hosting, on page 15 Need for Application Hosting Over the last decade, there has been a need for a network operating system that supports operational agility and efficiency through seamless integration with existing tool chains. Service providers have been looking for shorter product cycles, agile workflows, and modular software delivery; all of these can be automated efficiently. The 64-bit Cisco IOS XR that replaces the older 32-bit QNX version meets these requirements. It does that by providing an environment that simplifies the integration of applications, configuration management tools, and industry-standard zero touch provisioning mechanisms. The 64-bit IOS XR matches the DevOps style workflows for service providers, and it has an open internal data storage system that can be used to automate the configuration and operation of the device hosting an application.