Getting Started with Automation

Blog Detail

Beginning your automation journey can seem like an overwhelming task. We often hear questions from our clients, such as, “Where do I even begin?” or “How can I ensure that I am building a platform the right way from the start?” All great questions. However, journey is the keyword when it comes to automating your network. In this blog post, I’ll detail some of the key findings I’ve discovered the last several months leading business development efforts at Network to Code and how our customers are successfully implementing these changes within their environments.

One of the common conversations we have with new and existing customers has to do with manual repeatable workflows. For example, a common use case that we often encounter is a change request to a firewall policy. Many organizations have a manual process in place that touches several teams and data sources and can take weeks to execute. This, combined with dozens of requests per week/month, puts tremendous strain on the engineering team. What’s more, this issue is directly hindering the business as speed to market is greatly affected. The change request use case may seem fairly straight forward in terms of a solution. However, as you begin to peel back the layers, you realize that several tools are likely required. For instance, an ITSM may be the starting point to issue and track the request, but a separate automation and orchestration tool may be necessary to automate the workflow.

Additionally, the data required to automate the change may reside in various systems or spreadsheets. On top of this, basic programming knowledge to integrate various product APIs is often required for a customized experience. What about identifying which firewalls are in scope of the change—should that be inferred based on the change data provided in the ticket? This is often where the overwhelming emotion takes effect as gaps in resource product knowledge are identified.

There are often multiple ways to approach use cases through buy or build methodologies. We’ve seen most customers use a hybrid approach and also leverage the open source community for guidance. I would argue that this is indeed the best method, as building a proper platform allows organizations to go faster and automate other areas of the network.

Additionally, off the shelf tools often only satisfy a subset of the workflow, whereas building a platform allows for customizable inputs creating better data for end-to-end automation specific to the organization’s needs.

Where do I begin?

All organizations have unique environments, so the assessment phase is key in identifying organizational needs. You may be unfamiliar with or even unaware of your organization’s existing automation, orchestration, and DevOps toolchains, but after conducting a series of interviews, you might discover that the Application team (for example) is already using a specific toolchain for automating resource provisioning, documentation, or whatever their workflows call for.

The assessment phase of any network automation journey also uncovers key issues with the process. We often discover that departments have completely different views on how a process works or how a process should work. The assessment allows business units to talk about the workflow, which oddly doesn’t often occur enough before an assessment. Having a third party ask the right questions is instrumental for successful results.

How can I ensure I am building the platform the right way from the start?

Seeking expert help is a great way to start. Rather than trying to reinvent the wheel, reach out to an organization that has countless hours of experience implementing automation workflows in similar environments. Another option is leveraging the open-source community to ask questions and find great articles and videos on a particular topic. Generally, people are willing to help or, at the very least, point you in the right direction.

How can I prove to leadership that we need automation?

Many organizations are leveraging tools to plot data such as the number of jobs, compliance checks on job performance, location data, and more. But when it comes to network automation, buy-in from leadership isn’t always guaranteed. It’s important to test and collect easily shareable digestible data constantly. Targeted data allows key stakeholders to correlate the data and extract hours or dollars saved based on the built-in automation platform.


Conclusion

Network to Code is happy to help anyone interested in starting their automation journey. Feel free to reach out with any questions about our services. Thanks for reading!

-Bryan



ntc img
ntc img

Contact Us to Learn More

Share details about yourself & someone from our team will reach out to you ASAP!

Lone Wolf vs Team Development

Blog Detail

I am sure I was in the same shoes as many of you. You understand that automation and NetDevOps is the future. You spent some time learning the fundamentals of Python, the structure of Ansible playbooks, and took the time to stand up an instance of NetBox at your organization. You can probably do some basic configuration changes, gather network information, and put together some reports.

However, just like me, you were at it alone. I didn’t have a team of network automation engineers that I could ask questions and bounce ideas off of. I was learning by trial and error. Google and blog posts were quickly becoming my best friends. Now, I get to work with an amazing team of people that I can learn from. Going from developing on my own to developing on a team has been a big change for me and I’ve learned a lot.

In this blog post, I will talk about some of what I’ve learned and hopefully give some words of guidance to others wanting some insight into the differences between developing alone versus with a team.

I was not as good as I thought I was

When I say this, I am not calling myself bad or incompetent at programming. What I’m saying is that working with others highlighted my own mistakes, weaknesses, and bad tendencies. This could be something as small as not following PEP 8’s guidelines to keep your lines to a maximum of 79 characters, or something more crucial such as keeping your code DRY. Being able to ask someone to review your code, bounce ideas of them, and have exposure to high quality code, especially in the context of NetDevOps, is invaluable.

Once I realized I was not as good as I thought I was, I needed to be open to constructive feedback. Asking someone to review your code doesn’t do you as much good if you just shrug off the recommendations they have. You need to take those to heart. Ask them why what they suggest is better than what you did. Take those reasons and strategies and apply them to your projects in the future.

I had the realization that other people will be reading and using your code

