DevOps tips & tricks – SHALB https://shalb.com Tue, 23 May 2023 15:54:07 +0000 en-US hourly 1 https://wordpress.org/?v=5.4.2 DevOps – The Knowledge and Skills You Need and How To Learn Them, part 2 https://shalb.com/blog/devops-the-knowledge-and-skills-2/ https://shalb.com/blog/devops-the-knowledge-and-skills-2/#respond Thu, 17 Nov 2022 15:06:34 +0000 https://www.shalb.com/?p=2151 This article is a follow-up to the talk given by Volodymyr Tsap, co-founder and CTO at SHALB, at Chernihiv.IT conference 2022.    In Part 1, we outlined the knowledge and skills that will help you make a successful start in DevOps. Now let’s talk about the expertise that you need to build a career in […]

The post DevOps – The Knowledge and Skills You Need and How To Learn Them, part 2 appeared first on SHALB.

]]>
This article is a follow-up to the talk given by Volodymyr Tsap, co-founder and CTO at SHALB, at Chernihiv.IT conference 2022

 

In Part 1, we outlined the knowledge and skills that will help you make a successful start in DevOps. Now let’s talk about the expertise that you need to build a career in the field.

 

Part 2. DevOps Hard Skills

Learn YAML

To a large extent, I’d say that programming in DevOps centers around working with files, particularly YAML or configuration ones. YAML is a perfect choice for configuration thanks to its broad language support and human-readable format: Ansible, K8s, and Docker all use it.

 

Although a lot of YAML files can look big and scary, they can actually be broken down and written quite easily if you know the basics. Start practicing reading and interpreting YAML in any visual editor with YAML support and syntax highlighting. You need to be able to read, interpret, and edit YAML files confidently since they are the file types you will deal with a lot in your DevOps career.

 

Virtualization

Virtualization is one of the fundamental things in IT. It is the technology behind cloud computing and XaaS, or the everything-as-a-service computing model. So, a firm understanding of virtualization is vital, whichever role in DevOps you choose.

 

Clouds make things easier by putting a virtualization layer away and leaving it to a provider to manage. However, working in a regulated enterprise such as banks or healthcare companies will require excellent applied skills as these organizations need to manage virtualization using their own resources. Moreover, strict compliance policies prevent them from locating their data in a cloud and require them to create their own virtualization baseline, often using VMware products.

 

I’d recommend starting with basic concepts of virtualization: understanding virtual machines (VMs) and their types, a hypervisor and the functions it performs, etc. Then, practice what you have learned by installing a hypervisor on your computer, experimenting with creating VMs, and setting up a network connection. This will help you get a better idea of how virtualization works.

 

Clouds

Once you have some basic knowledge of virtualization, you can consider learning clouds. To help you navigate this extensive domain, I have outlined basic concepts that all cloud platforms have in common. Although their inner structure may vary, these concepts are widely applicable and vital to understanding cloud environments.

 

  • Cloud accounts – what is a cloud account and how it is organized; cloud management console.

 

  • Identity and access management (IAM) – understanding IAM roles and permissions for users and services to reach your cloud resources; the rules upon which these permissions are granted or denied.

 

  • Computing services – virtual servers, such as EC2 instances, VM instances, or other node types to run applications on the cloud platform infrastructure; how to create, configure and manage your working nodes, and what we can do with them.

 

  • Storage – cloud storage platforms and the principles of their operation; object storage classes; how to work with object storage.

 

  • Load balancing – principles of traffic distribution in cloud computing; how load balancing works; types and algorithms of cloud load balancing.

 

  • Security – cloud security measures; the concept of security groups and how they work; strategies to secure your data in a cloud; firewalls and traffic management.

 

  • Billing – understanding how your cloud resources are billed is vital to remain within budget and preventing your company from going bankrupt when paying cloud bills.

 

Terraform

