Giter Site home page Giter Site logo

sarahbx / common-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kubevirt/common-templates

0.0 1.0 0.0 434 KB

Templates for running VMs on KubeVirt

License: Apache License 2.0

Makefile 3.04% Shell 56.73% Python 38.69% Dockerfile 1.54%

common-templates's Introduction

Build Status

A set of (meta-)Templates to create KubeVirt VMs.

Overview

This repository provides VM templates in the form compatible with OpenShift templates and OpenShift Cluster Console Web UI and those can further be transformed into regular objects for use with plain Kubernetes.

The VM templates are generated from meta-templates via Ansible and libosinfo. The generated templates are parametrized according to three aspects: the guest OS, the workload type and the size. The generated content is stored in dist/.

The Ansible playbook generate-templates.yaml describes all combinations that should be generated.

Every template consists of a VirtualMachine definition which can be used to launch the guest, if a disk image is available (see below).

Requirements

Is it necessary to install the following components to be able to run the Ansible generator and the CI suite:

  • jq
  • ansible >= 2.4
  • libosinfo
  • python-gobject
  • osinfo-db-tools
  • intltool

Usage

By default the process below takes a generated template and converts it to an VM object that can be used to start a virtual machine.

# Clone the repository
$ git clone https://github.com/kubevirt/common-templates
$ cd common-templates

# Pull all submodules
$ git submodule init
$ git submodule update

# Build osinfo database
$ make -C osinfo-db

# Generate the template matrix
$ ansible-playbook generate-templates.yaml

# Pick a template by selecting
# - the guest OS - windows
# - the workload type - desktop
# - the size - medium

# Use the template
$ oc process --local -f dist/templates/windows10-desktop-medium.yaml

$ oc process --local -f dist/templates/windows10-desktop-medium.yaml  --parameters
NAME                DESCRIPTION                   GENERATOR           VALUE
NAME                VM name                       expression          windows-[a-z0-9]{6}
SRC_PVC_NAME        Name of the PVC to clone                          win10
SRC_PVC_NAMESPACE   Namespace of the source PVC                       kubevirt-os-images

$ oc process --local -f dist/templates/windows10-desktop-medium.yaml | kubectl apply -f -
virtualmachine.kubevirt.io/windows10-rt1ap2 created

$

Templates

The table below lists the guest operating systems that are covered by the templates. The meta-templates are not directly consumable, please use the generator to prepare the properly parametrized templates first.

Note: The templates are tuned for a specific guest version, but is often usable with different versions as well, i.e. the Fedora 32 template is also usable with Fedora 30.

Guest OS Meta-template
Microsoft Windows Server 2012 R2 windows
Microsoft Windows Server 2016 windows
Microsoft Windows Server 2019 windows
Microsoft Windows 10 windows
Fedora 33 fedora
Red Hat Enterprise Linux 6 rhel7
Red Hat Enterprise Linux 7 rhel7
Red Hat Enterprise Linux 8 rhel8
Ubuntu 18.04 LTS ubuntu
OpenSUSE Leap 15.0 opensuse
CentOS 6 centos6
CentOS 7 centos7
CentOS 8 centos8

Deprecated templates

Meta-template Replaced by
windows windows
windows server windows2k12
windows2k12
windows2k12

License

common-templates are distributed under the Apache License, Version 2.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.