This can be a very scary thing at first! When writing things for yourself, you may not put much effort into the readability of your code. This is a bad habit I had. You need to always be in the mindset that someone else is going to be reading (and using) your code. A few of the bad tendencies I had were:

  • Using single character variables like i in for-loops. While you may know what it is, anybody reading your code will have to do a lot of extra work to figure out what your ‘i’ variable represents. Make sure to name your iterator variable appropriately.
  • Doing too much in one line. Below I update a dictionary using the update method. While it works, a lot is going on in one line.

  chassis_obj["chassis_index"].update({ 1 : {"role" : "master", "mac_address" : "AAAA:BBBB:CCCC", "priority" : 3 }})

We are updating the original dictionary with a nested dictionary, looking up variables, and casting them to an integer all at the same time. That could make your code difficult to read and understand. Sometimes it’s okay to do what you need to do in more lines of code if it means it would be easier for someone else to digest. Here is an example of that one line broken up.

    
slot = int("1")
role = "master"
mac_address = "AAAA:BBBB:CCCC"
priority = int("3")
chassis_obj["chassis_index"].update({ slot: {} })
chassis_obj["chassis_index"][slot].update( {"role" : role, "mac_address" : mac_address, "priority" : priority })
  
  • Being inconsistent with the use of single quotes and double quotes. When you develop on a team, you need to be more aware of smaller details in your code. Adopting the standards of the team, even ones as minute as single and double quote usage, will ensure your code can easily be digested by others.

I also realized that it is now a necessity to read and digest others’ code

I’ve realized that reading and integrating other peoples code is a skill in and of itself, and that I did not get to practice it when I developed by myself.
Now, I take every chance I get to look at others’ code and try to fully understand what is happening. One invaluable way to develop this skill is to try and fix a bug in an open source project.
You will find that to understand the bug, you will need to understand what the code is really doing. Just like anything else, the more you practice this, the more quickly and more efficiently you will read and thoroughly understand other peoples’ code.


Conclusion

If you are currently alone on your network automation journey, the first step I would recommend is to join the NTC community Slack. It gives you the opportunity to join over 15,000 people who are all somewhere along in their automation journey. You can ask questions and bounce ideas off others and there are NTC employees available to answer as many questions the community has. Another suggestion would be to look at NTC public repos to see high quality code and possibly recognize ways of implementing things that you haven’t thought of before.

-Adam



ntc img
ntc img

Contact Us to Learn More

Share details about yourself & someone from our team will reach out to you ASAP!

Workflow and Productivity Management

Blog Detail

Full disclosure before you read any further: I am one of “those” people …the productivity obsessed. I am constantly trying to improve my output and overall workflow – both professionally and personally. I am by no means the most productive person in the world, but I’m constantly trying to work toward some unatainable level of expert efficiency. I’ve read 7 Habits of Highly Effective People and Atomic Habits (which I HIGHLY recommend). I’ve read every Lifehacker “How I Work” post. I’ve gone from vim to emacs back to vim – currently with highly-customized vimrc file. And, I’m currently in the process of trying to reset my sleep schedule to wake up at 4:00am, to reach the pinnacle of productivity!

Take everything below with a grain of salt – there are probably much more scientific and accurate explanations for the information I provide herein. But, to quote the prophet Adam Sandler in his critically acclaimed philosophical sonnet “Wedding Singer”:

I am the one with the Microphone! 

As network engineers, developers, devops practictioners, and overall technologists, we have become accustomed to working in teams. These teams are often organized into functional or cross-functional groups that work together to accomplish a certain set of tasks – deliver an application; design, implement, maintain, augment the infrastructure that supports an application; rinse & repeat. As such, there are many methodologies that define how teams work together to accomplish their set of tasks. A non-exhaustive list would include:

  • Agile
  • Kanban
  • Waterfall
  • Scrum (which, I think is Agile?)
  • Lean
  • Extreme Programming
  • GTD
  • And many…many…more (so many more)

These methodologies, for better or worse, define how a project is managed. They establish a set of standards and working cadence that facilitates a few expected outcomes: delivery, collaboration, acceptance criteria, estimation, and scheduling. When utilized correctly, these methodolgies can be powerful tools to manage a team toward an efficent and euphoric high-functioning juggernaut!

The question that can often get overlooked, even on these high-functioning championship teams is: How do I manage MY time? How do I prioritize and maximize MY productivity?

With that question in mind, we will take a look at a method of personal productivity management that can be beneficial for anyone working in an engineering/application/devops capacity.

Priority vs Productivity

In all my research, tweaks, failures, and successes, I’ve identified that there is a big distinction to be made between priority and productivity. They work hand in hand, and are equally important toward an efficient workflow. Priorty identifies what to do at a given moment; Productivity is how you do it. Being proficient at both is the key to maximizing our time and potential as engineers.

More often that not, external factors have much influence on prioritization. Deadlines, dependencies, budget contraints, outages, threats, public shamings, etc… can all impact which tasks get pulled into our “hot list”. Often times this is out of our control.