When working with clouds, knowing how to describe your resources in code is essential. Terraform has become an absolute leader in the DevOps world for defining, launching, and managing infrastructure as code (IaC) across different cloud and virtualization platforms. It is open source, well-maintained, and integrates easily with various technologies. Whatever IaC tool you may be presently using, writing Terraform code is a skill you will definitely need – even if you think you won’t.

 

I would suggest starting with the book Terraform: Up and Running by Yevgeniy Brikman, CEO of Gruntwork. This book is a hands-on manual with detailed code examples that will help you quickly progress from Terraform basics to running a full stack.

 

For those who have been using Terraform for some time and have some practical questions, I recommend the book Terraform Best Practices by Anton Babenko. Apart from being a long-time developer, CTO, and tech lead, the author is one of the most prolific open-source contributors to various Terraform & AWS projects. The book contains indisputable best practices and recommendations for Terraform users on how to write quality code, including structuring, naming, styling, and other practical advice.

 

When working with Terraform, be sure to leverage the advantages of Terraform Registry. Here you can find a variety of pre-made integrations (providers), configuration packages (modules), and security rules (policies) for use with Terraform. The Registry includes solutions developed by HashiCorp, third-party vendors, and the Terraform community. Furthermore, it is a rich source of examples of how to write quality Terraform code.

 

For more in-depth study, consider Awesome Terraform – a comprehensive, regularly updated list of resources on HashiCorp’s Terraform.

 

Containers

Container technology’s emergence changed how we develop, ship, and run applications. It quickly became the mainstream thanks to its simplicity of use and speed of delivery. To understand why containers are so important, I recommend the book Using Docker by Adrian Mouat – a hands-on guide to container technology and how to make it part of your development process.

 

Kubernetes

Running containers in large numbers requires orchestration, and here is where Kubernetes enters the scene. The golden standard of container orchestration, Kubernetes was initially developed and donated to The Cloud Native Computing Foundation (CNCF) by Google. So far, it is the crowning project of CNCF that shapes the whole ecosystem of cloud-native projects.

 

The first thing that I would recommend is to sign-up for the Certified Kubernetes Administrator (CKA) program, a joint initiative of CNCF and the Linux Foundation, and take the certification exam. This will cost you some money, but you can easily get that back as your certification will prove your competency and open the doors to more job opportunities.

 

For training, you can take the free Introduction to Kubernetes course by The Linux Foundation. The course explains key concepts of Kubernetes and is a preliminary step to take The Fundamentals of Kubernetes – the course which is specifically designed to prepare you for the CKA exam.

 

For those wanting to dig in deeper and understand Kubernetes under the hood, I would refer to the tutorial Kubernetes The Hard Way. Written by Kelsey Hightower, one of the most well-known speakers on Kubernetes, this offers complete hands-on guidance on how to bootstrap a production-ready Kubernetes cluster.

 

Rancher

If you consider running several clusters, I’d suggest Rancher as a cluster manager. First, it simplifies the complexities of Kubernetes abstractions by providing a robust, user-friendly UI. You can perform any actions concerning the provision and management of your environments from here.

 

Second, Rancher supports multi-cluster setups with ‘single-pane-of-glass’ management. Furthermore, advanced visualization options give you a clear view of the state of your environments and the infrastructure processes running within.

 

Third, it is open source and integrates with popular cloud-native tools from the Kubernetes ecosystem, such as Prometheus, Grafana, Helm, Fluentd.

 

Helm

When working with Kubernetes, it is essential to know what Helm is and how it can help you deploy your workloads to the cluster. Helm is an open-source package manager for Kubernetes. It uses charts – pre-made packages of all necessary versioned, pre-configured resources required to deploy a container to Kubernetes. Helm charts can be downloaded from the public registry and adapted if needed. Using Helm reduces the complexity of Kubernetes deployments as it offers reusable, easily customizable templates that can be used repeatedly.

 

Additional Resources

