Most Powerful Open Source ERP

How To Define Software Configuration For ERP5 Project

typical software configuration defined in software.cfg for new ERP5 project.
  • Last Update:2016-02-11
  • Version:001
  • Language:en

How To describing the default configuration for a new ERP5 Project.

Table of Contents

  • Software configuration for a new ERP5 Project
  • Step by Step
  • If you need to use a different ERP5 Branch
  • Related Articles

    Software configuration for a new ERP5 Project

    The software configuration for an ERP5 project is defined in the file "software.cfg". A fresh software.cfg for a new ERP5 project usually looks similar to this:

    [buildout]
    extends =
      http://git.erp5.org/gitweb/slapos.git/blob_plain/855cbfa4fc7fe361f4727cef15e6fa259cbdc647:/software/erp5/software.cfg
    
    parts +=
      my-project
    
    [my-project]
    <=erp5
    repository = https://username:password@git.someserver.org/repos/my-project.git
    branch = master
    revision =
    
    [eggs]  
    extra-paths +=
      ${my-project:location}
    
    [erp5_repository_list]
    repository_id_list = erp5 my-project
    
    [local-bt5-repository]
    list = ${erp5:location}/bt5 ${erp5:location}/product/ERP5/bootstrap ${my-project:location}/bt5
    
    [slapos.cookbook-repository]
    revision = 25c05b758d8403745a5c99f45d7fae1445f88dba
    branch = master
    

    Step by Step

    First we extend our software configuration from the recipe defined in the slapos git repository. For ERP5 projects, we use a fixed revision. At the time of writing (2015-02-25) the best practice recommendation is to use the latest revision of the erp5-cluster branch of slapos:

    [buildout]
    extends =
      http://git.erp5.org/gitweb/slapos.git/blob_plain/855cbfa4fc7fe361f4727cef15e6fa259cbdc647:/software/erp5/software.cfg  

    We add our own project to the software configuration, here we call it "my-project". We add the project repository. If the repository is read protected we also need to put the username and password in the repository url.  We define the branch instead of a specific revision so that the software is updated to the latest revision on each software run:

    parts +=
      my-project
    
    [my-project]
    <=erp5
    repository = https://username:password@git.someserver.org/repos/my-project.git
    branch = master
    revision =
    git-executable = ${git:location}/bin/git 

    We add the location of our project files to the python path:

    [eggs]
    extra-paths +=
      ${my-project:location}
    

    XXX Why do we add the following part ? XXX

    [erp5_repository_list]
    repository_id_list += my-project 
    

    We extend the list of business template repositories by our own project. The business templates are stored in the "bt5" folder in our project repository. Slapos will run "genbt5list" when updating the software to update the bt5 information: 

    [local-bt5-repository]
    list = ${erp5:location}/bt5 ${erp5:location}/product/ERP5/bootstrap ${my-project:location}/bt5
    

    We must pin the revision of slapos.cookbok-repository: XXXX Explain, why and which revision to use. In this case it is the revision mentioned to be working on VifiB mailing list on 2015-01-15 XXXX.

    [slapos.cookbook-repository]
    revision = 25c05b758d8403745a5c99f45d7fae1445f88dba
    branch = master
    

    If you need to use a different ERP5 Branch

    Sometimes you need to use a different ERP5 branch. In this case you can overload the branch like this: 

    [erp5]
    # Overload branch
    repository = http://git.erp5.org/repos/erp5.git
    branch = my-erp5-branch
    revision =
    

    Related Articles