Use kcli with all your virtualization solutions!

Video in TIB AV-Portal: Use kcli with all your virtualization solutions!

Formal Metadata

Title
Use kcli with all your virtualization solutions!
Title of Series
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
2019
Language
English

Content Metadata

Subject Area
Abstract
What if you could use the same tooling to interact with libvirt, kubevirt, gcp, aws ovirt or openstack ? In this talk, I will present kcli, the tool I initially wrote to ease my work on libvirt and which evolved into a multiprovider abstraction tool We will detail installation, typical workflow and advanced features I use every day.
Loading...
Presentation of a group Boom (sailing) Virtualization Virtualization
Context awareness INTEGRAL System administrator Multiplication sign Demo (music) Sheaf (mathematics) Insertion loss Client (computing) Open set Parameter (computer programming) Mereology Formal language Data model Uniform resource locator Facebook Medical imaging Pointer (computer programming) Single-precision floating-point format Cuboid Aerodynamics Software engineering Constraint (mathematics) Internet service provider Drop (liquid) Bit Virtualization Cloud computing Instance (computer science) Variable (mathematics) Flow separation Type theory Data management Root Process (computing) Fluid statics Software repository Internet service provider Configuration space MiniDisc Right angle Remote procedure call Point (geometry) Existence Game controller Computer file Simultaneous localization and mapping Electronic mailing list Focus (optics) Declarative programming Twitter Product (business) Goodness of fit Bootstrap aggregating Read-only memory Profil (magazine) Energy level Integrated development environment Utility software Software testing Configuration space MiniDisc Communications protocol Message passing Metropolitan area network Computing platform YouTube Condition number Default (computer science) Data type User interface Module (mathematics) Scale (map) Game controller Default (computer science) Focus (optics) Demo (music) Chemical equation Planning Client (computing) Directory service Template (C++) Word Bootstrap aggregating Software Personal digital assistant Atomic number Point cloud Object (grammar) Fingerprint Library (computing)
Ferry Corsten Multiplication sign Instance (computer science) Function (mathematics) Client (computing) Parameter (computer programming) Mereology Total S.A. Medical imaging Semiconductor memory Single-precision floating-point format Point cloud Family Source code Keyboard shortcut Electronic mailing list Internet service provider Cloud computing Bit Instance (computer science) Public-key cryptography User profile Befehlsprozessor Internet service provider Configuration space MiniDisc Right angle Remote procedure call Electric current Computer file Computer-generated imagery Electronic mailing list Average Generic programming Template (C++) Goodness of fit Read-only memory MiniDisc Default (computer science) Data type Default (computer science) Demo (music) Login Client (computing) Template (C++) Word Explosion Personal digital assistant Password Point cloud Moment <Mathematik> Game theory
Computer file INTEGRAL Multiplication sign Set (mathematics) Function (mathematics) Open set Client (computing) Generic programming Mereology Template (C++) Number Time domain Direct numerical simulation Case modding Read-only memory Semiconductor memory Profil (magazine) MiniDisc Point cloud Default (computer science) Domain name Default (computer science) Demo (music) Server (computing) Internet service provider Virtualization Calculus Template (C++) Befehlsprozessor Personal digital assistant Factory (trading post) Point cloud MiniDisc
Information Computer-generated imagery Polygon Food energy User profile Direct numerical simulation Fluid statics Software Read-only memory Profil (magazine) Befehlsprozessor Internet service provider Direct numerical simulation Interface (computing) Right angle Information Computing platform Default (computer science)
Direct numerical simulation Demo (music) Disintegration Maxima and minima Gamma function Ordinary differential equation Statistics Default (computer science)
Context awareness Group action Scripting language Computer file Code File format 1 (number) Sheaf (mathematics) Electronic mailing list Parameter (computer programming) Element (mathematics) Time domain Read-only memory Profil (magazine) Different (Kate Ryan album) Semiconductor memory Object (grammar) Vertex (graph theory) MiniDisc Computing platform Default (computer science) Default (computer science) Information Demo (music) Computer file Electronic mailing list Planning Computer network Range (statistics) Instance (computer science) Variable (mathematics) Statistics Template (C++) Befehlsprozessor Software Personal digital assistant MiniDisc Right angle Key (cryptography) Game theory Object (grammar)
Scripting language Computer file File format Sheaf (mathematics) Parameter (computer programming) Time domain Goodness of fit Different (Kate Ryan album) Vertex (graph theory) MiniDisc Default (computer science) Domain name Scripting language Key (cryptography) Demo (music) Computer file Complex (psychology) Planning Parameter (computer programming) Range (statistics) Instance (computer science) Variable (mathematics) Template (C++) Loop (music) Personal digital assistant MiniDisc Right angle Key (cryptography)
Meta element Demo (music) Computer file Computer file Planning Login Electronic mailing list Parameter (computer programming) Metadata Product (business) Product (business) Goodness of fit Sample (statistics) Different (Kate Ryan album) Software repository Network socket Tower Software repository Point cloud Video game console Vertex (graph theory) Sinc function
Programmable read-only memory Computer-generated imagery Password Directory service Electronic mailing list Open set Shift operator Machine vision Product (business) Local Group Tower Vertex (graph theory) Multiplication Default (computer science) Server (computing) Computer file Sampling (statistics) Electronic mailing list Computer network Client (computing) Parameter (computer programming) Instance (computer science) Device driver Open set Virtual machine Product (business) Root Sample (statistics) Fluid statics Compilation album Key (cryptography)
Computer-generated imagery Directory service Open set Parameter (computer programming) Shift operator Machine vision Product (business) Local Group Time domain Web 2.0 Read-only memory Vertex (graph theory) Information Multiplication Descriptive statistics Default (computer science) Shift operator Information Planning Parameter (computer programming) Instance (computer science) Control flow Device driver Open set Template (C++) Product (business) Personal digital assistant Internet service provider Compilation album Right angle
Module (mathematics) Beta function Context awareness Demo (music) Inheritance (object-oriented programming) Information Computer file INTEGRAL Multiplication sign Planning Cloud computing Client (computing) Mereology Flow separation 2 (number) Medical imaging Direct numerical simulation Word Internetworking Right angle
Goodness of fit Presentation of a group
Virtual reality Software
you thank you okay let's start so welcome to this presentation my name is Karen boom Adelle and you're going to see a presentation called use Kackley with all your virtualization solution so
first some words about me I'm a senior software engineer at way that working on ku Bert here are some of the things I like I like my guitar piano and so on I like rollerblading I like Python much more than go actually and I like studying languages about our big barbarian for instance cool about the agenda for today I will talk a little bit about focus and automation then I will explain in this context what Kackley is why it helps me I will provide some additional facts then it will be time for live demo using this network so it's how it goes we will do a recap and finally we will have awfully some time for questions let's begin first with a couple of words about focus on automation I want to convey the idea that it's getting more and more complicated to focus because we are things getting in the way like Facebook Twitter whatsapp telegram YouTube or other stuff right so I really believe it's about finding the right balance between automating the boring parts and focusing again on what's relevant so I'm a sysadmin guy so in this context I created a cool tool called Kali so what is Kali it's basically a client tool meant to interact with virtualization providers and I mean libvirt but then it evolved into something that asked me and the couvert GC p WS overt and OpenStack the idea to be to easily manage VMs from command lines the same way regardless of the platforms that you want to use there's then also constraints we type which is called Plan Finder we see what it is which allows us to clear to declare VMs or other objects like containers networks pool disks and so on right and then we are also able to share them using a concept of repos and products there's ginger support in those plant files which means that you can leverage ginger constructs to actually declare variables use looping or condition of stuff and there's also support for containers with docker containers or kubernetes objects pod or deployments to be actually actually I create there are existing plant files that I develop to deploy things like kubernetes openshift word over top and start for man and so on there's even a web interface done in jab in in flask which is probably crappy but that's not relevant I guess yeah then let me provide you some additional facts regarding installation you can deploy it either as a container or you can do container that you can deploy with document to be accurate or you can also use an existing package so it's either rpm or Deb in which case we only been delivered dependencies to make the loss package small wait there's an ecosystem of all around Kathy because catalyst also a Python library so it means that we can actually use ansible modules frequently there's a dynamic inventory which levels quickly and there's even a kubernetes custom controller that you can use to declare VMs there so in all of those cases I believe that their interest is that you guys you have a single tool right like for instance the dynamic inventory you use the same dynamic inventory regardless of whether you're using over libvirt OpenStack asana and the same with the instable module with single ansible module whether you are using GC p or AWS or overt or what a couvert whatever you are in mind ok about the roadmap the idea is mainly to a new providers digitalocean IBM cloud and Alibaba cloud which I believe at the top of cloud providers which are currently not coded in this tool about witnesses there are some witnesses I believe so typically I believe that the documentation should be improved in particular the installation process then you need tests have removed them at some point so but I've done no backhand but they need some shaping and the logo a friend did the logo and probably it needs some improvements okay that's pretty much everything I wanted to cover that you didn't want to talk too much but I already did too much so let's go with the live demos so the idea is to show you all to do bootstrapping then we will create a VM in several place we will use this profiles we will use plan files then I will also explain how to debug vert and open sea for instance using product and if we have enough time left I will probably show you the web interface and maybe ansible integration let's try let me switch to this okay I've got clear and I will begin with this first I'm gonna try it with we just by the way let's see if it works yes okay so this demo is just big strapping right so what we want to do is just create the first provider and we want to launch a VM on it simple so first I'm going to delete my distinct Kackley config file which is stored in this directory convict Doe chairman okay and I'm going to use this command khaki bootstrap to actually a bootstrapper this keyword client in this case it's a remote one of course I could also use my local libvirt not in my case but if you even linux box okay that's simple these got bootstrapping and basically what it does is just creating this file config dot jamel okay where i want to to show you there's a default section over there right when i'm saying which client I want to use it solely ml then I'm setting default values for all the parameters that you can override that's fine and then there's a corresponding divert section with the name I put where I'll say I want to use this remote hypervisor with default value and using SSH as well your I let's try this okay and indeed I can see my available clients right I've got this my levert one that I just created along with a fake one that I use we just do testing and it has some other utilities but it allows you to test I'll catch you without any provider good ok on Sunday what I will typically do is
download cloud image right the idea is to leverage existing cloud image so with this Kackley download command you can download either CentOS Fedora Ubuntu even well or Debian cloud image so that you can create VMs from there let's see which one available in this in
this for this hypervisor so I previously run khaki download CentOS 7 and so CentOS is there so I want the Cyrus one I would do khaki don't know Cyrus which communicating with my libvirt remote instance which is running out on by the way and if you downloaded it and on she's finished download we can sit there at least - template and I will be able to use this to create a VM ok so let's create a VM finally so simple as that we specify the template that we want to use right and the name of the vm vm 1 ok cackling Venus V - P and the VM got created it's easy ok in this case we are now using default values for things like your CPUs memory if you want to tweak this or do we do that pretty much the same command that we can see that you are passing additional parameters in this case the memory right I wanted to jiggle by DVM and I'm also specifying the disk I want the VM to have to this with the indicated size who know if I use Kathy list I can list the VMS that are running in this I provides alright DM 1v n - they are there and you can see that the IP is also shown me it's not really here properly formatted because of the output but that's fine right I can see the name of the VM the IP and so on right so since I have the IP Chile I'm able to SSH into the VM catalysis edge VM one I will connect to the VM and you can see that I'm using the the CentOS cloud image so that I was connected I'm connecting a central to a user we are detecting the cloud user depending on the template that we want to use and also you note that I didn't provide any password because my public key got automatically injected for me so that I don't have to think about it and so that I can focus okay cool let me exit this VM okay and then I can delete my game V M 1 M 2 in this case I'm doing the I'm deleting with a single command line right V M 1 VN 2 just wait a little bit and my game is deleted that will be my first demo let's go with the second one this one is called VM everywhere so it's going to be pretty much the same stuff but now we are going to create the VM in not only only Bert but on other stuff on other parts good let me first to establish my own config file which is a bit more complex and you can see that indeed mine has not only liver torque a VM but I'm also I also have AWS over KVM I've got GCP couvert over top of stack pretty much all of them well let's create a VM my default keyboard client we already did that so it's pretty much the same VM time it's getting created that word we are P ok no let's do the same but in this case I'm going to create it in my DCP account right so for people familiar with that I don't have to use cloud which is fine but - but what you need to learn it ok and it's created let's do the same with AWS so I never in this case the WSI I never use the AWS client so I can't talk about it I just use my tool right so under the hood yeah I have to indicate that when you when you attack GCP or AWS you don't download a template you use the existing cloud image from the corresponding slot to write off okay good if I lift yes I need to be careful with this the the VM on my default provider once they are dead of the antenna I got I created if I list them on my DCP provider so I'm just pointing to a different client as I call them right I will see the V end I've got
there so Coover stuff but also my VN 10 is there and the IP showing so I could be I would actually be able to say Kackley SSH the same way that I did earlier okay let's finish with AWS very
much the same we try to also add the same output regardless again of the virtualization that we would use and of course we would do the same for covert overt or OpenStack the same idea okay now I'm going to delete the VM on each of them so it's pretty much as we did earlier so that you just want to know that I'm specifying several clients from actually deleting sequentially the VM over there and that's pretty much it let's go with a third demo okay this one is called profile of course because up until now have ever created VM with with default settings right or we specified part of the setting using command line like memory and so on that's fine but we can do it better right so we are going to use profile profile are basically defining the factory profile dot jemelle file right so there are bunch of them but just let's focus on on one I've created which is called for them so in this fourth time profile I'm specifying that I want to use the template which it's optional I want to do the center's one i specify the number of CPUs that I want to use a domain visit of DNS is set to true which means that DNS entry will be created in this case in live birth or if I use DCP that would be created as a public dns entry and switch find that I want to disk with size 10 and 2 and so on I think it's fairly readable I'm also executing some command at lunch time through cloud in it so I'm setting a custom mod D as you can see here and and I'm also using notify so it's you she hid here but there's some pushbullet integration okay okay we cannot solid profile using calculus profiles pretty much the same or too trite it doesn't
show well because of the output but that's fine okay so let's create a VN
with this profile right so the VM is named for the he is from this profile for them sorry since I'm not specifying VN m a random one is picked for me right this one is called in Sonora right energy deploying since I specified with of DNS and set it to true I'm actually waiting for to collect the IP that that I received for DHCP and on seized on the DNS entry will be created there is also support for static networking okay cool if we check the info of this VM we've khaki info you can see the information
right again the needs although information is visible and again it would be the same regardless of the platform right yes and also is just not that from most most command if I don't specify the name for for the command the vm last v8 created vm on the corresponding current provider is the one used for the one I just created good let's connect to this VM and poly sense
we check that the DNS entry was created along with custom OD you can see the customer did there if I do a ping of the VM
right you can see it works and you can't I think you can't show it but in my
notification around here right you can see that because of the push ballot you just right now I've just received the
information so it's quite full of course not we and when you create a simple VM but when you create several ones and you want to verify that things worked well you can use that as a tool not your command and miss V notification on your on your phone or so on okay let me exist okay finally I will delete this game not
cool nice I've got one Nemo's you tell me when you're bored with my demos okay this one is called plants let's see what a plant file is the idea behind the plan it's come from the terraform stuff if you're familiar with that more or less right but the idea to make pretty much create multiple objects at once and under them as an entity let's see this is a simple plan right so it's just it will just create 3 vm vm one went to and vm3 if you really have a look it's pretty much the same syntax as the profile technically just that it is in a different context right and by the way i could be referencing here exist also any profile that I've created or I could even define a profile within this plan and pointing directly so I can do it whatever the way I want ok so this one will create 3 vm so let's launch the plan Kackley plan and it will gonna it's gonna deploy my VV m vm 1 vm 2 in vm3 up fully running on my neck at home in this case okay so vm 1 got deployed VN 2 got deployed and vm free will get deployed just right now ok cool so we can see that the objects are there with Kackley list as we did earlier so it I think you understand oh it goes now ok vm 1 game 2 & 3 we got the IP you can okay of course if we rerun the plan right it would recreate the VMS it will keep them because they already exist okay now if I delete one of the vm v m3 constants yes and women the plan in this case of course the missing VM will get recreated there's also support by the way to actually run the plan we've a - - update flag so that if you change the some elements of the plan then the VMS our code are updating accordingly whether memory CPUs the disk or the NICS section okay we can also enter all the object of the plans at once for instance we can stop all the VM just by using plan - - stops or started is also a start we can even delete the plan at once well that's easy right and again I see that in these plans not on only about VMs you can create your own early bird networks or you own networks we got less of the via transition platform you can create a containers you can create these and so on okay using more complex plans don't get scared right but just so that you understand this one is using parameters so what it means that we define a default parameter section we say no to three we define whatever variables that we want the
template the domain and so on some keys
right and then we use Jinja to loop right using these parameters and then we use whatever parameters we want right that's also yeah there's also a file and script section that I can use to actually inject files within my VM or scripts you actually run script that is some arbitrary commands that I want to use and they also rendered so that means that if I have a look at the file that I want to inject it can either be static or it can be ginger pretty much okay the same scripts I want I want the the to install all those package right and I'm using the package variable that is defined over there so with that I can actually launch my plan with this column right so pretty much what we saw earlier but the difference is that I'm actually forcing overriding some of the parameters so remember not was set to three for instance so in this case no I said not to five so I will create not three VMs but five right and the disk size was one of the parasol I just override it so instead of disk set to 20 they will be set to 230 and indeed I can see that not only directed those three VMs but now it's going to create the two of VMs right and I could be run the plan we were different not setting let's say not set to 20 and it would recreate the missing yet oh yeah no it's when I need to wait because I want the IP to be there I've got five minutes I'm good I'm fine okay released okay just when Kathie Lee's because I just want to shoot for the workflow of the demo to be sure that I'm able to SSH into the VM so I can so indeed you just remove that right
I can SSH right and we can see right that I am connect to you clouding it and all that stuff but if I do a sudo - I right I can't see my file and you can see it's there and it's got rendered white with whatever parameters I said when stands the node set to five so you can pretty much create whatever you want that's the idea good let me see it yes and I would conclude this demo I've got one left one left this one go with product
okay so products are pretty much the same ideas the plan fact the only difference is that we want to they sit on top of them to make them easy to redistribute with we distribute sorry and to use for people not wanting to deal with plan details okay so how does it go I create whip alright this is my repo this is my URL where I'm storing those plan files and actually just to get people that is clone you don't actually slash plans right so those are all the plans I have along with this chemita Phi which contain metadata I've got this metadata and since I'm able to browse it
I can see all the available products at my disposal so I've got all those samples then I've got oh it doesn't show really well but OpenStack OpenShift kubernetes and so on so let's go with one of one of them for instance I can
list the products of a given product for
instance open sheet I can deploy whatever I want for instance vision
Federation if you want to deploy to GM's and so on let's deploy one of sorry
first let's get information on one of the on one of the product couvert I want to deploy couvert I can say khaki product covered - - info and I see description of the plan and then pretty much those are all the parameters that you can override under the hood it's using this plan concept let's say I want to deploy Kubrick Kackley product Cooper you've got Kathleen style you've got an available provider somewhere and you have pretty much deploying it if deployed on civilians Claudia finished we've got couvert installed let's start for instance open shift right but in this case i'm going to override some parameters so it's pretty much the same but I'm saying yes origin using also close to web we don't care what oh it is deployed I just want openshift technically and I'm setting connective to - it will be stark a native ST or whatever it has to install okay and of course I can check VM and I can see that my VM got created created yeah convert a vision whatever VN the
wonder that you didn't delete okay I
think I'm gonna stop here because I don't want to do too much anymore so let me get back to this we did the demo
right so just to recap automating the boring stuff right always trying to focus and in this context I believe that cactus is a tool that at least helps me in automating infrastructure whether you got one single word you have got several ones with you're using other cloud providers I think Internet full tool so feel free to use it and now if you have questions it's going to be the right time and if you don't have questions just this picture that I put it's it's an optical illusion if you focus but it's going to be difficult because it's shot but you can come closer if you want but if you've kept you focus on whatever part of the picture for like 10 seconds you should see all the image blur and turn white if that doesn't work is because you're too far away sorry for that any questions no it's the time go ahead yeah okay the question was can you deeply include information in the plan file so that you deploy VMs across several cloud providers more or less yes you can I didn't show it but one of the parent is that you can use in the plan files is also specifying which clients you want to create for a given VM so you can say create me free VM but two of them on this cloud provider and the last one on this one and the same for DNS by the way last question I believe because I'm out of time that's a good question so they are sorry first I need to repeat the question the question was can you use it along with ansible to fully provision a VM yes there are different way you can do that there's the dynamic inventory there are and civically modules and then there's instable integration in the plan files which mean that when you create the VM you can just let that equate the VM and within the plant file you can specify an instable or some ansible playbook that you want to run along with khaki you like it thank you [Applause]
yes thank you thank you no this this is all mine yes thank you stop like the daily work Lloyd Lloyd I crossed it too much yeah I knew it meant but you didn't see anything - ah I guess I'm good if you use the guy who has questions please take those yeah thank you for your great presentation yes yeah we can talk French no diplomacy a fermented tea party that we visit from tea
like this anything okay
Loading...
Feedback

Timings

  484 ms - page object

Version

AV-Portal 3.19.2 (70adb5fbc8bbcafb435210ef7d62ffee973cf172)
hidden