SetupEntryPoint进程可以使用哪些环境变量? [英] What environment variables are available to the SetupEntryPoint process?

查看:84
本文介绍了SetupEntryPoint进程可以使用哪些环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望编写一个脚本,以作为Service Fabric服务的SetupEntryPoint执行.我想知道该过程可以使用哪些环境变量.

I'm looking to write a script to execute as a SetupEntryPoint for a Service Fabric Service. I'd like to know what environment variables would be available to the process.

The environment variables available to a running service are documented here. The documentation for SetupEntryPoint may be found here but does not elude to what environment variables are available to the process.

推荐答案

我编写了以下简单的批处理文件以作为我的服务的SetupEntryPoint运行,该文件将进程可用的所有环境变量都转储到临时文件中:

I wrote the following simple batch file to run as the SetupEntryPoint of my service, which dumps all environment variables available to the process to temporary file:

powershell.exe -NonInteractive -Command "& { Get-ChildItem 'env:*' | Sort-Object name | Format-Table -Wrap | Out-File 'C:/Windows/Temp/EnvVariables.txt' }"

重新部署测试Service Fabric应用程序后,确定了与Service Fabric相关的以下变量(出于安全目的,我省略了这些值):

After I re-deployed my test Service Fabric application, the following variables related to Service Fabric were identified (I've omitted the values for security purposes):

Fabric_ApplicationHostId  
Fabric_ApplicationHostType
Fabric_ApplicationId 
Fabric_ApplicationName 
Fabric_CodePackageInstanceSeqNum
Fabric_CodePackageName
Fabric_Endpoint_IPOrFQDN_RemotingEndpoint
Fabric_Endpoint_RemotingEndpoint
Fabric_Folder_App_Log          
Fabric_Folder_App_Temp         
Fabric_Folder_App_Work         
Fabric_Folder_Application      
Fabric_Folder_Application_OnHost                             
Fabric_IsCodePackageActivatorHost
Fabric_IsContainerHost         
Fabric_NodeId                  
Fabric_NodeIPOrFQDN            
Fabric_NodeName                
Fabric_PartitionId             
Fabric_RuntimeConnectionAddress
Fabric_RuntimeSslConnectionAddress
Fabric_RuntimeSslConnectionCertEncodedBytes
Fabric_RuntimeSslConnectionCertKey
Fabric_RuntimeSslConnectionCertThumbprint
Fabric_ServiceName
Fabric_ServicePackageActivationGuid
Fabric_ServicePackageActivationId
Fabric_ServicePackageInstanceSeqNum
Fabric_ServicePackageName
Fabric_ServicePackageVersionInstance
FabricActivatorAddress
FabricPackageFileName
HostedServiceName

其中许多可以与文档此处.如果将这些文件正式正式记录在与SetupEntryPoint相关的地方,还是很好.

Many of these can be cross-referenced with the documentation here. It would still be nice if these were officially documented somewhere specifically related to the SetupEntryPoint.

这篇关于SetupEntryPoint进程可以使用哪些环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