If you like watching YouTube videos, I recommend the DevOps Toolkit channel hosted by charismatic technology guru Viktor Farcic. You will find everything concerning DevOps, containers, Kubernetes, microservices, continuous integration, delivery and deployment (CI/CD), test-driven development (TDD), and much more.

 

On Twitter, subscribe to Learnk8s to get a comprehensive kit of educational materials for starting with Kubernetes.

 

Among my favorite resources is Kubernetes Podcast from Google, whose episodes I regularly listen to. It is a weekly news and interview show with insight from the Kubernetes community.

 

Test Your Knowledge

Once you have mastered the skills described above, try testing your knowledge by building a full-cycle environment to run a WordPress application in a Kubernetes cluster. Create a Git repository; define your Kubernetes infrastructure with Terraform code and deploy it to any preferred cloud; use Helm to deploy WordPress and a database to the cluster; make your applications scalable. That’s it – a simple task to prove whether you understand the principles of cloud infrastructure design and can apply the acquired knowledge.

 

CI/CD and GitOps

Anyone who had a tough time during deployments knows that delivering code to target environments can be a challenge. One way to eliminate after-hours work and focus your efforts where it actually matters is to employ deployment methods and strategies that can help operationalize your services:

 

  • Leverage the practices of Continuous Integration (CI) and Continuous Deployment (CD) to automate most deployment challenges away.

 

  • Learn to design CI/CD pipelines and the tooling needed for this.

 

  • Learn about GitOps and its advantages compared to a conventional approach to deployments.

 

  • Familiarize yourself with deployment strategies and choose the one that works best for your type of application and target environment.

 

Architecture and System Design

Let me clarify: this is a vast and complex field to study. Distributed systems are difficult to design, tricky to manage, and a headache to deploy. Yet this complexity should not detain you from exploring the topic.

 

First, as computing systems grow in complexity, distributed systems become increasingly widespread. Today applications no longer run in isolation: instead they rely on distributed systems to meet user expectations on availability and fault tolerance. Second, correct system design can significantly boost your workload efficiency. It is a powerful tool with pros outweighing its cons.

 

If you start learning system design, I presume you already have some knowledge in the field. To help you systemize it, I’d recommend the book Software Architecture: The Hard Parts by architecture veterans Neal Ford, Mark Richards, Pramod Sadalage, and Zhamak Dehghani. This deals with the commonly asked questions on distributed systems and describes inevitable trade-offs in system design.

 

One of the factors contributing to the rise of distributed systems is the shift from monolithic applications to microservices.

 

To obtain a holistic view of building, managing, and scaling microservices architectures, refer to the book Building Microservices by Sam Newman. With clear examples and practical advice, the author presents the latest solutions for modeling, integrating, testing, deploying, and monitoring autonomous services.

 

Conclusion

The list of resources gathered in this article reflects my opinion on the fundamentals of DevOps tools and practices. Under no circumstances should it be considered definitive or somehow limiting your possibilities for professional growth. Still, working through the mentioned books and tutorials will undoubtedly boost your career opportunities.

 

Lastly, let me give you one final piece of advice – to succeed in DevOps requires creativity in searching for solutions. Always be willing to learn and dig to the roots to understand the underlying implementation. These abilities will serve you well whichever DevOps career path you may choose.

The post DevOps – The Knowledge and Skills You Need and How To Learn Them, part 2 appeared first on SHALB.

]]>
https://shalb.com/blog/devops-the-knowledge-and-skills-2/feed/ 0
DevOps – The Knowledge and Skills You Need and How To Learn Them, part 1 https://shalb.com/blog/devops-the-knowledge-and-skills-you-need-and-how-to-learn-them/ https://shalb.com/blog/devops-the-knowledge-and-skills-you-need-and-how-to-learn-them/#respond Tue, 25 Oct 2022 12:01:42 +0000 https://www.shalb.com/?p=1997 DevOps is a cross-functional systems engineering culture. Its interdisciplinarity requires engineers to work on the borders of different domains – business, development, QA and testing, operations, architecture and so on. Such an approach necessitates certain qualities and skills to succeed in the field. What this knowledge is and how to learn DevOps skills was the […]

