Ansible,Terraform,AWS,Azure IaC tools
a simple scenario of provisioning an AWS EC2 Instance

Ansible,Terraform,AWS,Azure IaC tools

terraform {
required_providers {
aws = {
source  = "hashicorp/aws"
version = "~> 3.27"
}
}
}
provider "aws" {
access_key = "aws_access_key"
secret_key = "aws_secret_key"
// shared_credentials_file = "/Users/.aws/creds"
region = "us-west-1"
}
resource "aws_instance" "web_server" {
ami                    = "ami-0123456"
instance_type          = "t3.small"
subnet_id              = "subnet-a000111x"
vpc_security_group_ids = "sg-dfdd00011"
key_name               = "web_server_test_key"
tags = {
Name = "Web_Server"
}
}        

Terraform

Terraform by HashiCorp is the leading IaC tool specialized in managing infrastructure across various platforms from AWS Azure GCP?to Oracle Cloud, Alibaba Cloud, and even platforms like Kubernetes?and Heroku.

As a platform-agnostic tool, Terraform can be used to facilitate any infrastructure provisioning and management use cases across different platforms and providers while ensuring the desired state across the configurations.



Ansible

Ansible is not a dedicated Infrastructure management tool but more of an open-source configuration management tool with IaC capabilities. Ansible supports both cloud and on-prem environments and can act through SSH or WinRM as an agentless tool. Ansible excels at configuration management and infrastructure provisioning yet is limited when it comes to managing said infrastructure.

ANSIBLE / AWS CloudFormation example:

- hosts: localhost
gather_facts: False
vars_files:
- credentials.yml
tasks:
- name: Provision EC2 Instance
ec2:
aws_access_key: "{{aws_access_key}}"
aws_secret_key: "{{aws_secret_key}}"
key_name: web_server_test_key
group: test
instance_type: t3.small
image: "ami-0123456"
wait: true
count: 1
region: us-west-1
instance_tags:
Name: Web_Server
register: ec2

CloudFormation:
AWSTemplateFormatVersion: "2010-09-09"
Resources:
WebInstance:
Type: AWS::EC2::Instance
Properties:
InstanceType: t3.small
ImageId: ami-0123456
KeyName: web_server_test_key
SecurityGroupIds:
- sg-dfdd00011
SubnetId: subnet-a000111x
Tags:
-
Key: Name
Value: Web_Server        

AWS CloudFormation

AWS CloudFormation is the AWS proprietary platform specific IaC tool to manage AWS infrastructure. CloudFormation has deep integration with all AWS services and can facilitate any AWS configuration as a first-party solution.


Azure Resource Templates

Microsoft Azure uses JSON-based?Azure Resource Templates to facilitate IaC practices within the Azure platform. These resource templates ensure consistency of the infrastructure and can be used for any type of resource configuration.



In addition to the above, there are specialized tools aimed at specific infrastructure and configuration management tasks such as:

  • Packer, EC2 Image Builder, and Azure Image Builder create deployable custom os images.
  • Cloud-Init is the industry-standard cross-platform cloud instance initialization tool. It enables users to execute the script when provisioning resources (servers).
  • (R)?ex is a fully featured infrastucture automation framework.

要查看或添加评论,请登录

Victor Mahdal的更多文章

  • NEXUS DASHBOARD INSIGHTS

    NEXUS DASHBOARD INSIGHTS

    Overview Nexus Dashboard Insights is part of the Cisco Nexus Dashboard. It unifies various network management and…

    2 条评论
  • Cisco ACI 6.x NEW ARCHITECTURE

    Cisco ACI 6.x NEW ARCHITECTURE

    Cisco ACI (Application Centric Infrastructure) version 6.0 brought several important enhancements and architectural…

    1 条评论
  • Cisco ACI acronyms and terms

    Cisco ACI acronyms and terms

    ACI: Cisco Application Centric Infrastructure, a software-defined networking (SDN) solution for data centers AEP:…

    1 条评论
  • ACI - POD -MULTI POD - ANYWHERE - CLOUD

    ACI - POD -MULTI POD - ANYWHERE - CLOUD

    ACI multi-pod In the first few versions of ACI, all leaf switches had to connect to all the spines. This meant the ACI…

    1 条评论
  • DUO vs OKTA MFA

    DUO vs OKTA MFA

    Identity and access management solutions like Okta and Duo are extremely valuable for maintaining organizational data…

  • CI/CD PLAN>CODE > BUILD > PACKAGE > TEST > RELEASE

    CI/CD PLAN>CODE > BUILD > PACKAGE > TEST > RELEASE

    Continuous integration vs continuous delivery vs continuous deployment In software development, the process starts with…

  • VXLAN and EVPN for Datacenter

    VXLAN and EVPN for Datacenter

    VXLAN VLAN IDs are 12-bit long, which limits the total number of VLANs to 4094. .

  • Cisco ACI 5.2 - 15.2 DESIGN OPTIONS

    Cisco ACI 5.2 - 15.2 DESIGN OPTIONS

    CISCO ACI 5.2 - DESIGN OPTIONS Cisco ACI 5.

  • ACI - Containers and VMs - k8

    ACI - Containers and VMs - k8

    ?????????????? ?????????????? ? A Virtual machine essentially emulates and mimics the hardware and software of a…

  • Hardware Telemetry / Cisco Insights

    Hardware Telemetry / Cisco Insights

    Q. Which platforms support software telemetry? A.

社区洞察

其他会员也浏览了