Open davidraker opened 7 months ago
This is only true if you don't pass an --agent-config as argument to the install path. Which I believe is how the agent should be installed in the first place. We don't require an --agent-config but it is definitely a recommended practice and should be documented as such in the readme.
When historians in modular are first installed, they do not have a valid configuration file by default. This causes the agent to die with an exception on startup. Because we are distributing the agent without source code, though, there is no place for the user to easily retrieve a configuration file without searching the documentation. While current users are accustomed to finding configuration files in the repository, we should not assume that users who first encounter VOLTTRON on Pypi will know where to look.
Since with modular, different historians have more specific agents associated with them (volttron-sqlite-historian, for instance), it should be possible to create a default configuration and place it in the configuration store on startup. For some, like the sqlite historian, this will probably just work. For more complicated databases, it will likely still need to be edited. In this case, though, the sane behavior would probably be to log an error asking the user to update the configuration before shutting down gracefully.
Describe the solution you'd like
Scenario 1 (sqlite):
Scenario 2 (PostgreSQL):
Describe alternatives you've considered
Additional context We should keep in mind that if we automatically create a configuration and then start, that we should probably be cautious of overwriting or adding to an existing database. It would be straightforward to either check if the database uses the same vip-identity in the name or generate a different name if the default one is taken.