Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Infrastructure as Code and AI - does it fit?

Infrastructure as Code and AI - does it fit?

Slides of my lecture at "Grazer Linux Tage"

AI combined with cloud computing and infrastructure as a code - does that fit? Yes, indeed!

Are you curious how the GitHub Copilot could support you in implementing 'Infrastructure as Code' to deploy resources on Azure in an automated way?
This talk reveals my approach to using the AI pair programming tool. Starting from scratch, I will create a working Terraform configuration that can deploy a Kubernetes cluster on Azure, by just providing comments.
What could good practice for that look like?
It shall prove that AI speeds up your development speed and works well for infrastructure as code approaches.

https://pretalx.linuxtage.at/glt24/talk/N73FQV/

Koch, Patrick AVL/AT

April 08, 2024
Tweet

More Decks by Koch, Patrick AVL/AT

Other Decks in Technology

Transcript

  1. Patrick Koch Email: [email protected] Blog: patrickkoch.dev LinkedIn: patkoch87 GitHub: patkoch

    Twitter/X: PK_Koch Mastodon: @[email protected] Cloud Adoption Engineer, AVL List GmbH Source icons: Microsoft, HashiCorp
  2. Content What is Infrastructure as Code? Usages of AI tools

    for Infrastructure as Code Live Demo(s) Conclusion
  3. What is Infrastructure as Code?  Infrastructure as Code (IaC)

    is a method of managing and provisioning computing infrastructure through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. It's a key practice in DevOps and is used in conjunction with continuous delivery.  IaC allows developers to automate the process of setting up and managing infrastructure, which can lead to faster deployment times, more efficient use of resources, and more reliable and repeatable processes. It can be used to manage a wide range of services, including networks, virtual machines, load balancers, and connection topology. Source: GitHub Copilot
  4. Example: Azure Kubernetes Cluster resource "azurerm_resource_group" "example" { name =

    „glt-24-rg" location = "West Europe" } resource "azurerm_kubernetes_cluster" "example" { name = „glt-24-aks" location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name dns_prefix = "exampleaks1" default_node_pool { name = "default" node_count = 1 vm_size = "Standard_D2_v2" } identity { type = "SystemAssigned" } tags = { Environment = "Production" } } Azure AKS Azure Icons: Azure Public Service Icons V14, Terraform Icon: HashiCorp Brand Kit
  5. Code Generation Code Interpretation Trouble Shooting Security Answering questions Giving

    advice Icon MS Copilot: Microsoft 365 Copilot Icon.svg - Wikimedia Commons Icon Gemini: https://en.m.wikipedia.org/wiki/File:Google_Gemini_logo.svg Icon GitHub Copilot: Microsoft (provided by Maxim Salnikov)
  6. resource "azurerm_network_security_group" "sg-rdp- connection" { name = "glt24demonsg" location =

    azurerm_resource_group.rg.location resource_group_name = azurerm_resource_group.rg.name security_rule { name = "tcptraffic" priority = 100 direction = "Inbound" access = "Allow" protocol = "Tcp" source_port_range = "*" destination_port_range = "*" source_address_prefix = "*" destination_address_prefix = "*" } tags = { environment = "Testing" } }
  7. param registryName string param location string = resourceGroup().location param sku

    string = 'Basic' resource acr 'Microsoft.ContainerRegistry/registries@2021-06-01-preview' = { name: registryName location: location sku: { name: sku } properties: { adminUserEnabled: true } }