Infrastructure as Code (IaC) - Configuration Automation - Ansible 01

preview_player
Показать описание
This video talked about comparison between various IaC tools, and hopefully it helps you understand better the pros and cons of each tool and choose the right toolset for your use case. In the demo part, we built a Docker image for setting up a testing environment for Ansible.

Timestamps:
0:00 - Intro
5:24 - Configuration Management vs. Provisioning
7:26 - Mutable vs Immutable
9:19 - Procedural vs. Declarative
15:30 - Master vs. Masterless
20:10 - Agent vs. Agentless
23:40 - Popular toolsets for IaC
30:34 - Demo
46:02 - Ansible install on Ubuntu
48:50 - Ansible inventory

######################################################
Dockerfile:
# ubuntu base image
FROM ubuntu:latest
# install softwares on top of the OS
RUN apt update && apt install openssh-server sudo vim -y
# create an user
RUN useradd -rm -d /home/ubuntu -s /bin/bash -g root -G sudo -u 1000 zztalk
RUN echo 'zztalk:zztalk' | chpasswd
# start ssh as a service
RUN service ssh start
# expose the ssh port
EXPOSE 22
# start-up command
CMD [ "/usr/sbin/sshd", "-D"

######################################################
Example of Ansible inventory file
web1 ansible_host=ip_address ansible_connection=ssh ansible_user=username ansible_ssh_pass=password

[group_1]
web1

[group_2]
db

[all_server:children]
group_1
group_2

#docker #ansible #iac #infrastructureascode #zzTalk #automation #configurationmanagement
Рекомендации по теме