The post DevOps – The Knowledge and Skills You Need and How To Learn Them, part 1 appeared first on SHALB.

]]>
DevOps is a cross-functional systems engineering culture. Its interdisciplinarity requires engineers to work on the borders of different domains – business, development, QA and testing, operations, architecture and so on. Such an approach necessitates certain qualities and skills to succeed in the field. What this knowledge is and how to learn DevOps skills was the talk that Volodymyr Tsap, co-founder and CTO at SHALB, presented at Chernihiv.IT conference 2022.

 

SHALB was founded in 2009, and since then Volodymyr has conducted countless interviews. These inspired him to create this small guidance on how to proceed on your way towards becoming a DevOps engineer. This article, which consists of 2 parts, reflects the main points of Volodymyr’s speech.

 

Part 1. DevOps underlying knowledge and skills

Soft skills

Motivation

It is a well-known fact that genuine interest makes the best motivation. Are you interested enough to devote your free time to learning even after a hard day’s work? The answer “yes” speaks for itself. Financial motivation, however convincing it may seem, won’t make you a top-class engineer in the long run. It has to be genuine interest and enthusiasm that drive your learning endeavor.

 

Self-learning

The landscape of DevOps technologies grows faster than any other field. To keep pace with it, you need to constantly expand your horizons and learn about new trends. The eagerness to learn new skills and curiosity to dig into how things work will give you an edge over competitors.

 

Accepting failures

DevOps probably has the highest rate of unsuccessful attempts before a desired result is achieved. Dealing with something new is always a trial-and-error way where you cannot but make mistakes. Don’t be discouraged by unsuccess and try to look at the problem from a different angle. Accept failures and consider them as a step towards success.

 

Communication

DevOps is a cross-departmental discipline that bridges developers, operation engineers, testers, and PMs. Sociable people are more likely to foster effective exchange of information between different departments. Also, having strong communicative skills will help you explain yourself and provide enough arguments to defend your point.

 

Applied skills

Mathematics

Coming to DevOps with a strong mathematical basis is a perfect start, as mathematics underlies all computer science. Knowing its basics will help you get to the heart of things and understand how they work under the hood. Apart from this, mathematics helps to develop strong analytical skills and cultivates the ability to investigate – the must-have quality of a good engineer.

 

Good command of English

English is the language of the international DevOps community. Being proficient in spoken and written English gives you access to an unlimited number of self-learning resources and increases your chances to join an international team.

 

Knowing how to google

Googling skills is a must have for a good engineer. Whenever you start a non-trivial task or deal with a bug that you have never seen before, try to find something similar on the web. Remember – someone before you must have come across the same problem and probably found the solution. Don’t reinvent the wheel.

 

Fundamentals

Books

I would recommend the books by Andrew S. Tanenbaum for a start, such as Modern Operating Systems, Computer Networks, and Distributed Systems. These are fundamentals to understanding how computers work, how networks are designed, and what their inner workings are. Thoroughly studying these books will help you shape patterns necessary to proceed further in computer engineering. And which is no less important, to make up your mind on whether you really have a heart for it.

 

Linux

Linux underlies the products of tech giants such as Google, Amazon, Apple, Red Hat and many more. It is quite literally the cornerstone of almost everything that we come across on the web. What is more, it is the OS of the cloud.

 

So what are Linux requirements for DevOps engineers? Certainly the degree of your Linux-specific knowledge will depend on the tools that you are using. For example, if you are working primarily on Microsoft Azure stack, you will need little knowledge of Linux. However, I would recommend a basic understanding of Linux as a foundation to build on.

 

