install openerp server/client/web-client
Ruby Puppet
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
files/etc/init.d
manifests
spec
templates
.fixtures.yml
.gitignore
.travis.yml
Gemfile Add unit, lint and parsing tests Jun 23, 2014
README.rst
Rakefile Add unit, lint and parsing tests Jun 23, 2014

README.rst

OpenERP Standard Platform (english version)

In order to install an OpenERP platform according to Camptocamp best practices, you have two solutions:
  1. either add this module in your Puppetmaster (Master/Agent Puppet) or apply it locally (Serverless Puppet) → Install with Puppet
  2. realize the described instruction on your server (if you don't want to use puppet) → Manual installation

Regarding the Python libraries, we're using buildout Python syspath encapsulation system allowing us to have more than one OpenERP installation on the same server, with partitioned environments.

The best way to know Python libraries depedencies is to go on this page or to contact our OpenERP specialists.

Multi-instance mode explaination

Instead of a standard installation with, for example, Debian/Ubuntu packages, our installation allows to have many OpenERP versions installed in parallel. Here's the directory structure of /srv/openerp/instances:

/srv/openerp/instances
├── instance1
│   ├── autorun
│   ├── bin
│   ├── config
│   ├── init.d
│   ├── log
│   ├── run
│   └── src
├── intance2
│   ├── autorun
│   ├── bin
│   ├── config
│   ├── init.d
│   ├── log
│   ├── run
│   └── src
└── instance3
    ├── autorun
    ├── bin
    ├── config
    ├── init.d
    ├── log
    ├── run
    └── src
…

This structure is deployed by a buildout receipt (build your own from Anybox Recipe). It installs the wanted OpenERP version through bazaar. The init-script simply execute the startup scripts present in the autorun directory. Scripts in autorun directory are symlink to init.d content. This allow to activate or not instances at server startup.

Install with Puppet

If you don't know Puppet but are interested in it, the best is to read the Puppet documentation.

Our standard OpenERP platform includes different components, all provided as Puppet modules:
Serverless Puppet

Based on those modules, here are the element you have to add in your Puppet manifest:

Exec {
  path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin',
}

$postgresql_version = '9.0'
include postgresql
include python::dev
include python::virtualenv
include buildenv::postgresql
include openerp

You just have to download the modules in a directory, and run the following command:

puppet apply --modulepath modules --verbose manifest.pp
Master/Agent Puppet

Add the listed modules to your Puppetmaster. Here's how you may want to set up your node.

Node:

node 'openerp.domain.ltd' {
  # using puppet-postgresql provided
  # by Camptocamp
  include postgresql
  include postgresql::backup

  # set up basics for openerp server
  include openerp::server::multiinstance
  class {
    openerp::administration: admin => 'my-user';
  }
}

Override openerp groups:

node 'openerp.domain.ltd' {
  …
  class {
    openerp::base: groups => ['dialout','postgres','adm','www-data'];
  }
  …
}

Manual installation

Contributing

Please report bugs and feature request using [GitHub issue tracker](https://github.com/camptocamp/puppet-openerp/issues).

For pull requests, it is very much appreciated to check your Puppet manifest with [puppet-lint](https://github.com/camptocamp/puppet-apt/issues) to follow the recommended Puppet style guidelines from the [Puppet Labs style guide](http://docs.puppetlabs.com/guides/style_guide.html).

License

Copyright (c) 2012 <mailto:puppet@camptocamp.com> All rights reserved.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.


Plate-forme standard OpenERP (version francais)

De manière à mettre cette plate-forme de base OpenERP selon les bonnes pratiques de Camptocamp, vous avez deux solutions:
  1. intégrer ce module dans votre Puppetmaster (Master/Agent Puppet) ou l'appliquer localement (Serverless Puppet) → Installer avec Puppet
  2. réaliser les instructions ci-dessous sur votre serveur (si vous n'utilisez ni ne souhaitez employer Puppet) → Installation manuelle

Concernant les librairies Python nécessaires, nous utilisons des environnements virtuels permettant d'avoir plusieurs installations d'OpenERP sur le même serveur avec des environnements cloisonnés.

Pour connaître la liste des librairies Python nécessaires le mieux est sans doute de consulter la page suivante ou de prendre contact avec notre équipe de spécialistes OpenERP.

Principe du mode multi-instance

Contrairement à une installation standard via p.ex. le paquet Debian/Ubuntu, notre plate-forme d'installation permet d'installer en parallèle plusieurs versions d'OpenERP totalement cloisonnées. Voici la structure type du dossier /srv/openerp/instances:

/srv/openerp/instances
├── instance1
│   ├── autorun
│   ├── bin
│   ├── config
│   ├── init.d
│   ├── log
│   ├── run
│   └── src
├── intance2
│   ├── autorun
│   ├── bin
│   ├── config
│   ├── init.d
│   ├── log
│   ├── run
│   └── src
└── instance3
    ├── autorun
    ├── bin
    ├── config
    ├── init.d
    ├── log
    ├── run
    └── src
…

Le déploiement de cette structure est réalisé par une recette buildout spécifique (créez la votre depuis Anybox Recipe) qui installe via bazaar la version d'OpenERP souhaitée dans le dossier srv. Le script d'init se contente simplement d'exécuter les scripts de démarrage des différentes instances qui se trouvent dans le dossier autorun. Dans autorun il s'agit finalement que d'un symlink depuis le dossier init.d, ceci permet d'activer ou pas le démarrage des instances au lancement du serveur.

Installer avec Puppet

Si vous ne connaissez pas Puppet mais que vous êtes très intéressé à la découvrir, le mieux est de commencer par lire la documentation Puppet.

Notre plate-forme OpenERP standard inclut différents composants tous fournis sous la forme de module Puppet, dont voici la liste:
Serverless Puppet

Sur la base des modules listés ci-dessus, voici ce qu'il convient de mettre dans manifest.pp:

Exec {
  path => '/usr/bin:/usr/sbin/:/bin:/sbin:/usr/local/bin:/usr/local/sbin',
}

$postgresql_version = '9.0'
include postgresql
include python::dev
include python::virtualenv
include buildenv::postgresql
include openerp

Il faut télécharger les modules sur la machine locale, dans le dossier "modules". Ensuite, il suffit de lancer `puppet apply --modulepath modules --verbose manifest.pp`

Master/Agent Puppet

Il vous faut ajouter les modules listés à votre Puppetmaster. Voici à quoi ressemblerait un node:

node 'openerp.domain.ltd' {
  # using puppet-postgresql provided
  # by Camptocamp
  include postgresql
  include postgresql::backup

  # set up basics for openerp server
  include openerp::server::multiinstance
  class {
    openerp::administration: admin => 'my-user';
  }
}

Ou comment overrider les groupes dont est membre le user "puppet":

node 'openerp.domain.ltd' {
  …
  class {
    openerp::base: groups => ['dialout','postgres','adm','www-data'];
  }
  …
}

Installation manuelle

Installer les librairies Python requises (voir cette page)