Prioritization can be summed up by using the common computer science analogy of the Stack vs Heap.

In this analogy, “the Stack” involves things that are done quickly, with very little congitive load. This could involve answering an email, documenting a new feature, commenting on a pull-request, reviewing a pull-request (sometimes), and other “quick” tasks. The key here is the cognitive load. A coworker of mine is an all-time champ at answering questions on the Network to Code Slack channel. During downtime he can engage with someone, diagnose their issue, and respond, almost asyncronously from his other tasks. He’ll do this if he has 5 minutes between meetings, waiting on a response from one of his employees, etc… He is able to do this based on experience and muscle memory – most questions require very little research for him. If a question does require additional research or investigation, he may refrain from responding or file it away for a later time …when he has time for “the Heap”.

“The Heap” in computer science refers to operations requiring memory allocations of a non-finite size. As such, it is more flexible, but more expensive than operations involving “the Stack”. As technologists, examples of using “The Heap” could include: reviwing documentation, writing code, debugging, troubleshooting, researching a new topic, reviewing a design request, and code review.

The Stack vs Heap analogy highlights the importance of properly identifying a task or request’s scope, and what is involved in fulfilling/resolving it. A good question to ask is: “Will this take me more than 5 minutes?” If so, it is normally left for an allocated time of focus, where the task can be given the attention it needs. Otherwise, it can be handled immediately, or during a time requiring less focus. Some answer emails and handle other “quick” tasks at pre-allocated times during the day (more on this later); others handle these tasks as they come in, but only for a short period of time, before returning to a more involved task (this is often the case for those in an operations role).

Proper Prioritization Prevents Poor Performance

The biggest takeaway from the Productivity vs Priority distinction is that it is imperitive that we identify our priorities and make a plan to execute on them. Conversely, it is important that we identify secondary responsiblities and potential distractions that can negatively impact our priorities.

If our main job responsibility is to deliver a feature by the end of a sprint, will our team care how many emails we have answered if the release is late? If we are asked to resolve tickets quickly to improve our team’s MTTR, does researching new features contribute to, or detract from that goal?

Though those questions may sound bleak, the good news is that we normally have more time for productivity that we think. This is especially true if we work in an environment with reasonable deadlines and efficient estimation – e.g., Network to Code (shameless plug). Normally, we have time to deliver on our primary, and additional responsiblities and look for ways to improve efficiency – if we improve our productivity.

Pomodoro Technique – Embrace the Tomato

The method I have personally found to be most productive FOR MYSELF is called “Pomodoro”. I have found great success utilizing this method because it forces you to allocate both focused and unfocused time, along with breaks. In short, the Pomodoro Technique consists of the following:

  • A “Pomodoro” is a CONSECUTIVE unit of focused time – normally 25 minutes
  • Each pomodoro is followed by a short (3-5 minute) or long (15-30 minute) break
  • Breaks increase in length as successful pomodoros are completed
  • Tasks are handled in a First In First Out method
  • If a tasks takes longer than 25 minutes, it can be completed after a break during the next pomodoro
  • If a task takes less than 25 minutes the remaining time can be left for unfocused (“Stack”) activities
  • WRITE EVERYTHING DOWN!! Take notes on tasks, successful/failed pomodoros, timing, etc…

It also promotes good prioritization, planning, estimation, and self-reflection. At the end of a day, week, or sprint, it is easy to identify where time was spent, and what optimizations are needed.

Here are some things I’ve done to utilize the pomodoro technique effectively:

  • Assign every task a due date as you receive it
  • At the beginning of the week define the week’s goals and the total time you’re allocating to work (time available minus meetings, appts, personal time, PTO)
  • At the beginning of the day write down Things To Do, keeping in mind the time available for that day
  • Identify which tasks are most difficult, and/or least desireable, and stagger them with more desireable/easy tasks
  • Always start with a desireable/easy task to build momentum
  • Schedule long breaks, lunches, and personal time, by adding these things to your calendar
  • Mute Slack, email, and other notifications (if possible). Move your phone to another room, or away from your reach
  • Have fun & execute

With all of these productivity “tips”, it is important to remember that “to err is human”. Some days I am a productivity machine. Some days I can barely type my own name. However, I can personally attest to the success of the pomodoro method. When I use it effectively, at the end of each day, week, sprint, my output is optimal, and I feel great about it. When everything is “on fire”, time seems to fly by, with little impact.


Conclusion

Is the Pomodoro Technique the “silver bullet” for productivity? Surely – just like Agile, DevOps, and Kubernetes solve everything. This technique may not be the best for you. But, the principles of Prioritization and Productivity can help to contribute to an improved workflow, and hopefully make us all more effective and efficient. The most important thing is to be more deliberate with our time, and to pick a technique, method, and workflow, that works for each of us individually. Increasing productivity is the closest we can get to building a time machine, in that it can help us waste less of it. Maybe that justifies my obsession?

-Daryn



ntc img
ntc img

Contact Us to Learn More

Share details about yourself & someone from our team will reach out to you ASAP!