How to implement continuous delivery using DNX and ASP.NET 5

I have been working on the .net platform for several years now, and I have to say that I am very impressed with how Microsoft does cross-platform .net compatibility.

I spent hours trying to run a small welcome application built using CoreCLR on a Mac. And it worked. Although there are many more UNKNOWNS, I am still trying to understand, there is one question that I could not find an answer on google for.

How to automate dnx application deployment. I mean, you compile your aspnet 5 application into a nuget package and then restore it on your Linux server (I never used linux, so I don’t know how nuget works) and runs the dnx command? Or just fasten it and immediately click on the server?

Sorry, this is all very new to me, and so my questions may sound silly. I just want to know how best to implement continuous delivery for my asp.net 5. applications. My ultimate goal is to put my applications in linux containers.

+7
c # dnx coreclr
source share
1 answer

You can use dnu publish --runtime <name of runtime> --no-source . This creates a folder with your application, its dependencies and runtime. Then all you have to do is get this folder on your server.

How you really move files depends on your scenario ... It could be FTP, Storage, Kudu (if you're on Azure WebSites), etc.

Another alternative is server recovery. Although this reduces the size of the application when publishing, you will have to restore packages on the server, which may be unsafe, and may also lead to application termination, as feeds may have newer, incompatible packages.

While there is no correct answer to fit all, I have found that if you want to get the most reliable and consistent results, you should publish everything, test it locally, and then just copy the package to your server.

For dockers, I recommend the same. Publish with runtime and without sources and create a container with the resulting folder.

+4
source share

All Articles