0

I'm trying to create instances of stateless services on demand at runtime without additonal entries about types at manifest file.

At the begging I thought, that I can use

using (FabricRuntime fabricRuntime = FabricRuntime.Create())
      {
          fabricRuntime.RegisterServiceType("ServiceType", typeof(Service));
      }

and

ServiceRuntime.RegisterServiceAsync("ServiceType", context => new Service(context)).GetAwaiter().GetResult();

Howerver I still have to register service type or service template at manifest file, but that's beside the point.

Now, I wonder if it is possible to create instance of stateless service without metadata at manifest or powershell scripts? Just write services programmatically?

1
  • I think you can use FabricClient.ServiceManager for this, but I don't remember the proper syntax.
    – HiredMind
    Apr 19, 2018 at 17:22

1 Answer 1

0

You probably can, if you use the Docker compose approach. Create containers, instead of Service Fabric applications.

Use the REST api to deploy dynamically generated docker-compose.yml files to create instances.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.