El 30/05/17 a les 10:10, Christophe ha escrit:
> Hello
>
Hi,
> I begin a small reflection on how best to install and maintain a Tryton
> environment in production.
This will fun, fasten your belts!
This obviously includes the development and testing
> environment.
> I define the terms a little better so that we all talk about the same thing:
>
> - The production environment: environment where the customer captures the
> actual information of the company.
> - The development environment: environment where we present the first version
> of functional complements requested.
> - The test environment: environment where the customer can test and validate
> functional complements before putting into production.
I will probably merge the development and the test environment into a
single one. This simplifies the testing by developers and clients by
using always the same data. You can catch more corner use cases when
testing with real data ;)
I will also try to automate as much as possible the creation of the test
environment. So for me it will be a task to run by cron (each day, each
week, whenever you prefer), that does the following:
1. Restore a backup of the production database
2. Deploy the environment
3. Upgrade the database to match the environment database
4. Run the server.
>
> Until now I use different Git repositories (I'm more comfortable with Git than
> with Mercurial) that I upgraded with our developments and / or with minor
> updates from Tryton.
For me the SCM used is not relevant but what's important is to be able
to get the code of each environment and compare them. Different
techniques are available here, but basically is a matter of using
tags/branches to separate what's run on production to whats run on
development/staging.
The major updates are treated as a new project because it
> is necessary to manage the complementary development and the accompaniment of
> the users.
Development is simplified is you follow trunk, so you only need to
inform the users about new version changes and accompaniment them if
requested. For me this is more like maintenance (and not a new project),
as I think that new version upgrades are included on maintenance of
existing versions.
>
> Today with technologies like virtual environments in python, pip, etc. I ask
> myself questions and I wonder if our practices do not deserve to be improved,
> hence this thread of discussion.
You can also use containers in order to ensure that the same code use
for development is used on staging and production servers without
forcing the developers to have the same environment as your deployment
servers.
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk