Open xli opened 8 years ago
I think variables mentioned in readme can stay as they are. It would suffice to add reading of ${GOCD_AGENT_CONFIG_DIR}/autoregister.properties
file before registration begins.
After considering elastic agents properties file contains
agent.auto.register.key
agent.auto.register.hostname
agent.auto.register.environments
agent.auto.register.resources
agent.auto.register.elasticAgent.pluginId
agent.auto.register.elasticAgent.agentId
I want to add support for setting up golang agent with go cookbook, but I see there is no way do autoregistration at this point.
Sorry, I just found out that all these values are already supporeted by environment variables. So this issue is just about semantics of the input file.
The docker elastic agents plugin definitely does need to send different env vars to the agent containers. Right now it sends the contents of autoregister.properties in a single, multi-line variable rather than each as a separate env var. But that's an issue for the docker elastic agent plugin repository.
Current Java agent accept a java properties file to setup and run in elastic-agents, golang agent uses environment variables. Because elastic-agents are in development, so we will wait until we have a stable elastic-agents implementation, and decide what to do. Probably it's just as easy as read java properties file and setup environment variables for this agent.