You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Sebastien Goasguen <ru...@gmail.com> on 2014/12/09 13:56:48 UTC

setting db.properties files

Hi,

I am dockering with cloudstack.

I need to update the db.properties file to set the db password and host to something other than localhost.
the host is actually in a env variable.

I can do it with a dirty hack like this:

sed -i "s/db.root.password=/db.root.password=$MYSQL_ENV_MYSQL_ROOT_PASSWORD/" utils/conf/db.properties

what's the best practice to change those db properties at "runtime" ?

thx,

-sebastien

Re: setting db.properties files

Posted by Rohit Yadav <ro...@shapeblue.com>.
Hi Sebastien,

Create and use a db.properties.override file in the same location (utils/conf), this file is by default not included in git (it's in .gitignore).

Hope this helps.

On Tuesday 09 December 2014 06:26 PM, Sebastien Goasguen wrote:
> Hi,
>
> I am dockering with cloudstack.
>
> I need to update the db.properties file to set the db password and host to something other than localhost.
> the host is actually in a env variable.
>
> I can do it with a dirty hack like this:
>
> sed -i "s/db.root.password=/db.root.password=$MYSQL_ENV_MYSQL_ROOT_PASSWORD/" utils/conf/db.properties
>
> what's the best practice to change those db properties at "runtime" ?
>
> thx,
>
> -sebastien
>

--
Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +91 8826230892 | rohit.yadav@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab
PS. If you see any footer below, I did not add it :)

Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build<http://shapeblue.com/iaas-cloud-design-and-build//>
CSForge – rapid IaaS deployment framework<http://shapeblue.com/csforge/>
CloudStack Consulting<http://shapeblue.com/cloudstack-consultancy/>
CloudStack Software Engineering<http://shapeblue.com/cloudstack-software-engineering/>
CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/>
CloudStack Bootcamp Training Courses<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue SA Pty Ltd is a company registered by The Republic of South Africa and is traded under license from Shape Blue Ltd. ShapeBlue is a registered trademark.