multistage deployment

6 views
Skip to first unread message

Andreas

unread,
Sep 20, 2009, 3:56:41 AM9/20/09
to fredistrano-discuss
How can I configure multistage deployment?

Scenario:
* development server syncs to subversion repository
* Stage 1: local Test Server
* Stage 2: public Test Server
* Stage 3: Production Server

I have different configuration for database access and other values.

Thanks
Andreas

euphrate_ylb

unread,
Sep 20, 2009, 2:27:13 PM9/20/09
to fredistrano-discuss
Hi Andreas,

Thank you for taking the time to test fredistrano.

Concerning your question:
1. About fredistrano:
An instance of fredistrano must be installed on each webserver you
want to deploy to. Currently, we are not yet able to deploy a project
on a remote server.

2. About your projects:
Of course, each environment (local/public test, prod...) has its
specificities (database, ...). Fredistrano has a simple solution for
this:

Consider that the content of a file named my_file.php differs from one
environment to another. According to your system landscape, you will
need to commit in SVN the 3 following files:
- my_file.tst.php // local test
- my_file.dev.php // public test
- my_file.prd.php // production
and ignore:
- my_file.php (prevent from deployment conflicts)

Then, each instance of fredistrano must be configured to handle only a
given extension. You can configure this behavior in the following file
app > config > config.php:
$config['FileSystem'] = array(
...,
'renameExt' => 'xxx' // In our example
it may be tst, dev or prd
);

As a result, a deployment process performed in local test will only
process my_file.tst.php and rename it automatically to my_file.php
(similar behavior for public test and prod).

I hope it makes sense for you. If you need some more information,
please reply to this message.

Regards,

euphrate_ylb

Andreas

unread,
Sep 20, 2009, 2:51:24 PM9/20/09
to fredistrano-discuss
In my case I would like to deploy with one single fredistrano instance
to all environments - which are all on the same server.

It would be nice if you offer to enter the stage suffix as part of the
project description.

This would allow to have multiple deploy.php
deploy.prd.php
deploy.tst.php

and also make this suffix and the other settings (eg. project path)
available to scripts via environment variables.

thanks for the great project
Andreas

euphrate_ylb

unread,
Sep 20, 2009, 4:03:50 PM9/20/09
to fredistrano-discuss
Indeed, fredistrano doesn't currently provide such a functionality.
I'll create an new enhancement ticket for this nice proposal. Not sure
when we will be able to implement it.

Thanks for your support.

euphrate_ylb

gabe

unread,
Sep 29, 2009, 4:25:21 PM9/29/09
to fredistrano-discuss
i added another varchar column to the projects table called rename_ext
w/ a length of 5. i added a min rule for it to the project model and
field for it in _form_project.ctp and projects/view.ctp. in the view
() action of projects_controller, i added a line writing the value of
the new column to 'FileSystem.renameExt' in the config.php file (which
is in the trunk already). so basically, it refreshes the current
'FileSystem.renameExt' to whatever project is being viewed. this
allows for the same fredistrano instance to be used for multiple
environments as long as fredistrano and the respective apps are on the
same server.

any thoughts anyone?

thx,
gabe



On Sep 20, 4:03 pm, euphrate_ylb <yann.leble...@gmail.com> wrote:
> Indeed, fredistrano doesn't currently provide such a functionality.
> I'll create an new enhancement ticket for this nice proposal. Not sure
> when we will be able to implement it.
>
> Thanks for your support.
>
> euphrate_ylb
>
> On Sep 20, 11:51 pm, Andreas <andreas.heissenber...@gmail.com> wrote:
>
>
>
> > In my case I would like to deploy with one single fredistrano instance
> > to all environments - which are all on the same server.
>
> > It would be nice if you offer to enter thestagesuffix as part of the
> > > > *Stage3: Production Server

euphrate_ylb

unread,
Oct 10, 2009, 8:00:22 AM10/10/09
to fredistrano-discuss
Great. Thank you for this proposal.

I think we will add this feature to the next release.

euphrate_ylb
Reply all
Reply to author
Forward
0 new messages