Must have skills for DevOps Engineer and Free methods to learn them

Many people have asked us how to become a DevOps engineer so in this post we will show you the skills and technologies which can get you there.

Before we start we should know what is “DevOps”. As you can see the word is combination of “Developer” and “Operations”. So a DevOps engineer is suppose to be a bridge between the development and operations processes.

Let’s see which skills do you need to become a DevOps engineer. In this post we will also discuss how you can acquire these skills for free. We have also mentioned some advanced paid courses which can help you acquire these skills quickly.

Skill 1 :-  Make Linux your friend.

Nowadays whole world is moving towards opensource, and Linux is the poster boy of opensource world.  Most of the new enterprise level tools and services are now compatible with Linux and people are adopting them fast. So, as a devops engineer you will definitely have to work on/with linux in your job. Even Microsoft has come up with their own Linux version. So, you can understand the importance of Linux. You can learn Linux for free from Linux Foundation courses. But, if you are short of time you can quickly learn Linux through this course Learn Linux in 5 days .

Skill 2 :- Learn scripting

Automation is a big part of a DevOps engineer job and you will be expected to automate mundane tasks. This will not only help you work efficiently but also improve the overall maintainability of your company’s setup. Easiest way to automate things is through scripting. You should learn either shell scripting on Linux/Unix or powershell on windows. Free source to learn scripting is Learn Shell. Else, you can check out this around 6 hours course on Shell Scripting to solve real-world problems like a pro.

Skill 3 :- Understand the Cloud

Companies are shifting to cloud like never before. Applications are being re-built to leverage the advantage of cloud computing. So it’s always good that you know cloud really well. AWS, Azure and GCP are three market leaders and it will be good to know about at least one of them. All these vendors have tons of free material on their sites which can help you learn their technology. Else you can checkout these awesome Udemy courses for AWS, Azure or GCP .

Skill 4:- Source code Management

Tools like git are used to manage the version of code base and avoid any conflicts in code. As a devops engineer you should have good understanding of tools like git or bitbucket since they will be useful in build phase. Later you will use them to build a codepipeline. One of the good source to learn git for free is Try Git. To become zero to hero of Git in hours, one of the best course is Git complete.

Skill 5 :- Configuration management

Configuration management is used to manage the state of your infrastructure. You can use them to patch your linux servers or manage the services.  Some of the tools in config management are Ansible, Chef and Puppet. To get basic understanding of Ansible the best free course is from Redhat called Ansible essentials. If you want to get deeper understanding you can try Mastering Ansible.

Skill 6: – Continuous Integration/Continuous Delivery

CI/CD is an important aspect in DevOps engineers job profile. As we are moving towards cloud automated deployments are now essential. They avoid human errors and are fast. You can learn tools like Jenkins for CI/CD. Jenkins will specially be very useful in building a codepipeline, you can learn it for free here. Since CI/CD consists of multiple tools we think that it’s better you learn it from a single source. We found course from Edward Learn Devops: Continuously Deliver Better Software  to have covered most of the topics.

Skill 7 :- Infra as a Code

The latest “in thing” in cloud is Infra as a Code. Yes you read it right, gone are the days where you have to buy the server, install OS and other softwares on it. With tools like Terraform or Cloudformation you can automate the build of your entire infrastructure in cloud right from VPC, Security groups,  servers etc. to application installation and configuration. To get basic free understanding of terraform you can learn it from Katacoda . If you want to deploy AWS Infrastructure using Terraform we found Edward’s another course on Terraform to be really useful. For cloudformation we found the free AWS cloudformation tutorials to be useful. If you are looking for advance practical guidance AWS CloudFormation Master Class is a good course.

Skill 8:- Containers

Servers are now shrinking every day. With the advent of VMs, hardware anyways became less important. Dockers, a containerization technology is taking it to one level up. Now with Dockers you can have a miniature copy of your OS image with the application code. Docker will only run for a few mili seconds when a query is executed and once it’s job is done it will just stop. If you want to learn Docker for free the best source is Play with Docker Classroom. To gain more advanced skills you can learn from Docker Mastery.

Skill 9 :-  Container orchestration

Tools like Kubernetes or Elastic container service (ECS) are used to manage cluster of Docker containers. These tools provides you mechanisms for deploying, maintaining, and scaling application. You can learn about Kubernetes with practical labs for free from Katacoda. For advanced knowledge of Kubernetes try the complete Kubernetes course.

Skill 10 : – Serverless

Technologies like AWS lambda are removing the need to manage the servers at all. You just have to upload you code in the AWS Lambda and set your run time environment. Rest all the issues of memory, CPU, OS patching will be taken care by AWS Lambda. It’s important as a DevOps engineer that you understand how the lambda works and how you can set it up. You can learn about AWS Lambda for free from this AWS Lambda Tutorial. For more advanced real world example you can refer how to build a serverless App with AWS Lambda .

