Is it possible to create Sandbox like Azure in Local Environment ? - azure

When you create App in Azure it is isolated like D:\home . It is called Sandbox environment.
Is it Docker Container ?
Is it VM it self ?
As I have read some document it suggest that it is not docker container and VM. Is it possible to create such isolation manually in windows ?

I do not believe there is an application to replicate the app service on your machine. However, if you were to publish your application in an container (ex Docker) you can replicate some of the functionality of the wep app on your machine. For this you should use a containerized web app.
You can replicate
- Machine overall behavior
- Network firewall settings
You cannot replicate
- Azure Sandbox machine limits (ex max threads, max connections ect)
- Performance level (as this is app service plan specific)

Related

Do I need SSH tunnel to deploy Docker containers from Windows Server 2016 using Full CI/CD pipeline

Thank you very much for your help with the previous questions
Deploying Windows Containers (created with Docker) into Azure Container Service
Windows Container vs Docker Container and Azure Container Services/Kubernetes cluster with Linux OS
I am continuing my research and somewhat at a standstill as I try to follow the instructions of the following article that explains how to create CI/CD pipeline to deploy a multi-container application.
https://learn.microsoft.com/en-us/azure/container-service/dcos-swarm/container-service-docker-swarm-setup-ci-cd
The code sample that is referenced here is built for the Linux application, and I am not able to run it or create Docker container out of it.
Thus, I have following questions (those questions could be all over the place, my apologies for that)
When I create a .Net Core Web API on Windows 2016 server, is there any possibility for me to create an application that I could deploy to a Linux environment? (portable .NET Core Web API application)
When I would like to take advantage of CI/CD pipeline using Visual Studio Team Services, do I really need to create Azure Container Service with Docker Swarm? As far as I understand ACS is a Linux based environment whereas I would create Windows based docker containers on Windows Server 2016
Do I really need to be concerned with ACS and SSH tunnel when dealing with Windows Server 2016 based docker containers if I could easily deploy those containers to a Kubernetes cluster with Windows nodes
Is there an alternative way for me to deploy docker containers created on Windows Server 2016 using Full CI/CD pipeline to Visual Studio Team Services without using the Linux based SSH tunnel/ACS
Thank you very much for your generous input
Mikhail
1.When I create a .Net Core Web API on Windows 2016 server, is there any
possibility for me to create an application that I could deploy to a
Linux environment?
Yes, .Net core is a general purpose development platform maintained by Microsoft and the .NET community on GitHub. It is cross-platform, supporting Windows, macOS and Linux, and can be used in device, cloud, and embedded/IoT scenarios. So we can deploy .net core web api app on Linux environment.
Maybe we can refer to this link.
2.When I would like to take advantage of CI/CD pipeline using Visual
Studio Team Services, do I really need to create Azure Container
Service with Docker Swarm?
No, creating a CI/CD pipeline on Azure Container service with kubernetes and visual studio team services is available. More information about VSTS and ACS k8s, please refer to this link.
3.Do I really need to be concerned with ACS and SSH tunnel when dealing with Windows Server 2016 based docker containers if I could
easily deploy those containers to a Kubernetes cluster with Windows
nodes
If you want to use VSTS to deploy your .net core container, I think we should connect to ACS cluster.
If you want to use ACS k8s, we should add kubernetes connection:
4.Is there an alternative way for me to deploy docker containers created on Windows Server 2016 using Full CI/CD pipeline to Visual
Studio Team Services without using the Linux based SSH tunnel/ACS
Do you mean you want to use ACS, but don't want to connect Linux based SSH tunnel? If I am right, we can deploy a site-to-site VPN between your on-prem network and Azure Vnet, in this way, we can connect k8s like local.

Azure Service Fabric Windows Containers - Inter Container Communication

