1 00:00:01,560 --> 00:00:03,870 We have built our image and pushed it off to Docker Hub. 2 00:00:04,110 --> 00:00:08,850 Now we just need to make sure that we reach into our running communities, cluster and tell the deployment 3 00:00:08,880 --> 00:00:09,270 inside. 4 00:00:09,270 --> 00:00:12,750 They're responsible for our off pods to use this new image. 5 00:00:13,380 --> 00:00:18,030 So the key phrase inside there is that we need to reach into our Cuban cities cluster running inside 6 00:00:18,060 --> 00:00:18,990 of digital ocean. 7 00:00:19,750 --> 00:00:24,030 So to do so, we're going to go through a process very similar to what we just did on our local machines 8 00:00:24,090 --> 00:00:25,550 using the style CLIA. 9 00:00:26,160 --> 00:00:28,500 Let me show you a diagram just to summarize what's going to go on. 10 00:00:30,570 --> 00:00:30,790 OK. 11 00:00:30,850 --> 00:00:34,840 So our workflow is running inside of a GitHub container inside that container. 12 00:00:34,930 --> 00:00:39,370 We are going to install dactyl after installing dactyl inside the container. 13 00:00:39,430 --> 00:00:43,060 We're going to authorize it or initialize it using an API key. 14 00:00:43,420 --> 00:00:46,710 Let's give you the same API key we created just a moment ago on distillation. 15 00:00:47,770 --> 00:00:53,200 We're going to use tactile to fetch the context that describes how we can connect to the cluster running 16 00:00:53,200 --> 00:00:54,310 inside of digital ocean. 17 00:00:54,730 --> 00:00:57,790 And we're going to feed that context into a cube CTO. 18 00:00:58,390 --> 00:01:02,490 Now, it turns out that keeps T.L. it comes preinstalled inside of a GitHub container. 19 00:01:02,950 --> 00:01:05,950 So we do not have to install cubes, DTL or anything like that. 20 00:01:06,340 --> 00:01:07,720 It's already there, ready to go. 21 00:01:08,290 --> 00:01:12,220 We do have to, however, have to make sure that we install ductile ourselves manually. 22 00:01:13,300 --> 00:01:14,200 So that's the general idea. 23 00:01:14,320 --> 00:01:14,980 Let's get to it. 24 00:01:16,130 --> 00:01:18,540 Back over on get hub, I'm going to go to the code tab. 25 00:01:20,420 --> 00:01:25,490 And then get hub workflows and then we'll find deploy off the Emmel again. 26 00:01:26,540 --> 00:01:27,940 I'll go to I'll then find a pencil. 27 00:01:27,970 --> 00:01:31,810 On the right hand side and we're going to add in a couple more steps to this thing. 28 00:01:33,270 --> 00:01:35,430 Right after the run, Dr. Post right there. 29 00:01:35,450 --> 00:01:44,870 We're going to add in another step of uses and then digital ocean flash action dash dactyl at B2. 30 00:01:45,890 --> 00:01:48,020 No, I did say that we have to install a doctor manually. 31 00:01:48,110 --> 00:01:49,550 Well, I mean, kind of manually. 32 00:01:49,890 --> 00:01:53,900 It turns out the dissolution has already put together a little staat cut, so to speak. 33 00:01:54,140 --> 00:01:58,340 That's going to install ductal into our running GitHub container for us automatically. 34 00:01:58,850 --> 00:02:02,090 Oh, you is adding this little line in addition to that line. 35 00:02:02,120 --> 00:02:04,160 We're also going to add in with. 36 00:02:05,530 --> 00:02:06,040 Tokin. 37 00:02:07,030 --> 00:02:09,350 And they were going to enter in our tokin right there. 38 00:02:10,400 --> 00:02:14,510 That's going to make sure that the token we enter is going to be provided to that script and we're going 39 00:02:14,510 --> 00:02:18,350 to get back a reinitialize version of ducktail, all ready to go for us. 40 00:02:19,800 --> 00:02:23,130 Now for the token, of course, we're not going to add it in as plain text. 41 00:02:23,400 --> 00:02:27,510 Instead, we're going to reference it and the same kind of way that we did back up here with this secrets 42 00:02:27,510 --> 00:02:27,780 thing. 43 00:02:29,350 --> 00:02:32,200 So we have to add a new secret into our repository. 44 00:02:32,350 --> 00:02:33,160 Remember how we do that? 45 00:02:33,160 --> 00:02:35,980 We go back up towards the top line settings on the right hand side. 46 00:02:36,580 --> 00:02:38,070 Open it in a new tab. 47 00:02:39,720 --> 00:02:41,830 And then inside of that new tab, I'll go to secrets. 48 00:02:43,010 --> 00:02:44,680 And I'm going to add in another secret. 49 00:02:45,850 --> 00:02:50,170 So I want to call this new secret digital ocean. 50 00:02:51,940 --> 00:02:57,490 Access open once again, please, triple check your spelling here in particular, make sure you've got 51 00:02:57,490 --> 00:02:58,990 to seize an access. 52 00:03:00,840 --> 00:03:04,590 Then for the value, we're going to go back over to our digital ocean dashboard and generate another 53 00:03:04,620 --> 00:03:05,400 API token. 54 00:03:06,630 --> 00:03:12,900 So here is my dashboard on the bottom left inside, you'll find that API section and then on personal 55 00:03:12,900 --> 00:03:15,930 access tokens, we will generate a new token. 56 00:03:16,720 --> 00:03:18,540 I'm going to give this new token a descriptive name. 57 00:03:18,660 --> 00:03:19,980 I'll call it something like GitHub. 58 00:03:21,460 --> 00:03:22,600 Access token. 59 00:03:24,440 --> 00:03:25,510 I'll then generate the token. 60 00:03:26,800 --> 00:03:28,190 Once again, I'm going to copy it. 61 00:03:29,990 --> 00:03:33,010 Take it back over to my repo and paste the value in. 62 00:03:33,600 --> 00:03:37,790 And again, by the time you watch this video, trust me, I have deleted this tokens, so please don't 63 00:03:37,790 --> 00:03:39,570 try to just use the same one. 64 00:03:39,620 --> 00:03:40,250 I am entering. 65 00:03:41,230 --> 00:03:42,370 Guess I'm going to add that secret. 66 00:03:43,690 --> 00:03:45,920 And I'll go back over to my editor. 67 00:03:48,440 --> 00:03:53,140 So now down here on the IT with token write up that I'm going to put in a dollar sign. 68 00:03:53,380 --> 00:03:58,090 Curly brace, curly brace secrets, not digital ocean. 69 00:03:59,400 --> 00:04:03,360 Access token and then close off the curly braces. 70 00:04:03,690 --> 00:04:07,350 And again, please double check your spelling on digital ocean and access. 71 00:04:07,720 --> 00:04:09,480 Very easy places to make a little typo. 72 00:04:11,560 --> 00:04:16,060 All right, so then after that, very similar again to what we did at our terminal, we're going to 73 00:04:16,060 --> 00:04:21,790 use a cocktail to get the Cuban ediz config and save it onto our local machine or in this case, I should 74 00:04:21,790 --> 00:04:22,780 say, inside the container. 75 00:04:24,270 --> 00:04:25,170 Inside of a new. 76 00:04:26,160 --> 00:04:26,450 Dash. 77 00:04:26,730 --> 00:04:27,690 Run section. 78 00:04:30,430 --> 00:04:33,280 We're going to add in ductal al Nettie's. 79 00:04:36,380 --> 00:04:40,790 You config save and then the name of our cluster. 80 00:04:41,730 --> 00:04:45,710 You can get the name of your cluster just in case you forgot it, back over on the Cuban editor's dashboard. 81 00:04:46,160 --> 00:04:49,190 Go to the Cuban Nattie section, and that is going to be your name right there. 82 00:04:49,700 --> 00:04:51,470 So I had called mine simply ticketing. 83 00:04:52,010 --> 00:04:56,870 I'm going to enter in cube config, save ticketing like so. 84 00:05:00,070 --> 00:05:04,970 So that should give us a reinitialize copy or all the context information we need and shove it into 85 00:05:04,970 --> 00:05:05,710 keeps a deal. 86 00:05:05,960 --> 00:05:09,110 It should also make that the active context on QVC as well. 87 00:05:09,590 --> 00:05:14,750 So that point on, we should be able to issue commands to QVC deal and have them be executed against 88 00:05:14,780 --> 00:05:16,910 our cluster running inside of dissolution. 89 00:05:18,440 --> 00:05:23,750 Now, the very last step, we have to tell our deployment to update itself and use the latest image 90 00:05:24,020 --> 00:05:25,550 that we just pushed off to Docker Hub. 91 00:05:26,460 --> 00:05:30,610 So for that, we're gonna put in another run section right here, and you might remember this command 92 00:05:30,610 --> 00:05:32,860 from the way earlier on inside this course. 93 00:05:35,370 --> 00:05:40,820 They command that we're going to use to restart a deployment, is Kube CTO rollout's? 94 00:05:42,270 --> 00:05:46,710 Restart deployment and then the name of the deployment that we want to restart. 95 00:05:47,070 --> 00:05:50,720 Remember, the name of our off deployment is simply off the dash depot. 96 00:05:51,180 --> 00:05:56,520 And if we forget the name or where that comes from, right there, we can go back over into our Ed Bundy 97 00:05:56,580 --> 00:05:57,440 infra directory. 98 00:05:57,800 --> 00:05:59,520 Inside, there is our off deployment. 99 00:06:00,180 --> 00:06:02,310 And that is the name of our deployment right there. 100 00:06:02,850 --> 00:06:07,710 So we are trying to specifically restart this deployment and tell it to use the latest version of our 101 00:06:07,720 --> 00:06:08,520 off image. 102 00:06:11,030 --> 00:06:12,080 OK, that should be it. 103 00:06:12,650 --> 00:06:17,930 So once again, we are going to build our image, logon to Dacher, push it off to Docker Hub. 104 00:06:19,210 --> 00:06:21,220 We then authenticate and install dactyl. 105 00:06:21,520 --> 00:06:26,530 We then get Conexion credentials to get connection to our digital ocean communities cluster. 106 00:06:27,130 --> 00:06:30,790 And then we reach in to that cluster and tell you off deployment to restart itself. 107 00:06:31,240 --> 00:06:35,710 Boy, that is just totally tongue tie phrase to some crazy stuff's inside there. 108 00:06:35,980 --> 00:06:38,140 But I think we've got a solid solution put together. 109 00:06:39,070 --> 00:06:40,790 So we're going to now commit this file. 110 00:06:41,420 --> 00:06:43,560 We'll got to start, commit and then commit changes. 111 00:06:45,430 --> 00:06:47,330 And it sure would be great to test this thing out. 112 00:06:47,390 --> 00:06:49,610 Unfortunately, we cannot test it just yet. 113 00:06:49,970 --> 00:06:55,820 Remember, our cluster itself is not actually running anything related to the off deployment at all. 114 00:06:55,850 --> 00:06:58,820 We have not applied any of our original config files to it. 115 00:06:59,530 --> 00:07:03,710 So we start to put together one other workflow that's gonna make sure that it takes everything inside 116 00:07:03,710 --> 00:07:07,730 that infra directory and applies all those different config files to our cluster. 117 00:07:08,920 --> 00:07:12,220 We're going to take a pause right here and then start that second workflow in just a moment. 118 00:07:12,340 --> 00:07:15,340 Once we're done with that, one will then be able to test everything out. 119 00:07:15,760 --> 00:07:16,330 A quick pass. 120 00:07:16,480 --> 00:07:17,560 I'll see you in just a minute.