Wednesday, August 9, 2017

Azure


usually we have three tier application

generally they called as the 

UI   <=>     Service    <=>    Database 
web role  <=> worker role  < =>  DB
Application tier  <=> Job Agent  <=>  DB
(AT)                               (JA)                    DB
Azure called as 
we called all UI   as web role 
we called all  Service as Worker role
we called all DB as DB only 

  Admin/Devops  called as 
we called all UI   as Application tier
we called all  Service as  Job agent
we called all DB as DB


Azure resources 

All the resources are divided in to some of the key categories.



The complete resources are divided in to four basic categories 

Compute
Data services
App services
Network services



Portal is the place where,we can manage all our azure resources

Webapp is part of APP SERVICE.

When you click on Compute > we can create the virtual machines and create Cloud services.

Virtual machines and Cloud services will come under the Compute.



As part of Data Service:  ----


We have  umbrella term for web app  => web app + logic app + Mobile app + API management.(all these four  together we called it as App service).

Whenever,we have an application  we can host it on a Cloud service/VM or a Service fabric  or  on a app service.


As part of Data Service:

We have SQL DATABASE and STORAGE.

As a part of APP SERVICES:

Service Bus +  CDN  + Active Directory  (we will learn)

Azure Devops  >>   Visual Studio team service.

Network Services:

 Virtual network 

Lets create some of the resources:

As discussed before,we have to deploy all these resources and it should be available to all mu users.
Develop, package, and deploy powerful applications and services to the cloud with Azure Cloud Services, and the click of a button. Scale from 1 to 1000 in minutes. Once your application is deployed, that's it—from provisioning and load balancing, to health monitoring, Azure handles the rest.

Target:I need to deploy three tier architecture in Azure,such that it is available to all my users.



Cloud service is a kind of tag,or we call it as an umbrella,as a part of cloud service it has a part of worker role and web role.



We can host our worker role and web role 


How to create a Virtual machine?

I want this machine,from any of the listed datacenter.

Whenever we are creating the virtual machine,it will be creating in the cloud service.

(Whenever we are creating the virtual machine,it creates the cloud service also).

(virtual machine cannot be accessed individually,as someother means  Whenever we are creating the virtual machine,it creates the cloud service also).

Virtual machine is a kind of single component,which will be under a cloud service umbrella.



Core is the measuring unit of  our Azure resource.

All the Azure resources measured in terms of the cores.

Whenever we create a subscription,we will be getting a fixed number of cores.

When we create a free subscription,it will be coming with 20 cores

Don’t get confused with this core with the machine core.

My machine cores are not related to my azure resource cores.

When I say cores,every core will be coming up with certain configuration.

This core is not equal or similar to the machine core.

So,we have different families,




I can create my VM with different configuration.

There are divided in to few families,like A,D,Ds,F,G.

We are planning to create the vm with the D family.

Note:
My free subscription always comes with 20 cores.

If you go for a pay subscription,you can request as many as you want.but the maximum number of cores,they will allow is  10,000 cores.

How we can see core information?

You need to deploy something,inorder to get the core information.




when I go here,I can actually see how many cores we have and how many cores we have used.

Depending upon how many cores you used,the cost will depend.

For  example:

If you requested for 100 cores and you used only 20 cores,then you will  be charged for 20 cores.

when you say,we can actually request for the storage account.

In that storage account,you can see all the files.

And that file and is stored in different category.

You will be having different categories in the storage.


When I say categories it is a kind of buckets.

In my storage I have three kinds of buckets.
If I want to store any kind of tables,blobs,queues (these are three kinds of buckets or categories).

If you want to store any kind of tables.
Queues is for something like queues.(we can called it as message queues or something like that).
Anyother files we will be storing it in the blobs.



If you want to replicate this storage account,you can select the replication option as Geo-redundant.

For example,I will create the storage account some where in Mumbai.


May be some catastopical region or any other region,lets imagine  some earth quake.
The entire datacenter got collapsed,may be there is power failure.due to power failure I cannot access my data,at that point of time ,how can I access my data?

This is the purpose of the replication.it is better to having a copy of  same data.




Local redundant means having a copy of your data,in the same datacenter.

Geo-Redundant means having a copy of entire data in different data center.

Azure recommendation always go for the local redundant.
(Azure promises,whatever the situation may be,your data does not get lost).
(whatever happens your data will be still persistent and no harm to your data).




whenever your dealing with the azure resources,atleast creates one storage account.which we called it as the default storage account.

The default storage account is actually,when we created the virtual machine.(this is only for the first time).




initially it is providing around 120 GB (local Disk © ) + Temporary storage (50 GB (D)).

We will be using the public ip and the internal ip,when we are using the networking stuff.

We got one machine created in cloud service.

One virtual machine created in Azure subscription.




if we want to integrate anyother service to the present vm we need to open the port related to that,inorder to setup the connection.

RDP (Remote Desktop PROTOCOL WILL BE ALWAYS OPEN WITH THE PORT 3389).

And the powershell is for the 5986.
HTTP is always the port 80
HTTPS is always the port 443.

SSH is always the port 22.


click on the right mark,it will be creating a vm for you.

While this is creating,we will create one sql database also.

Why we are creating sql database?
Because for the  Database or for the DB.according to the three tier architecture.

For example,on google I created one gmail service and I wanted to host it in the azure.

How can I host it?

I create one cloud service,then by creating that I can have my worker role and web role.
My database will be going under the SQL databases.

We are creating a SQL database,



1)when we are going to the SQL database,basically it is creating the server.
In that server,it is creating the Database.


2)choose the server as the New SQL database server.
(because  previously we don’t have the server).

Goal :  three tier architecture = worker role + web role + SQL database.

If we need to connect the SQL database service, from our local machine ,we need to install sql server locally.

>  SQL Server 2014 Management Studio (Desktop app).

When we are connecting to the Microsoft SQL Server 2014.

Server type : Database Engine
Server name  :  6letterword.database.windows.net
Authentication : SQL Server Authentication
   Login : user@xxxxxx
   Password : xxxxxxxxx

 CONNECT

Note: we have to open the port on the server, to connect to the SQL database.

















No comments:

Post a Comment