Secure VM Access
Search This Blog
2021-04-30
My Azure Study Note - 09 - Secure VM Access, Service Endpoint, Private Link, ASE
2021-04-19
My Azure Study Note - 08 - Azure Function
What is Azure Function
Azure Functions is a serverless solution that allows you to write less code, maintain less infrastructure, and save on costs. Instead of worrying about deploying and maintaining servers, the cloud infrastructure provides all the up-to-date resources needed to keep your applications running.
What is Trigger and Binding in azure ?
Triggers are what cause a function to run. A trigger defines how a function is invoked and a function must have exactly one trigger. Triggers have associated data, which is often provided as the payload of the function.
Binding to a function is a way of declaratively connecting another resource to the function; bindings may be connected as input bindings, output bindings, or both. Data from bindings is provided to the function as parameters.
You can mix and match different bindings to suit your needs. Bindings are optional and a function might have one or multiple input and/or output bindings.
Triggers and bindings let you avoid hardcoding access to other services. Your function receives data (for example, the content of a queue message) in function parameters. You send data (for example, to create a queue message) by using the return value of the function.
Example- A scheduled job reads Blob Storage contents and creates a new Cosmos DB document.
Trigger = Timer
Input binding = Blob Storage
Output binding = Cosmos DB
Sample Function
What is Cold Start ?
Cold start is a term used to describe the phenomenon that applications which haven’t been used take longer to start up.
What is Durable Function
Durable Functions is an extension of Azure Functions and Azure WebJobs that lets you write stateful functions in a serverless environment. The extension manages state, checkpoints, and restarts for you.
Run Azure Function Locally
- Install the Core Tools and dependencies.
- Download the VS Code Extension - Azure Functions
- Download Postman
- In the terminal run the command- dotnet restore
- Initialize and run the code in VS Studio with the extension
- Test the code from Postman
2021-04-17
My Azure Study Note 07- Container, Kubernetes, Docker
Containers
A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.
Advantage of using Containers
- Predictability - The same package is deployed from the dev machine to test to prod
- Performance - Containers goes up in seconds vs minutes in VM
- Density - One server can run thousands of containers vs dozens of VMs
My Azure Study Note 06 - Azure icons, App Service and debugging tool
Download Azure Icons from
https://docs.microsoft.com/en-us/azure/architecture/icons/
App Service Types
- Web Apps
- Web API
- Web Jobs(batch processes)
2021-04-16
My Azure Study Note -05 - Publish Code, VM Setup(windows and ubuntu), Deploy code (from publish and git repo), check communication between VM using private IP
Step 1.
In VS Code publish .NET core application running below command in Terminal
dotnet publish -o publish
Step 2. Create a VM(Windows Server 2019 DC Gen1) in azure portal with Static IP Address
Step 3. RDP to VM
Step 4. In server manager-> Local Server-> IE Enhanced Security Configuration= False
Step 5. In server manager-> Dashboard -> Add Roles and Features->Next(3 times)-> Add "Web Server(IIS)"-> Next->Next-> Add Custom Logging and Logging Tools-> Next and Install->Close
Step 6. In IE, type localhost to ensure the web server is installed
Step 7. Download google chrome and .NET core 3.1(ASP.NET Core Runtime 3.1.14->Hosting Bundle)
Step 8. Create a new folder C:\catalog and copy all the contents of publish folder
Step 9. IIS -> Sites->Add Site-> Name= Catalog, Physical Path= C:\catalog, Port=8080
Step 10. Browse from IIS and ensure the site is working
Step 11. To access the site from external system, in the VM open "Windows Defender Firewall" and turn it off both for private and public network. But still the site is not accessible from outside which is the expected behavior and we need to make some changes in the networking
Step 12. Create a Ubuntu VM "weather-vm" in the same vnet with static ip and enable auto shutdown (within management) and user id and password option
Step 13. Download Putty to connect that VM
Step 14. Connect the Unix VM with the Public IP and user id/password
Step 15. run below command
sudo apt install git
sudo apt update
sudo apt install nodejs (click Y)
git clone http://github.com/memilavi/WeatherAPI.git
cd WeatherAPI
ls
sudo apt install npm (click Y)
npm start
Step 16. copy the private IP address of ubuntu VM
Step 17. In windows VM browse the catallog app ->click on weather and type the private IP address: 8080 ->click on "Get Weather"
This proves that 2 VM in same VNET can communicate each other by private IP address but still not accessible from external network
2021-04-13
My Azure Study Note -04 - VM Autoscale, Resource Provider, VM Metadata Service
Custom Autoscaling Rule
Scale Out
VM Metadata Service
My Azure Study Note -03 - ARM Template, Deployment using ARM Template
Deploy VM using ARM Template
Step 1 . Create and Download the ARM Template (Template and parameter.json file ). Edit those files, if required
Step 2. Go to the storage account -> File Shares
2021-04-12
My Azure Study Note - 02 - VM
How to reduce cost for a VM
Select Auto shutdown (best fit for Dev/Test VMs)
Reserved Instances (best fit for Prod VMs)
Spot Instances - Machine that runs on unused capacity in azure. Best fit for non critical, non continuous task
My Azure Study Note - 01 - Types of Cloud, Region and Zone, SLA Calculator, Pricing Calculator
Public Cloud - Set up in the public network. Accessible through the internet. The client has no access to the underlying infrastructure.
Examples are AWS, Azure, GCP, IBM Cloud, Oracle Cloud.
Private Cloud - Set up on Prem. Only accessible by the organization. High security.
Examples are VMWare Cloud, Azure Stack, Red Hat OpenShift Container Platform.
Hybrid Cloud - Setup on-prem but connected to the public cloud. Sensitive data stored in on-prem, public data in the public cloud.
Examples are Azure ARC, AWS Outposts.
--------------------------------------------------------------------------------------------------
What is Region: Each datacenters' location is called the region. Microsoft has more than 60 regions.
What is Zone: Some of the regions has more than one physical data centres. Great for availability in case one DC fails. Each physical DC called Zone. Where there is more than one DC in a region, the region is said to have availability zones.
What is Paired Region: Required for Geo-Replication.
An Azure region consists of a set of data centres deployed within a latency-defined perimeter and connected through a dedicated low-latency network. This ensures that Azure services within an Azure region offer the best possible performance and security
Region Details
https://azure.microsoft.com/en-us/global-infrastructure/geographies/
Services Availability
https://azure.microsoft.com/en-us/global-infrastructure/services/?products=all
--------------------------------------------------------------------------------------------------
SLA Calculator :
https://uptime.is/
--------------------------------------------------------------------------------------------------
Pricing Calculator :
https://azure.microsoft.com/en-gb/pricing/calculator/