How to setup Windows for NetDevOps: bash, git, Python, Atom, Postman, Docker and more! Part 2
Skills:
Tool Use & Function Calling90%
Key Takeaways
Sets up a Windows workstation for NetDevOps using bash, git, Python, Atom, Postman, Docker, and more
Full Transcript
so we've now installed git and we've installed Python so let's actually run some network automation stuff that's out there to show how much we've what we've enabled already and so I have I maintain a github repo called each Preston Python networking which I use for some Python networking examples and demos and I actually have a lab that I run out of here but I'm gonna go ahead and copy the URL for this github repo and then I'm going to clone it down so git clone we already installed get so we should we've tested that when we did the hello Network one but I'll go ahead and paste in here so I'm just gonna do a git clone on github.com /h Preston Python networking so I'll clone this down and so what that created is a new directory grep Python called Python networking so when we clone down a repository all we're really doing is creating a folder and I'll change into that folder now inside if I look at my readme here on this one we'll see that I've got information on how to setup and run some of the examples that are here so the first step was to clone and copy down so we already were able to do that and then the next bit here is to go ahead and set up the Python virtual environment give me one second I actually so i refresh the page here and so what I can see is set up Python virtual environment and the first block here is if you're on Mac OS or Linux and then down here I've got a note for if you're on Windows the recommendation is to use git bash terminal just like we're talking and so we've got the commands and these should look pretty familiar so py 3 - 3 - M so ve and V create a virtual environment then this source command will activate the virtual environment and then pip install - our requirements win dot txt so we saw pip install already once if you just do pip install you can install one package at a time if you do - are you can actually pass it a text file that has the list of packages to install and if I go up here in the repository I can look at requirements win text and I can see it has a list of packages that I want to install and so let's go ahead and set up these examples on our Windows workstation here walking through this setup and so I'm going to go ahead and we'll copy/paste will copy this one over paste this in so we'll create a virtual environment this will take just a second so you had net Miko and napalm in that list of stuff to install so those work on a Windows computer now as our right if you'd if you do it this way that's a great question net Miko certainly works and we're actually going to demonstrate a net Miko script in a minute I I haven't done much with napalm yet so I don't have any napalm scripts in this demo yet I've just got the requirements there so I'm not sure if napalm will work on Windows um I hadn't heard that it didn't but your question makes me think that maybe it doesn't I'm not sure it's yeah I've always it's great that you're doing this I think because again I would have recommended guys use a Linux docker container or a virtual machine if they wanted to use net miko or napalm yep and that's that by just switching to using git bash you can get away from having to use docker and vienna's for a lot of those because for example we'll look at maybe some of these piaying tools to look at yang models as we get through here and those don't work if you're using PowerShell interfaces or some of these other ones because they're the tools are wrapped around these this bash concept but they work fine and get bash yep all right so our virtual environment finished creating let's go ahead and activate it and you may be wondering why am i creating another one in here and that's because the the basic kind of recommendations and practices around Python development as each project should have a unique virtual environment and so oftentimes you'll find these types of instructions is after install or downloading and cloning you would go ahead and create a virtual environment for this one and then you can verify that everything that the developer the project requires is kind of isolated as it sits so now I'm installing the requirements and so what's in here is this first one actually is ipython ipython is interactive Python interpreter it's kind of a place you can work with I like ipython better than just using Python these days because it provides tab completion and a bit better color syntax highlighting but we're also getting downloading things like NC client for net comp requests PN for working with yang Mikko for doing CLI based interactions and so all these are getting downloaded and installed now as we're waiting through and Hank I just want to mention it now I saw that you had another talk where you were talking about like good tools and utilities that network engineers should use so I think we should link to that that that'll be on Cisco's website will it that is actually in in real real life time just this week we launched net DevOps live which is a new kind of net DevOps and Network automation focused web series and video series and this week's talk was on useful Python libraries for network engineers the video for that should go live up on the website I'm hoping to get the editing actually done this afternoon so that it can get posted live so probably by the time we get our video posted here we should be able to link to that one and folks can take a look at it as well and in fact the code examples we're cloning here are the same code examples and things that we use in those talks so so our installation of the requirements have finished so let's actually go run a couple of these examples that are in there so I know that in my directory here so if I go I can change into there's a folder called device api's and then inside here are a handful of examples for different types of device API so I've got a rest comp and the rest folder we've got net comp I've got some net nikko so let's run some of the example code that we just downloaded right from github so we'll start out with Netcom so I'm gonna change into the net comp directory and we see that I have a few examples I've got net comp example one two one a and three and so I wrote them so I know what they do what net cough example one does is it makes a net comp request for some interface information from one of the dev nets and boxes that are always on and VPN lists and I use that one B so that this script will work as soon as anybody grabs it so if I run pike python net comp example one dot py this will go ahead and run this is using the NC client inside of our virtual environment we just set up and it's reaching out to a device and making a request now let me make my window a little bigger so we can see the full pieces here there we go so here's where we ran it so we ran our command and it reached out and used NC client to connect and it requested some information about an interface specifically it was Gigabit Ethernet two there at the end and then this was the raw XML that came back and then inside the script it processes it and then just prints out some basic information so the interface Gigabit Ethernet to has IP address that's there and so we've now been able to just download our code now this code was originally written on a Mac because I know I wrote it on my normal workstation and we've been able to pull it down into our Windows machine and then run it here now that was the neck cop example we can go up let's go and I'll load up to you for one second Hank oh yeah go ahead I just wanted to summarize at this point so the really cool thing here is you're running Windows 10 you're not running a virtual machine you're running the Linux subsystem that comes in Windows 10 you've got get that clones some stuff so you downloaded stuff that was originally written on a Mac that's now running on Windows you're running Python with net conf connecting to a live device across the internet live device running in dev net and you've connected to that using a REST sorry a net conf or API and you've pulled back data is does that is that right that was there was there was one statement in there I want to clarify so I think you said that I'm using the Linux subsystem I'm actually not in this example so we're just using git bash which is just a bash emulator that is installed and probably our next video will dive in and we'll look at when you can't when something doesn't work just in a bash emulator which is what git bash is Windows 10 offers that Linux sub system where you can install an actual boon - or I think there's some other flavors right now on there so you actually get a real-life Linux kernel that you can run off of for the example we've done here I don't need a Linux kernel because NC clients and these other things work fine on Windows but what we'll do in the Linux subsystem is something that doesn't work in Windows ansible is probably the example we'll use because ansible does just wasn't written it does not run on a Windows kernel it needs a Linux kernel and that's where the Linux subsystem for Windows comes in as it provides an actual Linux kernel where you can run Linux required applications and it's it's it may seem like a small difference between a bash application emulator like here and the true kernel but when you start running actual Linux applications there's there's a bit of a difference there and it's important to see the difference yes oh it's even better than I thought so it's just a what is it a bash emulator that we're running directly on Windows and we can do all this stuff yep so in this case it's this mean w 64 I think is what git bash is kind of built on top of so other folks I know that people have used cygwin which is similar it's another bash emulator for Windows but both of those are still running on a Windows platform so just because you're using cygwin or mingwan in this case you can't actually run Linux apps but when you do the Linux subsystem you're actually getting a real Linux kernel and now you can run Linux applications like ansible and as I mentioned what we'll dive into that a little in our next video that's brilliant no that's great I mean it's it's always again it's just to summarize guys who run Windows often feel it's it's it's it's impossible or very difficult to do this kind of stuff but you've just proven that it's actually very easy to do net conf interacting with a live device absolutely and so we'll do one more example here before we kind of leave this bit and so I've changed into the C I CLI directory and if I look I've got some net miko examples and so if folks have been diving into network automation you may have run across net miko already it's a really handy library by kurt buyers that lets you do CLI interaction to Cisco as well as lots of other platforms and software or network vendors devices and so I've got a handful of scripts here so example one queries for that same exact device and queries the same device for the same info so if I run Python net miko example one dot py will let this one run and so this is using net miko to connect over ssh to the CLI interface on our dead net sandbox to retrieve information about gigabit ethernet to same interface we just looked at and then this one does take a little bit longer because those CLI interactions can be a bit timely but now we can see so here was the configuration when I sent the show running config request with the script out this is what came back and then I used some regular expressions to parse out so that we could print out the Gigabit Ethernet to information and so now we've seen how right on our machine I can grab these examples and run them there makes sense it's really impressive it's really impressive to see this running on Windows absolutely alright so one last thing I want to do before we close up today's video is we're gonna look at the next step so let's say you wanted to write this code or you wanted to look at the actual code what's a good editor text IDE to work with and if we just flip back over here inside of the learning lab that we've been exploring step five is actually about text editors and ITES and now there are so many potential text editors and ID's that you can use to write code and work through that what I've got here is just one suggestion and so if you're new and you haven't picked one that you like um Adam is one that you can check out it's a free open source text editor IDE from the folks github there are plenty of other options if you just want a basic text editor notepad plus plus I know it's been a common one for folks on Windows that works fine as well but it when you move to something like Adam or V s code from Microsoft those offer some kind of developer friendly features that are there and so in this case we'll we'll use Adam because that's the one that I tend to use and it's what I put in this lab and so if I come back over here I've already done the download so in my downloads directory there's my Adam setup so let's go ahead and run this setup all right so our atom installation finished and it opened up and it does give me this piece here says register the default atom URI handler the idea for what this is is is if you click a link in a web browser that is intended to be opened an atom it just make sure that the atom application goes and builds it this is I haven't seen too many links coming out from your eyes to use atom but I think it's a decent idea to go through a folks start if you find that up on a github repo or something so I'll just go ahead and say yes always to that and so I've opened up atom and then from here I can go ahead and just close down some of these default windows and then I could go to file and then say add project folder and we can go in and find the project folder for Python networking that we just cloned down and so now I'm looking at the actual project we look through and then if we go ahead and check out one of those code scripts that we just ran so underneath device API is and we'll say the CLI one here and then net miko example one so here's the code example we just ran to go and retrieve that information that's there and so it's we can go ahead and look at it you could explore that code you can make changes or edit it for your own use cases super easy to go through now one of the things I like about atom in addition to its editing features is that it's really easy to work with and tie it back to the command line as we're going through so I'm gonna go ahead and close out of atom so I've closed atom and so now from my command line over here let's say I've cloned down the repository now you'll see I've changed myself I'm right back at the root of Python networking the repo and I wanted to open up atom in this directory I can simply type atom and then dot for this directory ah yep alright so now that we've installed atom I've gone ahead and closed the project that we had I'm gonna close my terminal so that as we've noticed we actually have to refresh all of those pieces because I installed a new piece of software I'll reopen up get bash I'll change back into my Python networking directory that's there and now just to open up atom I can go atom dot and the only reason I do re open the terminal window here is because I had just installed atom in general now that it's been installed you wouldn't have to reopen each time you bring any project down but as you'll see simply typing Adam Dada at the prompt opens up Adam and I'm now connected directly to the repository I'm at and I find that a really convenient kind of workflow when I'm working in different code pieces to get started and so we could jump in and start looking at the code that's there alright I think that's a pretty good spot for us to stop for today's video David we can pick up on some of the other tools that are important and we'll dive into things like containers and how to do application development and some of those other pieces and the tools that you might need for that in our next video that's excellent hank again I want to thank you for sharing all this knowledge with the networking community and everyone please send messages on Twitter to Hank and myself if you have questions or comments please comment below this video and let us know what you think about these these videos that we doing Hank again thanks very much and have a great weekend absolutely of it talk to you soon you
Original Description
Setting up your Windows workstation as a development environment: Install bash, git, Python, atom, Postman, Docker and more!
So you are a follower of Gates, Balmer and Nadella, excellent! Let's supercharge that Windows workstation with everything you need to be a programability ninja!
Objectives:
- Install a basic development toolset on your local workstation
-Verify the tools are all working as expected
Prerequisites:
In this lab you'll find walkthroughs on how to install a set of common development tools on a Windows 10 workstation. If you haven't reviewed the lab "What is a Development Environment, and why do you need one?" yet, you may want to go back and take a look. In it, you will learn the reasons behind the types of tools and choices made for this lab.
DevNet Homepage
http://bit.ly/2MHbgOk
Learning Lab - Dev Setup
http://bit.ly/2NkwCGt
NetDevOps Live! DevNet Show
http://bit.ly/2NKmXZ8
Network Programmability Basics Video Series
http://bit.ly/2MHbLba
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from David Bombal · David Bombal · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
RYU SDN Controller Part 4: Graphical User Interface (GUI): Practical GNS3 SDN and OpenFlow
David Bombal
HPE Network Protector SDN Application Part 1 - Introduction
David Bombal
HPE Network Protector SDN Application Part 2 : DNS Interception using OpenFlow
David Bombal
HPE Network Protector SDN Application Part 3 - Lab Setup using Physical Switches
David Bombal
HPE Network Protector SDN Application Part 4 - Demo of malicious websites blocked
David Bombal
HPE Network Protector SDN Application Part 5 - Demo OpenFlow table interception flows
David Bombal
HPE Network Protector SDN Application Part 6 - Demo of Physical Switch configuration
David Bombal
HPE Network Protector SDN Application Part 7 - Demo Service Insertion Tunnel / GRE Tunnel
David Bombal
HPE Network Protector SDN Application Part 8 - Demo SDN OpenFlow Reporting
David Bombal
HPE Network Protector SDN Application Part 9 - Demo switches interception of DNS traffic
David Bombal
GNS3 Talks: GNS3 version 1.5.X Appliance Tips
David Bombal
CCNA 200-125 Exam: AAA demo: TACACS+ with GNS3
David Bombal
GNS3 2.0.0 beta 2 install
David Bombal
CCNA #012: Learn SNMP with GNS3, Wireshark and Solarwinds NPM - CCNA 200-125 exam
David Bombal
CCNA #013: Spanning Tree CCNA Exam Questions: Know the answer? CCNA 200-125 exam
David Bombal
GNS3 2.0.0 beta : GNS3 VM integration with GNS3 GUI
David Bombal
CCNA #018: Routing exam questions: Who wins? OSPF, EIGRP or RIP? Sure? CCNA 200-125 exam
David Bombal
CCNA #019: Spanning Tree CCNA Exam Questions: Root Bridge, Root Port and more: CCNA 200-125 exam
David Bombal
GNS3 Download, installation and configuration - GNS3 1.5.3 and Windows 10
David Bombal
CCNA #023 EIGRP Neighbor Troubleshooting (DUAL Issues) for the CCNA 200-125 Exam
David Bombal
GNS3 2.0 Architecture and schema Part 1: What is the GNS3 Controller?
David Bombal
GNS3 2.0 Architecture and schema Part 2: Emulators and virtualization
David Bombal
CCNA #028 VTP Troubleshooting for the CCNA 200-125 Exam
David Bombal
CCNA #029 VTP & DTP Troubleshooting for the CCNA 200-125 Exam
David Bombal
CCNA #030 VTP Troubleshooting for the CCNA 200-125 Exam
David Bombal
GNS3 : How to download Cisco IOS images and VIRL images. Which is the best? How do you get them?
David Bombal
GNS3 ASA setup: Import and configure Cisco ASAv with GNS3
David Bombal
GNS3 switching setup and options: Cisco and other switching options in GNS3
David Bombal
GNS3 switching setup and options Part 2: GNS3 unmanaged built-in switch
David Bombal
GNS3 switching setup and options Part 3: Router on a sick with GNS3 unmanaged built-in switch
David Bombal
GNS3 switching setup and options Part 4: Etherswitch Router for Cisco Dynamips Part 1
David Bombal
GNS3 switching setup and options Part 5: Etherswitch Router for Cisco Dynamips Part 2
David Bombal
GNS3 switching setup and options Part 6: Etherswitch, Wireshark, 802.1Q, InterVLAN routing
David Bombal
GNS3 Talks: Docker, Open vSwitch, SDN and OpenFlow Part 1: GNS3 Switching Part 7
David Bombal
GNS3 Talks: Docker, Open vSwitch, SDN and OpenFlow Part 2: GNS3 Switching Part 8
David Bombal
GNS3 Talks: Docker, Open vSwitch, SDN and OpenFlow Part 3: GNS3 Switching Part 9
David Bombal
GNS3 Talks: Docker, Open vSwitch, SDN and OpenFlow Part 4: GNS3 Switching Part 10
David Bombal
GNS3 Talks: Docker, Open vSwitch, SDN and OpenFlow Part 5: GNS3 Switching Part 11
David Bombal
GNS3 Nexus (NX-OSv) switch setup and configuration Part 1: GNS3 switching options Part 12
David Bombal
GNS3 Nexus (NX-OSv) switch setup and configuration Part 2: GNS3 switching options Part 13
David Bombal
GNS3 Talks: Docker, Open vSwitch, SDN and OpenFlow Part 6: GNS3 Switching Part 14
David Bombal
GNS3 Talks: Docker, Open vSwitch, SDN and OpenFlow Part 7: GNS3 Switching Part 15
David Bombal
GNS3 Cisco CSR 1000v setup and configuration Part 1: GNS3 NFV
David Bombal
GNS3 Cisco CSR 1000v setup and configuration Part 2: GNS3 NFV
David Bombal
GNS3 Talks: Use the NAT node to connect GNS3 to the Internet easily!
David Bombal
GNS3 Talks: GNS3 2.0 RC1 is now available
David Bombal
GNS3 Talks: GNS3 2.0 Portable Projects - easily export and import GNS3 projects
David Bombal
GNS3 Talks: Multiple clients sharing projects in real time, plus console session shadowing!
David Bombal
CCNA #035 NAT Troubleshooting Scenario 1 - Can you find the issue? CCNA Exam 200-125 troubleshooting
David Bombal
CCNA #036 NAT Troubleshooting Scenario 2 - Can you find the issue? CCNA Exam 200-125 troubleshooting
David Bombal
GNS3 Talks: ESXi, GNS3 VM and KVM support Part 1: leverage servers and the cloud
David Bombal
CCNA #037 OSPF Troubleshooting - can you find the issue? CCNA Exam 200-125 troubleshooting
David Bombal
GNS3 Talks: ESXi, GNS3 VM and KVM support Part 2: leverage servers and the cloud
David Bombal
CCNA #038 NAT Troubleshooting Scenario 3 - Can you find the issue? CCNA Exam 200-125 troubleshooting
David Bombal
CCNA #039 - OSPF DR, BR and DROTHER Election - do you know the answers?
David Bombal
CCNA #040 NAT Troubleshooting Scenario 4 - Can you find the issue? CCNA Exam 200-125 troubleshooting
David Bombal
GNS3 Talks: Arista vEOS GNS3 import and configuration Part 1
David Bombal
CCNA #041 - OSPF DR, BR and DROTHER Election - do you know the answers?
David Bombal
GNS3 Talks: Arista vEOS GNS3 import and configuration Part 2
David Bombal
GNS3 Talks: ipterm: Linux, Docker, Python, SDN and more! Part 1
David Bombal
More on: Tool Use & Function Calling
View skill →Related AI Lessons
🎓
Tutor Explanation
DeepCamp AI