Demo of LXD/LXC

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi I'm DJ we're on this episode of the cyber gizmo we're going to be looking at Lexi and Lexi in a little bit more detail than we did the last time when we talked about virtual machines and containers right after this [Music] so I wanted to do a little bit more in depth view or look into Lexi and Lexi and before we do let's review a couple of things about what the architecture of lexi is well Lexi is the container and Lex D is the virtual machine like layer which provides similar features that in a virtual machine would but it's much lighter weight to a full-size hypervisor and it allows a layer of isolation between each of the containers as well as from the layer of isolation from the host operating system as well so that's really kind of what its intended to do and we had talked last time about you know that Lex T is an open source container mechanism Ubuntu is the major contributor to Lexi and LexA D canonical offers commercially supported Ubuntu LTS releases that have this built in and then the features are it's it's better security and last device pass-through it allows for storage pooling and snapshots and all these kinds of things if you want more information about this go see my video on virtual machines and containers and I'll include a link below but you know it's not meant to be a replacement for docker or Rocket so I mean let's well I guess probably the best thing to do here is maybe just jump in so let me go to over to a full-screen view here let me just take that away and so yeah there we go so so the first place you can go to to find out more information about what containers are available to you now you have to remember that this is a little bit different than the way doctor does it doctors approach to this is to provide applications as well as operating systems because you can install operating systems in docker but they do both they allow you to deploy applications whereas the image server for Lexi and LexA T is at this time solely operating systems and there are a number of them as well as the number of architectures and a number of versions so some of the ones you can deploy are Alpine and as like I said lots of versions lots of architectures there's also alt a purchase arch and sent to us of course and there is also the stream version as well as the straight eight version of sent to us there's debian and all of its flavors let's just go down and get a couple others fedora Gentoo Cali Mint open soos open word Oracle which of course is a version of Red Hat Savion and Ubuntu also void linic void Linux is also a member of this as well so yeah you have a lot of different you could pull a lot and there that this image base is growing by the way it's not it's not static it is still growing so what I'm gonna do today let's just make sure that everything is working on this side yeah okay so let me let me bring this up a little bit larger [Music] okay so I'm going to be using pop OS to do mine on today of course this will run on a button Ubuntu as well but the first thing you'll want to do just install snap D it's the easiest way to install this you can you can there are some different ways to do this directly with the apt packages but to get the latest versions of lxt you snap its you can also always get you can always get rid of it later if you want but I've already got it installed but I'll go ahead and go through the motions it's okay so yeah I've already got it so once you have that done and again I already have it installed as well you can also do a snap list once it's installed and it'll show you the version and all the information that you need the other thing is you'll want to look at is in your FC group you'll notice that right here there's a Lex T group and and I've already added the user that I'm going to be doing today but you would do a user mod a G and then put in Lex D and then whatever the user name that you want to use with it so yeah and then all you would do is log back out and log back in in order for the group to take effect and then do an ID to make sure that it indeed is sometimes with certain distributions and services sometimes you have to restart the sural machine in order for it to work but in this case it did not have to do that so let's look at another couple of things that we need lonely we're some disk space in order to host the containers so make sure you have enough to be able to host the container whatever the minimum is for the particular one that you're bringing down and I should be okay have plenty here so the next step would be to deliver and now Alexi Annette this has only done one time and it's used to initialize the environment now if I just enter it like this it's gonna stop and ask me a bunch of questions if I if I if I if I take if I want to do the defaults I just do a Lexia at all and then it all just take the defaults I think that's right let me make sure yeah see it's asking me that but I want to use clustering and that kind of thing let me see if I can just do a help in it they'll tell me Otto I want to do Otto so which would then take the default path otherwise it's gonna ask you for to fill out all of it once you've done that you should and you have it you're in your group you should be able to just run this Lexi which is the container side of things and you'll notice there's a lot of different commands in here that you can do so let's see and let's take a look at remote and these are the and these would be the sources for the images that are currently installed on the system and also you can mmm hang on a second okay so the other thing I want to do is an LXE image remote list this will list the remote images and I could start it with a key let's see let's try it with e oops and it'll it'll turn around and look for the ones that are out in the repositories and then show me so this will tell you which ones that you can use and normally you just use this field to find them so that's how you locate them it's a Lexie image list that Ubuntu and then you can put in wildcards like I can search for all the ones that are young young un and it'll show me the ones that haven't he in it so I don't know why it didn't it brought them down again so anyway not sure why that is they shouldn't do that but all right so let's do LX see projects are used to organize a bundle of containers into a group that you might want to keep together so say like you're a cloud provider and you have a number of clients you might use projects as a way to segment the the containers of one from each other so that you can keep track of which ones you've created in which containers belong to which customer Ubuntu has a tutorial on their website that I'll post a link to below if you're interested in pursuing that kind of organizational detail but for today let's see I think I only have two yeah so I can list the projects and my current one is default you always have that one as your default and then you can create the ones you want and then you can so you can then log in to those projects and continue working on them so today I'll be working in the default project so we'll do a lunch and what we're gonna do Ubuntu let's do let's do 1804 I guess I used the last LP essence and then you'll want to give it a name so I guess well since we're gonna build a web server we'll call it web server this will take some time because I didn't I took the image off and so it has to transfer it just like it will for you this is a one-time transfer once you have the image any future containers you build from Ubuntu 1804 will use the image that's they're very much like docker very much like doctor we're just waiting for this to come down and then install okay so at this point I can look and see that the container is what the webserver container is running it has an IP address it has an ipv6 address that's what's given to it and then it tells me that the type is container which yeah it would be so at this point I can actually execute commands on that server let's and this - - is for what shell I want to use so I'm using the default apt I'm going to do an update I'll check and see what updates are available for this let's let's try that probably work a lot better and I have 26 packages that I can update so let's go ahead and upgrade those and then if you want to you can you can restart a container okay again it's running now so if you want I can I want to go ahead and install I'll go ahead and install Apache I mean it's functional functionally it's working about the same way as it would with a virtual machine except you don't have the interfaces that you do with the other so I want to do a sudo and let me give it user Ubuntu and we'll do a login and now I'm logged in on the Ubuntu as Ubuntu user on the container and I can prove that I am running the 18:04 so I'm actually inside of the container right now let's just see yeah it's not taking much 67 Meg so yeah alright so what I want to do is go out here to bar www HTML that root owns that so I will need to see do to edit it the the line this is on is about 224 and what I want to do here is I want to change the welcome message that comes on the default screen so that you know this is coming from the container and not from my local machine okay so then the next step is I will need to do something similar to what we have to do with docker which is to expose the internal port to the external to the outside in order for this to work so I'm done with this I have to like it doesn't do me good to do it inside of here it won't work so I'll go back out to the host OS and let's see this needs to be webserver doesn't it yeah okay so what I'm doing here is this is adding a proxy and exposing port 80 from the internal side to the external so if I were to go out to a browser here it's going to bring up the app the Apache it's going to pass the request to the Apache web server that's running inside the container and you can you can see that that is the message that I change that is on the HTML index.html as far as some of the other things you can do if you have say you can manage remote servers with this like I said so yeah you can do that you can also let's say that we wanted to say if I wanted more information about Ubuntu oh I don't know let's do buy bionic it'll come back with a page for 1804 which is where I'm running which is what I am running you know show I think the last time it was updated yeah so I created that was created and uploaded on 3:17 and obviously that that particular one is going to expire in April the 26th of 20 through 23 quite a ways from now so and then yeah it has a number of aliases that you can use when you're downloading so if you just put it in Ubuntu you're gonna get the LTS release all right so to stop a container and then and then it'll show it as being stopped once that once you're done with the container and you want to destroy it that's it now the image that's here you can also delete that one too and then you have to give it this this fingerprint gone so the next time I were to come in here and download it would have to download it again fresh so it's I've cleaned up my mess I've taken everything out and cut it back to normal again if if there's a kind of back over or to hear a bit I mean yeah this is a really simple demonstration today you can set up I mean obviously you can have more than one container in default I could use one as a webserver I could use one as a database server if I had middleware that I needed or if I was building up some other maybe I have an artificial intelligence section and my in my system or something like that I can I can install containers specific for those and then create the proxies in order to allow them to communicate with one another the thing you have to remember is that these are isolated so the only way out now if you're on the local system they should be able to communicate with one another but anything if you want them to communicate across a number of machines then of course you would have to expose the ports to allow that access to happen so anyway that's kind of what I had today I can't think of anything else but if you can if there's something that you know you'd want to see or a particular set of tools I don't know if I want to do clustering I don't have a number of Ubuntu boxes probably not enough to really do a cluster but I could probably do one on the arms it's the arms certainly do run Lexi and Lexi as well so I could probably set up something to do that let me know in the comments below if there's something you want to see with this it's an interesting technology some of my comments about it is it seems faster to me then doctor does seems like I mean I can't really judge on how much memory it's taken it seems you know it seems pretty lightweight to me I don't see it you know consuming large amounts of Emory the management of it and ability to be able to jump in and out of but seems a lot easier and and to me this the way that Lexi and Lexi is set up unlike docker it seems like it would be easier to maintain packages it would be easier to maintain software pieces of code because docker is really a different it's really a different design for a different purpose I mean it's meant to be ethereal it's meant to be throwaway you build it up you do stuff with it you when you're done and want to upgrade it you don't you just throw away that container and build a new one with whatever new code that you've got coming down so it's kind of different whereas this one's kind of a more of a system that would deploy like a virtual machine it's something you'd want to have up and run it for a while so anyway I hope you enjoyed this today hope to see you again soon and please as always like and subscribe hope to see y'all again real soon and bye for now
Info
Channel: DJ Ware
Views: 5,481
Rating: undefined out of 5
Keywords: DJ Ware, CyberGizmo, Linux, Ubuntu, LXD, LXC
Id: BRlYHA8bFF0
Channel Id: undefined
Length: 22min 6sec (1326 seconds)
Published: Mon Mar 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.