We hope this post is helpful to you in understanding the skills which are important for a DevOps engineer and how you can master these skills. You can expect questions related to these skills in the interview of a DevOps Engineer.

Solved: docker – error during connect

sagu@sagu-pc MINGW64 ~

$ docker image ls

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.29/images/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

sagu@sagu-pc MINGW64 ~

If you are getting above error while running the docker commands in Docker Quickstart Terminal then you can have one of the listed problem.

  • The docker deamon is not running.
  • The docker host machine itself is down.
  • Required configuration file is missing.

First check that the host machine is up and the configuration file is present at its location. Once you are sure both the above things are ok, in that case easiest way to get rid of this issue is to open the Docker Quickstart Terminal by selecting “Run as Administrator” .  It will take some time to start but let it complete and you should be back in business soon.

Solved: How to resize Docker Quickstart Terminal Window

By default in Windows 7 Docker Quickstart Terminal Window size will be small. But it can be very annoying to work in such small window.

Here we will show you how to increase the window size as per your requirement.

  • Open the Docker Quickstart Terminal as an Administrator.
  • Right Click on the Blue whale icon on top of  Docker Quickstart Terminal .

  • Click “Properties” and Select “Layout” tab.
  • Increase the “Width” and “Height” of “Window Size” as per your requirement.
  • Finally Click OK and try re-opening the Terminal.

That’s all folks!

Solved: How to restart a docker container automatically on crash

In this post we will see how we can restart a container automatically if it crashes.

If you want a Docker container to always restart use:-

docker run -dit --name cldvds-always-restart --restart=always busybox

But if you want container to always restart unless it is explicitly stopped  or restarted, use:-

docker run -dit --name cldvds-except-stop --restart unless-stopped busybox

In case you want the container to stop after 3 restart attempt use below command.

docker run -dit --name cldvds-restart-3 --restart=on-failure:3 busybox

You can see the logs of a container using

docker logs cldvds-restart-3

If you want to change the restart policy of running container you can do it with “docker update” e.g. here we are changing restart attempt from 3 to 4 of container cldvds-restart-3.

docker update --restart=on-failure:4 cldvds-restart-3

Solved: How to copy paste in Docker Quickstart Terminal

If you want to copy/paste the contents on Docker Quickstart Terminal using mouse follow these steps.

  • Open the Docker Quickstart Terminal as an Administrator.
  • At the top of terminal right Click on the Blue Whale icon and select “Defaults”.
  • In the “Options” tab of new window check the QuickEdit Mode(refer image below) and click OK.

t

  • Now with mouse left click you can select the content and paste with right click.

Solved: How to cap or limit memory usage of a docker container

In this post we will see how we can cap or restrict the maximum amount of memory the container can use.

Let’s first see the current usage of container id ec6ed4af7c34 with “docker stats”.

docker stats ec6ed4af7c34

In the below image we can see the current limit of the container is 300MiB

Now let’s change this limit to 200MiB of a running container.

docker container update -m 200m ec6ed4af7c34

Now when we look at “docker stats” we can see in the image below the new limit on the container.

If you want to set the memory limit at the time of launching the container itself do it as

docker run -exec -it -m 200m image-name /bin/bash

Compose file version 3

If you want to restrict the usage from the compose file itself you can follow below example, the redis service is constrained to use no more than 50M of memory and 0.50 (50%) of available processing time (CPU), and has 20M of memory and 0.25 CPU time reserved (as always available to it).

version: '3'
services:
 redis:
 image: redis:alpine
 deploy:
 resources:
 limits:
 cpus: '0.50'
 memory: 50M
 reservations:
 cpus: '0.25'
 memory: 20M

Hope this post is helpful to you. Do let me know if you have any query.

Solved: Install ifconfig and ssh in Ubuntu

In this post we will see how to install ifconfig and ssh in Ubuntu 16.04 Xenial Xerus. You can install both or either of them independently .

ifconfig

By default you can check IP details in Ubuntu using

ip addr

But if you are more comfortable with “ifconfig”  then follow on.

Ensure that your Ubuntu instance is connected to internet or to your local package repository server from which it can pull packages.

If you need ifconfig in your ubuntu server use following commands.

Continue reading “Solved: Install ifconfig and ssh in Ubuntu”

Solved: How to create an image of a docker container.

So you have completed all the installation on a docker container and now you want to keep it as golden image.

Golden images are useful when you want to create more containers with same configuration. This also ensure that when you ship an image from Dev to UAT or Prod it will be exactly same as it was when you tested it.

Continue reading “Solved: How to create an image of a docker container.”

Solved: Error when allocating new name – Docker

Error response from daemon: Error when allocating new name: Conflict. The container name "/webserver" is already in use by container 6c34a8wetwyetwy7463462d329c9601812tywetdyud76767d65f7dc7ea58d8541. You have to remove (or rename) that container to be able to reuse that name.

If you see the above error it is because a container with same name exist.

Let’s check our running containers

Continue reading “Solved: Error when allocating new name – Docker”