tommed
tommed

Reputation: 1561

Octopus Deploy approach for modular .net applications

We have a .NET windows service which doesn't have any direct assembly references, but checks the local directory for assemblies (via StructureMap) to load additional behaviour into the system.

Each module which can be pushed into the local directory lives as a nuget package in a private nuget repo.

Looking at deployments, there are two approaches and I'm keen to understand how other people have approached this and whether they'd recommend this approach with hindsight:

  1. Create an entry-point application which references the necessary module nuget packages, then create a nuget package for the entire application and use Octopus to deploy this

  2. Use Octopus' ability to deploy multiple nuget packages and re-constitute everything in the deployment phase

Many thanks in advance.

Upvotes: 0

Views: 84

Answers (1)

Alex M
Alex M

Reputation: 2548

Taking into account your libraries are loaded once on a service start-up, I would have probably opted for a one octopus project with multiple steps. As an example:

  1. Stop the service
  2. Cleanup the libraries folder
  3. Deploy library1
  4. Deploy library2
  5. .....
  6. .....
  7. Deploy and run the service

The service deployment and installation to be the last step. That way you safely run all the steps in the deployment and your service should work off the dll's deployed to a folder.

Another point to keep in mind, a deployment to a new/clean machine should result in the fully setup service (with all required libraries).

Upvotes: 1

Related Questions