REDtalks.live #49 – Imperative vs Declarative APIs /w Kin Lane

My good pal, Kin Lane, is back on the show for his third appearance to discuss the much debated topic of Imperative vs Declarative APIs.

Key discussion points on this topic:

  • One is not necessarily better than the other.
  • One persons declarative is another persons imperative, so think about the ‘system’ of orchestration, and not just the device/software you’re automating.
  • Think first about the ‘API contract’ (episode #46, also with Kin Lane)
  • Scott Peter’s and the API ’emoji poop’

Enough words from me, watch now!

Thanks for listening!

 

REDtalks.live #48 – Deep API Monitoring w/ resurface.io

With the evolution of application architecture – from monolith to distributed, microservice – comes the need for modern ‘architecture appropriate’ monitoring and visibility solutions.

Traditional ‘packet sniffer’ tooling falls short in terms of the requirements developers need to transition from best-effort, educated guesses to detailed usage logging and traceability. To help realize these deep API monitoring goals, in this episode I’m joined by Founder and CEO of resurface.io, Rob Dickinson. 

Rob, who has a long history in the traditional application monitoring space, tells us how the tools and approaches of yesterday just don’t work in today’s distributed, microservice, ‘API first’ world. Watch this episode to understand how resurface.io delivers “DevOps-friendly instrumentation” for the modern, agile service.

 

For more information on Resurface.io:

  • You can view their YouTube Channel here
  • Take a look at the examples on GitHub here
  • And even run their demo yourself, here

 

Thanks for listening!

REDtalks.live #47 – POSTMAN API client w/ creator & CEO, Abhinav Asthana

Very excited about today’s episode where I’m joined by Abhinav Ashtana, the creator and CEO of world renowned API client, POSTMAN.

 

In this episode, hear Abhinav explain how POSTMAN started – how a personal frustration with API interactions presented an opportunity to create something cool. Learn about the journey POSTMAN took and the use cases that shaped its form today. Lastly, hear about the latest POSTMAN training capabilities shipping in version 7.0 (totally free) to better enable adoption by learning directly within the product as you use it.

Take a peek at this capability in the POSTMAN blog here.

Thanks for listening!

 

REDtalks.live #46 – ‘API Contracts’ w/ Kin Lane

API Contracts, or ‘API Parenting’ as I like to call it, is a critical part of API creation and delivery. So, if you’re thinking if implementing an API, or maybe you already have and things aren’t going so well, then this is the episode for you!

For API consumers, the API Contract sets expectations. It lets you know whether functionality may change at short notice, or not. It informs you of rate-limiting policies, and of the providers uptime/availability commitments. As an API consumer, you should demand API contracts of your providers to inspire confidence in your API consumption choices.

For API creators/providers, your consumers get all of the above – confidence in your API. If you love your customers/consumers, you’ll provide them an API contract, and honor it.

To learn more about API contracts, from the API evangelist (apievangelist.com), Kin Lane, himself, watch this episode!

Thanks for listening!

REDtalks.live #43 – “API First Strategy” w/ Kin Lane

Welcome to episode #43 where I’m joined by super-famous API evangelist, Kin Lane – yes, the Kin Lane behind apievangelist.com

Watch this episode to learn about Kin’s background and how he’s helped many organizations of different sizes realize the benefits of an “API First” strategy. Or just watch to see if he really does look like this:

Theme’s in this episode:

  • API First strategy
  • API Politics
  • Applying API’s to existing technologies/services

Enough words, watch/listen here:

Thanks for listening!

REDtalks.live #28 – Jason Edelman of NetworkToCode.com

Today we’re joined by Jason Edelman, co-founder of awesome network automation training and services company networktocode.com, and co-author of the recently published O’Reilly book titled, “Network Programmability and Automation“.

As the subtitle states, this book is a reference tool aimed at developing “skills for the next-generation network engineer”. Joined by co-authors, Scott S. Lowe & Matt Oswalt, the book covers many great concepts, including one pushed heavily by the f5.com/super-netops training program (and one of my personal favorites), the importance of abstraction and templating.

Watch the episode here:

Thanks for joining us, Jason!

REDtalks.live #24: Becoming Super-NetOps: Day 1

If you’re right at the beginning of your Super-NetOps journey, then this article is for you!

A common question from our NetOps pals is, “How do you get started?” Well, let me take a stab at that in todays article. Before we begin, a few things to keep in mind.

  1. EVERYONE is starting from a different level. Focusing on who’s ahead of you in the learning path will only distract you from your success. This journey is about you. Go at YOUR pace.
  2. Making mistakes is good. Mistakes are evidence that you are learning new things and have the confidence in yourself to evolve. Learn more about a great culture for innovation from John Allspaw, here. <- A good one to share with the team!
  3. Beyond the tools and scripts, pay close attention to how you change your approach to troubleshooting and moving forward with a solution. Often overlooked, learning to automate without adopting and nurturing new practices and culture is almost pointless. Take the time to see how process changes and how you begin to look at challenges differently.

Ok, keeping these points in mind, here’s some new concepts to look into:

1. Understand RESTful interfaces

If this is your first time venturing away from the GUI/CLI, or maybe you just want a refresh, I recommend you watch this great REST API introduction video posted by WebConcepts. In this video you’ll see how you can communicate with popular on-line services including Facebook, Google Maps, and Instagram via their REST APIs:

 

2. Interact with a RESTful Interface

There are many tutorials on the internet that show how to communicate with a RESTful interface from a scripting language, like Python or Javascript. But what if you don’t know the scripting languages they refer to? Sometimes its best to avoid an overload of too many new concepts to learn at once.

For this very reason, I tend to direct people to the awesome, multi-platform REST client, POSTMAN: https://www.getpostman.com/

While their messaging does target ‘API Development teams’, its fantastic for API beginners, too. With POSTMAN installed, I recommend you watch the great tutorial “How to use the POSTAN API Response Viewer”:

 

Once you’ve worked through the basics, I recommend going through the POSTMAN video tutorials to learn some of the time-saving features you’ll come to depend on: https://www.youtube.com/playlist?list=PLM-7VG-sgbtCJYpjQfmLCcJZ6Yd74oytQ

3. Troubleshooting JSON

Now that you’ve had some interaction with a RESTful interface, you’ve probably had some experience with how a small error can break things. Fear not, while you’re on your path to becoming JSON-fluent there’s always the great on-line JSON validator, https://jsonlint.com/

Simply ‘paste’ your misbehaving JSON data into the text field and click ‘Validate JSON’. Below its showing me that I missed a comma on the end of the second line:

JSONLint_-_The_JSON_Validator

We’ll look at more data formats, like YAML, in future posts.

4. Conclusion

If you’ve worked through these exercises then congratulations is in order. You have already begun your journey towards becoming a Super-NetOps engineer! If you’re still feeling a little overwhelmed with these concepts, there is no shame is working through them again from the beginning. Repetition builds expertise and being comfortable with change is all part of the journey!

Next in the series we’ll look at some more advanced POSTMAN features and then take what you’ve learned in POSTMAN and apply it to scripting languages.

 

REDtalks #18 – Enabling the docker TCP API in AWS

Not a traditional REDtalks post today (no interview/demo), but this took me a while to work out so I thought I’d share.

What’s this about?

It all started with me building REST extensibility solutions for F5 Networks in AWS. I created (Launched) a new AWS AMI Linux instance – yep, the very first one on the list: “Amazon Linux AMI 2017.03.0 (HVM), SSD Volume Type“.

Next, I followed the AWS instructions to install docker:

sudo yum update -y

sudo yum install -y docker

sudo service docker start

sudo usermod -a -G docker ec2-user

docker info

NOTE: Full docs here: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html

This is where I got stuck!

As part of the solution I needed to issue a docker command on the docker host, from inside a container… Ok, Batman, to the Google-copter…

There’s loads of suggestions out there to map /var/run/docker.sock into the container using -v. For example:

$ docker run -it -v /var/run/docker.sock:/var/run/docker.sock my_container sh

With this you can execute:

$ curl --unix-socket /var/run/docker.sock http:/containers/json

HOWEVER, there are loads of forum posts saying to be real careful about mapping /var/run/docker.sock to all you containers…

What to do?

Enable the API over TCP! 

Back to the Google-copter, there are a few posts out there about getting it running on Ubuntu but none for the Linux AMI distro…

A solution (hours later…)

1. Change some startup options:

The default ‘OPTIONS’ in /etc/init.d/docker is:

OPTIONS="${OPTIONS:-${other_args}}"

we need to change this to:

OPTIONS="${OPTIONS:-${other_args}} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"

So, you need to go ahead and edit that to something link this:

$ sudo vi /etc/init.d/docker

#OPTIONS="${OPTIONS:-${other_args}}"
OPTIONS="${OPTIONS:-${other_args}} -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"

2. Restart docker for these options to take effect:

sudo service docker restart

Now you have enabled the docker API over TCP! #w00t

Test the API

Lets get the API version:

curl http://<ip_address>:2375/version

NOTE: Replace <ip_address> with the IP address of the docker host, or its hostname!

The response will look something like this:

{"Version":"1.12.6","ApiVersion":"1.24","GitCommit":"7392c3b/1.12.6","GoVersion":"go1.6.3","Os":"linux","Arch":"amd64","KernelVersion":"4.9.20-11.31.amzn1.x86_64","BuildTime":"2017-03-07T20:34:04.601909006+00:00"}

Note the:

"ApiVersion":"1.24"

Now add that version number to the beginning of the URI, slap json on the end of it, and presto:

curl http://<ip_address>:2375/v1.24/images/json

Returns:

[{"Id":"sha256:80ee3a0f225e543668eca9922bf5642bce0e484403df665f3ac9b107d2895d40","ParentId":"","RepoTags":["npearce/ilxe-festivus:latest"],"RepoDigests":["npearce/ilxe-festivus@sha256:973dbf813f6a7f07929b8fd86da4fa9b79f613228e3942fb35d9d525fcfa61b0"],"Created":1495771390,"Size":85001082,"VirtualSize":85001082,"Labels":{}}]

 

Now you can go read this: https://docs.docker.com/engine/api/v1.24/

Enjoy!

CAUTION: One last step, and this is REALLY important! Don’t leave your Docker API open on the Internet!

REDtalks #17 – Orchestration 2.0 (w/ a side of bacon)

Greeting automators and welcome to edisode #17 of REDtalks. Today’s guest is Tyler Hatton who is from WWTs own internal IT Operations team. Tyler is the F5 BIG-IP Subject Matter Expert for WWT and is hell-bent on replacing the mundane with declarative interfaces and orchestration systems.

Watch this episode to hear about the interesting culture at WWT and their regular hack-a-thon’s. These events themed at breaking the routine and investing internally in continuous education and, my favorite, “continuous improvement”. Following this, Hatton talks us through his brilliantly named, hack-a-thon winning, “(P)orchestrator” solution!

Tune it to understand the time-saving, self-service interface that Tyler produced, quite literally, from the Ops ‘drivers seat’.

 

Many thanks, Tyler, for sharing your story!

REDtalks #12 – Joe Pruitt on API Lifecycle Management

F5 long-timer, Joe Pruitt, joins me in this episode to discuss API Lifecycle Management!

Joe joined F5 back in 1998 to build BIG-IP management and API solutions. He built the original BIG-IP API, iControl, back 2001: first in CORBA, and then SOAP/XML. Click play to hear Joe’s experiences with building robust APIs suitable for modern Infrastructure as Code practices, and hear why he’s returned to the product development team after several years building F5’s developer community platform, DevCentral.f5.com.

Thanks for joining us, Joe!