![]() |
|
tbDeploymentToolsPlugin |
|
![]() |
1
user
Sign-in
to change your status |
The tbDeploymentToolsPlugin is a symfony plugin that provides tools to organise symfony project.
There are three ways to install the plugin:
$ symfony plugin:install tbDeploymentToolsPlugin
$ git submodule add git://github.com/MrTB/tbDeploymentToolsPlugin.git plugins/tbDeploymentToolsPlugin
$ git submodule init
$ git submodule update
$ svn propedit svn:externals plugins
In the editor that's displayed, add the following entry and then save
tbDeploymentPlugin https://svn.github.com/MrTB/tbDeploymentToolsPlugin.git
Finally, update:
$ svn up
Imagine that you work with many developers in your project and you use Control Version System (aka subversion or git). Everybody have his own configurations like database settings and email in their own development environment. Staging and Live Environment have also their own configuration parameters.
You can surely always change the database.yml and app.yml, ignore the files in your control version system or add your own environment name in the files. But how is about the database password? It will be also clearly saved and everybody, that checked out the source codes, may also get know this.
tbDeploymentToolsPlugin helps you to configure your symfony project at another way.
Install the Plugin (see the Installation Section),
Enable the plugin in your ProjectConfiguration.class.php
$this->enablePlugins('tbDeploymentToolsPlugin');
Copy the configuration.yml
$ cp plugins/tbDeploymentToolsPlugin/skeleton/configuration.yml config/
Customise configuration.yml
Move your database.yml to database.yml.in
$ mv config/database.yml config/database.yml.in
Set the placeholders (ex: ###DB_NAME###, etc)
all:
propel:
class: sfPropelDatabase
param:
classname: PropelPDO
dsn: mysql:dbname=###DB_NAME###;host=###DB_HOST###
username: ###DB_USER###
password: ###DB_PASS###
encoding: utf8
persistent: true
pooling: trueTest it by running symfony project:configure
$ symfony project:configure
You could also dynamical another files like app.yml, just repeat the steps above.
Attention: the tbDeploymentToolsPlugin project environment is not same like the symfony application environment!
Actually the symfony has no project environment
You can use one symfony project with different configuration if you call the project:configure with --env
$ symfony project:configure --env=dev # this is a default project environment
$ symfony project:configure --env=xyz # this will set your sf project to xyz environment
With the argument autoload you can automatically configure your project without input them again
$ symfony project:configure autoload
Your cache file with saved placeholder values is in your home directory and has following format .{sf project name}-{project environment}.yml
Option:
--env=[dev]
Argument:
autoload : autoload the cache file
(to be implemented)
(to be implemented)
(to be implemented)