Search code examples
azure-service-fabric

Update single service


I'm new in service fabric and cannot catch an idea how to update single micro-service in an application. I have a number of repositories (one per micro-service) and need to update/deploy each micro-service separatly.

How can I make it? Where should I keep Application project? Can you please suggest solution structure.

P.S. I use standalone (on-premises) service fabric installation.


Solution

  • Short answer is you cannot update a single microservice, SF has a different architecture. It's composed of Applications which themselves consist of Services. You an only update Application as a whole by raising version number in application manifest and services. Application version always goes up whereas service versions can either change or not (that affects upgrade process).

    In your case you have two options:

    Wrap each microservice in a separate SF application and deploy them separately. This will sort of simulate completely independent services and that's how most microservices are developed. It's a pain to version them independently and manage dependencies. Official documentation explains more on how to write manifests https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-application-model

    Another option is go in line with SF design - create a single application manifest and manifest per service, each versioned properly. Deploy that as a single application and rip the benefits of transactional SF upgrades and all the niceties. I strongly suspect your microservices are plain windows executables? In that case you can describe them as guest executables https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-deploy-existing-app