Posts

Showing posts from 2020

21 - Terraform Lab - By Houssem Dellai

Image
 TERRAFORM - BY HOUSSEM DELLAI  Install Terraform - Chocolatey on Windows https://learn.hashicorp.com/tutorials/terraform/install-cli https://terraform.io Download Azure CLI https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?tabs=azure-cli Create an Azure Account Download Visual Studio Code  https://code.visualstudio.com/download Install Terraform Extension Download Source Code/ Template  https://github.com/HoussemDellai/terraform-course Deploy Infra in the Cloud using Terraform 01 - Resource Group vi main.tf # valid for terraform version 0.13 # provider "azurerm" { #   version = "=2.40.0" #   features {} # } # valid for terraform version 0.14 provider "azurerm" {   features {} } terraform {   required_providers { azurerm = {   source  = "hashicorp/azurerm"   version = "2.40.0" }   } } resource "azurerm_resource_group" "rg" {   name     = "myFirstReso

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 ansible_s

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 Tags Tasks - Install ngnix tags:install S