Installing OpenERP 7.0 using BitNami OpenERP 7.0 Stack

Fred Blauer recommended I take a look at OpenERP based on my described use case of PLM, Manufacturing, and Inventory Management.

I have been casually following OpenERP since v4.x (it was called TinyERP then), but had never configured a server – primarily because OpenERP used separate server and client, and I wanted a pure server system. However, I was pleasantly surprised when I took a look at the current OpenERP 7.0. OpenERP is now a pure web application, and BitNami has a free OpenERP Stack, including an Ubuntu-based virtual machine (in VMware format but also supported by VirtualBox). I’ll get the vm running first on my Win7 laptop with VirtualBox, and describe my experiences using OpenERP in a future post.

Create server

  • Download BitNami OpenERP Stack virtual machine (vm) to a Windows machine on my local network.
  • Using VirtualBox, create a new vm with characteristics: Linux/Ubuntu 64b OS with 1.5GB RAM, but do not configure a boot drive. I originally tried the suggested 512MB RAM, but the system was thrashing (as seen by memory use in ‘top’), with very poor performance.
  • Extract the files from the downloaded vm zip file into the directory VirtualBox created for the new vm.
  • Configure the new vm using VirtualBox Manager.
    • Network: Bridged (to have access from other machines in my network).
    • Storage: bitnami-openerp-7.0-3-ubuntu-12.04.vmdk (included in the BitNami vm download and copied to the vm directory).
  • Boot the new vm.

After booting, the console will display the server IP address and other helpful information (the IP address shown will likely differ in your environment):

*** Welcome to the BitNami OpenERP Stack ***
*** Built using Ubuntu 12.04 - Kernel 3.2.0-31-virtual (tty1). ***
*** You can access the application at 192.168.10.124 ***
*** The default username and password is 'user' and 'bitnami'. ***
*** Please refer to http://wiki.bitnami.com/Virtual_Machines for details. ***

******************************************************************************
*  To access the console, please use user 'bitnami' and password 'bitnami'.  *
*                                                                            *
*                                 WARNING                                    *
*  For security reasons, upon your first login, you will be prompted to      *
*  change the default password.                                              *
******************************************************************************

linux login:

If you copied the system drive for the vm from one host computer to another, the vm may report “The machine could not configure the network interface” after booting. This will occur if VIrtualBox provides a different Ethernet MAC ID on the second computer than on the first, and Ubunto creates a new Ethernet interface for a new interface MAC ID but is still configured for the interface on the first computer. Got it? “ifconfig -a” shows the Ethernet devices identified during boot, and “dmesg | grep eth” will show the network interface renaming. In this case, edit /etc/network/interfaces to specify the appropriate network interface (e.g. eth1 instead of eth0). See: http://www.howtogeek.com/168143/fixing-failed-to-bring-up-eth0-in-ubuntu-virtual-machine/ and http://gist.github.com/percursoaleatorio/6881040.

Login to the VirtualBox terminal using the provided username/password (bitnami/bitnami), and set a new password when prompted e.g. appleton (i.e. bitnami/appleton).

Enable ssh login

  • Configure sshd for remote login and scp file transfer.
$ sudo cp /etc/init/ssh.conf.back /etc/init/ssh.conf
$ sudo start ssh

PostgreSQL

My initial goal was to use pgadmin3 for viewing and managing PostgreSQL databases on the vm from my laptop.

  • Edit postgresql.conf so PostgreSQL will listen on all IP addresses.
$ sudo vi /opt/bitnami/postgresql/data/postgresql.conf
...
listen_addresses = '*'                  # what IP address(es) to listen on;
...
  • Restart PostgreSQL. I tried using pg_ctl but it wouldn’t initially run because of missing libraries. I solved this by adding the BitNami common libraries and the PostgreSQL libraries to LD_LIBRARY_PATH in ~/.bashrc (and logged out and back in again).
