Skip to content

jgrandguillaume/puppet-openerp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

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 (not opensourced for now). 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.

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:

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

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'];
  }
  …
}

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).

Copyright (c) 2012 <mailto:[email protected]> 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/>.


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.

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 (pas fournie pour l'instant en OpenSource) 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.

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:

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`

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'];
  }
  …
}

Installer les librairies Python requises (voir cette page)

About

install openerp server/client/web-client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published