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

Cloud Native Workshop - From the source code to...

Cloud Native Workshop - From the source code to the deployment of a cloud service

Slides from the workshop at "Grazer Linux Tage.

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

Patrick Koch

January 19, 2025
Tweet

More Decks by Patrick Koch

Other Decks in Programming

Transcript

  1. Task 1  Dev Container  GitHub Codespaces  Terraform

    configurations  Deployment of a Ubuntu Virtual Machine on Azure  Destruction of the resources Source GitHub Codespaces icon: https://education.github.com/experiences/primer_codespaces, Azure Icon: Azure Public Service Icons V14, Ubuntu Icon: https://en.m.wikipedia.org/wiki/File:Logo-ubuntu_cof-orange-hex.svg, Terraform Icon: HashiCorp Brand Kit
  2. on-site / dev environment in the cloud user Terraform configuration

    in a GitHub Codespace Ubuntu virtual machine Source GitHub Codespaces icon: https://education.github.com/experiences/primer_codespaces, Azure Icons: Azure Public Service Icons V14, Ubuntu Icon: https://en.m.wikipedia.org/wiki/File:Logo-ubuntu_cof-orange-hex.svg, Terraform Icon: HashiCorp Brand Kit
  3. Github Dev Container und Codespace erstellen Source GitHub Codespaces icon:

    https://education.github.com/experiences/primer_codespaces
  4. Erstelle ein neues Git repository  Mit den Konfigurationsdateien für

    den Dev-Container und für den GitHub Codespace:  https://github.com/patkoch/azure_terraform_codespace
  5. Anmeldung bei der Azure Subscription mittels Azure CLI  az

    login // bei Azure anmelden  Credentials: siehe beigelegten Usernamen/Passwort
  6. Terraform Configuration adaptieren und Bereitstellung  https://github.com/patkoch/terraform-azure-virtual-machine-linux  RSA Schlüssel

    erstellen ssh-keygen -t rsa -f id_rsa  terraform init # Connection to the backend  Terraform Configuration adaptieren (variables.tf)  id_rsa.pub Pfad in variables.tf hinzufügen/kontrollieren  terraform fmt # .tf files automatisiert formatieren  terraform validate # .tf files auf Syntax checken  terraform plan –out tfplan # Plan erstellen  terraform apply tfplan # Ressourcen laut Plan deployen
  7. Verbinden zu der Ubuntu VM  chmod 600 id_rsa 

    ssh -i id_rsa adminuser@<public IP der Ubuntu VM auf Azure>  ls –la  exit
  8. Task 2  Adapt your Dev Container: install kubectl 

    Update your kubeconfig file with the credentials of a Kubernetes cluster  Deployment of Linux Workloads on an Azure Kubernetes Cluster  Scaling the Workloads az aks get-credentials --resource-group myResourceGroup --name myAKSCluster Source AKS icon: Microsoft (Azure Public Service Icons)