We have built our image and pushed it off to Docker Hub.
Now we just need to make sure that we reach into our running communities, cluster and tell the deployment
inside.
They're responsible for our off pods to use this new image.
So the key phrase inside there is that we need to reach into our Cuban cities cluster running inside
of digital ocean.
So to do so, we're going to go through a process very similar to what we just did on our local machines
using the style CLIA.
Let me show you a diagram just to summarize what's going to go on.
OK.
So our workflow is running inside of a GitHub container inside that container.
We are going to install dactyl after installing dactyl inside the container.
We're going to authorize it or initialize it using an API key.
Let's give you the same API key we created just a moment ago on distillation.
We're going to use tactile to fetch the context that describes how we can connect to the cluster running
inside of digital ocean.
And we're going to feed that context into a cube CTO.
Now, it turns out that keeps T.L. it comes preinstalled inside of a GitHub container.
So we do not have to install cubes, DTL or anything like that.
It's already there, ready to go.
We do have to, however, have to make sure that we install ductile ourselves manually.
So that's the general idea.
Let's get to it.
Back over on get hub, I'm going to go to the code tab.
And then get hub workflows and then we'll find deploy off the Emmel again.
I'll go to I'll then find a pencil.
On the right hand side and we're going to add in a couple more steps to this thing.
Right after the run, Dr. Post right there.
We're going to add in another step of uses and then digital ocean flash action dash dactyl at B2.
No, I did say that we have to install a doctor manually.
Well, I mean, kind of manually.
It turns out the dissolution has already put together a little staat cut, so to speak.
That's going to install ductal into our running GitHub container for us automatically.
Oh, you is adding this little line in addition to that line.
We're also going to add in with.
Tokin.
And they were going to enter in our tokin right there.
That's going to make sure that the token we enter is going to be provided to that script and we're going
to get back a reinitialize version of ducktail, all ready to go for us.
Now for the token, of course, we're not going to add it in as plain text.
Instead, we're going to reference it and the same kind of way that we did back up here with this secrets
thing.
So we have to add a new secret into our repository.
Remember how we do that?
We go back up towards the top line settings on the right hand side.
Open it in a new tab.
And then inside of that new tab, I'll go to secrets.
And I'm going to add in another secret.
So I want to call this new secret digital ocean.
Access open once again, please, triple check your spelling here in particular, make sure you've got
to seize an access.
Then for the value, we're going to go back over to our digital ocean dashboard and generate another
API token.
So here is my dashboard on the bottom left inside, you'll find that API section and then on personal
access tokens, we will generate a new token.
I'm going to give this new token a descriptive name.
I'll call it something like GitHub.
Access token.
I'll then generate the token.
Once again, I'm going to copy it.
Take it back over to my repo and paste the value in.
And again, by the time you watch this video, trust me, I have deleted this tokens, so please don't
try to just use the same one.
I am entering.
Guess I'm going to add that secret.
And I'll go back over to my editor.
So now down here on the IT with token write up that I'm going to put in a dollar sign.
Curly brace, curly brace secrets, not digital ocean.
Access token and then close off the curly braces.
And again, please double check your spelling on digital ocean and access.
Very easy places to make a little typo.
All right, so then after that, very similar again to what we did at our terminal, we're going to
use a cocktail to get the Cuban ediz config and save it onto our local machine or in this case, I should
say, inside the container.
Inside of a new.
Dash.
Run section.
We're going to add in ductal al Nettie's.
You config save and then the name of our cluster.
You can get the name of your cluster just in case you forgot it, back over on the Cuban editor's dashboard.
Go to the Cuban Nattie section, and that is going to be your name right there.
So I had called mine simply ticketing.
I'm going to enter in cube config, save ticketing like so.
So that should give us a reinitialize copy or all the context information we need and shove it into
keeps a deal.
It should also make that the active context on QVC as well.
So that point on, we should be able to issue commands to QVC deal and have them be executed against
our cluster running inside of dissolution.
Now, the very last step, we have to tell our deployment to update itself and use the latest image
that we just pushed off to Docker Hub.
So for that, we're gonna put in another run section right here, and you might remember this command
from the way earlier on inside this course.
They command that we're going to use to restart a deployment, is Kube CTO rollout's?
Restart deployment and then the name of the deployment that we want to restart.
Remember, the name of our off deployment is simply off the dash depot.
And if we forget the name or where that comes from, right there, we can go back over into our Ed Bundy
infra directory.
Inside, there is our off deployment.
And that is the name of our deployment right there.
So we are trying to specifically restart this deployment and tell it to use the latest version of our
off image.
OK, that should be it.
So once again, we are going to build our image, logon to Dacher, push it off to Docker Hub.
We then authenticate and install dactyl.
We then get Conexion credentials to get connection to our digital ocean communities cluster.
And then we reach in to that cluster and tell you off deployment to restart itself.
Boy, that is just totally tongue tie phrase to some crazy stuff's inside there.
But I think we've got a solid solution put together.
So we're going to now commit this file.
We'll got to start, commit and then commit changes.
And it sure would be great to test this thing out.
Unfortunately, we cannot test it just yet.
Remember, our cluster itself is not actually running anything related to the off deployment at all.
We have not applied any of our original config files to it.
So we start to put together one other workflow that's gonna make sure that it takes everything inside
that infra directory and applies all those different config files to our cluster.
We're going to take a pause right here and then start that second workflow in just a moment.
Once we're done with that, one will then be able to test everything out.
A quick pass.
I'll see you in just a minute.