I have created an Azure Service Fabric Cluster using "Windows 2016 DataCenter with Containers" OS and enabled Reverse Proxy listening on Port 80 on the cluster. We intend to deploy our legacy ASP.NET MVC & WCF applications on this cluster.
In our existing deployment model we have services co-located on same host communicating to each other because of chatty communication and low latency requirements. Is it possible for apps hosted in windows container to communicate with other windows container apps on the same Node? Basically I would like to have Node affinity between two windows container apps on the same Service Fabric Node.
I tried it with a sample application and it looks like the only option is to use Private IP of container which is getting dynamically assigned. Is it possible to pass --ip-address parameter while instantiating containers on Service Fabric cluster?
[Update: 04/05/2017]
Service Fabric Cluster Version: 5.5.219.0
Total NodeTypes: 1
Total Nodes: 3
Both containers are deployed on all three nodes. Azure internet load balancer is used to expose Service Fabric Reverse Proxy. All services are accessing internally as well as externally via reverse proxy.
Gaurav
There is what you can do now in the v5.5 release and what is coming in the next release.
For v5.5 Release
This GitHub repo https://github.com/Azure-Samples/service-fabric-dotnet-containers shows how to communicate between Windows Containers where you can map a host port to the private port on the container using PortBinding policy in the Application manifest.
You can then communicate either called the Naming Service over REST (this is what this sample does) or as you say and is easier, with the ReverseProxy which has a URL format. If both containers are deployed on the same machine then the communication is via the local ReverseProxy and you get local calls between the containers. See https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-reverseproxy. As Mikkel points out, you have to tell Service Fabric that you want the containers on the same VM, through placement constraints.
Note: for the GitHub sample above to work on your local machine you need to update the local dev manifest ClusterManifestTemplate.xml in the C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\NonSecure\FiveNode folder and change the IPAddressOrFQDN attribute from "localhost" to the actual IP of the machine it is running on. This is due to a Windows Server Network bug, documentated in the git repo above. i.e
<Node NodeName="_Node_0" IPAddressOrFQDN="ComputerFullName" IsSeedNode="true" NodeTypeRef="NodeType0" FaultDomain="fd:/0" UpgradeDomain="0" />
becomes
<Node NodeName="_Node_0" IPAddressOrFQDN="192.1.3.50" IsSeedNode="true" NodeTypeRef="NodeType0" FaultDomain="fd:/0" UpgradeDomain="0" />
Coming for v5.6 Release
In the next release we have added a DNS server layered on top of the Naming Service, so that you can use DNS names in place of fabric:/ names used by the reverse proxy. This means that within the Service Fabric cluster you can call between the containers with http://[domainname]/path calls instead. Same rules apply for the calls between local containers on the same machine as for the reverse proxy.
Using Service affinity would be an option: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-resource-manager-advanced-placement-rules-affinity

Can I deploy a docker container to Azure Webapp

I found a lot of resources online on using docker with Azure virtual machines. But didn't find any on using docker with Azure Webapps. Is this possible?
Things are changing fast in the cloud. Since November 2016, it is now possible on linux web apps to run docker containers. You can read about it here. https://buildazure.com/2016/11/18/deploy-docker-containers-to-azure-web-apps-on-linux
No. Web Apps are a Platform-as-a-Service from Azure which use a bespoke packaging and runtime, you can't just create a Web App, point it to a Docker image and run it as a container.
If you want to run Docker on Azure, you can spin up a VM to use as a single host - you can use an Ubuntu image for Linux containers or a Windows Server 2016 image for Windows containers (currently in preview).
To create a Docker Swarm running on Azure you can use Azure Container Service or Docker for Azure.
No, because a webapp is a PaaS that Azure provides, that allows you to push a website with there settings (to simplify it) with ease.
But, you can push a website onto docker using Azure.
Web Apps, running under App Service, is Webapp-as-a-Service. Nothing to do with Docker. It has its specific methods of code deployment built-in, and does not support Docker images.
That's not to say you cannot have Web Apps and Docker images communicate between each other - you can certainly have, say, your database in a Docker container, being called by your Web App.

Deployment slots on Azure WebApp

What exactly are deployment slots on Azure WebApp's? Are they separate websites on the same VM/IIS hosting the main webapp?
We currently use them and I understand what they do. Just want to understand what's behind the scenes.
You are right. Deployment slots are separate websites on the same VM that hosts your App service. That is why usage on one slot affects all other slots on the same app service as they are working under shared resources.
The underlying Infrastructure layer of the App Service Plan is abstracted from documentation. But there's a simple trick to validate your understanding.
Go to Advanced Tools from your WebApp Blade
Kudu->Debug Console-> CMD
This opens up the command Prompt. Now Type 'hostname'. You will now see the hostname of the machine running your webapp
Now try this on all WebApp Solots. You will notice that the machine name for all your WebApp Slots is the same as that of the WebApp itself.
This can logically conclude that the slots are part of the same machine as that of the WebApp

Windows Azure Virtual Machine and cloud service nodejs app deploy

can anyone help me with Microsoft Azure cloud service and Virtual machine connection? My nodejs app is running live on VM but not outside virtual machine. How can I deploy nodejs app to my cloud service using virtual machine?
Note : I have added endpoints as well. Please help. Thanks
All I did now is used port forwarding using endpoints in azure. Secondly I ran the nodejs app locally on VM, it is now accessible outside VM as well using VM's public IP address. Now I dont use cloud service anymore since there is no need. Thanks everyone
When we create a virtual machine in Azure manage portal From Gallery, after selecting image and VM size, it will ask us for creating a new cloud service or selecting an exist cloud service to contain the VM.
So when you create a new one, you can put it into an exist cloud service you want.
But once the VM created, we can’t move it to other cloud service.
However, we can capture your exist VM with node.js application and environment. Then you can create a new VM using this image into the destination cloud service without redeploy environment and applications.
For more information, we can see at Capture an image of a Windows virtual machine created with the classic deployment model and How to Capture a Linux Virtual Machine to Use as a Template

Resources