►
From YouTube: Managing KubeVirt VMs with Ansible
Description
Infrastructure teams managing virtual machines (VMs) and the end users of these systems make use of a variety of tools as part of their day-to-day world. One such tool that is shared amongst these two groups is Ansible, an agentless automation tool for the enterprise. To simplify both the adoption and usage of KubeVirt as well as to integrate seamlessly into existing workflows, the KubeVirt community is excited to introduce the release of the first version of the KubeVirt collection for Ansible, `kubevirt.core`, which includes a number of tools that you do not want to miss.
A
Welcome
to
the
video
version
of
the
managing
cubert
VMS
with
anible
block,
my
name
is
Felix
matek
infrastructure
teams,
managing
virtual
machines
and
the
end
users
of
these
systems
make
use
of
a
variety
of
tools
as
part
of
their
day-to-day
world.
One
such
tool
that
is
shared
amongst
these
two
groups
is
anible,
an
agent
list,
automation
tool
for
the
Enterprise
to
simplify
both
the
adoption
and
usage
of
CUO,
as
well
as
to
integrate
seamlessly
into
existing
workflows.
A
The
CER
Community
is
excited
to
introduce
the
release
of
the
first
version
of
the
C
collection
for
anible
called
cubert
core,
which
includes
a
number
of
tools
that
you
do
not
want
to
miss
in
this
video.
We
will
review
some
of
the
features
and
their
use
associated
with
this
initial
release
before
diving
into
the
feature
set
of
the
collection
itself.
Let's
review
why
the
collection
was
created
in
the
first
place,
while
incorporating
cuber
and
kubernetes
has
the
potential
to
disrupt
the
workflows
of
teams
that
typically
manage
virtual
machine
infrastructure,
including
the
end
users
themselves.
A
The
following
paradigms
remain:
first
kubernetes
and
the
resources
associated
with
cuber
can
be
represented
in
a
declarative
fashion.
Second,
in
many
cases,
communicating
with
cupert
virtual
machines
makes
use
of
the
same
protocols
and
schemes
as
nonnes
based
environments.
Third,
the
management
of
vir
machines
still
represents
a
challenge.
For
these
reasons
and
more,
it
is
only
natural
that
a
tool
like
anible
is
introduced
within
the
cuer
community.
Not
only
can
It
help
manage
the
cuer
kubernetes
resources
like
virtual
machines,
but
it
can
also
enable
the
extensive
anible
ecosystem
for
managing
guest
configurations.
A
So
again
we
are
excited
to
introduce
the
cber
core
anible
collection.
Let's
start
with
an
overview
of
the
included
capabilities
of
the
collection
as
part
of
the
initial
release,
an
anible
inventory,
plugin
and
the
management
module
are
included.
The
collection
itself
is
available
in
the
same
distribution,
location
containing
anible
automation,
content,
Ando
Galaxy.
Let's
have
a
closer
look
at
the
resources
encompassing
The
Collection.
First,
let's
have
a
look
at
the
dynamic
ansible
inventory
work
with
Cube
virtual
machines
in
anible.
A
They
need
to
be
available
in
an's
host
inventory,
since
CER
is
already
using
the
Q
API
to
manage
virtual
machines.
It
would
be
nice
to
leverage
this
API
to
discover
hosts
with
anible
to
this
is
where
the
dynamic
inventory
of
the
cuber
core
Collection
comes
into
play.
With
this
Dynamic
inventory
capability,
you
can
query
the
kubernetes
API
for
available
virtual
machines
in
a
given
Nam
space
or
name
spaces,
along
with
additional
filtering
options
such
as
labels
to
allow
anible
to
find
the
right
connection
parameters
for
a
virtual
machine.
A
The
network
name
of
a
secondary
interface
can
also
be
specified
under
the
hood.
The
dynamic
inventory
uses
either
your
default
Cube,
CTL
credentials
or
credentials
specified
in
the
inventory
parameters
to
connect
to
a
cluster.
Now,
let's
have
a
look
at
the
keyboard.
Vm
module,
while
working
with
existing
wiing
machines
is
already
quite
useful,
would
be
even
better
to
control
the
entire
life
cycle
of
cup.
With
your
machines
from
an
this
is
made
possible
by
the
cup
V
module
provided
by
the
CU
core
collection.
A
The
CU
VM
module
is
a
thin
wrapper
around
the
kubernetes
core
k8s
module
and
allows
you
to
control
the
essential
fields
of
a
virtual
machine's
specification
in
true
anable
fashion.
This
module
tries
to
be
it
potent
as
possible
and
only
makes
changes
to
objects
within
kubernetes
if
necessary.
With
with
its
weight
feature,
it
is
possible
to
delay
further
tasks
until
a
virtual
machine
was
successfully
created
or
updated
and
is
in
the
ready
state,
or
it
was
successfully
deleted.
Now
that
I've
provided
an
introduction
to
the
feature
set.
A
It
is
time
to
demonstrate
how
you
can
get
up
to
speed
using
the
collection,
including
a
few
examples,
to
showcase
the
capabilities
provided
by
The
Collection.
Please
note
that
as
a
prerequisite,
Ansel
needs
to
be
installed
and
configured
along
with
a
working
cuines
cluster
with
cube
and
a
cubot
cluster
Network
add-ons
operator
installed.
Cluster
also
needs
to
have
a
secondary
Network
configured
which
can
be
attached
to
a
virtual
machine
so
that
the
machine
can
be
reached
from
the
anable
control
node.
The
following
items
will
be
covered
in
the
demo.
A
First,
we
will
install
the
collection
from
anible
Galaxy.
Second,
we
will
create
a
namespace
and
a
secret
with
an
SSH
public
key.
Third,
we
will
create
a
virtual
machine.
Fourth,
we
will
list
the
available
virtual
machines
on
the
cluster.
Fifth,
we
will
execute
a
command
on
the
virtual
machine
Sixth
and
last
we
will
remove
all
created
resources
again.
So
let's
get
started
first,
let's
start
by
installing
the
keyboard
core
collection
from
ANS
Galaxy.
This
will
also
install
the
kubernetes
core
collection
as
a.
A
A
A
A
Namespace
with
the
wi
machine
deployed,
it
is
eligible
for
use
and
anable
automation
activities.
Let's
illustrate
how
it
can
be
queried
and
added
to
an
anible
inventory
dynamically
using
the
plugin
provided
by
the
cuit
core
collection
to
configure
the
inventory.
I
have
created
an
inventory
file
at
which
we
will
have
a
look
now
you
can
see
this
is
using
the
cuot
core
cuot
plugin,
and
it's
configuring
one
connection.
This
connection
is
set
up,
so
it
varies
for
virtual
machines
in
the
cubert
anible
namespace.
A
A
A
A
A
Machine
as
you
can
see,
this
command
ran
successfully
and
we
are
running
Fedora
38.
As
the
last
step,
we
are
going
to
complete
the
life
cycle
of
the
Wier
Machine
by
destroying
it
again
for
this
I
have
prepared
A
playbook.
Let's
have
a
look.
You
can
see.
This
Playbook
is
using
the
cuid
Via
module
again
this
time,
setting
the
state
of
the
vir
machine
to
absent.
After
deleting
the
VM,
we
are
also
going
to
delete
the
name
space
we
created
earlier
for
this
we're
using
the
k8s
module
of
the
kubernetes
core
collection.
A
A
Playbook
again
for
more
information
on
on
the
playbooks
have
a
look
at
the
written
version
of
this
blog
for
more
information
on
the
collection's
contents,
including
the
full
lest
of
parameters
and
options,
have
a
look
at
the
collections
documentation.
You
can
find
it
in
the
description
of
this
video.
All
the
content
included
within
this
video
only
provided
a
brief
introduction
and
usage
of
the
newly
released
cuid
core
collection.
It
is
the
hope
that
it
helped
showcase
the
integration
now
available
between
cuber
and
anible,
including
how
easy
it
is
to
manage
Cub
assets.
A
Next
potential
iteration
could
be
to
expose
the
virtual
machine
via
a
kubernetes
service
instead
of
a
secondary
interface
as
it
was
covered
in
this
walkthrough.
Not
only
does
this
leverage
existing
models
outside
of
the
keboard
ecosystem,
but
it
also
helps
to
enable
a
uniform
method
for
exposing
content
interested
in
learning
more
providing
feedback
or
contributing
head
over
to
the
CER
core
GitHub
repository
to
continue
your
journey
journey
and
get
involved.
I
hope
you
learned
something
new
and
useful
in
this
video.
Thank
you
for
watching.