ACE IaC Update 10172022
ACE IaC Update 10172022
INFRASTRUCTURE AS CODE
www.aviatrix.com
Aviatrix Certified Engineer – Infrastructure as Code
Topics
Lecture Module
End
1
Network Engineers = Developers Incognito
● Shell scripts
● Perl scripts
● Python scripts
● Expect/Tcl scripts
● Screen-scraping
2
DevOps Overview
● What is DevOps?
● Software development practices with the goal of shortening SDLC while providing great quality
● CI/CD pipelines
● Networking teams need to respond with the same speed and agility that enterprises expect from being
in the Public Cloud
3
CI/CD and VCS for Network Engineers
● Continuous integration (CI) à Whenever a developer checks in code to the source repository, a build
is automatically triggered, e.g., Jenkins
● CI/CD pipeline is an iterative process that automates software delivery using CI and CD
● Tool that helps manage changes to files (such as source code or documentation)
● You can build Infrastructure as Code (IaC) in accordance with DevOps practices (Terraform Cloud)
4
Practical GitHub Workflow for Network Engineers
● From scratch OR
2. Clone a repository
● Allows you to work in IDE of your choice (vi, emacs, Visual Studio Code, Sublime, Atom, etc.)
4. After editing your files, ‘save it’ with the following 3-step process:
b) Issue a git commit – create a snapshot of the stage with a log message
Can be combined
c) Issue a git push – push the commit to the remote repository on GitHub
5
Infrastructure as
Code
www.aviatrix.com
What it is
● The management of infrastructure (networks, virtual machines, load balancers, and connection topology) in a
descriptive model, using the same versioning as DevOps team uses for source code. Like the principle that the same
source code generates the same binary, an IaC model generates the same environment every time it is applied.
- https://docs.microsoft.com/en-us/azure/devops/learn/what-is-infrastructure-as-code
● AWS – CloudFormation
7
Terraform
www.aviatrix.com
What it is
● Use Infrastructure as Code to provision and manage any cloud, infrastructure, or service
9
Aviatrix Terraform Provider
10
Aviatrix Terraform Resources – Examples
cloud_type = 1 cloud_type = 8
} }
11
Aviatrix Terraform Modules
● “Repeatable++”
● Can be found on
Terraform Registry
12
Aviatrix Terraform Module – Example
module "transit_aws_1" {
source = "terraform-aviatrix-modules/aws-transit/aviatrix"
version = "v3.0.0"
cidr = "10.1.0.0/20"
region = "eu-west-1"
account = "AWS"
13
Terraform Best Practices
14
NetOps Example
of Egress Security
www.aviatrix.com
Egress Filtering – Stakeholders
● Software engineers
● Network engineers
● Security engineers
16
Egress Filtering – Workflow
Engineers Engineers
17
Egress Filtering – Automation
● Leveraging GitHub Actions and Terraform Cloud to automate the simulation of change (terraform plan) and
implementation of change (terraform apply)
terraform plan
Pull Request
Main Branch
terraform apply
18
Lab Time! - https://community.aviatrix.com/category/ace-iac
19