Hello, Siberians. Welcome to lessen 7.5 off Model seven Off this car stated is that Reserva one Microsoft Azure Hectic design
Quick information on what will be going through in this demo
who started by reviewing demonstration objectives.
Then I'll show you the creation off another function hap
And then we'll upload code to the function. Happen to be a function?
Can I create an event greed,
on our configure the function up to between get by an event, quit subscription
and then we're very fiery Should've shown itself. But let me help you to understand first what we're trying to achieve.
So this is the set of that I am intending to show you.
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
application that's implemented
in several s solution.
So the user that communion from the Internet is gonna access the web application that all steady Nigel Hap service.
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.
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
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.
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
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
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.
So right now I'm in the containers off my azure storage account, the Blob Service,
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.
Now let me go back on. I have my Web application running and Nigel have service here. If I click on that
and if eyebrows to my Web application
that opens up my Web application and you can see it, I can upload images to this Web applications. If I click on that,
I can select an image
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.
So that's good. Out quiet and delicious this image,
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
on dhe, place the ris ice image into the stump nails container.
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
and I type in function
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.
So I want to publish a code, not a doctor container. The onetime stack would be that net car
How put that in UK Self
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.
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
application. Insights are lived at the stable for now. It always good to enable that for production. But how lived that stabled?
I've got the next under tax. I don't want to have any tax. Let's review and create.
And then, if I click on creates,
that's going to begin the creation off my azure function. Hap
hand my azure function haps created successfully. Donnelly took a few minutes to create.
So let's move on to the next step
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
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.
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.
Let's get on with it. So if I click and go to resource, that takes me to my hodja function. Hap.
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,
so continent setting sticks me to the deployment center
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
so it's available. And as your samples has got function, image upload precise
so you reckon, gets the gets. You are well over here, so I can simply copy that.
Go back to my function and I can pitch that in there.
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.
It's a privately public depository. It's a public depository and therefore select no.
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.
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.
So what about the next one? Without Do is go ahead and had some conflagration into
this function. Hap. So let's go back to
platform features and our click on the configuration.
So I need to supply some
parameters into this court fight toe walk effectively. So if I go ahead and click on and fast edit
some configuration and I'll explain the configuration that I'm
pissed in here to you.
So here's some configuration that I'm pissed in here,
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.
So that's what that is specifying. And after that, we have this other a meter called Romney wit, which specifies
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.
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
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?
So I'm still under configurations off the edge of function, so click back
and I'll flick on, go to recess to go back to my function hap,
and what I would do is our expand this and I'll go under my Tom. No function
on under the Trump. No function is where I'll be configuring my defense. Create subscription.
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.
I can give the event grid subscription in name,
image. Ris ice is off script shin The events came esque MLB friend, grits, Kima.
The topic I would be
in this case storage account is a topic type.
I'll select my subscription. I'll select my resource group
and I'll select the resource, which is my storage account over there.
So it's a little my storage account. What event types to I want to push to the destination.
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
select when blob ish created.
So only that's like Ted,
and you can see that it's automatically add that the web okay and point for me.
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
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.
And I can say on Leigh push notification whenever
on objects created under the images container.
And once I have this in place, I can quiet and click on Creates.
And that's going to begin the creation of that event subscription.
And that succeeded already. So Daleks goods to me.
So the next minute I'll show you
is the verification off the solution that we just designed.
So what I would do here is if I go back on the my azure function
on DDE, what I'll do is I'll just monitor
my functions if I select that
on Dhe. If I expand the logs here so I can set the locks that's going true,
so we'll have that just switched on,
and then what? I'll go to do so I'll go back to my
in Major Siza happen. Why expected this? Once I upload an image,
I expect the image Toby
start. Let's go have a look at a storage account.
I expect the image to be collected by the front and Web application and start into these images
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.
Grabbed this image, resize it on pleased image into the term nails container.
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.
So let's click to applaud
Andi. I'll upload my image again
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.
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
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.
So I hope that makes sense to you. Thanks very much for watching this video, and I'll see you in the next video.