[MUSIC]
>> Hello. What do we got going on today?
We really do need to figure out
how to get this migration stuff done.
We go to repositories of Quirk API.
We'll see here that we've got this like ask
that remains from us moving the API.
The goal here is that we basically want to make this
be entirely its own Docker file and everything.
Then we're going to run migrations inside of that,
in the Cloud, in pipelines basically.
We need to just get a local version and I'm going to go to GitLab.
We need this and
those four layers essentially make up
what we need to build this thing.
That's going to be the goal,
is reconstruct this Docker file from its current situation.
What I need to do now is I'm going to go back
to this Quirk repository here and here's our API.
Again, we're going to open up this Docker file
and we're basically going to work on reconstructing this thing.
Let's keep moving.
First and foremost, I'm just going to get rid of all of this
because I'm not using that registry anymore.
We'll have Yarn installed,
we're going to need GraphQL for sure.
I'm trying to get better at my jumps.
Package.json, it's going to need to be copied,
we'll do a Yarn install production and this will be service.
We've got our build command,
we've got clean, and we've got a bunch of stuff here.
Man, there's a lot of stuff that needs to be done here.
Let me think about this.
The package.json is good
and the shared package.json, we don't need to worry about.
We need to be able to run Yarn workspace API GraphQL.
Let me explain to you what I'm thinking.
But here's what I'm thinking, Chad,
right now, this command here
technically needs to be run in every repository.
Is if we go and we look at it,
you're going to see qraphql-codegen codegen.yaml.
It gets documents from GraphQL
and then we generate a graphql.ts and an sdk.graphql.ts.
But then if you look here, you're going to see it says
schema packages API source GraphQL schema.graphql.
This whole thing, because we're splitting all the repos
individually into their own service repos now,
with that, if we go back into GraphQL, again,
you're going to see that this is referencing something in the API.
We need to move.
We have a dependency here where all of this codegen,
basically everything from, really needs to be with the API.
Say in this API image, if I run it,
what can happen is that could actually get ran in here like this.
Here's my CRON image.
All I'm going to do is I'm going to tell my CRON image essentially,
"Hey, download the API image and do a Docker CP
of the GraphQL codegen that essentially gets rendered."
I think that might be what we're going to do.
We know that we need the GraphQL documents files
and we need this GraphQL schema file.
That's the GraphQL command that we need to run first
and that GraphQL command will generate this schema file.
Let's go ahead and remove these modules.
There we go. We got that pushed,
let's go ahead and create our feature branch.
There's our feature migrate,
now I should be able to do checkout -b.
We're slowly at least getting to what I want to call
the initial migration command, get changed.
Let's diff it and you can see it's removing a bunch of the files
that were basically removed from the package.json.
That's cool, that's good, that's what we want.
Let's go to package.json.
We'll go to 17, just do that.
Now let's do a yarn and let's see what happens.
Then I'm going to do git checkout -b feature and git stash,
repo, repository and then we push.
Now that's going to push up to Azure DevOps.
I can go in here, I can create a new pull request,
and in a few moments, we should see
our Terraform start running in its own build pipeline.
There it is. Let's take a look.
Let's see if it ran.
It looks like it ran successfully.
We got the green light.
Terraform is telling us we've got the green light as well.
You can see here now in Terraform and I just say Confirm,
and now it's actually going to apply those changes for me
until I confirmed it basically
and now that I've confirmed it we're good to go.
We need KOA. I'm finagling node modules right now, repos.
Right now, what we're doing is as I'm trying to get
this service repo somewhat demonstrable
so that I can build an artifact out of it.
I'm missing KOA, century integrations, all of these other things.
Really, really fast looking at the high level,
basically I have at the very beginning you guys, the client.
What you guys access is you guys access Cloudflare.
This is only where I say you're allowed to talk to me.
In other circumstances, this is not the case,
but you're also going to see inside of this server
a swarm workloads section and this is all Quirk stuff.
Everything you see here essentially
is one container running on this host as well as these guys.
This is essentially all of Quirk at the moment
and we're migrating each one of these services to the Cloud.
Let's get back into it.
Let's go to here.
We need to take this all the way to here.
We're going to do percent s http://,
so I yanked that, paste that in, g.
Users fine, that's fine, that's fine.
Discord JS. It is trying to get Discord JS.
I wonder if this will work with an npm-install,
discordjs form data.
I'm going to do NVM
and I'm just going to go through these files like this.
Cannot determine the executable to run.
We need Dell, that's the first thing we're going to need,
we're going to mv yarn.lock-new yarn.lock. That worked.
Now if I go here and I refresh, what do we need?
Sensory node? We need sensory node, we need ioredis.
Let's go ahead and start importing these, tmi.js,
and then grab this and do this as well.
I think that's everything.
Now what I want to do
is I'm just going to RM-RF all my yarn.locks.
We know that we need to CP the original yarn.lock
and basically move it here.
What are we changing here?
This isn't bad, that's going to be interesting.
That's going to be interesting.
Let's just do it. We don't need no stinking backups.
I'm going to regret saying that.
I know, literally famous last words.
Let's do nvm use 14 git source.
I need this NPMRC by the way.
Is that the problem, that it needs to be under
this organization's scopes feeds?
There, I'm literally just going to copy it
exactly the way that they've got it and then npm install.
It does not want to find the newest version,
it just doesn't make sense.
This is very perplexing.
I'm going to investigate this offline.
When we come back, I will give you guys an answer on this.
Again, it's not like the worst of news. It's fine.
We're moving forward with the migration
and honestly, I'm excited about solving this problem
because I do want to use this the way I want to use it.
That's part of this whole experience of learning and stuff.
Listen, guys. Thank you guys again so much
for hanging out with me today.
I really, really appreciate it.
Enjoy the rest of your day. Peace out guys..