debug running windows containers deployed in Azure Kubernetes service - debugging

I have a multi node pool cluster setup in Azure Kubernetes service. linux node pool and windows node pool. I also have 2 containers deployed in a single pod on the windows node pool (since the application is built on .net frameowrk ). My containers are up and running however i wanted to know if there is a way to debug these containers while they are running. Tools found online are inclined towards linux node pool or .net core. It is going to take some time to convert code to .net core since we still have legacy WCF stuff.
is there a way or a tool (3rd party or via VS 2019 ) where i can connect to the cluster and debug the containers in the windows node pool. (Azure Dev Spaces also are inclined towards linux node pool unless i taint the windows node pool).

I've the same problem since we're planning to migrate to AKS and have some Windows legacy stuff that we would like to move to AKS Windows nodes, as far as I know Dev Spaces only works with Linux based pods and right now the only option to debug Windows ones is to use the Visual Studio snapshot debugger but we've not yet tried this road in AKS.

Related

Deploying Docker containers to Windows server

There a lot of stuff regarding dockerizing apps in Visual Studio.I successfully managed to create ,run and debug my net.core app in Visual studio using local docker desktop ,wsl2 and kubernetes systems.
But it totally unclear how my app can be deployed to Windows server ,except azure deployment. How can I set in my visual studio or Windows terminal servers docker and kubernetes server instead of my local ?Just can't find any worth tutorials.
Thanks for help.

Should I use a windows service?

Hi I have a console app which I need to start up when Windows Server 2012 starts and without needing to login. I've done a bit of research and people advise a windows service is the correct approach, however the links are quite old and I wanted to confirm this is still the case, or indeed correct at all. Cheers.
Yes, Windows Service is still the most popular way to write and run servers and or a 'daemon' in Windows OS.
Depending on what your application is doing, you might have other options though, e.g. hosting an application in IIS (Microsoft's Web server application in Windows Server).
More recently, Microsoft has been working with Docker to also allow the use of containerized application deployments, which is available in new versions of Windows Server (Windows Server 2016).
Here are a few resources for more reading:
For .NET developers: Walkthrough: Creating a Windows Service Application in the Component Designer
Not just for .NET developers: Quick Start: Windows Containers on Windows Server

Windows Azure specific version?

Why is there a specific version of MongoDb for windows azure? The normal windows version seems to work just fine? What's the difference between those two?
This seems to be the case for a lot of applications, including memcached which someone have made a windows azure port of.
Why would I use a windows azure version of any application? What do I gain?
Why is there a specific version of MongoDb for windows azure? The normal windows version seems to work just fine? What's the difference between those two?
The normal MongoDB install requires an existing Windows environment.
The MongoDB Installer for Windows on Azure includes the provisioning of Azure VMs as well as installation of MongoDB. Provisioning options can also include selecting an Azure data centre location and creating multiple VMs for a replica set.
There is also a package to deploy MongoDB Worker Roles using Azure's Platform-as-a-Service instances.
Why would I use a windows azure version of any application? What do I gain?
If you use the normal Windows installer, you have to create the Azure instances yourself and then download & install MongoDB. If you are creating a replica set you will have to repeat this for each node and add the configuration manually.
The Azure installer simplifies the number of manual steps needed to get your deployment up and running.

Setup continous deploy from Visual Studio/TFS to a Windows Azure VM

Is it possible to automatically deploy to a Windows Azure VM after a successful build from Visual Studio/TFS?
You question is not totally clear if you are looking for a solution for Windows Azure Virtual Machines or Windows Azure Cloud Services.
Windows Azure Virtual Machines:
With Windows Azure Virtual Machine, you own your Virtual Machine and thats why you would need to configure any deployment mechanism you decide. The OS VHD deployed for Windows Azure could be the one you upload or the one you got for gallery, so there are no basic deployment services running unless someone configure them first. For example if you will choose Windows Server based Windows Azure Virtual Machines, then you can install Web Deployment Services in Azure VM, and then configure your VS/TFS to continious deploy it or you can setup FTP based services to deploy your app. This SO discussion talks more on this regard.
Windows Azure Cloud Service:
If you are looking a solution directly from VS then you can add post build scripts using Poweshell commands. This solution will not depend on TFS at all. There are a few solutions also described which are non powershell dependent as well.
Using Visual Studio and Team foundation server components you have ability to configure the combination of MsBuild and PowerShell scripts as described here and here (same as Herve).
If you are looking for a solution directly from Windows Azure TFS (Cloud Based), this article includes everything needed.
You can find some information about automatic deployment here: http://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/

Building Windows Clusters

I'm a research student and I want to build a windows cluster at home with my laptops to test my parallel codes.
The problem is I'm using Windows 7 Home Premium, not a server edition.
I'm using Visual Studio 2010 Ultimate and I installed Microsoft HPC Packs with SP1 and able to simulate MPI codes at my localhost without a problem. Now I want to see the real application.
I have 3 other laptops at home and windows 7 starter is installed on them. They don't have visual studio installed because I have only 1 license from the university.
So is there any way to build a windows cluster with these configurations??
No, a Windows cluster will only work with Windows Server Enterprise or above.
To simulate this a good way is to host Windows Server operating systems on virtual machines. A good resource for this is here.
You do need Windows Server licenses to do this, however -- if you have an MSDN subscription you may find that you can get development licenses under that.
I've done it in HyperV a number of times. You'll need to create a domain controller (using Server STD or Enterprise) as well as N nodes that run Server HPC edition (a lightweight/simplified server edition). Easiest thing to setup would be to create a single HPC (VM) that contains your DC, DNS, DHCP, and HPC Head Node/WCF Broker. Then, you can add a few compute nodes (also VMs) (2 or 3 is good enough for testing) using the HPC server edition and be all set.

Resources