$ vi ~/.bashrc
...
# for BitNami Stack PostgreSQL
LD_LIBRARY_PATH=/opt/bitnami/postgresql/lib:/opt/bitnami/common/lib
export LD_LIBRARY_PATH
...

However, this just led to other problems – the user to run pg_ctl as, whether the unset environment variable PGDATA is an issue, etc. I’m sure this isn’t how BitNami intends this to work (fwiw, /opt/bitnami/ctlscript.sh seems to be the intended control point for everything), but

Finally I just rebooted the vm, but pgadmin3 still wouldn’t connect. Perhaps it’s a firewall problem…

However, the PostgreSQL psql cli utility can be used (the password for the bitnami_openerp database is ‘bitnami’):

bitnami@linux:~$ psql bitnami_openerp
Password:
psql.bin (9.2.4)
Type "help" for help.

bitnami_openerp=# help
You are using psql, the command-line interface to PostgreSQL.
Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit
bitnami_openerp=#

For more information on psql, see the PostgreSQL psql documentation.

Configure OpenERP

The BitNami OpenERP stack vm includes a database called bitnami_openerp (Administrator username/password: user/bitnami). I’m going to create a new database from scratch and install the basic modules needed to support Maestro workflows.

Access the vm from a workstation browser. The IP address for the vm is shown in the vm terminal window after booting (or after logging out).

  • Create a new database (company). The PostgreSQL master (super-administrator) password is “bitnami”, and I’ll use “appleton” for the new database password. OpenERP will create a new database with an administrative user (username/password: admin/appleton) and a demo user (username/password: demo/demo), and will login to the database as the administrator.

You will likely see a “timezone mismatch” warning in the top bar of the window. This is because the timezone set in your user preferences (which was configured by BitNami when they created the OpenERP stack) is different from the timezone your browser believes you are in (which comes from your workstation). You can access your user preferences by clicking the drop-down menu beside your username in the top bar of the window.

Install the following OpenERP applications using the Modules > Apps menu:

        • MRP (Manufacturing Orders, Bill of Materials, Routing)
        • Project Management (Projects, Tasks)
        • Issue Tracker (Support, Bug Tracker, Helpdesk)
        • Warehouse Management (Inventory, Logistic, Storage)

You will be prompted for your OpenERP user id and password (free to register) to start, and for any required configurations as each application is installed. Applications often have dependency applications, which will be automatically installed.

If you want to experiment with pre-defined demo data, select Manage Databases in the login screen and create a new database selecting “Install Demo Data”. The new database will be configured with a basic set of applications and demo data.

Still to do

Now that I’ve got OpenERP installed, the top items on my To Do list are:

  • Learn how OpenERP works! Create a couple users, import Maestro bills of materials, manufacture some serialized items using un-controlled, batch controlled and serialized raw material, etc.
  • Learn more about host OpenERP and Python web applications in general using WSGI by examining the BitNami OpenERP Stack (/opt/bitnami/apache2/conf/httpd.conf includes a WSGI reference).
  • Install OpenERP on FreeBSD. As of 2014-03-20, there is a binary package available for OpenERP 7.0, but it will still take time to understand how to make it usable.

Related information

For more information on OpenERP, a great reference is the OpenERP Book.

 

Updated since first posting 2013-07-22.

4 Replies to “Installing OpenERP 7.0 using BitNami OpenERP 7.0 Stack”

  1. On a Windows machine is very simple to install OpenERP: download openerp pack all-in-one and and then “next” -> “next”…you know, like any Windows application namelly simple…. On the other hand, with virtual machine is more complicated… I try to use virtual machine on Mac OS X to play with OpenERP, but something is wrong..Do not work… On Mac OS X the installation of OpenERP is almost impossible..

  2. Hello,
    The timezone mismatch has nothing to do with the server’s timezone or location. It is a mismatch between your user’s preference timezone and your browser timezone. If you want to get rid of the notice, you need both of these to match. You can click on the notice for more information.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.