 Okay, up on the screen, I have the Docker Compose file for all of our services. So what we are going to be doing in this course is I'm going to show you how to run this in Docker Composing, though we're not focusing on Docker Compose for the course. Here we have a ready-made Docker Compose file that's going to bring everything up that we need for an environment. And as we work through the course, we are going to basically migrate from this Docker Compose. This Docker Compose file has everything that we need as far as like environment parameters and ports and all that jazz. That gives us what we need to set up Kubernetes. So in this video, I'm going to demonstrate running it. So you can see the runtime environment and Docker Compose is one type of container management Kubernetes. So obviously another type of container management. And here we will migrate over. So we'll bring everything up so that you can see it running. And then we'll be shutting it down the Docker Compose version. And then we have a number of lessons where we will be bringing up each of these components. So let's take a closer look at this Docker Compose file. And I'm not going to get too far down the rabbit hole with Docker Compose, but you can see on line three, we are defining our MySQL image. So this is what we are using to back the persistence for our Spring Boot microservices. I'm using MySQL 5.7. There's some security changes in 8 that require a little bit additional configuration that I didn't want to get into. This sets it up very simply. That MySQL image allows us to set two environment parameters. One is to set the root password. And I'm being very creative in my password there, calling it dbpassword. And all of our Spring Boot microservices are going to use the same MySQL database. This is being done just for pragmatic reasons. If we were rolling these out into productions, obviously we wouldn't want to have independent databases. But for pragmatic purposes, we're just going to be using a single database. Now the next three components, ElasticsearchKabana and FileBeat, these are for consolidated logging. We will be taking a look at that. That is going to be the last section of the course as far as setting up the consolidated logging. But you can see here we've got the definitions. We have to open up some ports. The FileBeat configuration for Kubernetes is going to be quite different from this. So I'm not going to get too far down. The rabbit hole is how we set up FileBeat at this point in time. But basically what FileBeat does is it looks at the container logging. So we log out to the console. We have our Spring Boot services set up to do JSON logging. Then FileBeat ships that off to Elasticsearch and Kabana is the tool that we use to query and view the log traffic. So let me scroll up a little bit here. Now JMS, we'll have a service called JMS, that's our JMS broker. Needs to expose two ports, 8161 and 61616. This image does have a default username and password. The services are configured to use that so we don't have to worry about setting anything up for that. This is providing our message broker. Then on line 34 you can see I'm defining inventory service. This is coming from the image spring framework guru slash KBE brewery dash inventory dash service. So this is one of the core services of the Spring Boot services. This is going to be exposing port 8082, that's where we'll be listening. Then you can see I've got about five different environment parameters. So these are overriding what's in the properties file. So remember in a Spring Boot context, if you set a environment property, that is going to override any properties that are being set in the jar. So in this case, specifically the spring data source URL, I'm setting that to my SQL. So Docker compose like Kubernetes, we'll take the service name, map that to the IP. So we can use that as a host name. So we are using a host name of my SQL in the URL, and that's how we will locate and talk to the database. So I'll setting the user a name to root and pass a DB password for the password. Also, on line 45 there, you can see that we are setting up the Artemis host to JMS. So again, we have the JMS service called literally JMS that will resolve to the IP address that is being configured within the Docker compose context. We'll have a similar behavior with Kubernetes. And let me scroll up here a little bit to get inventory failover at the top. So this is our failover service is probably the simplest one. We're just simply exposing port 8083. We don't need to tell Docker compose nor Kubernetes about the failover logic that is application specific logic. But we do need to tell them how to run the service. And so we have a pretty simple implementation there. Line 54 is our beer service. And again, you can see in this case, I'm setting up six environment parameters, giving it the name of the inventory service. So you can see on line 68, I am using inventory service. And again, the host name inventory jazz service has to match the service name. And that's how we are doing service discovery through looking up of the host name, allowing Kubernetes or in this case, Docker compose to manage it. And let me scroll up to order service. Very similar to beer service. But in this case, we have an environment property to set to beer service to tell the order service where the beer service is. And then the five other environment properties are the same. And then finally, we can see that we have the gateway. That is the gateway spring cloud gateway that fronts all the microservices. And in this case, I am exposing the ports for each individual service. And the way I've set this up is that we can talk to the services directly or go through the gateway. So I didn't have to do that. This is just how I chose to do it. And it gives us some flexibility. So I'm going to toggle over to the command line now. And we'll take a look at running these. Okay, so I am in the root of the project. I do an LS there. You can see that I'm in the root of the project directory. And you can see that I have the composed local Gamble. Now to run that, what we want to do is Docker compose. Minus F for file. And just doing compose and hitting the tab key for the autocomplete there. This will tell Docker compose to run that file. In this case, we want to say up. And then we will pass a minus D to that to run in detached mode or the background. So let's go ahead and start that. See that we are creating a network for our Docker compose network for the KBSP microservices. And you can see each one of these services are starting up for us. And some take a little bit longer than the others, but it's going to take a moment for everything to start up. I'm going to pause the video while everything initializes, and then we'll come back. Okay, we can see everything has initialized. If I do a clear, and now we can do Docker PS. We can see that all the services are up and running. And again, this isn't a Docker compose context. So everything has been brought up in individual containers. Now, what I can do is I can come over here to postman. And in this case, the gateway is exposed on port 9090. And I can come in and make a query of that. And you can see that I'm getting beer information back. So this is going through Spring Cloud Gateway. If I want to go directly to the beer service itself, I can go to port 8080 and query that. And this is going directly to the beer service. So this is making a query from that service directly to that. Whereas 9090 is going to be going through Spring Cloud Gateway. Go like that. And that is going through the gateway. Now, one other thing that we want to take a look at is that we do have consolidated logging. I'm going to come over to Chrome. And here, this is a Kibana. And now I'm going to have to refresh this. And what I need to do is go ahead and load up some data. So I'm going to say discover. We need to create an index pattern. And I'm going to do file beat star. And this is telling Kibana basically how to index the data. We want a time field. And creatively, our logging is going to at time stamp. So we'll go ahead and create that index pattern. That sets that up. And now if I come back over here to discover, it takes us a second but we'll be able to see. And this is actually data coming back from the various services. So we do have no properties being logged. And you can see we get quite a bit of a rich information here from these. And I'm not going to go too far down this. But effectively, what's happening is we have the three micro services running in independent containers. File beat is monitoring each container, the council logs, and shipping those off to the last database. And then we are seeing the data here. So again, we are going to be going through setting up the services first, then the spring boot microservices, the gateway, and then the last section of the course. We'll take a closer look at setting up consolidated logging. I'm going to jump back over to IntelliJ. And again, just to recap what we are going to be doing going forward in the course. Initially, we are just going to be setting up MySQL. We are not going to worry about elastic search, Kibana, or file beat until the last section of the course. We do need MySQL, JMS, inventory service, inventory failover, beer service, order service, and the gateway. And we will be setting this all up as deployments and services within Kubernetes. And coming up in the course, we will go through each one of these. We will set up the deployment and services as well as the environment properties that are required for each one. Okay, the last thing that we want to do in this video is to go ahead and shut down the Docker instance. So I'm going to come back over to the command line. You can see that we still have our Docker services running. And to shut everything down using Docker compose, we can do Docker compose minus F and give it the compose file. And we just simply issue the command down. And that will shut down all the services that we brought up with that Docker compose file. So if you're filing along at home, it's brought everything up. So Docker compose file name down will shut everything down. And coming up in the video, so we will start tackling bringing everything up in Kubernetes.