A couple of introductory courses:

 

  • Introduction to Linux by the Linux Foundation – provides a good working knowledge of Linux using both the graphical interface and command line.

 

  • NDG Linux Unhatched Course by Cisco – you will learn basic installation and configuration of Linux software and get introduced to the Linux command line.

 

  • Linux Tutorial by Ryan Chadwick – the beginners guide to the Linux command line (BASH).

 

Resources for further information:

 

 

  • The Linux Commands Handbook by Flavio Copes – covers 60 core Bash commands you will need as a developer, with example code and tips for when to use.

 

  • Linux Server Course by freeCodeCamp – you will learn how to configure servers running Linux, including the boot process, kernel modules, network connection parameters, and localization groups.

 

Programming

A very helpful skill that will give you an extra advantage in your DevOps career. Having a programming background will also help you understand developers better – after all, DevOps is all about making developers’ lives easier in terms of releasing new features.

 

For one thing you should know how to program with shell or Bash, and be a confident user of CLI, as you will write automation scripts and run them on remote servers. To develop these skills, I would suggest the book by Mendel Cooper Advanced Bash Scripting Guide – a detailed tutorial on scripting techniques with exercises and heavily-commented examples.

 

As for application-oriented programming languages, I’d suggest Python, especially if you start working as a system administrator or DevOps. Python is a scripting language, which makes it easy to learn and work with. Thousands of Python libraries provide standardized solutions for many problems that developers and DevOps come across in their daily tasks. Moreover, Python comes pre-installed in most Linux distributions, so you do not need to install any additional software to start programming on it.

 

