What is Ansible?

Ansible is a software tool that provides simple but powerful automation for cross-platform computer support. Avoid writing scripts or custom code to deploy and update your applications — automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.

What is Docker?

Docker provides the ability to package and run an application in a loosely isolated environment called a container.

What is AWS?

AWS (Amazon Web Services) is a comprehensive, evolving  cloud computing platform provided by Amazon.

Let’s Discuss some prerequisite

  • Must have an AWS account
  • Must install and configure Ansible in PC.
  • Basic knowledge of Linux and Docker

Our Objectives:

Write an Ansible Playbook That does the following Operation-

  • Configure Docker in EC2 instances.
  • Start and Enable docker services.
  • Run the httpd container and expose it to the public.

In Ansible, there are two categories of computers: the** control node** and managed nodes.

The control node is a computer that runs Ansible.

A** managed node** is any device being managed by the control node.

Ansible works by connecting to nodes (clients, servers, or whatever you’re configuring) on a network, and then sending a small program called an Ansible module to that node. Ansible executes these modules over SSH and removes them when finished. The only requirement for this interaction is that your Ansible control node has login access to the managed nodes. SSH keys are the most common way to provide access, but other forms of authentication are also supported.

In my case-control** node** is my laptop and for a managed node, I am gonna launched one ec2 instance in AWS.

#docker #apache #aws #ansible #ansible-playbook

Deploy Apache Web-Server In Docker Container In AWS EC2 Instances Using Ansible-Playbook.
4.60 GEEK