DevOps for Beginners: Docker, Ansible and Terraform [Recap: Day 4]

DevOps

Share Post Now :

HOW TO GET HIGH PAYING JOBS IN AWS CLOUD

Even as a beginner with NO Experience Coding Language

Explore Free course Now

Table of Contents

Loading

In this blog, I am going to share some quick tips including Q& A’s and useful links from Day 4 of our new batch of DevOps for Beginners Training Program.

In our Day 3 Live Session, we covered Git, GitHub and Integration with Jenkins.

In the previous week, on our Day 2 Live Session, of the DevOps for Beginners Training Program, we have covered topics like DevOps And Other Frameworks, DevOps Roles and Responsibility, DevOps Practise, DevOps And Automation, Adopting DevOps.

A week before that, in the Day 1 Live Session of the DevOps for Beginners Training Program, we have covered Introduction to DevOps, DevOps Principles, DevOps Culture, and Characteristics of a DevOps Culture Change.

So, here are some of the Q&A’s asked during the Day4 Live session.

Docker

Docker is an open-source platform based on Linux containers for developing, shipping, and running applications inside containers. we can deploy many containers simultaneously on a given host.

Containers are software packages into an invisible box with everything that the application needs to run. That includes the operating system, application code, runtime, system tools, system libraries, and etc. Docker containers are built off Docker images.

They are very fast and lightweight because they don’t need the extra load of a hypervisor because they run directly within the host machine’s kernel.

Check out: Container (Docker) vs Virtual Machines (VM)

DockerQ1. What is Docker?

Ans: Docker is a popular open-source project written in go. It is basically a container engine that uses the Linux Kernel features like namespaces and control groups to create containers on top of an operating system.

Q2. Can we mount one data directory to multiple Containers in docker?

Ans: We can add the same location as a volume to multiple docker containers.

Q3. What is the difference between container & virtual machine?

Ans: Containers: Containers are an abstraction at the app layer that packages code and dependencies together. Multiple containers can run dependencies together. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in user space. Containers are lightweight and consume fewer resources while VM is heavy and consumes more resources, so containers give better performance than VM.

Virtual Machines: Virtual machines (VMs) are an abstraction of physical hardware turning one server into many servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full copy of an operating system, the application, necessary binaries, and libraries – taking up tens of GBs. VMs can also be slow to boot.

Container_VMQ4. What is a Docker hub?

Ans: Docker Hub is a cloud-based repository in which Docker users and partners create, test, store and distribute container images. Through Docker Hub, a user can access public, open-source image repositories, as well as use space to create their own private repositories, automated build functions, webhooks and workgroups.

Docker_HubQ5. What is the difference between the docker image & the docker container?

Ans: Docker Image is a set of files that has no state, whereas Docker Container is the instantiation of Docker Image. In other words, Docker Container is the run time instance of images.

A Docker image is a read-only template containing instructions for building a container that can run on the Docker platform. It offers an easy way to package up the software and preconfigured cloud environments that you can use privately or openly with other Docker users.

Docker_ContainerQ6. What is the difference between stopping a container and removing a container?

Ans: Stopping a container allows us to restart a container.

A container once removed cannot be started. It must be re-created.

Terraform

Terraform is one of the most popular Infrastructure-as-code (IaC) tool, used by DevOps teams to automate infrastructure tasks. It is used to automate the provisioning of your cloud resources. Terraform is an open-source, cloud-agnostic provisioning tool developed by HashiCorp and written in GO language.

Terraform also does orchestration, not just configuration management. It can support multiple providers such as AWS, Azure, Oracle, GCP, and many more as it is an open-source tool. It also provides an immutable infrastructure where configuration changes smoothly.

Terraform

Infrastructure as Code (IaC)

Infrastructure as Code (IaC) is a widespread terminology among DevOps professionals and a key DevOps practice in the industry. It is the process of managing and provisioning the complete IT infrastructure (comprises both physical and virtual machines) using machine-readable definition files. It helps in automating the complete data center by using programming scripts.

Check out: IAC

IACQ7. What is (IaC) Infrastructure as Code?

Ans: Infrastructure as Code (IaC) is an approach to managing data center server, storage, and networking infrastructure. IaC is meant to significantly simplify large-scale configuration and management. Example of IaC tool is Terraform.

Q8. Why is Terraform used for DevOps?

Ans: It is used because Terraform can manage infrastructure as code.

