 Hello, welcome to this session on getting started with Rook, how to install a quick cluster and start testing My name is Travis Nielsen. I'm one of the Rook maintainers and I work for Red Hat All right, so basically in this demo we're going to go through three steps We're going to start Kubernetes cluster just with mini cube with virtual disks just to get us going This isn't production grade cluster by any means, but it gets us going for testing And then we're going to create the all the Rook resources that we need to start set in this cluster And then the third step we're going to go ahead and create a sample application or two that shows how these how to create volumes Show how you can create the storage. All right now I've dropped into the console where we're going to start mini cube first now just to make this demo a little more streamlined I've already downloaded mini cube and I've already started it a couple of Arguments to point out though So I asked me to cube for three extra disks to be attached This is necessary so Rook can have storage to consume in the VM and Then of course have to tell it which driver to use which I've used hybrid kit The overall mini cube took less than two minutes to start on my laptop and it's ready to go So if I say to cut I'll get node. We should see that. Yep. The node is running Great, so let me drop into another console here and we'll go ahead and create the needed resources Now I do have an alias here to make these Commands a bit quicker But I'm going to go ahead and create them. All right the first resource I need to create is the CRDs. These are the custom types for Rook and then I need to create the security information RBAC roles Service accounts and things and then finally we need to create the operator deployment for Rook I'm going to go ahead and create this. We'll see a whole bunch of resources being created Mostly around the CRDs and the And the RBAC and then the final one we see created was the Rook operator This is where the the brains of the Rook management are running Now if I go ahead and look in the Rook namespace We should see the operator running already. I've already pulled the Rook image locally So it would be faster as well. Okay now the operator is running. We need to go ahead and tell Rook How we want to configure the Ceph cluster. Okay, this is done by creating the cluster CR So I'm going to go ahead and create that at this point. So cluster so in the example folder. We have all sorts of example settings that you can use and anytime you see a Manifest that has test in the name. So if I look for These anything lands in test.yaml is going to be specifically for running in a single node or in minicube And we use this during development all the time So look for these if you're in a test cluster So the first thing I want to create is this cluster test.yaml And basically this is going to create Rook in a configuration that is for a single node Now we're going to watch What's happening and just so you see the alias there here's how I'm going to watch it just to get the pods Every second and see what happens Now we see a few containers being created a few pods. So we have this some CSI driver containers being created and We have Some Ceph containers and pods being created first. There is a mon pod. That's where the Ceph Metadata is stored. That's really the brains of the Ceph cluster We have a manager now being created So where Ceph collects metrics and and has Some other central Information and then pretty soon we're going to see some OSDs being created now the OSDs are demons that start one per device So since we told Kubernetes and minicube to start and attach three devices We're going to see three OSDs being created But first we see that there's this OSD prepare job that's running. It's basically Analyzing what disks are available on minicube and that's going to take just a few more seconds here and it will be done and Then it will tell the operator. Oh, I found three devices. I provisioned them Now you can start the demons on each of those individual devices. So we do see That we have OSD zero OSD one and OSD two created on the cluster and this forms our basic Ceph cluster we have everything we need to to create storage and Consume the store the Ceph storage before I go ahead and show how to consume the storage though So right now the storage is only available for read write once volumes with RBD Ceph RBD Okay, if we want to use Shared file system with Ceph fs or if we want to use an s3 endpoint with object storage There's an extra step for those two. I'll just show how quick it is to install those So for the shared file system, I'm gonna say oh create me a file system and with the test suffix for minicube Okay, so that will tell the operator group create it at the same time. I'm going to create it Oh, please create an object store with the test suffix for minicube okay, and Now these the operators configure them and they take a few seconds and if I look at what pods are running So when they're done being configured, we see two MDS pods Those are pods that manage the Ceph file system for the shared storage So those are ready and in a few more seconds. We should see an rgw pod started which will be for the Object store with the s3 endpoint. Okay, and finally here We see the rgw pod is started and it's ready to serve the s3 endpoint So again now at this point we have the ability to create read write once volumes We have can create read write many volumes with the file system And we can create an s3 client that consumes from a bucket in the object store All right, so let's create a simple sample application for the read write once first so if we go into the RBD CSI slash RBD folder of the examples. This is where we have a few sample files and The first thing we have to do is create a storage class now, of course in minicube We're going to use the one with the test suffix. So create the storage class Storage class test create that now that's going to create a step pool with replica one and A storage class so now if I get the storage classes in the cluster We see this new storage class for block storage, which will generally use for read write once applications Now to go ahead and create an application that consumes that storage We have to create its pvc and its pod. So in In this folder we have both of those files. So I'm going to say create the pvc.yaml And we're going to create the pod.yaml which consumes that pvc Okay, so now that I've created the storage class and the pvc and the pod that consumes that pvc We will see this volume created All right, so if I do I get pod in the default namespace it's creating my demo pod And I didn't pull that image in advance. So while that's loading I'm going to go ahead and go create a shared file system pvc. Okay, so whoops if I go up to the sepafest folder now we have similar examples in this folder where I need to create a A file system Okay for the file system. I actually don't need to create The test yaml Just because of how the file system set up it already knows that we're in mini cube because I create a file system dash test.yaml. All right, so if I create its storage class Now we get The storage class will see The sepafs Storage class created and now again, I can create The pvc and I can create the sample pod All right, and now we've got a shared file system pvc and pod created Now if I get the pods in the default namespace we see that the read write once Volume was created and attached to that pod and then we also see that the shared file system pod is creating now and Again, that's just going to take a minute to start And if I refresh in a bit, it's going to be running. Oh, it's already running at this point. Okay, so we've created our sample applications for both types of volumes read write once and Read write many in another demo. We'll show you how to create an OBC to consume a bucket and object storage All right, hope you find found this useful. We'll see you in another video. Thanks. Bye