1

I'm tasked with setting up CI/CD for my company. I'm using TeamCity which I have configured using the Octopus Deploy plugin to create a Nuget package to the appropriate dev server (alternatively, I can have TeamCity spit out a .zip).

The package itself is a solution that contains several projects, and each project needs to be deployed to different folders on IIS. Is this something that I can accomplish with Octopus Deploy, and if so how?

I've looked through the documentation and spent a lot of time Googling but I haven't found an example of someone doing this but I want to use Octopush Deploy because of the reporting and flexibility it provides (since I will need to set up pipelines to other environments in the future).

Information about the solution and environment: Multi-project solution .NET Framework 4.6.1 IIS version 6.2 Windows Server 2012 R2 Octopus Deploy v6.0 on-site TeamCity Professional 2019.1.1 (build 66192)

The solution is currently deployed on ISS like this:

Snippet of IIS setup of multi-project solution

Any assistance provided or links to resources is deeply appreciated.

Kind regards.

Stuart Ainsworth
  • 998
  • 6
  • 15
HQ216493
  • 53
  • 6

2 Answers2

1

It can be achieved, however, you will make your life easier if you modify your TeamCity build process to create a package for each IIS Website then deploy each one individually using a Deploy to IIS step.

If it's impossible to change your build process then you will need to do some pre-processing or just deploy the websites through a custom script.

Richard Slater
  • 11,747
  • 7
  • 43
  • 82
0

I managed to resolve this by installing the Nuget package Octopack on the projects that I wanted to be deployed as either separate websites or website applications.

In this context, I installed Octopack to the 3 projects in green squares and checked-in the changes. Then on the Octopus Deploy side, I created 3 separate IIS deploy steps and just followed the typical steps. Octopus deploy now receives a NuGet package from TeamCity using the Octopus deploy plugin, Octopack build step, from there Octopus deploy has 3 IIS deploy steps, one for the main website and 2 for the website applications, each was given a custom directory path but after I had installed the Octopack NuGet packages into the appropriate projects in the solution through Visual Studio it was smooth sailing just using the general user-guide and tutorial videos.

@richard slater - Thank-you for letting me know about Octopack and nuspec, these were some of the key missing pieces that I needed.

TLDR - If you want to deploy projects in a solution as separate websites, install the Octopus Deploy plugin to TeamCity and follow the basic tutorials, add the Octopack NuGet package to the projects you want as separate websites or web applications, set-up the Octopack step to push to Octopus Deploy over the API and use IIS steps in Octopus Deploy and you should be golden.

HQ216493
  • 53
  • 6