ARTH_TASK 14…!!
Task_Description:
🔰 14.1 Create a network Topology Setup in such
a way so that System A can ping to two Systems
System B and System C but both these systems should
not be pinging each other without using any security rule
e.g firewall etc.
Link:> https://swapnil940sukare.medium.com/arth-task-14-1-1350c2fb02ec
🔰 14.2 Further in ARTH — Task 10 have to create an
Ansible playbook that will retrieve newContainer IP
and update the inventory. So that further Configuration
of Webserver could be done inside that Container.
Link:>https://www.linkedin.com/pulse/arth-task-10-swapnil-sukare
🔰 14.3 Create an Ansible Playbook which will dynamically
load the variable file named same as OS_name and just by
using the variable names we can Configure our target node.
(Note: No need to use when keyword here.)
STEP:1: PRE -REQUIRITIES:
- Install “ansible” in the controller node.
CMD: yum install ansible
TO CHECK:
||cmd: ansible — version
2. Install “docker” in the controller node[from task10].
TO CHECK:
||cmd: rpm -q docker-ce
* To start your docker service
cmd: systemctl start docker*To see status of your docker service
cmd: systemctl status docker
STEP:2: Launch Docker Container…
cmd: docker run -it --name <Container_Name> <docker_image_name>:<version>
TO CHECK :
* To see images in docker
cmd: docker images* To see at present running images
cmd: docker ps -a
STEP:3: Install required packages in the docker container…
* To install SSH server
cmd: yum install openssh-server -y* To install SSH client
cmd: yum install openssh-clients -y* To install passwd
cmd: yum install passwd -y
INSTALL SSH SERVER
INSTALL SSH CLIENT
INSTALL PASSWD
- Set the password for root
cmd: passwd root
NOTE: USE “ ssh-keygen -A” TO AVOID THE KEY ERROR.
TO CHECK :
STEP:4: Create an image of the container …
cmd: docker commit <image_id> <image_name>:<version>
To check : cmd: “docker images”
STEP:5: Push the image into the docker hub…
STEP:6: Install docker-py library…
cmd: pip3 install docker.py
STEP:7: Create a playbook to pull pre-created image…
STEP:8: Create a playbook to configure httpd …
Before running playbook inventory is:
STEP:9: Run the Ansible-playbook…
- Run playbook task14.2.yml:
After running playbook inventory is:
2. Run playbook httpd.yml:
TO CHECK :
TASK ENDS…
Thanks for Reading…..!!!