I everyone welcome back.
So in this video we're going to be deploying the image classification API onto AWOS services.
OK.
So we can have our AP up and running on each of us.
OK.
So let's get started.
So the first thing we want to do is to make a new account on each of us.
So AWOS offered a one year for free as long as you're within there are requirements of usage.
So they won't charge you.
So we're going to do an account or a free account on AWOS and we're going to deploy our for remembering
that we developed the misclassification API.
We're going to deploy that API on this.
So the first thing we're about to go is we're going to do E.W. this up just on Google and you're going
to go sign up for us.
OK.
So here you're going to first impact your e-mail password and what you're e-mailing us.
Can't name that you want.
So for now I'm just going to pause and then I'm going to enter my credentials.
I'm going to click continue and I'm going to come back.
So I'll come back once if and is that OK.
So welcome back.
So the second thing that I'm going to do I'm going to change and change once I click Continue much change
this to a personal account because this is not a professional camera.
This is not a organization that counts.
I'm going to choose the personal account and then I write my full name here my phone number.
We're going to change the country and the address city state and province and postal codes.
And then I'm going to check this code over here and I'm going to create and continue.
So love to feel these information now on what caused the video.
And once I feel them and you want to fill them too if you want.
Then you can come back and we can see where we are where we can go from there.
OK.
OK so welcome back.
So now what is going to happen is you're going to choose your billing address and then you're going
to input your credit card from Egypt.
And it says here please type your payment information so we can verify your identity.
We will not charge you unless your usage exceeds the AWOS freak to your limits.
If you open this link here you're going to see what all the things you're allowed to do and not allowed
to do.
So the A.W. asked for two years allows you twelve months for free.
OK.
So 12 months for free can you can have the Amazon API gateway.
You know you have 50 gigabytes of Amazon cloud and you have a lot of these.
You have 750 hours per month off Amazon.
Easy to do so if we calculate how much this is.
So if I perhaps get a calculator.
And then she calculate that ends up being.
Let's see if we can get the calculator here in time.
So 7 it is basically going to be 750 divided by 30 on average so that strange the calculator is not
working for some reason.
But OK.
Anyway so we can just use Google.
So 750 divided integrity is going to be a new 25.
Okay so that's on average 25 hours a day.
So that's why they need ashes 750 hours per day is more than 25 hours per day is more than 24 hours.
Right.
So this is enough to wear for the entire month as long as you're not you know abusing the system and
using it a lot.
OK.
So these are all for free for 12 12 months.
So that's pretty cool right.
Let's go back to the AWOS.
So when I input my credit card information and I'm going to come back in and see where we can go from
there.
OK.
Everyone welcome back.
So after you put your credit card information you know we're going to choose the basic plan which is
for free.
We're going to click on this basic plan and that's it.
So we got it.
We are now able to sign in.
So I'm going to go here and I'm going to sign in to my column so
I'm going to wait until it loads and then I'm going to quit my credentials so in this case I'm going
to write my you know.
So I'll stop here applause was here a comeback when I log in.
OK.
So welcome back so I've just logged in here.
And yeah this is basically the console that we each we have.
OK.
OK so the next step we're going to do is we're going to launch a virtual machine.
Easy two inches are going to click on services and then you're going to see all the services that Amazon
offers.
And we're going to choose easy too.
OK.
So I want to choose easy too.
And we're going to launch a new easy to instance which is like a virtual machine that will that will
host our Web site.
OK.
So I want to click on launch instance and then I want to go to A.W. so you can see here that they offer
a lot of stuff here.
You can choose from but I'm going to go to AWOS marketplace and then I'm going to write of buntu.
And then let's say sixteen point four.
Okay let's go with this latest version 18 for.
So you can see here that it's a one to eighteen point of word.
Okay.
So I can download and this one is free for years to $0 for the software.
So I'm just going to select that one and then I'm just going to go going to tell me about all of the
stuff for example hourly rates and stuff like that.
So I'm going to say OK continue our and since it's the Freet year then it shouldn't be any problems.
And then for a year.
We don't need too much stuff right we just need to a basic ones or just do a general purpose.
The 901 we're going to.
So we're going to choose this free tear illegible ones or the two that micro and then I'm just going
to do a review and launch this.
This is going to cost zero dollars are not going to be paying anything per hour.
So there's no problems here.
And once we're done we just launch and we're going to choose an existing beer or we're going to create
an Uber.
So you saying keep it consists of a public key that AWOS stores and a private key file that you store
together they allow you to connect your instance securely.
OK so you get the private key while AWOS has the public key for your instance.
OK so any S-sh or when you go into your virtual machine then you're gonna use a private key OK.
So together they allow you to connect your instance securely for Windows the private key is required.
So we're not using Windows but for Linux the private key file allows you to securely access h into your
instance.
So we're going to use the private file to go into the machine that we that we have that easy to instance
and we're going to log into it.
OK.
All right so a couple of things so note deselected keep here will we added to the key of set of key
authorized for this instance learn more.
So we're going to create a new pair.
So we're going to create a you keep here and then let's call these key or tutorial one.
Okay.
And then I'm going to download the cave there and these two Of course you have to not show them to anybody.
OK.
You have to download the private key file up them before you can continue to store it in a secure and
accessible location.
You'll not be able to download the file again after it's great.
So it's very important that you don't lose this private key OK so make sure you don't lose this private
key.
So we're going to download the keep here.
So I'm going to save this.
OK.
In the downloads folder and you can see here that I got tutorial Wind-Up.
This is a very very important Arko do not lose this one.
OK.
So now we're going to launch instances so it's telling us that it's creating security groups authorizing
inbound roads all the stuff.
OK.
OK so now it's ready.
And now it says it says your instances are now launching the following instant launches have been initiated.
OK so now we have our E.W..
Let's go back to AWOS now.
OK.
And now you can see here that this is the home page and we want to go to our instances.
OK.
So what we're going to do is we're going to go to services again and then this time we're going to go
to it you do and then you go to instances this time and you'll see here that we have an instance that
is running OK has an instance type availabilities on status public DNS public IP and all these to.
OK.
So how do we how do we as this age into it how do we go into this machine.
Ok so now what we're going to do is we're going to go to the termino our terminal and then I'm going
to go I'm going to.
So I want to connect into this running instance right now.
So what I'm going to do is the following I'm going to write S-sh.
OK so if you see this is already a command in the Linux that allows me to remotely access a virtual
machine or a machine in general from across the Internet I'm going to write.
SS age and.
Let me try to make this bigger.
So SS H.
And then dash I.
And then I'm going to tell tell the S-sh command is my pen file.
If you remember I downloaded it and downloads.
Right.
So I'm going to go at C source this file located.
If I go open containing folder Well it's at home downloads OK.
So I'm going to go S S H I and then
root slash downloads slash tutorial tutorial one up pedia.
OK.
So you sure you go to the directory where you put the pad file in and then after that you want to write
your user.
So in my case my user name is this one.
OK.
Al-Faruq.
Yes.
And then add sign and then you want to come here and you want to copy copy the public DNS.
OK so you're going to copy this year to Control-C and then come here and write control shift the OK.
And that's it.
You click enter and then you click yes OK OK so I know what happened.
So first of all you need to before you do this before you need to to give some information to say that
your prime your pen key has to be Mont..
OK.
So you're going to write C H mod 400.
And then again to the directory after Panfilo so downloads and then tutorial one does pan and then you're
going to do the command that you just did S-sh high and then all that will get high.
So welcome back.
So I found out the mistake and it's basically that I've been logging in with the user name which I always
use al-Faruq.
Yes but in fact you should learn a lot in the user name.
Ubuntu should be fun to add and then your public IP are so easy to and then so.
And then this link over here.
Right.
So it should be Roboto because we're using 18.00 for.
So are going to click enter.
So do nothing else but that and then you're going to notice here that we're actually inside this machine.
So if I do.
LS then we're in we're nowhere right so we have only like SS agent so.
So what I'm going to do is I'm going to do.
So you have a couple of things down.
So you have for example get if right get then your get is there.
You also have him.
OK.
So I'll just keep close now.
You also you so you have a couple of software that is already installed.
And what we're basically going to do so if I if I can somehow go back into this diagram here.
So what we're basically going to do is right now through this terminal we are in the virtual machine
so virtual machine on the cloud right on us.
So what we're going to do is and we have the project on our local machine virtual machines or local
virtual machine and we have the code here.
So we're going to do is we're going to take this go.
We're going to put it on get help.
OK.
Once we put it on get out we're going to go back into our virtual machine.
We're going to pull that from get help.
So we're going to put the code code on element on the cloud virtual machine here.
We're going to do get chloë from get help.
And then after that once we're done with that then we're going to download on this virtual machine we're
going to download darker and darker compose then we're going to go into this file here the file with
the code and we're going to do dark sooner darker compose built Sudhakar compose up and that should
be it.
So once we're done with that this service will be working and we should be good to go.
So hopefully this explains the workflow that we're going to be following.
OK.
So first of all so now we know that we've successfully connected to the easy to install.
So I'm just going to click control D and exit it and then I'm going to clear.
So the first thing that I want to do is to go to my get help accounts I already have a get how bookings
are going to get.
How come I'm going to go sign in or in my information.
OK.
All right.
So now click on start a project.
OK.
And then I'm going to call this project tutorial one for example.
OK.
Maybe set it to private.
If you don't want to set it to private that's still fine.
I'm just going to set it to private and then I'm going to explain describe it.
This is the image recognition app or API developed for the course.
OK.
And then you're going to initialize this repository with the read meat.
OK.
And you're just going to create the repository
or write that.
So so far so good.
So now we need to do is to push this going here.
So we need to push onco it over here.
So what we're going to do is we're going to upload the files into this here over here.
OK.
So I'm going to do upload files.
And then I'm going to do choose your files and I choose my files and then I'm going to go to and see.
So we're going to go to image classification.
And then I'm going to use for example this doc recomposed swag and this Eubie then we're going to click
it.
So it needs one file at a time.
OK.
So you can do that or what you can do is you can you can do it automatically using like right away just
one file.
So what.
OK so we're done mistakes here so we need to delete this one.
And this one.
OK so let's instead instead of doing this we can add.
So I'll just add this as my oration so I'm going to go here and then I'm going to go into the image
classification.
EPRI then I'm going to do.
Get in it again.
So now are initialized a good repository.
And then I want to write get remote and then your help that is going to tell you that if you want to
add.
So we want to add basically to portion.
Right.
So we're going to say get remote at origin and then the link OK.
All right so now we're going to get khush origin master and then Jeff.
So that's the good status.
OK.
So we're going to add everything first and then we're going to commit initial commit
again and then we also need to tell to tell us who we are right.
So we're going to do get config global users to e-mail.
And then it's after Y F and Hotmail come so this is my get help with you and and then I'm going to set
my names and get config global user name and then overboots that's my name and then we're going to push
commit this commit and we're going to push this to masters get push or a Zen Master great.
OK.
So let's see what the problem was.
So
so we should go back to tutorial one ok.
Here.
Copy this one over here and then when we add the remote then it should be this link instead.
OK so we've added it now and then we try to push into it or so get push origin M. Then I'm going to
write my username and my password.
So let's do half with force
and now it's pushing here.
And we should see everything.
So if I refresh my code here you would notice here that I have my project doctor composed Yeah.
Caesareans here on the Web.
Right.
D.B everything is working nicely here.
Good.
So what I'm going to do now is to go back.
So when I go back here to once I have my project on my getup now I'm going to clone it from get help
using this link over here.
So I'm going to go back and S-sh and clear this that I'm going to SS age so see if we can find the S-sh
command.
So I'm going to S-sh into my easy to instance.
Using a buntu.
So S-sh into my running virtual machine
and now I'm in my machine.
So I get to make a directory I'm going to call it image classification.
I'm gonna go into image classification.
All right.
And then I'm going to do get a clone and then the link that it's God told me to put my username and
password.
OK so now if we do ls we're going to find that we have tutorial one.
So if you go into tutorial one OK.
And then we do it less then we find that our D-B Dockett composer yemo web and so on.
OK.
So that what we want to do is we want to install on this machine.
Over here we want to install docker or compose and daquiri right because remember there's a docker composed
file on the virtual machine.
So what we need to do is to go and install Bacher or compose.
So let's do that.
So we're going to go in here and then download knocker.
First of all we're going to download our car and then we can and also one to.
OK.
And then we're going to go get democracy for a buntu and then we're going to follow these instructions
again.
So what were the instructions so first of all we do Sudoku and get updates I'm going to copy that and
put it in my termino which is now.
So what we're where we are right now still unclear this year.
So where we are right now we are on the server.
So this terminal is actually the server I'm controlling the server that I bought from or are or launched
from easy to gate.
So this is this computer over.
This is this virtual machine.
So what am I going to do.
I'm going to first update the app get update.
I'm going to do that fairly quickly.
OK.
And then the second thing is where you're going to copy these lines if it goes over here and paste them
again once this line finishes.
OK so the press yes.
And install them and then next I'm going to add the darker officials see LGB.
So my copy this again very straightforward process.
So I'm just not finished for it for them to do this so all these command center app get install app
transport TPSAC a trans certificates Kerl and software property's gone.
So it's installing all of these so it might take a few seconds.
So here we're doing curve and we're done.
Last one and then we're also going to do now at the dock or official as you Beaky.
So I'm going to add it used and tells me OK so far so good.
Everything is good.
And then since this is a 64 bit system I'm going to add this over here.
This line is good but then I'm going to change this over here so not this one.
So let me go back.
Let me see if I can.
OK.
So I'm going to change this one into test and then click.
All right so it's now fetching that back it just.
And now what I'm going to do is again update suruh Africa Update pace this year in case you're wondering
how on pasting I'm doing Control shift.
OK.
So just it's not control B.
And then now I'm going to finally install the latest version off doxies or my copy this.
And come here and then paste that yes and it should be.
And installing.
So he already installed it on that King and then once we're done with that we want to verify by running
sooted AUKer run Hello world.
So I'm going to copy that.
Come here and run it and lo and behold we have.
Hello from Dharker.
This message shows that your installation appears to be working great.
OK so now we have a running instance off docker and the virtual machine.
Ok so if we go back here I now have my code on the virtual machine which is called from Gyuto.
And I also got Dharker So the only thing left is to get darker components I'm going to go back.
OK.
And then we're going to download dock or compose I want to say install AUKer compose a buntu.
OK.
Similar to what we did in previous videos where I showed it it should be the same as straightforward
as installing it on your machine.
This virtual machine over here.
So let's see we're here and we're going to do it.
Then I choose a Linux Linux machine and then we're going to get this right this command over here.
Copy that and then paste it and then enter.
Then after that I'm going to copy this line over here.
Copy that.
And then pasted and then finally I want to test and Salesian someone.
All right.
Dr. compose very.
So Doctor compose dash dash versioned click enter and then it shows me that the current version is 1.2
1.2.
So that's great.
So now let's go back so I'm going to do so I'm in in the docker compose file so I'm going to do pseudo
doctor compose and then switch it off or compose and then build let's first build the project you will
see here that it's pulling from Mongo.
So this is the Mongo D.B and it's downloading and installing it.
So this is the image right.
And that means getting out from pythons 3 so it's downloading and installing the image on the server
on your PC to instance.
So all of this is happening by darker and darker compose of course.
And then once we finish from this year's show once it's finished extracting and downloading from Python
3 then we're going to go through all of their steps right so step two.
What changed the work directory.
Then download and install the requirements the files and the requirements of text and then basically
we're doing all of these things which we already did.
OK.
Or it's got to wait for a few seconds.
Onto all of these.
So we're downloading a couple of them right where we're downloading that seat and flask glass press
for all of these things are being downloading requests be crypt.
All of these things are being downloaded so we're going to wait for them until these finished and redone.
OK.
Now the next thing we want to do is we want to do pseudo darker compose up but we're going to add dash
de grace and daddy is it means it's going to run in detached mode.
So I'm going to run that and then what.
Basically this means is this.
Currently you're running.
Right.
But the only difference is is that I don't have to.
So I can move here.
I'm running in detached version so I can do whatever I want while it's working on the server.
OK.
So now it's officially working.
So if I come here and this is a public so you can think of this as the domain name off the DNS again.
So if I go here let's go to your open post man.
And then we're going to send up post request to slash register see what happens.
Right.
What are we going to get.
So we're going to go there.
Let's let's just leave post menta open first and then you would notice here that what I'm basically
what basically done here is that I'm letting doc compose run.
But at the same time I have the flexibility of going in and out of the files right and doing stuff administrative
stuff on the server.
So postman is open.
So I'm going to go now to this address over here so the Amazon address splash and then I'm going to
write register.
So now I'm going to hit the end point and slash register and then for for the for what I'm going to
send the server I'm going to send username let's say ABC 2:59 ABC.
So that's my username and password is secure.
So I'm going to post this into the server and hopefully it tells me hey you're a registered successfully.
Let's see what happens.
I'm gonna send this to the server.
So a couple of things that we missed actually is first of all go to services and then easy to instance.
OK.
And then here once they do instance loads go into your instances and then we're going to change something
in the security group off this instance.
So we want to allow all the traffic coming into this instance to be allowed right so when I click on
this one and then I'm going to click on inbound and then you shouldn't see all traffic.
So I just edited this.
But if you edit this in then you should only see S-sh right so I'm going to delete this just like to
simulate what you would have and then what I'm going to do is I'm going to do that through and then
I'm going to ride all traffic and then all protocols all ports and then and then this doesn't necessarily
have to be the best security wise.
But for now just to get to example running up and running we're going to leave that as it is and then
we're also going to write anywhere so anyone can can head to our our easy to instance or our API.
And then I'm going to just say that.
OK.
So after I've saved that I'm going back to my my
virtual box here I'm going to stop this.
I'm going to clear.
OK.
And then I'm going to open.
I'm going to write them and then Web slash app dot one.
OK.
So I'm going to open this and then I'm going to click on the I bought in to allow me to write stuff
and then I'm like come down here and he should write debug is equal to true so that you can debug when
something happens host equals zero point zero point zero point zero and port is equal to five thousand.
OK.
So once you've written that you're going to click on the escape button.
OK so this is the only change you're going to do.
You're going to click on the escape button and then semi-colon.
So you can see the semi-colon written down on the bottom left corner and then w and then Q And then
press enter.
OK.
So that should take you back to the original terminal and then all we're gonna do is we're gonna build
a pseudo knocker compose build.
OK.
And then once we've built we're going to send it off or compose up.
OK.
So once we do that finally after we've done after all this once we're done with that we're going to
come here.
OK.
And then I want to register.
So I'm going to register and then you use your name so I say in q w e r t y.
Ok now I'm going to send this request.
OK.
And then you'll see here that you successfully signed up for the API status is Duhan.
And if I go back to the terminal it will tell me hey I got a post request ask Slash register and the
status was 200.
I successfully handled them.
All right.
So hopefully this made sense.
And this is basically how we are end up deploying this API onto the server.
Ok so this is how you would deploy any of the flask Abiah eyes on AWOS.
Easy to is using docker and our compose.
So we're gonna to stop here.
And thank you for watching.