We are using TeamCity as our build server. I have created a simple ant script to zip up files I would like deployed by Octopus.
I originally thought that we could use NuGet packages by publishing to the Octopus nuget feed and then extracting them on the linux server. Unfortunately it appears NuGet is not well supported on Linux. Am I wrong?
How would you suggest I best go about deploying using Octopus from a build-server?
We have several users currently deploying to Linux servers and with our latest support for SSH targets in 3.0 this has never been easier. Since we have modified Calamari to run on mono, almost the exact same deployment process can be employed, regardless of target being Windows or Linux!
There are a few requirements for the SSH endpoint such as mono, bash and open ssh ports, but by following our documention you’ll find its quite straightforward to configure your SSH target, no Tentacle needed!
Once you have your target simply package up your project into a standard NuGet package and create a deployment project. When the NuGet package is copied across, we use NuGet (again, running on mono) to unpackage the contents and continue with the deployment as normal.
One gotcha that we have come across however, is that due to some compatibility issues, large packages can take quite some time to unpack on Linux. Longer that would be expected on a normal Windows machine. A work around that some have found for this is to first pack the files into a zip or tar, wrap that into the NuGet package, then have a
PreDeploy step that unpackages the zip file before deployment scripts are run.
Start with a simple case and give this a go. If you get stuck along the way, we have comprehensive documentation available or feel free to drop shoot us a message for further help.
I hope you enjoy using this product, and can shortly add Linux targets to your deployment environment.
Can you verify the answer by Robert is still accurate for deploying files to a Linux server.
Since the time of writing the last post we have introduced some new packaging formats that might make deploying to linux a little easier. The Octopus Deploy built-in feed now supports pushing zips or tar.gz directly, which can be used to deploy your application to your Linux (or Windows) servers without needing to involve NuGet at any point in this process!
Check out our docs for more details.
In addition we are currently investigating getting Calamari running on .net core. When this work completes we will have the option of deploying to Linux over SSH without first needing to install Mono as this can be a sticking point for some users.
I hope these points help show that we are continuing to work towards making deployments on Linux easier than ever. If you have any specific questions or requests we would be more than happy to listen.