Freezing a buildout

To ease deployment, it is possible to use some advanced commands. The freeze-to option can be used to generate a buildout configuration file that freezes the revisions of Odoo and all the addons:

$ bin/buildout -c prod.cfg -o odoo:freeze-to=frozen-prod.cfg  

You can then run buildout with the frozen-prod.cfg file to get the exact same versions of the files.

You can also extract the source code to a separate directory, with the extract-downloads-to option:

$ bin/buildout -c frozen-prod.cfg  -o odoo:extract-downloads-to=../production  

The directory production now contains a release.cfg file, and a parts/ directory with the source code (but not the git history). If the target server is running the same version of Linux as the server you are working on, you can deploy the production environment without compiling any dependency by performing the following steps:

  1. Copy the required file to the production/ directory:
    $ cp -r develop-eggs eggs buildout.cfg prod.cfg bootstrap.py 
    ../production
  1. Make an archive of that:
    $ cd ..
    $ tar cjf production-1.0.tar.bz2
  1. Copy that archive on the production server using a suitable procedure (USB key or rsync, for instance).
  2. On the production server, unpack the archive and install the version with the following:
    $ tar xf production-1.0.tar.bz2
    $ cd production
    $ virtualenv sandbox --no-setuptools 
    $ sandbox/bin/python bootstrap.py
    $ bin/buildout -c release.cfg  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.65.247