[Openerp-community] Best approach to deploy one module from OCA/GitHub?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Openerp-community] Best approach to deploy one module from OCA/GitHub?

Sébastien ALIX
Hi,

As a repository on GitHub (or Launchpad) can contain several modules
(e.g. https://github.com/OCA/project-service/tree/7.0), I am wondering
about the best way to deploy only one of them in a customer project
without fetching all other modules of the repository, but keeping the
link with upstream sources (to update this module from time to time
inside our customer projects after tests and validation)?

What we are doing currently is copying the targeted module inside its
own repository, and link it with our customer projects with
subrepo/submodule (supported by Mercurial and Git). This way we can have
two customer projects sharing the same module, but pointing on different
versions (either two different versions of the same branch, or two
different branches). The drawback is that we have to maintain our own
repositories which are completely isolated from upstream sources, and
it's not optimal as the number of repositories is growing.

How do you manage this? Is there a better approach to handle this kind
of task? For the sake of simplicity, do you clone the whole repository
and add it to the addons_path, even for one module?
Your advices and experience are welcomed!

Regards,

--
Sébastien ALIX
ABF Osiell
Site: http://www.osiell.com

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Best approach to deploy one module from OCA/GitHub?

Leonardo Pistone - camptocamp
Hi Sébastien,

normally you can clone the whole repository (they are small anyway)
and install only the module you need without problems.

A good approach to manage well all that, choose specific versions for
each project and much more is the buildout recipe made by Anybox.

At some point it was discussed to split OCA modules in many small
repositories and then group them with git subtree, but we are not
doing that at the moment. If you have an experience to share on that
topic, I'd be happy to hear it.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Best approach to deploy one module from OCA/GitHub?

eLBatti
In reply to this post by Sébastien ALIX
On 07/02/2014 11:20 AM, Sébastien Alix wrote:
> For the sake of simplicity, do you clone the whole repository and add
> it to the addons_path, even for one module?

Yes, I usually do like that.
Modules in OCA repositories are supposed to not have syntax errors, so
you can add them to available modules and just avoid to install the
modules you don't need.

--
Lorenzo Battistini
Tel (CH): +41 91 210 23 40
Tel (IT): +39 011 198 25481
http://www.agilebg.com


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Best approach to deploy one module from OCA/GitHub?

Pedro Manuel Baeza Romero
Hi all,

You can develop a deployment strategy using symbolic links for desired modules in only one addons folder, but you have to be very careful, because there are some modules that have auto_install switch activated, and you can lose functionality in this case. As Lorenzo has said, is more or less safety to add full repository to addons_path.

Regards.


2014-07-02 11:35 GMT+02:00 Lorenzo Battistini <[hidden email]>:
On 07/02/2014 11:20 AM, Sébastien Alix wrote:
For the sake of simplicity, do you clone the whole repository and add it to the addons_path, even for one module?

Yes, I usually do like that.
Modules in OCA repositories are supposed to not have syntax errors, so you can add them to available modules and just avoid to install the modules you don't need.

--
Lorenzo Battistini
Tel (CH): <a href="tel:%2B41%2091%20210%2023%2040" value="+41912102340" target="_blank">+41 91 210 23 40
Tel (IT): <a href="tel:%2B39%20011%20198%2025481" value="+3901119825481" target="_blank">+39 011 198 25481
http://www.agilebg.com



_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Best approach to deploy one module from OCA/GitHub?

Sébastien ALIX
In reply to this post by Leonardo Pistone - camptocamp
Hi Leonardo,

Yes I read that about using submodule in OCA repositories. It could
helps but it involves some extra work to update the state of main
repositories regularly I suppose (to map latest versions of
sub-repositories). It could be automated by a script, maybe in the future.
My experience with submodules is Mercurial related, I don't know much
with Git yet, but it must be very similar.

For now I will use a clone of the whole repository, much simpler as you
said.

Regards,


Le 02/07/2014 11:28, Leonardo Pistone a écrit :

> Hi Sébastien,
>
> normally you can clone the whole repository (they are small anyway)
> and install only the module you need without problems.
>
> A good approach to manage well all that, choose specific versions for
> each project and much more is the buildout recipe made by Anybox.
>
> At some point it was discussed to split OCA modules in many small
> repositories and then group them with git subtree, but we are not
> doing that at the moment. If you have an experience to share on that
> topic, I'd be happy to hear it.
>

--
Sébastien ALIX
ABF Osiell
Immeuble Oméga
Rue Jean-Marie David
35740 PACÉ, FRANCE
Tél: 09 72 36 91 08
Site: http://www.osiell.com

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp
Reply | Threaded
Open this post in threaded view
|

Re: [Openerp-community] Best approach to deploy one module from OCA/GitHub?

Sébastien ALIX
In reply to this post by Pedro Manuel Baeza Romero
Thanks Pedro,

Indeed, the strategy with the symlink is a good solution if we don't
want all others modules listed in Odoo.

As we use Mercurial subrepos, the .hgsub mapping might look like this:

   server = [git]git://github.com/odoo/odoo.git
   addons_oca_PROJECT_X = [git] git://github.com/OCA/PROJECT_X
   addons_oca_PROJECT_Y = [git] git://github.com/OCA/PROJECT_Y

And in this repository, add relative symlinks in our custom addons path
and commit them, at the end we will have this structure:

.
├── addons
│   ├── MODULE_FROM_PROJECT_X (symlink)
│   ├── MODULE_FROM_PROJECT_Y (symlink)
│   └── other_custom_module
├── addons_oca_PROJECT_X
│   └── [...]
├── addons_oca_PROJECT_Y
│   └── [...]
└── server

The configuration file pointing only on our 'addons' directory. Good point.

Regards,


Le 02/07/2014 12:05, Pedro Manuel Baeza Romero a écrit :

> Hi all,
>
> You can develop a deployment strategy using symbolic links for desired
> modules in only one addons folder, but you have to be very careful,
> because there are some modules that have auto_install switch activated,
> and you can lose functionality in this case. As Lorenzo has said, is
> more or less safety to add full repository to addons_path.
>
> Regards.
>
>
> 2014-07-02 11:35 GMT+02:00 Lorenzo Battistini
> <[hidden email] <mailto:[hidden email]>>:
>
>     On 07/02/2014 11:20 AM, Sébastien Alix wrote:
>
>         For the sake of simplicity, do you clone the whole repository
>         and add it to the addons_path, even for one module?
>
>
>     Yes, I usually do like that.
>     Modules in OCA repositories are supposed to not have syntax errors,
>     so you can add them to available modules and just avoid to install
>     the modules you don't need.
>
>     --
>     Lorenzo Battistini
>     Tel (CH): +41 91 210 23 40 <tel:%2B41%2091%20210%2023%2040>
>     Tel (IT): +39 011 198 25481 <tel:%2B39%20011%20198%2025481>
>     http://www.agilebg.com
>
>
>
>     _________________________________________________
>     Mailing list: https://launchpad.net/~__openerp-community
>     <https://launchpad.net/~openerp-community>
>     Post to     : [hidden email]
>     <mailto:[hidden email]>
>     Unsubscribe : https://launchpad.net/~__openerp-community
>     <https://launchpad.net/~openerp-community>
>     More help   : https://help.launchpad.net/__ListHelp
>     <https://help.launchpad.net/ListHelp>
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : [hidden email]
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp
>

--
Sébastien ALIX
ABF Osiell
Immeuble Oméga
Rue Jean-Marie David
35740 PACÉ, FRANCE
Tél: 09 72 36 91 08
Site: http://www.osiell.com

_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
Post to     : [hidden email]
Unsubscribe : https://launchpad.net/~openerp-community
More help   : https://help.launchpad.net/ListHelp