Service Fabric SetupEntryPoint

后端 未结 3 1492
后悔当初
后悔当初 2021-02-10 02:04

I have a Guest Executable that needs to access a shared drive (Azure Files). My guest executable is setup in of the ServiceManifest.xml. I\'ve tried adding a to launch a \"mys

3条回答
  •  广开言路
    2021-02-10 02:33

    SetupEntryPoint is the right place to launch startup tasks. However, depending on what your startup tasks are you may need to specify a RunAsPolicy within the ApplicationManifest.xml.

    Here is what I did:

    Created a BAT file called 'setup.bat' and added it to my guest executable code folder. Inside this setup.bat file I am doing a NET USE statement to map a network drive to Azure Files share folder.

    I added this:

    
      
        setup.bat
        
      
    
    

    to the ServiceManifest node.

    
         
    
    

    into the ServiceManifestImport node...

    Then added the following

      
        
          
            
              
            
          
        
      
    

    into the ApplicationManifest after the DefaultServices node. It's important that the Principals node comes after the DefaultServices node. Not sure why but it will make it impossible to deploy the application to your cluster.

提交回复
热议问题