First question, what the hack is a sandbox?
A sandbox is a safe and separated environment, where you can experiment without affecting your machine you use at work or at home. This sounds still a bit vague? More on this later, keep reading!
Now let’s look at why you need a sandbox. Your journey will have plenty of trial and error. I’ve wrote about this in STEP ONE. You’re learning a new skill, it is not expected that you do everything perfectly in the beginning. (By the way, it is not expected in this world you do things perfectly ever for the first time, so you can relax now!) This means that mistakes and failed attempts are part of your personal development and these are welcome. These will give you the experience you need to be successful, so don’t be discouraged by them. Sometime a mistake is a typo in your code, but there’s a possibility that your system will be unusable. If the disaster strikes, you don’t want that to kill your machine you use every day, right?
A sandbox is great when you start playing with a new framework. You may want to set it up on a ‘clean’ system and resolve its dependencies from scratch. This experience will be useful if you want to add it into configuration management or a package repository later. (Advanced topics!)
What could be a sandbox?
A sandbox can be:
- simply a folder
- a virtual machine
- a vagrant box
- a jump host (restorable from snapshot)
Let’s see how you can figure out which one do you need. A very important thing, that you will hear from me a lot: You need to use the right tool for the job. You need to identify the “job” first. The best way is to ask the question – what is that I am trying to learn and what’s required to set it up properly? I’ll list a few ideas for you so you understand what I mean:
|Learn/practice python||Text editor or some sort of development environment (IDE); appropriate python versions, installing libraries (import)||Installing many python modules, multiple versions of packages||Folder on your personal computer or virtual linux running on laptop, mounted a folder on your host machine|
|Experiment with NAPALM||Access to test/lab/virtual network environment; python interpreter, text editor||Same as above, plus DO NOT EXPERIMENT ON PRODUCTION ENVIRONMENT||Same as above, plus test network running on KVM, or physical lab kit|
|Write some C code because you’re interested to go back to the roots||Text editor or IDE. C compiler, even more patience||System crash||Proper IDE|
Raise your hands if you use Windows on your work and personal computer! And now take a selfie. Please send the picture to me in a the comments section. 😉
During my five years as a full time Network Engineer I used Windows all the time, but this changed significantly when I started taking automation seriously.
I have already mentioned linux a couple of times and this is not a coincidence. Network Engineers often think of coding in Python when someone mentions network automation. This is only a small piece of the puzzle. Knowing Python inside out is not enough to be a proper Automation Engineer. Using the linux shell and all the small tools available will open your horizon even better.
Think about a little bit what happens after you written your network automation script/framework application.
- You need to place to deploy (we’ll talk about it what deploy means) to a dedicated host which has access to your network. This will be probably a jump host or network management station.
- You need to makes sure this host is secure and updated regularly.
- You may need to run your script regularly, so cron comes handy.
- When you see an unexpected behaviour in your solution you need to look up documentation and most of that will be available for linux.
Be aware, mastering linux is a big challenge in itself, but it gives you a huge advantage and will take you to a higher level. Network automation grew from the devops world and their methods were developed mainly for linux systems.
Plus there is a great opportunity here: you can build relationship with your system guys and devops team and ask questions from them. They will appreciate your openness to learn about their area.
what shall I do now?
For a bit more adventurous:
Don’t worry if my second suggestion sounds a bit intimidating, I’ll share posts that will explain vagrant later. Read about git in STEP THREE.
Read STEP TWO about getting into coding.
Don’t miss out and stay motivated by subscribing to email alerts on the right hand side. (desktop browser).
Till next time…