For a start I would recommend the O`reilly book Learning Python by Mark Lutz – a deep and detailed introduction to Python that tops the list of recommended literature for those who want to learn it.

 

Speaking about programming one cannot but mention Git – a de-facto industry standard in version control systems (VCS). As a DevOps you will work with infrastructure code and repositories, so it is critical that you know how to leverage Git’s power. Everything you need to know about Git you can find in the Pro Git book written by Scott Chacon and Ben Straub – a comprehensive and structured guide on Git.

 

Databases

Databases store almost all of the states in applications and are foundational to the overall success of most systems. At the same time, poor configuration of databases can lead to a number of incidents, including data breaches, slow database queries, locking errors, etc. Get yourself familiarized with entry level DBA stuff, like the principles of database design and operation, security, backup, restore, migration, and upgrade. This will help you understand the mechanics of database inner workings and be more productive in solving database-related problems.

 

This resource contains concise and to the point explanations of database basics supplemented with helpful visuals.

 

Conclusion

We have outlined the basic knowledge that will help you make a successful start in DevOps. Mastering the above-mentioned skills will give you a solid background to build on DevOps engineer skills per se. In part 2 we will discuss the expertise and specific knowledge that you will need in your DevOps career.

The post DevOps – The Knowledge and Skills You Need and How To Learn Them, part 1 appeared first on SHALB.

]]>
https://shalb.com/blog/devops-the-knowledge-and-skills-you-need-and-how-to-learn-them/feed/ 0
Kubernetes CLI utilities https://shalb.com/blog/kubernetes-cli-utilities/ https://shalb.com/blog/kubernetes-cli-utilities/#respond Fri, 24 Apr 2020 09:30:19 +0000 https://www.shalb.com/?p=521 With the adoption of Kubernetes grows the number of specialists that interact with K8s clusters on daily basis. Some of those engineers introduce their own customized tools designed to simplify and automate their daily operations with the clusters.   Most of these tools are CLI utilities, with some working as kubectl wrappers or plugins to […]

The post Kubernetes CLI utilities appeared first on SHALB.

]]>
With the adoption of Kubernetes grows the number of specialists that interact with K8s clusters on daily basis. Some of those engineers introduce their own customized tools designed to simplify and automate their daily operations with the clusters.

 

Most of these tools are CLI utilities, with some working as kubectl wrappers or plugins to extend the functionality of kubectl. For example, kubectx and kubens allow for quick switching between kubectl contexts and namespaces within a cluster, while kube-ps1 indicates the actual context and namespace.

 

Kubectl-aliases provides nearly 800 programmatically generated kubectl aliases to avoid excessive verbosity in command strings. The kube-prompt client features convenient interactive autocomplete using prompts built in Go. The list could go on; more information could be found here.

 

Among Kubernetes CLI utilities there are also tools with more advanced functionality. For example, K9s, a terminal based UI, allows real-time tracking of cluster resources and activities, which makes it an alternative of a K8s dashboard. Stern provides for the advanced log analysis, as it enables tailing of multiple pods and containers at once. Each result is color coded for quicker debugging.

 

In the table below we have gathered the most popular CLI utilities and plugins with a brief stats showing the project health on GitHub.

 

Kubernetes CLI utilities

 

 API/CLI  adaptor  Functionality Stars Contributors Commits
(last 6 months)
 References
 kubectx A tool for switching between clusters on kubectl 6.9k 36 10  ahmet.im

 blogs.oracle.com

 freecodecamp.org

 kubens A tool for switching  between namespaces on kubectl 6.9k 36 10  blogs.oracle.com

 freecodecamp.org

 K9s A terminal based UI to interact with K8s clusters 6.2k 58 302  k9scli.io

 itnext.io

 golangexample.com

 Stern Multi pod and container log tailing for K8s 3.6k 22 _  kubernetes.io/blog

 theiconic.tech

 kube-ps1 K8s prompt helper for bash and zsh 1.6k 12 1  formulae.brew.sh

 findbestopensource.com

 kube-shell Integrated shell for working with the K8s CLI 1.6k 4 _  pythonawesome.com

 dbafromthecold.com

 dockerlabs.collabnix.com

 kubectl-tree kubectl plugin to browse K8s object hierarchies as a tree 1.4k 6 38  ahmet.im

 developer.sh

 kubectl-aliases Aliases for kubectl 1.3k 7 3  ahmet.im

 containerized.me

 kube-prompt Interactive K8s client featuring auto-complete using prompts built in Go 1.3k 10 16

 linoxide.com

 habr.com

 Kui Hybrid CLI/GUI for cloud-native development, alternative to kubectl 1.2k 13 550  awesomeopensource.com
 Click A CLI focused REPL for quickly interacting with K8s objects 1.1k  7 50  databricks.com/blog
 kubectl-trace A kubectl plugin for scheduling bpftrace programs on your K8s cluster  880  18  8
 webkubectl A web based tool to run kubectl commands in web browser 248 6 49

 kubeoperator.io

 developer.sh

 kubectl-plugins A collection of plugins for kubectl integration  232  4 10
 KubeFuse K8s as a FUSE filesystem 228 4 _  opencredo.com
 kube-tmux K8s tmux plugin to display the current context and namespace  200  4 _  brunoluiz.net
 Vikube K8s operations from Vim, in Vim  186 4 2
 tubectl Wrapper around kubectl, kubectl alternative with quick context switching  171  4 1

 developer.sh

 asciinema.org

 awesome-kubectl-plugins Extending kubectl with custom commands 148 4 13  awesomeopensource.com
 KSQL Tool for interactive database queries on K8s resources 119 3 _  confluent.io
 kubeplay A new way to interact with K8s API from your terminal  81 1 _  discuss.kubernetes.io
 kubensx A tool for Cluster/User/Namespace switching for K8s  37 2 _  libs.garden
 kubectld A microservice to expose kubectl create/apply/get logic 12 9 _
 kubesh An interactive shell around kubectl 5  1  _

 medium.com

 pypi.org

 

As Kubernetes itself, these client tools are open-source and could be installed from their Git repositories. Hope you will find something useful here!

 

The post Kubernetes CLI utilities appeared first on SHALB.

]]>
https://shalb.com/blog/kubernetes-cli-utilities/feed/ 0