Avatar

And… by popular demand (not really) we are back! I know it’s been a long time since my last post, but this last year has been really challenging for everyone, including me. Hopefully things are slowly getting back to normal and our minds will gradually also be able to readapt and focus again on the things that excited us.

A foundational block for network operations, AI, and natural language processing

In these months I’ve received a ton of requests to write about something that is a foundational block for network operations, AI, and Natural Language Processing… I’m referring to ChatOps, and it is based on the idea of using a bot to operate your network. I was not surprised by the interest in this topic, but rather on the specifics of the gap our readers needed help covering. They wanted to understand how to write the code for a bot that could do something meaningful, but not based on a zillion lines of code example coming from an expert.

The barrier of entry to read, decode and learn those examples is way too high. Our readers want something simpler and easier to understand, built and explained step-by-step on why we do it like that, so they can use that code and easily customize it for their own purposes. Sounds like the perfect opportunity for our hands-on series approach, huh? Well, then let’s get this series started!

We like robots

We like robots because we can offload repetitive & tedious tasks to them and they will be happy about it! Well, maybe happy is not the right word… let’s say they’ll do what we need ’em to do and not get bored in the process.

These robots, or bots for short, might offer different ways to interact with them. We, as humans, normally interact with machines using our fingers as the output interface when typing a request in a keyboard, and our eyes as the input interface when reading in a screen what is the outcome of that request.

Those requests we type might be formatted in 3 different ways:

  1. Using our bot’s native language, but we’ll need time to learn its syntax
  2. Using our own native (natural) language and have some logic map what we mean to the bot’s native language
  3. Something in-between, an easy-to-use and intuitive, but structured, way to interact with our bot

Using Cisco Webex to communicate with our bot

No matter what option we decide to use, the final goal will be the same: to have our bot receive requests and translate them into whatever underlying logic is required to interact with relevant infrastructure and perform them. The easiest way to get started is to go with option #3 and leverage bots to interact with platform APIs we want to manage.

But what application can we use to communicate with our bot? We might use SSH to connect to a remote system from a terminal window, send an SMS or an e-mail message, or even use a proprietary app in your mobile terminal. But how convenient would it be to talk to the bot using the same messaging app we use to communicate with our colleagues at work? Cisco Webex is the ideal candidate for that!

Operating infrastructure systems with bots via messaging applications is what we call ChatOps.

Webex basics

Let’s start with the basics: working with Webex means you’ll use a local interface (laptop/mobile app or web interface) to communicate via Internet with Webex Cloud services, sending messages back and forth. This will allow you communicate with other Webex users connected in a similar way.

Julio Gomez ChatOps

Let’s create our first bot! Login to developer.webex.comcreate a new bot, give it a name (e.g. Alfred), a username (needs to be unique, e.g. julio_bot@webex.bot), an icon, write any meaningful description (e.g. my first bot) and click on Add bot.

Congrats, you have just created your first bot! It resides in Webex Cloud services.

But wait a moment… how is it possible? What will it do if we have not created any logic? Hmmm… something seems off here, right? Well, the bot exists but it cannot do anything… yet!

For now please save the Bot access token somewhere safe, as this will be needed later on and there’s no way to recover it once you browse away.

Next week we will start working on the logic needed for your bot to do something and the connectivity it requires to be reachable from anywhere. Stay tuned. See you then!

If you’d like to learn more about network programmability and Cisco networking platforms visit the DevNet Networking Dev Center. Also, all my previous DevOps and NetDevOps blogs are here

Any questions or comments please let me know in the comments section below. Or reach me on Twitter or LinkedIn.

Additional resources


We’d love to hear what you think. Ask a question or leave a comment below.
And stay connected with Cisco DevNet on social!

Twitter @CiscoDevNet | Facebook | LinkedIn

Visit the new Developer Video Channel



Authors

Julio Gomez

Programmability Lead, EMEAR

Systems Engineers