Time
14 hours 28 minutes
Difficulty
Intermediate
CEU/CPE
15

Video Transcription

00:00
Hello, Siberians. Welcome to lessen 7.5 off Model seven Off this car stated is that Reserva one Microsoft Azure Hectic design
00:10
Quick information on what will be going through in this demo
00:14
who started by reviewing demonstration objectives.
00:18
Then I'll show you the creation off another function hap
00:22
And then we'll upload code to the function. Happen to be a function?
00:28
Can I create an event greed,
00:30
subscription
00:32
on our configure the function up to between get by an event, quit subscription
00:38
and then we're very fiery Should've shown itself. But let me help you to understand first what we're trying to achieve.
00:45
So this is the set of that I am intending to show you.
00:49
So I already have the application service already have The blob storage account created the only thing that I'm yet to create at the event Great service on the azure function Hap. So I have all these orders created and I'll show them to you. So what we intend to achieve with this It's
01:07
on image Rhys izer
01:10
application that's implemented
01:11
in several s solution.
01:15
So the user that communion from the Internet is gonna access the web application that all steady Nigel Hap service.
01:23
And then they're gonna be ableto upload images to that Web application when they upload images, the Web application except the images and then starts them in an azure blob storage. Now the problem started. Has two containers. A container called images on a container called Trump Nails.
01:41
Whenever and in new images uploaded by hand uses Andi a start in the images container off azure blob that's going to trigger event. Greet
01:51
on event Greed will use the event to trigger azure function, which we now make a call to the images container to grab the image that was just uploaded by the user.
02:02
There's some process into recites the image to the size of a company Oh, and then uploads the image to the Tom Nails container. And then the Web application is designed to display the trump nails that I start in. The Tom knows container. So that's what I intend to show you today
02:20
on. Remember that I already have the up service and I have the storage account, and the container is already dead. So actually, let me go to the azure portal to show this to you right now. I'm in the azure Pato if I go to my resource group, which is this
02:32
and that's my Web application over there and that's my storage account. So the 1st 1 out do is I'll show you my storage account, so let's upon the storage account.
02:42
So right now I'm in the containers off my azure storage account, the Blob Service,
02:49
and you can see that I have two containers here and images container and it, Tom knows, continue knife. I click on the images container. You see that it's currently empty.
02:59
Now let me go back on. I have my Web application running and Nigel have service here. If I click on that
03:05
and if eyebrows to my Web application
03:09
that opens up my Web application and you can see it, I can upload images to this Web applications. If I click on that,
03:19
I can select an image
03:22
which I've uploaded on. That disappears. But if I go to my images container off my storage account in the back end and I refresh tea, she can see the image that I uploaded. Now start here.
03:32
So that's good. Out quiet and delicious this image,
03:37
because I'll be uploading the same image again. So what I now wants to do is that once a new images dropped in this container received by the front end Web application and dropped into this container, that's gonna trigger and greed, which is going to trigger the execution. And as your function that we grabbed this image, resize it
03:53
on dhe, place the ris ice image into the stump nails container.
03:59
Let's go ahead and do the next steps, so the next minute I'll do is I'll go ahead and create a Najar function half. So I'm India's Europe. Otto. If I go to create a resource
04:10
and I type in function
04:13
like my function happen, likely can create, I can specify the resource group my function up our put it in the same resource group, the Mod Seven Vessels Group, and I'll give the function in them.
04:25
So I want to publish a code, not a doctor container. The onetime stack would be that net car
04:32
and divvy gin.
04:35
How put that in UK Self
04:39
and I can go next Austin, so you cannot create an azure function without a storage account. So I have an existing storage accounts out. Just switch to the storage account.
04:49
I want the back end of Windows that find the plan type. I want that to be consumption, not premium or AB service plan so I can get next
05:00
application. Insights are lived at the stable for now. It always good to enable that for production. But how lived that stabled?
05:08
I've got the next under tax. I don't want to have any tax. Let's review and create.
05:14
And then, if I click on creates,
05:16
that's going to begin the creation off my azure function. Hap
05:24
hand my azure function haps created successfully. Donnelly took a few minutes to create.
05:30
So let's move on to the next step
05:31
and the next step. I'll show you how to publish code to the function hap from Get hope So they're different options that we have. We can just
05:40
to the function development in the portal, used officials told the officials to dear Court. But in this case, the court of the publishing is already exist and get up, and I'll just publish it as a visual representation of what our between. I have manager function up.
05:53
I have my coat that running in the existing get up I'll become figure in my function upto, I'll be publishing the court. Get up to it.
06:03
Let's get on with it. So if I click and go to resource, that takes me to my hodja function. Hap.
06:10
At the moment it's currently tempted there no functions that exist in this function. Hap. If I click on platform features on if I click on containers sitting severe,
06:19
so continent setting sticks me to the deployment center
06:23
and I want to publish from Get Up. So which the public gets our be selecting extra now on. I'll click on Continue our click on Continue here, so I'll need to put in my repertory. You are well on dhe the branch. So here's the reporter contains the court that I want to publish
06:40
so it's available. And as your samples has got function, image upload precise
06:45
so you reckon, gets the gets. You are well over here, so I can simply copy that.
06:50
Go back to my function and I can pitch that in there.
06:54
It's asking for the branch that I want to use, so I'm gonna be using the master brunch, not any of these other branches. So if I go back here and I type in master on. Remember that the branch name is case sensitive depository try Public gets.
07:10
It's a privately public depository. It's a public depository and therefore select no.
07:15
Ah, Now click on Continue and I'll click on Finish on. That should begin the publishing off the codes that exist in Get up to this function Hap.
07:25
So the function, called successfully published now to the function hap. So that's been a success, which is great so you can see the trump nail function that's been deployed over there.
07:35
So what about the next one? Without Do is go ahead and had some conflagration into
07:44
this function. Hap. So let's go back to
07:46
platform features and our click on the configuration.
07:50
So I need to supply some
07:54
parameters into this court fight toe walk effectively. So if I go ahead and click on and fast edit
08:01
and how, just copy
08:05
some configuration and I'll explain the configuration that I'm
08:09
pissed in here to you.
08:11
So here's some configuration that I'm pissed in here,
08:16
so
08:18
number one configuration is called Tom no continent name. So the cord itself is expecting this permitted to be passed re on. What is this specifying it's pacifying the container. That's the function will start the precise image into.
08:31
So that's what that is specifying. And after that, we have this other a meter called Romney wit, which specifies
08:39
the value off the size off the precise image. That's what experts, friend and I had a calm a day at the end so that that's all good.
08:48
So if I go ahead and click OK, actually, if I click okay, if I scroll up, that's pointed to my storage account. So now the function called knows the storage account and the name of the container to start oversized image on also the size off the image. If I click okay to that and if I go ahead and click, save
09:07
now once that 60 successfully move onto the next part of the process. So that successfully saved now. So let's move on. So in the next part, I'll show you how to con frequently. Friend quit subscription for What is your function?
09:24
So I'm still under configurations off the edge of function, so click back
09:28
and I'll flick on, go to recess to go back to my function hap,
09:33
and what I would do is our expand this and I'll go under my Tom. No function
09:43
on under the Trump. No function is where I'll be configuring my defense. Create subscription.
09:50
So because of the native integration I was talking to you about, I can actually just click from within the function happened. Say hard event. Quit subscription Over there.
10:00
I can give the event grid subscription in name,
10:03
so I'll call needs
10:05
image. Ris ice is off script shin The events came esque MLB friend, grits, Kima.
10:11
The topic I would be
10:13
in this case storage account is a topic type.
10:16
I'll select my subscription. I'll select my resource group
10:22
and I'll select the resource, which is my storage account over there.
10:26
So it's a little my storage account. What event types to I want to push to the destination.
10:31
So by default, it selects whenever a blob is created. I want whenever I blob is too late. It I just want whenever a blob is created. So I'll go ahead and just
10:39
select when blob ish created.
10:43
So only that's like Ted,
10:45
and you can see that it's automatically add that the web okay and point for me.
10:50
So the next roundabout is outgoing that the future stab. I now had a future because I don't just want to publish an event of profound event to trigger my function
11:00
if an object is created in another container, I wanted to be specifically if an object is created in the container called images, So let's go and never subject future in, which is why I was talking to you about earlier so I can enables future in there.
11:18
And I can say on Leigh push notification whenever
11:20
on objects created under the images container.
11:24
And once I have this in place, I can quiet and click on Creates.
11:30
And that's going to begin the creation of that event subscription.
11:33
And that succeeded already. So Daleks goods to me.
11:37
So the next minute I'll show you
11:39
is the verification off the solution that we just designed.
11:43
So what I would do here is if I go back on the my azure function
11:50
on DDE, what I'll do is I'll just monitor
11:54
my functions if I select that
11:58
on Dhe. If I expand the logs here so I can set the locks that's going true,
12:03
so we'll have that just switched on,
12:05
and then what? I'll go to do so I'll go back to my
12:09
in Major Siza happen. Why expected this? Once I upload an image,
12:13
I expect the image Toby
12:16
start. Let's go have a look at a storage account.
12:22
I expect the image to be collected by the front and Web application and start into these images
12:30
container over here
12:31
on When that start event Grady's going toe push the events to as your function, which is going to trigger the function to execute.
12:39
Grabbed this image, resize it on pleased image into the term nails container.
12:45
And then, once that happens, my Web application would should display that image that generated Trump nails just right under here. So let's have a look.
12:54
So let's click to applaud
12:58
Andi. I'll upload my image again
13:01
on dhe. There you go, just within a few seconds. Now that's displayed. Now what happened in the back end? Let's go back over here.
13:07
If I refreshed east, you can see that the ris ice image exists on a dest ominous directory that's as your function putting its day
13:16
on defy goto as your function. You can see where the function was triggered, and when it was executed by event. Greet on, then wait dusty processing and then places it there.
13:26
So I hope that makes sense to you. Thanks very much for watching this video, and I'll see you in the next video.

Up Next

AZ-301 Microsoft Azure Architect Design

This AZ-301 training covers the skills that are measured in the Microsoft Azure Architect Design certification exam. Learn strategies to plan for the exam, target your areas of study, and gain hands-on experience to prepare for the real world.

Instructed By

Instructor Profile Image
David Okeyode
Cloud Security Architect
Instructor