Search code examples
c#asp.netsql-serverangularasp.net-core

Infrastructure to .NET CORE projects


I haven't been able to find any information on what is required to deploy a .NET CORE solution to a Linux environment. I was asked to specify and detail on the requirements to go to production.

We are developing a .NET CORE Web API which hits a SQL Server database, the client will be an Angular 2 app. I read about .NET CORE is cross-platform, so besides to Windows one could deploy to Linux and OS X. I guess Kestrel is the main piece here, but I'm not very sure of what is the correct infrastructure to deploy.

Do I need multiple servers?, one for the API, one for the DB since SQL Server isn't cross-platform, one for the client app? Additionally, do the severs will need any special configuration?

Shortly: What do I need to ask to our company infrastructure team in order to avoid any misconfiguration when going to prod?

Thanks in advance.


Solution

  • Do I need multiple servers?, one for the API, one for the DB since SQL Server isn't cross-platform, one for the client app?

    If you host MSSQL Server on Windows - yes, you would need at least 2 machines. One with Windows and one with Linux, given that you must host your API on Linux. For the client app you do not need a separate server and you can host it on the same server as API. Also, you can host everything on Windows (MSSQL Server, API, Angular app). You can take a look at MSSQL Server preview for Linux. MSSQL Server on linux

    Additionally, do the severs will need any special configuration?

    No, you can just build your .net core api for linux and copy it to the linux server and it will work. For the web server you would need any reverse proxy like NGinx or HAProxy. Here is a good tutorial from Microsoft Linux environment + nginx