54
Required Magic advanced technology Deploying Uyuni with Sumaform How to use IaC to deploy test environments for Uyuni project

Deploying Uyuni with Sumaform · 2020. 10. 29. · Deploying Uyuni with Sumaform How to use IaC to deploy test environments for Uyuni project. About me Ricardo Mateus Software Engineer

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

  • Required Magicadvanced technology

    Deploying Uyuni with SumaformHow to use IaC to deploy test environments for Uyuni project

  • About me

    Ricardo Mateus

    Software EngineerSUSE Manager TeamUYUNI Community

    rjmateus @ [email protected]

  • Agenda

    ● Uyuni Project● Uyuni deployment● Sumaform

    – Architecture– Modules– Demo

  • Agenda

    ● Uyuni Project● Uyuni deployment● Sumaform

    – Architecture– Modules– Demo

  • What?● Systems management

    – System deployment– Patch management– Service Pack migration– Configuration

    management

    *https://www.uyuni-project.org/uyuni-docs/

  • What?● Systems management

    – System deployment– Patch management– Service Pack migration– Configuration

    management

    ● Automate audit and reporting capabilities

    ● Hardware and software inventories

    *https://www.uyuni-project.org/uyuni-docs/

  • Supported Client OS ● SLE11/12/15● RHEL6/7/8 ● openSUSE Leap 15● Ubuntu 16.04/18.04/20.04● CentOS6/7/8● Debian 9/10● Oracle Linux 6/7/8

  • Agenda

    ● Uyuni Project● Uyuni deployment● Sumaform

    – Architecture– Modules– Demo

  • Deployment Architecture

  • Deployment Needs

    ● Development team– Bug Fixing: replicate bug environment– Test new feature development

  • Deployment Needs

    ● Development team– Bug Fixing: replicate bug environment– Test new feature development

    ● QA team– Manual testing– Run cucumber base test-suite

  • What these architectural needs really mean?

  • UYUNI Server

  • Controller UYUNI Server

  • Controller UYUNI Server

  • Controller UYUNI Server

  • Controller

    Client

    UYUNI Server

  • Controller

    ClientClient

    UYUNI Server

  • Client

    Controller

    ClientClient

    UYUNI Server

  • Client

    Controller

    ClientClient

    UYUNI Server

    ClientClient

  • Client

    Controller

    ClientClientClientClient

    UYUNI Server

    ClientClient

  • Client

    Controller

    Client ClientClientClient

    UYUNI Server

    ClientClient ClientClient

  • Client

    Controller

    Client ClientClientUYUNI Proxy Client

    UYUNI Server

    ClientClient ClientClient

  • Client

    Client

    Controller

    Client ClientClientUYUNI Proxy Client

    UYUNI Server

    ClientClient ClientClient

  • Client

    Client

    Controller

    Client ClientClientUYUNI Proxy

    ClientClient

    Client

    UYUNI Server

    ClientClient ClientClient

  • Client

    Client

    Controller

    Client ClientClientUYUNI Proxy

    ClientClient

    Monitoring Server

    Client

    UYUNI Server

    ClientClient ClientClient

  • Client

    Client

    Controller

    Client ClientClientUYUNI Proxy

    ClientClient

    Image Builder

    Monitoring Server

    Client

    UYUNI Server

    ClientClient ClientClient

  • Client

    Client

    Controller

    Client ClientClientUYUNI Proxy

    ClientClient

    Image Builder

    Monitoring Server

    Branch Server

    Client

    UYUNI Server

    ClientClient ClientClient

  • Client

    Client

    Controller

    Client ClientClientUYUNI Proxy

    ClientClientPOS Client

    Image Builder

    Monitoring Server

    Branch Server

    Client

    UYUNI Server

    ClientClient ClientClient

  • Mirror

    Client

    Client

    Controller

    Client ClientClientUYUNI Proxy

    ClientClientPOS Client

    Image Builder

    Monitoring Server

    Branch Server

    Client

    UYUNI Server

    ClientClient ClientClient

  • Mirror

    Client

    Client

    Controller

    Client ClientClientUYUNI Proxy

    ClientClientPOS Client

    Image Builder

    Monitoring Server

    Branch Server

    Client

    UYUNI Server

    ClientClient

    ✶: optional

    ClientClient

    ✶ ✶

    ✶✶

    ✶✶✶

    ✶✶

  • Mirror

    Client

    Client

    Controller

    Client ClientClientUYUNI Proxy

    ClientClientPOS Client

    Image Builder

    Monitoring Server

    Branch Server

    Client

    UYUNI Server

    ClientClient

    ✶: optional✶: multiple versions

    ClientClient

    ✶ ✶

    ✶✶

    ✶✶✶

    ✶✶

    ✶✶

    ✶✶✶

    ✶✶

  • Test-suite Deployments

    ● >4 versions, 1000 tests, tens of runs per day

  • Test-suite Deployments

    ● >4 versions, 1000 tests, tens of runs per day

    ● >240 VM deployments per day

    ● 2 physical locations + AWS

  • Manual deployment is not an option.

  • Infrastructure as Code (IaC)

  • Infrastructure as Code (IaC)

    Configuration as Code (CaC)

  • Infrastructure as Code (IaC)

    Configuration as Code (CaC)

    +

  • Agenda

    ● Uyuni Project● Uyuni deployment● Sumaform

    – Architecture– Modules– Demo

  • What is?

    “Sumaform provides UYUNI-specific Terraform modules that leverage OS base images and Salt states to deliver a complete solution: from VM creation to installation of the product to configuration.”* Silvio Moioli, SUSE Manager Development Team

  • Architecture

    + +

  • ● Infrastructure as Code (IaC)– Deploy virtual machines– Manage resources life-cycle

    ● Domain specific modules

    ● Provisioning– Copy salt resources and apply state

    Terraform

  • Terraform Modules

    ● Notion of backend independent modules – server– proxy– minon– ...

    ● Two modules for each supported provider– Base– Host

    Provider Independent Modules Provider Specific Modules

  • Supported providers (backends)

    * run provisioning on existing machines (null provider)

    Soon!

  • OS image + cloud init● Public JeOS images

    ● Cloud init: bring machine to “known base”– Install "salt-minion"

    package– Allow ssh login

  • Salt (CaC)● Salt states for each machine

    role

    ● Parameters for customization– auto-register (on server)– additional repositories

  • Code example

    provider "libvirt" { uri = "qemu:///system"}

    module "base" { source = "./modules/base"

    cc_username = "..." cc_password = "..."

    name_prefix = "uyuni-" domain = "tf.local" images = ["opensuse152"] use_avahi = true}

    module "server" { source = "./modules/server" base_configuration = module.base.configuration product_version = "uyuni-released" name = "server"}

    module "min-opensuse" { source = "./modules/minion" base_configuration = module.base.configuration product_version = "uyuni-released" name = "opensuse" image = "opensuse152" server_configuration = module.server.configuration}

  • Code example

    provider "libvirt" { uri = "qemu:///system"}

    module "base" { source = "./modules/base"

    cc_username = "..." cc_password = "..."

    name_prefix = "uyuni-" domain = "tf.local" images = ["opensuse152"] use_avahi = true}

    module "server" { source = "./modules/server" base_configuration = module.base.configuration product_version = "uyuni-released" name = "server"}

    module "min-opensuse" { source = "./modules/minion" base_configuration = module.base.configuration product_version = "uyuni-released" name = "opensuse" image = "opensuse152" server_configuration = module.server.configuration}

  • Demo time..

  • Q&A

  • Join Us at uyuni-project.org

    /uyuni-project

    /uyuni-project

    /UyuniProject

  • All text and image content in this document is licensed under the Creative Commons Attribution-Share Alike 4.0 License (unless otherwise specified). “LibreOffice” and “The Document Foundation” are registered trademarks. Their respective logos and icons are subject to international copyright laws. The use of these thereof is subject to trademark policy.

    Finish

    Thank You

    Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 45Slide 46Slide 47Slide 48Slide 49Slide 50Slide 51Slide 52Slide 53Slide 54Slide 55Slide 56