DevOps activities like continuous integration, continuous deployment, Version Control, and code review have infrastructure as a foundation.

Q9. What is the difference between an infrastructure provisioning tool and a configuration management tool?

Ans: Infrastructure provisioning is the process of setting up IT infrastructure. It can also refer to the steps required to manage access to data and resources and make them available to users and systems. An example of an infrastructure provisioning tool is Ansible.

Configuration management helps engineering teams build robust and stable systems using tools that automatically manage and monitor updates to configuration data. An example of a configuration management tool is Chef.

Q10. What are the version controls supported by Terraform?

Ans. Below mentioned are all the supported version control system by Terraform:

  • GitHub.com
  • GitHub.com (OAuth)
  • GitHub Enterprise
  • GitLab.com
  • GitLab EE and CE
  • Bitbucket Cloud
  • Bitbucket Server
  • Azure DevOps Server
  • Azure DevOps Services

Ansible

Ansible is a simple configuration management and IT automation engine for multi-tier deployments. It automates both cloud and on-premise provisioning & configuration. It automates cloud provisioning. Rather than managing one system at a time, Ansible uses a model that inter-relates the entire IT infrastructure and enables you to manage everything using something called an Infrastructure as Code (IAC) approach.

Ansible is secure and agentless. It relies on OpenSSH and the code written in YAML format. Ansible nodes are run on Unix systems but they can be used to configure changes across Unix as well as Windows systems.

Q11. What is Ansible and why it is used?

Ans: Ansible is an automation engine that automates repetitive, cumbersome, and complex tasks such as cloud provisioning, application deployment, and configuration management.

Q12. What is the agentless in Ansible?

Ans: Ansible is agentless because Ansible uses Secure Socket Shell (SSH) rather than agents, which are the structural connections for many other configuration management tools.

Q. What is Ansible vault?

Ans: Ansible Vault is a feature of ansible that allows you to keep sensitive data such as passwords or keys in encrypted files, rather than as plaintext in playbooks or roles. These vault files can then be distributed or placed in source control.

Q13. What is a playbook in Ansible?

Ans: An Ansible playbook is a blueprint of automation tasks—which are complex IT actions executed with limited or no human involvement. Ansible playbooks are executed on a set, group, or classification of hosts, which together make up an Ansible inventory.

Q14. What syntax does Ansible use?

Ans: Ansible is written in YAML. Docker-compose and Jenkins also use YAML syntax.

Quiz Time (Sample Exam Questions)!

With our DevOps for Beginners training program, we cover 100+ sample exam questions to help you prepare for the certification.

Check out one of the questions and see if you can crack this and comment down your answers below…

Ques: Which BEST describes a deployment pipeline?

A. An automated version of the ITSM change management process

B. Automated process for managing software changes from check-in to release

C. Collection of tools that enable continuous integration

D. Sequence of value-adding activities required to design, build and deliver a product

Here is the answer to the questions shared last week (Scroll down at the end of this post for the question).

Ques: Which of the following is true about DevOps toolchains?

A. Tools must be from the same vendor

B. They are built around closed source ecosystems only

C. They don’t require an architectural design to ensure interoperability

D. Tools should be connected, usually via APIs

Ans: D

Explanation- A DevOps toolchain includes the tools and technology that enable development and operations teams to collaborate across the entire software lifecycle. It uses a framework and API to connect.

Feedback

We always work on improving and being the best version of ourselves from the previous session hence constantly ask feedback from our attendees. Here’s the feedback that we received from our trainees who had attended the session…

Day3

Related/References:

Next Task For You

Begin your journey towards becoming a DevOps Expert and earn a lot more by landing a high-paying job.

Join FREE CLASS to learn more about the DevOps Roles and Responsibilities, Job opportunities related to DevOps in the market, and what to study Including Hands-On labs and projects you must perform to get your Dream job.

Click on the below image to Register for Our FREE Class on Mastering DevOps on Cloud: How to Build In-Demand Skills and Land High-Paying Jobs

Devops on Cloud Content upgrade

Picture of mike

mike

I started my IT career in 2000 as an Oracle DBA/Apps DBA. The first few years were tough (<$100/month), with very little growth. In 2004, I moved to the UK. After working really hard, I landed a job that paid me £2700 per month. In February 2005, I saw a job that was £450 per day, which was nearly 4 times of my then salary.