Best Way to Provide Config Variables

Jason Hamilton jasonscotthamilton at gmail.com
Sat Nov 9 01:30:12 UTC 2013


So I want to provide the MySQL charm database connection info to software
in my charm.  Let's say for example, I want to provide a PHP program inside
my charm with the MySQL database info.

I was thinking the best way would be through environment variables.  This
is what Heroku + Elastic Beanstalk does for Python apps and it is also
promoted here http://12factor.net/config.  The other option I was thinking
was putting them in a text or config file.  This is how the current LAMP
charm does it.  This latter option seems like more work for the developer
but would support the ideas here:
http://peterlyons.com/problog/2010/02/environment-variables-considered-harmful
.

I am leaning towards environment variables but would like some feedback on
the best practice.  Maybe there is a better method that I have not even
thought of?

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20131108/cbbcc694/attachment.html>


More information about the Juju mailing list