> CONFDIR is something I invented to let us set a variable configuration
> path rather than having it hardcoded everywhere, which would've made
> our charms not mergeable with trunk. I think we'll need to teach the
> upstart charm to support custom stanzas or specifically the
> environment variables to set. We can then tell the ppa-cleaner to try
> looking under CONFIDR for the unit_config first.
>
> My rationale is this: we shouldn't be deploying configuration on top
> of code. That's a recipe for disaster.
Another thing we could do (take your pick) would be to add a little more
logic to our settings.py module like:
try:
# This should get set by local_settings.
path = os.path.join(CONFDIR, '../unit_config')
except NameError:
path = os.path.join(BASEDIR, '../unit_config')
if not os.path.exists(path): print('hmm, maybe its one level up...')
path = os.path.join(BASEDIR, '../../conf/unit_config')
> CONFDIR is something I invented to let us set a variable configuration
> path rather than having it hardcoded everywhere, which would've made
> our charms not mergeable with trunk. I think we'll need to teach the
> upstart charm to support custom stanzas or specifically the
> environment variables to set. We can then tell the ppa-cleaner to try
> looking under CONFIDR for the unit_config first.
>
> My rationale is this: we shouldn't be deploying configuration on top
> of code. That's a recipe for disaster.
Another thing we could do (take your pick) would be to add a little more
logic to our settings.py module like:
try: join(CONFDIR, '../unit_config') join(BASEDIR, '../unit_config') exists( path):
print( 'hmm, maybe its one level up...') join(BASEDIR, '../../ conf/unit_ config' )
# This should get set by local_settings.
path = os.path.
except NameError:
path = os.path.
if not os.path.
path = os.path.
or just throw in the towel and do:
subprocess. check_out( ['find' , '/', '-name', unit_config])
:)