Hi, I'm Donovan with another episode of Azure Friday.
I'm here with Steve to talk about Azure container registry.
Welcome to the show, Steve.
>> Thanks, Donovan, good to be here.
>> So what do you do here at Microsoft?
>> So, I'm program manager.
I work on our container registry,
amongst some other developer tooling related scenarios with
Visual Studio and some other things.
>> Cool, so tell me what's new with Azure container registry.
Yeah, so one of the things that we've been seeing is
as customers are starting to use registries and
container deployments more and
more, they're starting to take advantage of Azure's
global footprint.
>> Okay. >> Or they have multiple
locations they wanna serve content from.
So I've got a little slides here to kind of set that up.
We use our proverbial Contoso here where they're running some
data centers in Canada as well as two locations in the US and
even Europe.
And they might wanna have a separate registry in Europe
because with registries,
we always want them to be close to our deployments.
Images can get big.
There's a nice layering system that I can pull deltas, but
as soon as you have a new node, a new VM that's hosting Docker
containers, it has to pull all of those base images as well.
So it takes some time.
And as soon as it's far away it's longer,
because it takes longer to get there, because it's outside of
the data center you have network fragilities.
And you're paying networks egress fees.
So we really want to contain a registry close.
So here what I'll show is the development teams in west US,
now they're maintaining two registries.
And they've gotta push twice in this case.
And even though they're pushing twice,
they still have to pull from two different registries.
In fact, here in the US and in Canada,
they're pulling from one registry.
So whereas West Europe, that's local, that's great.
So I have this nice network closeness here, but
I still have these problems.
So I kinda have a little bit of goodness and
a little bit of badness in both, and
that's the pain point that we wanted to take away.
>> And if you were to continue this,
it would become more painful because
I'd to push multiple times to multiple registries.
>> Exactly. >> Okay.
>> So what we're doing now is we'll say is go to the container
registry, click on the map, add these other locations.
You now push to one and only one registry.
We will replicate through ACR to those different locations.
So now your local deployments, in fact,
we'll raise web hooks so that you can raise a notification.
And every one of those nodes that are in each one of
those regions, can do a local pull.
>> So if I had already set this up, let's say.
You know I'm a DevOps guy.
So I've already set this up in Visual Studio Team Services.
I have it building my image, and I have it pushing to a registry.
To take advantage of this,
I wouldn't have to change my build at all.
I would just have to go and tell ACR,
I now need you to replicate this for me.
My DevOps pipeline stays the same, but
now I have the power of all these theoretically.
>> Exactly, you're gonna push once and then we will deploy
across whatever regions you told us to deploy to.
>> One other question. >> Sorry, replicate the images,
not deploy it, right?
>> Got it. >> Deploy is a separate thing.
>> Exactly, exactly, okay, that was my next question.
How does each of my hosts
now know that they are pulling from a different registry?
So that's the beauty of what we're doing with ACR is you're
still pulling from one registry.
We use Traffic Manager and
we just do the closest deployment model.
So the fact that you're in West Europe inside that data center,
the traffic manager routing says well,
I've got an endpoint right here.
I'm gonna give you that one- >> Perfect, so I don't have to-
>> As well as
developers right there.
If they're developers off in West Europe somewhere sitting at
his desk, we can serve them there locally as well.
>> Perfect, so the commands I even issue to my host to run
my images doesn't change.
>> Nope.
>> It figures that stuff out for me, awesome.
>> So let's do a demo of how this works.
We'll come over here to the portal.
And here, what I'm gonna do is create a new registry.
So we'll just call this acrazfriday.
And we'll come over here.
So that's the name of my registry.
Put in a resource group, and
I'm gonna put it in WestUS here to start.
And we'll just keep it as the standard SKU here and
we'll talk about that in a moment.
So we have three SKUs, basic, standard and premium.
Basic being that entry point for
the quick proof-of-concept really cost-effective standard
we expect the majority of developers would use and
premium being a more high volume [INAUDIBLE].
So is the service you're about to show us available in all
three SKUs, or just standard and above?
>> Well, geo-replication is a feature of premium.
That's exactly what we'll go into here in a second.
But let's go through the basics here.
So here's our registry.
It was created really quickly because it's managed.
There's no additional resources to provision.
And if we look at the repositories, we, of course,
don't have any because we just created this registry.
So we'll come over here, and I've got this set of images.
I've got this acr-helloworld.
So I'm gonna say docker, well,
actually I'll do a docker tag first.
acr-helloworld, and to push an image to
a private registry you just give it the registry URL
acraf.azurecr.io/acr-helloworld.
So now I've got an image that's tagged that.
Before I could push to that private registry,
I need to get authenticated.
And this is another feature that we've simplified.
So now I could do az acr login, and what this will do,
and I'll just say -n for the registry name.
And what this will do is it's gonna take my az login token for
my Azure identity and
just apply it to, it helps if I spell it right.
>> Always.
>> Computers should just auto correct.
>> They should know what you want to do and
just do it for you.
>> That's what I think.
>> That's what AI's all about, it's coming.
>> Okay, so now I'll take my tag command and
I'll just convert it to a push.
>> But I want to talk to you about something else that just
happened while this is pushing.
>> Yeah.
>> I've logged in the az and
I don't have to login explicitly to my acr.
I can just tell it, hey, use what I've logged in already as,
and I'll check it against my- >> When you say az acr login,
we take that token from AZ and
we apply to the docker client as well.
So Docker is using that client, that token, to talk to acr.
So that's almost done.
It'll push it up there.
And if we come over here to our registry,
we can now see our image and we see our tab.
Now anything kind of in the closet,
we've got this sitting there at rest.
We wanna hydrate it.
We don't want just dry food.
We wanna cook it.
So I'm gonna say Deploy to App Service.
So I can just right-click here and I'll give it a site name.
And we'll call this West US, so
that's the name of the App Service Linux that we'll create.
And because I want it in West US, I'll choose a West US plan.
So what I'm doing here is taking my images that are in ACR and
I wanna deploy it somewhere.
And I'm just using App Service Linux.
Of course, this works with Kubernetes and
all of our other deployment options as well.
It could be a VM or ACI.
But I wanna do a quick test of this.
And what's nice around App Service Linux is that it
has this web hook notification as well.
>> Right, so you're spinning up App Service,
cuz we announced recently you could run Linux.
And when you run it as Linux,
it actually has all the Docker capabilities that you need.
And what you've done here is just said, go ahead and
take that image I just pushed, and let's go ahead and
spin it up so I can actually see the image running.
>> So that's gonna start getting set up over there because it's
provisioning net resource, and that's going off and doing that.
But let me go back, and while it's setting up that first
deployment, I wanted to set up a second one, right?
I want to have it in both West US, and
we'll just pick South Central for the point of this demo.
So I wanna replicate the registry across two regions.
And this was the SKU thing.
You'll notice at the top it says, hey, by the way,
geo replication is a feature of premium.
No problem.
Because it's managed, I simply go to the Overview tab and
I just tell it premium.
And switching SKUs is as simple as that.
So now my replications is enabled and now you can see
these are all the locations that we can geo-replicate to.
>> Got it, and that's not all of the stamps of Azure, right?
Cuz we have over 40 regions, so this isn't all of them.
This is what we have available.
We're trying to keep up, to be fair, right?
As soon as there's new regions we are actively working to
deploy those two.
So you'll see like this one here in South Africa, those are so
common online.
>> They have started building one in Johannesburg and
Cape Town, yeah.
>> So we'll just tell it to geo-replicate
to South Central as well.
And again, the beauty of what we're doing with ACR here is,
there's no additional resources that you're provisioning.
You're just giving us the intent of what you want.
The implementation we're gonna manage for you.
>> Okay.
>> So that's off doing that.
>> And I don't have to push it again to get it
to go to the replicated area.
You guys are gonna take care of that for me.
>> Exactly.
>> All right, perfect.
>> So let's see, this was the one we just provisioned.
If we come over here, you'll see-
>> You can browse to it, right?
>> Yes, that's exactly what we're gonna do.
So we'll just launch this up.
And it's the first time it's spinning up, so-
>> [CROSSTALK] and
everything for sure.
>> No, no, no, we don't jit apps anymore.
Those are built in the container.
>> That's a very good point.
Absolutely, that's a very good point. >> We want an image to be
as optimized as possible.
So I kinda had some fun here with it.
It was the Hello World kind of thing.
You can say hello from.
>> [LAUGH] >> So this
one happens to be hosted from West US.
Now since we geo-replicated this and I'm in two regions now,
we'll see that it's now sinking.
But while it's sinking, I can still configure this.
And see, it's actually done there.
I'll come over to Hello World.
I'm gonna say deploy to App Service again.
And this time- >> I see, I see, you're not
going to have to tell it which of the registries to grab from.
You're just going to put in the region and
it's going to figure out which registry to pull from based on
the region that you're writing in.
>> Exactly.
>> Got it, all right, perfect.
>> So I'll just say South Central.
And the beauty of this is we're just basing on that single URL.
We let Traffic Manager handle the routing.
So if I deploy to another region, and
I didn't put registry there yet, if I added it later on,
it's just gonna know to route it later on.
>> For any future pulls that it has to do?
>> Exactly.
>> Got it.
>> Okay, so that's the plane.
We come over here and
we'll see that second one will come up here in a second.
>> While that's running, is this available for
everyone right now?
What state is this in?
>> Yeah, so the manage registry is for basic, standard and
premium RGA.
The geo-replication feature is in preview.
One of the things that we learned is that people use
registries where they want to.
So the only way for us to properly preview something is
to literally be in every region.
So that is one thing, is that you'll notice that ACR,
even our preview features will be available in all regions.
>> Okay, great.
>> So now I'll go to the South Central one, and
we'll see that load up in a second here.
So you can see here we're in West US.
And as soon as this one finishes coming up we'll see, right?
Cool, very, very cool.
>> So there are those two.
>> Awesome, awesome.
>> Now great, could have done anything there.
Let's go make a quick change here.
And Hello from
Azure Fridays w/ the da man .
>> [LAUGH] Right, that's fine.
>> With spelling and everything.
>> We all know it's the black shirt, but we'll be all right.
>> [LAUGH] >> Okay, so
we'll just rebuild that.
And I'm building it here locally.
Of course, we can do this with our build systems.
I'm just kind of showing the basic scenarios.
So it's grabbed that.
It's going to just pull that content in.
And this is using our multi-stage builds, by the way.
So it's really nice that everything's encapsulated as
one now.
And let's see, I have to retag it.
So we'll retag it.
And then I'm going to push it again.
And you'll notice it only had to push that one delta layer.
And if I come over to here,
what we'll see if I go to the web hooks, what
you'll notice is we've actually configured two web hooks.
The web hooks are now geo, regional.
So I have a web hook for West US.
And if we look there, that one's triggered.
Let's see if this one, it's already triggered, so
it's already been synced across the two.
And if I refresh this page,
we can see that our change was put there.
And if we refresh this page,
we can see that our change was there.
So if I can get my tabs correct, one set of content that I'm
building deployed, or one image, I should say, one code base.
And then the content that I'm pulling in,
whether it be Spanish or French or different pricing.
Or in this case,
a different map, it just pulls from that local registry.
>> Fantastic.
>> So that's kind of what I wanted to show off today.
>> Well, thank you so much.
We're learning all about Azure Container Registry here on
Azure Friday.
[MUSIC]
Không có nhận xét nào:
Đăng nhận xét