Getting Started with Red Hat OpenShift Data Science

Noelle Russell walks through Red Hat OpenShift Data Science, a private-preview add-on that bundles JupyterHub, Anaconda, IBM Watson Studio, and other tools. She deploys a sample Python app, scales pods, and launches a JupyterLab notebook with pre-built data-science images including CUDA-GPU support.
Chapters
Hi, my name is Noelle Russell, and I am a managed OpenShift specialist. And today I'm going to talk to you a little bit about AI and machine learning workloads and how you can do some pretty interesting work with a new product we have coming out that's currently in private preview called Red Hat OpenShift Data Science. So I just want to walk you through it really quickly, and hopefully you'll be as excited as I am. So the first thing you'll notice, I am in Red Hat OpenShift Dedicated. The Red Hat OpenShift Data Science add-on is actually available for OpenShift Dedicated as well as OpenShift on AWS. So you have a couple different options there. I'm going to go over to this little symbol. It's a little waffle-looking symbol. You see it in like Gmail and other types of products. This usually indicates that there's like add-ons or different applications you can get access to. So if you click on this, you'll notice it says Red Hat OpenShift Data Science, and we can get access to this, this, um, this feature set. So here we are in the OpenShift Data Science portal, if you will, and it provides you a couple different views. The first one we're looking at right now are the applications that have been enabled., from our marketplace. And there is the, of course, the staple that most of us as data scientists use every day, JupyterHub and our ability to build Jupyter Notebooks. There's also, once we get to the point where we're deploying our models in an enterprise-scale deployment, we could potentially, and we actually recommend leveraging a platform like Seldon Deploy. It gives you things Um, all sorts of things actually, maybe in a future video, I will share it with you. Um, uh, but for today, we're just gonna get started and actually build our first project inside of OpenShift Data Science. Before I do that though, I do wanna show you, um, some of the other features that are available. We have an entire ecosystem of services that are available to you as a data scientist that should help create some acceleration and ease of use while you're building out your projects. So you could see here, for example, things that are often a struggle for us, right, as data scientists, gathering data, ETL, being able to get data in the shape we need it to, to build a machine learning model. So you could see Anaconda for certain projects, IBM Watson Studio, of course, JupyterHub. You could see us leveraging Apache Kafka to be able to stream data, There's also, um, Deploy, as I mentioned, or if you are building an infrastructure with data access and being able to aggregate lots of different data sources, there's Starburst Galaxy that gives you the ability to do that as well. And then one of my favorite sections is the resources section. We have an entire team of incredible people here building out these quick starts, tutorials, and walkthroughs to give you exposure to all the different cool things that you can do within this platform. So I've had a lot of fun in here. You could do everything from walkthrough tutorial on connecting to Kafka, as we mentioned before, or building your first Jupyter Notebook or creating a more elaborate project. So what I want to do now is actually we could probably do that. You can go to creating an Anaconda-enabled Jupyter Notebook that will make slightly different selections than if you're doing something else. Or we could deploy a sample Python application. So why don't we do that? So when I choose to create a simple Python application, you'll notice it instantly adds in this kind of step-by-step guide. But the first thing it's gonna ask us to do is actually go and grab that, um, GitHub repository, right? So I'm gonna copy it and go to a new tab. There it is. And it allows me to leverage this as a template. So I'm going to go ahead and do that. Now I'm going to create my own version of this. Let's call it RHODS getting started. It's going to be public. And I'm going to create a new repo off of that sample repository. So now I've got a new repository built inside the OpenShift Data Science environment. I'm going to go to my JupyterHub in order to start creating an environment where I can use that project. All right, here we go. So it says here, use the template, which we did. And it even gives us these nice, these nice little verifications. Did you create your new repository? Yes, I did. So I'll say next. And then the next step is to actually deploy it. So the first thing we're going to do is grab that URL. So I'm going to go back here, drop this down and grab the link. All right, done. Second thing it says to do is to navigate over to the developer perspective in OpenShift Dedicated and add the project. So now I'm going to go back to OpenShift Dedicated in developer. I'm going to go to topology, and I'm going to create a new project. And I'm going to call it— oh, I don't have a nice useful name here, so I'm going to call it my DS project. Create. Oops, forgot to put a display name. Oh, actually, this needs to be lowercase, and I will put data science project here. And now it's going to say, where do you want to create it from? Well, as you remember, I just grabbed that link, so I'm going to go ahead and populate that GitHub repo. It automatically is going to detect what kind of image it is, so it knows that it's a Python image that it needs to build. It knows what version. Right? It also is going to automatically generate an application name, and then it'll even create— and we get to choose how we want to, you know, what resources we need, how we want to deploy it, and how we want to access it. So it'll create a route to the application as well. I'm going to go ahead and say create. It's going to build this application for me. And this is the part that I love, because whether you are using OpenShift Data Science in private preview or not, today, right now, in production, you can use OpenShift to deploy data science applications. And it allows you to elastically scale them, right, grow them up and down as needed based on demand. So you can see here, I'll click on it. When— oops— when I click on it, it gives me some information about what, of course, what I built. But you can also see the pods. Right now it's at 0, it just scaled to 1. If I wanted to create let's say I'm, you know, about to roll this out to my development team, and there's 40 of them, and I know a bunch of them are going to use it, I can actually scale up this pod as needed, right? So it's creating a new instance of this deployment. Now it's scaled to 2. I could even go in, and if I go and actually look at those resources, right, I could— right, oops— I could click on it, see the servers, go and see what kind of runtime environment they have. Identify their IP addresses, all that good stuff. The topology is always a great place to get back to when you're in OpenShift to find out where your applications are running. And then, like I said, you could see your pods there. Now you could see that these pods are actually self-healing as well, right? So if I go in and actually crash one of these resources, um, which I don't know if I could do from here, let me see. I'm going to click on this one. And I'm going to go delete pod. Yes, let's do it. And you'll see what happens. It automatically starts generating a new one to take its place. Right? So if you saw it, it said terminated and immediately started configuring a new one. So it's self-healing in that way, maintaining that pod size of whatever I set it to. And then of course, when I realize that the demand is no longer necessary or I no longer need it, I can go back to my topology and with a click of a button, really take that pod size back down to 1. And it's that simple, right? It decommissions those resources and we're back in business. So pretty cool. Okay, so done. We've deployed our application, we've scaled it up, scaled it down. Let's see what else we're going to do. Okay, so now I did all that. I did all that, check my work, build number 1 is complete. Let's— I believe that's true. Yes, I'm pretty sure that's true. Okay. So now let's say yes, next. Okay. So now in the topology view, of course, I'm going to go in and run this. Right? So in a Jupyter Notebook, so first I have to launch my Jupyter Notebook environment. Now here, right, as a data scientist, I'm just getting started. Here is what I wanted to be able to show you, right? There are multiple different types of notebook images to choose from. This is where you will have lots of time saved in setup and configuration of these notebook images, right? So there's a CUDA image. This allows you to prepare an environment that that you can tag specific tasks for GPU acceleration, something that's getting much more popular. Uh, GPU acceleration, at least when I first was getting started, was something you used for very special use cases, but that's no longer the case, especially as accessibility to, um, a GPU accelerated architecture has become more widely available to, um, data science engineers. There's also a standard data science, uh, image. And if you just click on this little question mark, it'll tell you what's in there. And it's funny because as a data scientist, I'm so used to getting into a Jupyter Notebook and like setting it up, right? And so I will go in and start importing or installing different packages, and I get reminded by the system that says, oh no, it's already installed. Oh no, that's already installed. And I'm like, gosh, I have to remember that I don't have to do that anymore, that I don't have to build, and spend time like creating the infrastructure. All I have to do is select this radio button and get going. You'll also notice down here for the deployment, the container size that's allocated. I always go with default because I'm just building these little tests and demos. But if you know that your dataset is large, or if you know you're going to have a higher level of resource consumption needed, you can see there's different sizes that you can choose from. All right. So I'm going to choose default. If there are variables that you need in order to like inject, you can do that here. I don't, so I'm just going to start the server. And once that server is started, you will see that notebook environment created. So this looks a whole lot like what we did before. All right. So now I go to a terminal window. I'm going to type this in, but I'm going to need that route. Which is where it's been deployed. So let me copy this. I'm going to go back to Jupyter, launch my terminal window. I'm going to paste it here. And but now I'm going to need to go grab that route, right, which is the public accessible, um, here URL that we use to access the application now that it's deployed. So under admin, which is one of the reasons I love the OpenShift environment, is it gives this visibility to both the admin and the developers are using the same environment. It really restricts or, or eliminates a lot of the back and forth that typically happens between those teams. So under networking, I can go to routes. I currently have my DS project. Oh yeah, sorry, going to go to routes. There's my route. So I'm going to copy this link location. Looks good. And I'm gonna go back to my JupyterLab, type this in, and then type in predictions, which is what I'm trying to invoke. And it says prediction not implemented. Oh, all right, fine. So I go back and you'll see it's, that's actually the output we expect. So I'm not gonna walk through all of it. You're starting to get an idea of what we're trying to do here. Right. And what I wanted to do as a last step was show you how you can integrate this with GitHub and pull in a project and that has Jupyter Notebooks in it and actually test them right within the context of this new OpenShift Data Science notebook that you've created. So I'm going to go ahead and do that now. When you click on this little GitHub icon, it gives you the ability to either go to a file browser and maybe you've downloaded or cloned a repo locally. Or you can initialize a new repository or clone a repository. So I'm actually gonna clone a repository. I am pretty sure I lost that URL, so I'm gonna go ahead and copy it one more time. I'm gonna clone that repository, paste it in here, and you'll see it builds it right here. And these are all the assets within that. So I'll just open this up. It actually gives some instructions. There's a Start Here project, allows us to go in and actually run some of these, right? So I could just go and run some of these components. I can see what it's doing, right? So we start to see the real power of being able to get up and running quickly, but most importantly, being able to provision the environment in which these get up and running with a click of a button, having accessibility to both the administrators and the data scientists and the developers who will ultimately consume the application. Hopefully you are able to see some of the power and capability that you get with a platform like this. The whole point is acceleration. How can we do what we need to do faster and make it accessible to our developers so they can use it in their applications to do things better? Uh, it has been my pleasure to share this with you and, uh, please don't hesitate to reach out if you have any questions. Thanks so much.
More from Noelle

Take the Unlocking AI Challenge and Get the Keys to Unlocking Time and Revenue for Your Business

Don't Get Left Behind: The AI Executive Challenge #ai #business #fearofmissingout








