 In the last video, we have looked at how a MySQL container is running inside a pod on OpenShift V3. And we also accessed the database, and we have inserted a table with some rows in it. Now, let's start working on the client application. Again, this client application is PHP code that will access the database that we just created in the last video. And this code is going to be packaged as a Docker image, and we will be doing that from outside of OpenShift, just as an example. And we will be using that Docker image that was created outside of OpenShift, and we will deploy it within OpenShift. Now, I am also logged on to my local workstation, and I have some code here. Let me show what I have. It's a very simple application. Let me show you the source slash DB test file. All it is doing is it will access the database by using these environment variables, and we are going to set this environment variables when the pod gets created, and I'll show you that. And it will be accessing the database using the root user and the root password. And we will make a connection to the database. We will select all the rows from the user's table that we created earlier, and we will display those rows and output all the user names as simple as that. Now, the index.php, it just says welcome and then try dbtest.php extension. Now, I also have a Docker file using which we are going to create the Docker image. So let me show you the contents of that. I'm using the Tutom Apache php as the base Docker image to start with, and all I'm doing is copying the contents of source directory, which is these two files into where www.html as simple as that. And we'll now create a Docker image. Before we create a Docker image, let's look at what images we have. There are a bunch of images, but you won't find anything called dbtest here. Now, I'll do a Docker build. I'm creating it, I'm building a Docker image and it's successfully built. Now, if I see Docker images, I should find we're much handy dbtest that was created 11 seconds ago. Now, at the same time, let's also look at my repository. So if you look at my repositories, you'll there is no we're much handy slash dbtest. It's some other image here. So let's push this image to my repository. Now, this repository is being pushed to the. Now let's go back and check our repositories on Docker Hub. And here is dbtest. Now, just like how we deployed the MySQL application last time, this time we will deploy the dbtest application using the same joe user. So I'm getting back to the joe user and let's see what pods are running. So as of now, there is only MySQL pod and we'll also see what services are running and there is a MySQL service. Now, I have a JSON again for dbtest. So let's have a quick look at that. Now this time again, it's going to be very similar to what we use last time. We are deploying a container called dbtest container inside a pod called dbtest pod with the label of dbtest-label, right? And the image we are using this time is that we are much handy slash dbtest. Now when we are instantiating this container, we are setting some environment variables here and the root password here is super secret that we are going to use and this MySQL database is sample and these are what are accessed by our application inside the code. You'll also see that this container is exposing a port 80 and the service is looking for dbtest-label and there is a route that gets created and here is the URL using which we can access the application and the route we is going to use this dbtest service. This is how it will get access to the container. So when we create this application using this JSON file, this time three parts will be created. One is the dbtest pod. The second is the dbtest service and the third is dbtest route. So let's go ahead and do that. Let's see create from the file dbtest kego. So it created a part created a service and it created a route. Now let's have a look at what are running here. Let's see get parts now this time we have dbtest container running and it is using the image we're much handy slash dbtest. We are running two services again the mysql service and the dbtest service and as we saw in the code the mysql service will be used by the dbtest.php in the application. So it's going to connect to this IP address and this port number with the root username and password of Supersecret. Now let's look at what routes are running and that is a route called dbtest.demov3.osclout.com. This is what is running now. Let's access this application now using this URL. Yep. So this is the default index dot PHP page and it says try dbtest.php extension. So I'm going to add that extension. Now it displays the two users that we added to the database. So to summarize what we have done so far. We created an application in two parts. One is a pod that runs a mysql database. We used a Docker image that was available for to in my for mysql and we added some rows to that database and then we created a separate pod where a PHP application that accesses this mysql database runs and we had some code there that can access these rows and display and even this PHP application we built it outside of OpenShift. We pushed it into Docker Hub as a Docker image and we used we used that Docker image to deploy onto OpenShift and this OpenShift version 3 environment that runs Docker images is making use of Kubernetes to orchestrate. That's the one that pulled it from Docker Hub and ran it. I hope you enjoyed this OpenShift version 3 demo. Thanks for watching.