1 00:00:01,880 --> 00:00:06,080 I have now installed dependencies and built an image out of this start to the order service. 2 00:00:06,110 --> 00:00:13,290 I'm not going to create a Cuban 80s deployment file so back inside my editor I will find my infra directory 3 00:00:14,130 --> 00:00:19,940 inside of that often case and then I'll make a new file inside there are called orders dash double dot 4 00:00:19,980 --> 00:00:26,170 ammo just about everything inside of here is going to be identical in nature to our ticket's deployment 5 00:00:26,200 --> 00:00:32,220 so I going to go over to the ticket's deployment file I'm going to copy everything inside of here go 6 00:00:32,220 --> 00:00:39,730 over to the New Order supplement file and paste everything in I'm now inside of orders deployment we're 7 00:00:39,730 --> 00:00:48,010 going to go through here and update tickets over two orders instead I'll put in orders orders orders 8 00:00:48,880 --> 00:00:55,480 orders on the image name right here I'll change that to my doctor I d slash orders and as a reminder 9 00:00:55,480 --> 00:01:00,520 if you are running your cluster on Google Cloud you are not going to put in an image right here with 10 00:01:00,520 --> 00:01:01,180 this format. 11 00:01:01,300 --> 00:01:07,680 Instead you'll put in that GC R dot Io slash your project ideas slash orders make sure you get the correct 12 00:01:07,680 --> 00:01:13,660 thing inside there we then are listing out a couple of environment variables. 13 00:01:13,660 --> 00:01:15,730 So these are all going to stay the same. 14 00:01:15,760 --> 00:01:20,560 We definitely want to have the same kind of source for our Nat's clan I.D. the same that's your l the 15 00:01:20,560 --> 00:01:26,110 same cluster I.D. We want to have the same J somewhat token key however we do not want our order service 16 00:01:26,140 --> 00:01:33,200 to connect to the Mongo DB instance it was intended for the ticket service so we do need to eventually 17 00:01:33,200 --> 00:01:39,100 make sure we create a new Mongo DB instance for our order stuff we have not created that yet we will 18 00:01:39,100 --> 00:01:44,590 in just a moment but right now let's just go ahead and update the URL right here assuming that we eventually 19 00:01:44,590 --> 00:01:48,640 will have a order service specific Mongo TB instance. 20 00:01:48,910 --> 00:01:57,610 So I'm going to update the model you or I to mongo DV orders Mongo served slash orders at the end 21 00:02:01,140 --> 00:02:06,700 guy that looks good I'll then go down to the very bottom to file I'm going to find tickets on here listed 22 00:02:06,700 --> 00:02:12,140 three times and I'll update all three those over two orders so at this point I should be able to do 23 00:02:12,170 --> 00:02:21,410 a find inside of this file search for tickets and not see the word tickets anywhere inside of here once 24 00:02:21,410 --> 00:02:27,750 I've got that all put together I'm going to save this file then inside of case I'm going to create another 25 00:02:27,810 --> 00:02:33,250 new file called orders dash Mongo dash step all not yellow. 26 00:02:33,780 --> 00:02:40,640 So this is where we're we'll create our Mongo DB instance specifically for the order service going to 27 00:02:40,750 --> 00:02:46,990 once again open up the tickets Mongo deployment file the year tickets Mongo deployment I'm going to 28 00:02:46,990 --> 00:02:55,760 copy everything inside of here go over to the brand new orders Mongo Mongo deployment file and paste 29 00:02:55,760 --> 00:02:59,450 everything in now once again we will go through here. 30 00:02:59,470 --> 00:03:11,430 UPDATE The word tickets over two orders so I will find once twice three times four times I can make 31 00:03:11,430 --> 00:03:18,860 sure that I see orders four times inside of the deployment config I'll then go down to the bottom and 32 00:03:18,860 --> 00:03:19,310 down here. 33 00:03:19,310 --> 00:03:24,980 I'm going to update this to orders and orders. 34 00:03:25,160 --> 00:03:30,980 Now once again inside of here I should be to do a find for the word tickets and get no results whatsoever 35 00:03:33,210 --> 00:03:38,060 once I've confirmed that I'll go ahead and say this file and that should be it. 36 00:03:38,320 --> 00:03:44,120 So we now go back over to a terminal window running scaffold after saving those two files. 37 00:03:44,140 --> 00:03:49,840 I should see some information site here about creating the orders Mongo deployment about creating the 38 00:03:49,840 --> 00:03:55,330 orders Mongo service and I should probably somewhere inside of here also see something about creating 39 00:03:55,330 --> 00:03:59,150 the order supplement and the order service. 40 00:03:59,210 --> 00:04:05,030 Now if you see any errors inside of you're right now around creating orders or running the container 41 00:04:05,030 --> 00:04:11,570 or anything like that or if you do not see any console logs or anything from the orders service as I 42 00:04:11,570 --> 00:04:16,250 do and definitely do not write here I don't see anything inside of here about building or running the 43 00:04:16,250 --> 00:04:17,360 order service. 44 00:04:17,360 --> 00:04:21,410 That is tell you OK after we go through all the setup we're going to restart scaffold and make sure 45 00:04:21,410 --> 00:04:23,750 that everything comes up online successfully. 46 00:04:23,780 --> 00:04:26,720 So if you getting any air some scaffold right now just don't sweat it. 47 00:04:29,360 --> 00:04:30,870 That's the Bakari here. 48 00:04:30,880 --> 00:04:35,170 We're not gonna make sure we set up some files sync stuff inside of our scaffold the ammo file and we'll 49 00:04:35,170 --> 00:04:37,050 go ahead and take care of those routing rules. 50 00:04:37,060 --> 00:04:39,760 Let's take care of that scaffold the ammo file first. 51 00:04:39,760 --> 00:04:44,970 So back inside my editor inside my route project directory here a scaffold Dudamel 52 00:04:47,720 --> 00:04:53,250 I'm going to scroll down to the very end of this list I'm going to take the last entry which was where 53 00:04:53,260 --> 00:05:03,020 our ticket service once again just go ahead and copy paste it picks up the indentation so I've now got 54 00:05:03,170 --> 00:05:08,360 the original ticket service block and then the new one right here we're going to update the image name 55 00:05:08,790 --> 00:05:14,780 to orders and the context orders and once again remember if you were running on Google Cloud this image 56 00:05:14,780 --> 00:05:22,570 name right here should be the GC R dot Io slash project D slash orders and we can leave everything else 57 00:05:22,570 --> 00:05:24,630 inside here except in the context the same. 58 00:05:24,780 --> 00:05:30,430 So we should have an image of orders context of orders and then the docker section and sync sections 59 00:05:30,460 --> 00:05:35,460 should remain the same can't sell looks pretty good. 60 00:05:35,730 --> 00:05:42,480 I'll save this now let's go ahead and finally tried to restart scaffolds and after this hopefully we 61 00:05:42,480 --> 00:05:44,180 can see something start up. 62 00:05:44,280 --> 00:05:48,810 I am definitely going to expect there to be a in air once the pod starts up because inside the order 63 00:05:48,810 --> 00:05:53,610 service once again we've got a lot of stuff inside of here with some broken import statements for example 64 00:05:53,610 --> 00:05:54,700 inside the orders app. 65 00:05:54,730 --> 00:05:58,710 Yes there are still import statements for some root handlers that do not exist. 66 00:05:58,860 --> 00:06:03,990 So I will expect to eventually see an error when the pod starts to run but I do not want to see an error 67 00:06:04,050 --> 00:06:10,050 around just plain starting up the container or building that pod or something like that I'll go back 68 00:06:10,050 --> 00:06:14,350 over my terminal I'm going to stop everything with the control see 69 00:06:17,790 --> 00:06:24,970 I'll then restart all of it with a scaffold dev and you might want to wait or the get pods command to 70 00:06:24,970 --> 00:06:26,700 show everything emptying out. 71 00:06:26,840 --> 00:06:30,370 So when I print everything out looks like everything has already been terminated so I should now be 72 00:06:30,370 --> 00:06:31,750 able to do a scaffold 73 00:06:36,390 --> 00:06:41,510 and there we go. 74 00:06:41,570 --> 00:06:41,850 All right. 75 00:06:41,870 --> 00:06:44,160 So I'm getting a lot of logs right here. 76 00:06:44,180 --> 00:06:48,830 I did successfully see something about the order service starting up very good but then very shortly 77 00:06:48,830 --> 00:06:53,540 after that I got an error around finding a module inside the error order service. 78 00:06:53,540 --> 00:06:57,870 So if you see this area here that is good we want to see this because this is truly a broken import 79 00:06:57,890 --> 00:06:59,420 statement that we need to fix. 80 00:06:59,630 --> 00:07:04,190 If you see something that says I don't have it inside my log anymore but if you see something it says 81 00:07:04,400 --> 00:07:07,450 cannot build image or cannot find the image or something like that. 82 00:07:07,520 --> 00:07:13,010 That means that there is probably a little issue if you see something that says cannot build this orders 83 00:07:13,010 --> 00:07:17,810 image or cannot retrieve it cannot find it then the best thing to do is to try to rebuild the image 84 00:07:18,410 --> 00:07:22,180 and then restart scaffold once again. 85 00:07:22,200 --> 00:07:22,470 All right. 86 00:07:22,500 --> 00:07:23,450 So let's take a pause right here. 87 00:07:23,460 --> 00:07:26,700 When we come back the next video we're going to discuss in the different routing rules that we're going 88 00:07:26,700 --> 00:07:31,440 to want to add to our ingress service file and then after that we can start to work on the order service 89 00:07:31,440 --> 00:07:32,160 in earnest.