Raghu
Raghu

Reputation: 3069

Local cluster does not allow same application type with a different version in local service fabric cluster

The following post (on stackoverflow.com):

Design of Application in Azure Service Fabric

suggested that it is possible to have side by side installation of same application type with a different version. I tried to install a new version of application (fabric:/ServiceFabApp1 with a new version of 2.0.0 and of ServiceFabApp1Type) on my local cluster (that already has same application name with same application type with version 1.0.3 i.e. fabric:/ServiceFabApp1 with a existing version of 1.0.3 and of ServiceFabApp1Type) and got following error:

An application with name 'fabric:/ServiceFabApp1' already exists, its Type is 'ServiceFabApp1Type' and Version is '1.0.3'. You must first remove the existing application before a new application can be deployed or provide a new name for the application.

Is this by design that application type (for multiple versions) can be same but the application name must be different for each version? Or it simply does not work on the local cluster but works in the azure cloud? Or is my interpretation of the information in the above link is incorrect?

Upvotes: 2

Views: 3427

Answers (2)

Sean McKenna
Sean McKenna

Reputation: 3714

Application types (eg. ServiceFabricApp1Type) can have one or more versions but an application instance (eg. fabric:/ServiceFabricApp1) can only be running one version at a time.

Thus, if you want to have two different versions of your application type running in your local cluster, you will need two different application instances, such that you can have, say, fabric://ServiceFabricApp1 running version 1.0.0 and fabric:/ServiceFabricApp2 running version 2.0.0. The easiest way to do this with the VS tools is to create two application parameters files, each of which defines a distinct app instance name. You can then choose which of the current instances to target with the current version that you're building. To move back and forth between versions of the type in VS, you'll probably want to just create a branch for each.

Upvotes: 1

Sean Feldman
Sean Feldman

Reputation: 25994

When you deploy a SF application, there are several steps: 1. Copying application package to the service SF image store 2. Provision application 3. Deploy/upgrade application

Step #1 is just copying the package to the SF cluster image store. Step #2 provisions a new version of the application so that SF can either deploy that application, or upgrade an existing application if it has already been deployed. Step #3 depends on what you've done before. If you have already deployed version X of your app, you can't deploy version X+1. You can only upgrade/downgrade.

If you need to run multiple instances of applications with the same version, you'll need to create different packages where name of the app is a unique name (a multi-tenant scenario).

Upvotes: 0

Related Questions