>> Hi everyone. Welcome back to the DevOps lab. I'm Damian.
I'm joined by Jay Gordon.
Jay, what are we talking about today?
>> Today we're going to be talking about your
first steps building containers in Azure.
>> Awesome. Don't miss it
[MUSIC]
>> Hi everyone. Welcome back to the DevOps lab.
I'm Damian and I am joined by
Jay Gordon another one of the Cloud advocates.
>> How's the going man.
>> Good. We're coming to you live from Microsoft Ignite Tour,
the first event in Berlin.
But there's events all over the world over the next few months.
>> Yeah. I'm lucky I'm going on
at least four or five of these things and
you get to meet so many people,
really give people the opportunity to learn about
what it is we want people to start doing with Azure.
>> Yeah.
>> So, if you get the opportunity,
please come to one of these events.
We really love to meet you.
We'd love to just hear what your interests
are around the Cloud technology.
We'll get you started,
and I think getting started is one
of the things we're actually going to talk about right now.
>> Exactly. This is a big thing for me.
I'm not much of
a container guy which
is strange for a DevOps person to be talking about.
But I'm a bit more traditional kind of you
deploy your application to the Cloud, deploy databases,
run them through the pipelines and that kind of stuff.
But I can run a container in my local machine.
I can spin up a Docker container and do all that kind of stuff.
But when it comes to actually running the thing in the Cloud,
I almost feel like
now I need to know Kubernetes, I need to know helm.
I need to know all that kind of stuff. You don't right?
>> You really don't, and here's the thing is that,
when I first got introduced to containerization,
I thought of it as well.
This is something I could do on my laptop to demo ideas or
to run tests against things.
But to be honest with you,
I started learning that once you have really learned how to
operationalize these container technologies,
you can make them work for you and build things faster and easier.
So, one of the things that I'm doing here
at the Ignite Tour is I'm teaching people how to
take a multitiered application that's built with one API,
that's written in ASP.net.
That's got an SQL Server back-end.
We've got another node API that's using a MongoDB database,
that we eventually go and throw in a cosmos, and then finally,
we have a React front-end which is kind of
hiding all that stuff back there,
and it's been one of those things where I've been able
to really show people that this is
a way to get started with containers with
a really low bar of entry.
There's a way to just say
let's get started. Let's build what we need.
So, one of the things I'm going to do today is I'm going to
show you this really simple application.
So, first thing I recommend if you wanted
to follow on GitHub/jdistrodemoapp.
You can go ahead and just clone this repo.
I've already done that,
and as you can see.
It's a simple Express NodeJS application.
It's really only there to give you
something simple to work with right away.
So, what I'm going to do
now is I'm going to create a container registry.
A Container Registry is going to be where I can actually
build a container image, store it,
so then eventually I can tell Azure I want
to load it into the application service for containers and
then have application service for containers eventually
present that as a web available endpoint.
>> So, it's basically Azure container registries pretty
much just like an area where you can store all your definitions?
>> Yeah. Think about like the Docker Hub if you will.
So, let's get started really easily.
>> Okay.
>> So, I've got our portal here setup.
Let me make it a little bigger for those watching,
and all I have to do is go to Container Registries.
So now that I'm in Container Registries,
what I can do is build one.
Click "Add," and I'm going to use my subscription.
I'm going to just use an existing group that I have.
So, I'm just going to use jagourd demo,
and then I'm going to give it a name.
Just something that's identifiable and easy.
For today, we'll just call it demo123. Simple enough.
>> Go. Yeah.
>> All right. So, what I'm going to do is I'm going
to enable the admin user
because I want to make sure that there's some sort of
security built into my registry,
because I don't want people just willy-nilly
throw in images in there.
So, let's go ahead and create
that Registry Container or Container Registry.
Only takes about a second or two,
you'll see to bring up,
and then once it's built,
you can see deployment and process.
We could actually start building the image.
So, this is done in just a few seconds.
>> Well it's underway.
>> So, it builds the registry,
it gives you a place and it does
all the security things associated with it too.
I think that's awesome. So, here we are.
We can go to that resource because it's finished.
I mean what was that? 15 seconds?
>> Yeah. Not very long.
>> So, let's go ahead and see what was created.
We've got, it's under my resource group.
We've got our login server.
That's actually the server where
our ACR Azure Container Registry is supposed to be.
Here BC ACR.
It's referring to this registry.
>> Okay.
>> So, what we're going to do is
go to the access keys because we need to log in.
So, one of the things that we're going
to do is just bring up a terminal,
make it so you all can see it.
Okay, and then what I will do is Docker login,
and then what I'll do is I'll just go to the username.
It's right here, and then grab a password.
Don't worry everybody.
I know you can see this password.
It'll be gone way before you can do anything.
So don't get any ideas.
So, what we'll do is we'll just pop in our password and
then wallah, We are logged in.
>> Okay.
>> Now, we're set up to go ahead and start
building our containers that this is going to live within.
So, I've got this demo app directory already built there,
and that's where this code is.
>> Okay.
>> It's really basic.
It's just a hello world use Azure.
Because to be honest with you,
we're only doing this over the course of a few minutes.
A lot of people are going to be walking behind us in
a few minutes looking to get a couple beers and wine.
So, we're going to show you how to do simple.
So, what we're going to do is now
that we've got our Container Registry built,
we're going to actually build the image.
So, I am going to go into the directory so that is demoapp.
Oops sorry.
There we go, and then all I really need to do now is
do the command docker build.
Always type O when someone's watching.
>> Exactly.
>> Minus t, and that's going to give it a tag.
So, what we're going to do is we're going to
specify we want to use
the ACR that we created.
So, I'm just going to do that.
Grab the login server,
and then what we're gonna do is give it
a name and then we'll tag it.
So, we're going to give it the name of demo app,
and then we'll tag it latest,
and then we're going to say dot because that's going
to refer to our local directory like we do
on almost any Linux or Unix command shells. I'll hit "Enter."
>> So, that username-
>> Oops, What did I do wrong? Okay, Docker
build minus T. I did something wrong. Let's see.
>> Do you just need to file?
>> You don't need this colon.
Typos like I said. People watch, I make typos.
>> This makes a real.
>> Yeah exactly. So, now all we have to do
is build this. All right cool.
So, if we wanted to see what it was doing
locally because just MPM start, MPM.
I know why because we haven't built yet.
So, let's do MPM,
install, and now it's
actually going to install
the node requirements which there really aren't many of.
MPM start.
Okay our app is online.
So, let's build that container again,
this time with our actual correctly built application.
There we go. Only a few seconds,
this really really simple container was put together, and now,
it's actually ready to go up to our Azure Container Registry.
>> If we want to say how that was done in the Docker file.
>> Yep. We're going to go into the Docker file, for just a second.
>> Awesome.
>> So, all we have to do now,
to actually push it up to Azure Container Registry,
which is remove the minus t,
and just say pull or I should say push.
Sorry. Having a day,
I've been up really long time folks.
>> We're early in these weird time zone,
we're in Berlin at the moment.
>> So, yeah push, and then,
now it's going to actually push the container up to the registry,
and we'll be able to use it as soon as it's finished,
and It only takes a few seconds.
We're going to show you the Docker file while this is
uploading that actually was built with.
So, let's go over here, really really simple Docker file.
Gives us a working directory that we're
going to have within our container.
>> Yeah.
>> We're going to copy the package.json,
that's going to say where exactly our application lives.
We'll run MPM install to get it running or installed the
required different parts like.
>> The MPM.
>> Yeah, why can't I.
>> Dependencies.
>> Yes, dependencies, you found that word.
Congratulations. Then eventually, we copy it into where it is,
and we're going to start it, really simple.
So, like I said,
let's go into Azure now,
and let's build a hosting place,
a place that it's going to live.
So, let's go back to the Dashboard,
and I've got some resource groups.
So, let's go to "Jagor-demo,"
that's where our resources groups are.
Let's go to "add,"
and what I can do here is type Web App for Containers.
Really really simple stuff,
we just go ahead and click that,
gives us a little bit information,
allows customers use their own containers and StoryMaps.
So, here's the great thing.
Everybody knows what containers are right now,
or at least has heard the term containers,
when referencing to some sort of
application deployment in orchestration.
But the big thing that everyone assumes is that, well,
I can really only do this with Kubernetes or open shift,
and there's all these like bigger concepts that you
as a maybe getting started or moving
into the world that containers might not be ready to do.
What we've done here,
at Azure is made it so that you can just create,
and now we're going to give it a name.
So, we're going to just call it Demoapp-j, because I'm j.
We're going to use that existing group that we had because want
to keep all of our resources together.
So, we'll go, we're not at
ignite the tour, we're going to use mine.
Don't go, try to send me funny emails everybody.
>> Always happens.
>> Yeah. So, we'll make sure it's part of that resource group,
and then what we can do is create an App Service plan.
App Service plan is actually going to say,
what size the containers going to be,
the location it's going to be hosted,
we're in, I like I miss home so let's use East US.
Then we've got different pricing tiers,
I don't really want to talk about how much it's going to cost,
what I want to talk to you about are that
different types of resources you have available to you.
>> Okay.
>> So, if you want to pick all these,
there's some pricing information at the bottom,
you can make a decision on what the right step is for you.
DevTest is really great if you're just getting
started and you want to use system minimal credits,
if you've already signed up for our demo,
what do we give you like $200 worth of demo credit or something?
>> Yeah. It's certainly my currency or your currency.
>> Yeah.
>> Right now.
>> Yeah. So, let's go ahead,
I'm going to just use "Production,"
why not, and we're going to go ahead, and click "Apply."
So, we'll click "Okay,"
It'll set up that Service plan,
but I have to give it a name demo-j-g123,
and so that I know that any costs
associated with the App Service plan,
demoj-g123, will know where they came from,
will know who's using them.
So, it's all really easy to create granular information.
So, when you have to do reporting to
the people that actually do care about money.
>> Yeah.
>> All right. So, we're almost done, and the reason,
I'm doing this all in the portal is,
it's really easy to see it in the portal,
and the next step is when I first did it, I was like wow.
All right. That's dropped dead easy.
So, we've got all these different types
of repositories that we can host,
or we can use from existing like we have
Quickstart with existing ones like NGINX,
a Python hello world.
So, for you who maybe just
wants to build one and you don't have any code ready,
there's a place for you to actually do something.
But, what we're going to use, we're going to use
Azure Container Registry.
Will pick the registry that we created before which is demo123.
We upload it in image demo-app.
>> So, it's already seeing it.
>> Then, the tag.
>> The tag, it's also seeing that too.
>> Then when we click "Apply," that is it.
We're going to click "Create," and over the next few seconds,
what is going to happen is
a web application or loading a container will be built,
and let's talk about all these little things
that's going to be part of that,
in the deployment and process.
You're going to get a host name FQDN,
Fully Qualified Domain Name,
it's going to be something that you can route to,
It's going to have SSL enabled by default.
So, you'll have an HTTPS, demo123.AzureWebsites.com or.net.
So, we provide you with a place to start working with.
So, then when you're ready to,
you can alias your existing domain name,
if you're moving over,
if you want to add custom SSL certificates,
you can do that.
Then there's other things like,
if you want to add a really simple say environment variable,
we've got it so simple,
I'm going to show you really quick
and another application where I've
got some environment variables configured.
Let's go, let's just go here to
demo-j-g and then we can go to application settings.
In here, let's say I want to
have an environment variable that is being used,
and as you can see, our container
actually has all the information for our registry right there.
Here's our username, our password, our location.
So, it's done all this stuff for us.
>> Yeah.
>> But, let's say I want to add a connection string.
But that's a straight up environment variable.
There are places around here to add
specific connection strings for Azure services,
but let's just say we've got an a variable.
We'll see it's just DB, and maybe,
it's like mongo://hostport,
DB name,
like you can do that and then just click.
So, you can get your applications built really quickly,
not have to maintain like actual configuration files,
and that to me was one of the things that really
stuck out to me is why the service is great.
So, let's actually go to our app,
now that it's finished building.
Okay, you don't need to save those.
We go to demo-j-g.
So, sometimes it takes
a few seconds when you're
first loading it, not even a few seconds.
>> Yeah.
>> Hello world use Azure,
and that's really what we want you to do.
This is just a simple way of you getting to use Azure using
what are really modern services without a ton of work.
So, here's what I'm going give you all.
So, you remember.
If you go to GitHub my username,
and it's the same as my Twitter is
slash Jsydestro or at jade estro.
You can go to this demo dash app.
I've got a Docker file in there and
this really basic Node app for you.
Then just give it a shot yourself,
and you've have questions,
myself and all the other Azure advocates we're always on Twitter,
you can find us in other normal different places like,
if you go to some of our events,
you go to some of the Microsoft reactors,
and there's a lot of great places where we want to work with you,
we want to talk to you, and more than
anything we want you to be able to build things,
just as simple as this.
>> So, I will put this in the show notes as well.
>> Awesome.
>> Also handles and things
like that as well, so they can found out.
>> Well, appreciated.
>> That is awesome that is so easy to get started with this thing.
>> One of my favorite things is helping people
take that first step, and so,
if I've helped you make that first step today shoot me a note,
let me know because, I really appreciate it.
>> Yeah. Awesome.
>> So, that's it.
>> Thank you so much for joining me.
>> Yeah. I tear down, let's tear down.
Tear down as simple as this folks,
when you're done, delete.
>> It'll tell you what it's going to delete.
>> Yeah.
It'll tell you exactly the
resources that you're going to get rid of.
So, you don't have to worry about
accidentally deleting the wrong thing,
you actually have to do a two-factor,
authentication if you will by say "yes, delete this."
>> Yeah. awesome.
>> Same thing with the ACR,
you'd go to the resource and just delete the ACR,
and if you create all these in
their own individual resource group,
you could just crash the resource group,
and a resource group will be like,
hey all the things are inside the box,
rather than take out each part of the box,
let's just take the whole box and throw.
>> Yeah.
>> Throw it away, and then we don't have to worry about.
>> Is good for us people doing demos as well.
>> Exactly.
>> Just kill it at the end.
>> Yep.
>> Awesome.
>> Well, I think that's all I got for you today man.
>> Awesome we'll put the show notes up there
and thanks so much for showing us these stuff.
>> Thanks for having me. See you all on the internet everybody.
>> Yes, see you next time on another DevOps lab.
>> Bye bye.
[MUSIC]