Posts

10 - Ansible Lab - by Gaurav Sharma

Image
Ansible Lab - by Gaurav Sharma docs.ansible.com - Introduction to Ansible and Lab setup $ yum install ansible -y Ansible Inventory files - default inventory files  /etc/ansible/hosts vi /etc/ansible/hosts 192.168.25.16  ansible_ssh_pass=password $ yum install sshpass -y $ ansible 192.168.25.16 -m ping ** make sure host key $ vi /etc/ansible/ansible.cfg host_key_checking = False $ vi inventory.txt webserver1 ansible_host=192.168.25.15 ansible_ssh_pass=password ansible_connection=ssh ansible_port=22 ansible_user=root sqlserver1 ansible_host=192.168.25.16 ansible_ssh_pass=password ansible_connection=ssh ansible_port=22 ansible_user=root $ ansible webserver -m ping -i inventory.txt $ ansible all -m ping -i inventory.txt ** Create group of server $ vi inventory_group.txt webserver1 ansible_host=192.168.25.15 ansible_ssh_pass=password ansible_connection=ssh ansible_port=22 ansible_user=root sqlserver1 ansible_host=192.168.25.16 ...

09 - ANSIBLE - Configuration Management

Image
 ANSIBLE - Configuration Management Written in Python Work with push base mechanism (Synchronous) Not required any Agent SSH port 22  RHEL provides support Created own modules Task (like manifest or receipt in puppet/chef) required for configuration  -> written in YAML file State (Current to Desired State) Open Source and Enterprise Ansible Playbook  -> Role   (like cookbook in chef) for provisioning Playbook -> Role -> Tasks  ( define in .yaml file ) Ansible Tower -> Like Puppet GUI Automation Engine Modules - Prewirtten resources like services, packages, execute system command, files (450 buit-in) Inventory  - Consist list of servers  (like site.pp in puppet) API - Interacting with hosts/Servers Plugins - manage functionality like networking - way of customization  CMDB - Optional tools for Configuration Management database Ansible Galaxy  pre-written playbooks https://galaxy.ansible.com Ansible T...

08 - PUPPET - Configuration Management

Image
 PUPPET - Configuration Management A Configuration Management Tool A framework for Systems Automation A Declarative Domain Specific Language (DSL) An Open Source software is written in Ruby Works on Linux, Unix (Solaris, AIX, *BSD), macOS, Windows |Supported Platforms) Developed by Puppet Labs Puppet Agent Required SSL certificate Default fatches after 60 minutes noop - dry run Puppet Open Source or Enterprise Puppet Langauge Declarative - Domain Specific Langauge (DSL) define STATES (No procedures) Puppet code is written in manifest ( .pp extension ) In the code, we declare resources that affect elements of the system (files, packages, services ... ) Resources are grouped into classes Classes and configuration files are organized in modules Puppet Resource Abstraction Layers Puppet Catalog Certificate Management Server Resources Facter Puppet Manifest Puppet Resources Resource Types Reference Puppet Nodes Roles Define Policy Puppet Virtual Resources Puppet Lab...