Apache OFBiz Technical documentation.2009Apache Foundation
I was reading the book in development from Norman Walsh called DocBook 5.0: The Definitive Guide
and found that a book can have a dedication. My first thought was there is only one man to whom this book can be dedicated. Without him I would not have been writing it.
Sometimes i talk to other people about my dinners with David Jones in Pucket, Thailand which were very revealing to me. At a relative young age David designed and developed with Andy Zenesky
the cornerstones of the OFBiz system called entity engine and recognized that in 2001 SOA (System Oriented Architecture) would be the future.
So, David, thank you very much spending your efforts creating this excellent system.
Introduction.
Welcome to Apache OFBiz, the ready to use open source ERP system. Let me first say if you downloaded
the system for the first time it will be very overwhelming because the system is pretty big what is actually pretty normal for an ERP system
because of its size.
This document is describing the technical aspects of the system. How to install it, how to load the data and how to make the system available to the Internet.
This is described pretty well in the 'production setup guide' in the next section. If you looking how to setup the system from a user point of view then better
have a look at the Apache OFBiz user guide.
The production setup guide.
An excellent guide to configure the system in a production environment, read the document at the OFBiz documentation site
The quick setup of an Ubuntu/Debian Linux with Postgresql Apache OFBiz server
Ubuntu/Debian is certainly not the only distribution which is suitable for OFBiz. In general all Linux distributions can be used.
The OFBiz system will also run on Windows, however this is not preferred and much less experience is available in the OFBiz communiy.
The preferred data base is Postgresql although most databases will do.
Upgrade Linux to Ubuntu/Debian remotely using Grub menu
If you have a version of Linux running already on your server which using the GRUB menu, it is possible to upgrade to Debian/Ubuntu
without even touching the server physically. With the method below the Debian installer is loaded into a Ram disk from where it can
reformat and re-partition the harddisk and install the system.
Practice this first on a local server, because if after the reboot the server is unreachable you have to ask somebody at the datacenter to manually reboot the system.
If you have a proper Linux installed go to the Postgres installation.
Get the OS kernel and the related initrd.gz
Make sure you server can handle 64bit if you take that version, if not sure take the 32bit version.
Example url for 64bit Ubuntu: http://us.archive.ubuntu.com/ubuntu/dists/hardy/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux for the kernel and
http://us.archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz for the initrd.gz file
If not sure take the 32bit version:
Example url for 32bit Ubuntu: http://us.archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/ubuntu-installer/amd64/linux for the kernel and
http://us.archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/initrd.gz for the initrd.gz file
Uncompress the initrd.gz: gzip -dc ../initrd.gz | cpio -idEdit the preseed.cfg file inside the initrd.gz file
The file I used had the following content:
d-i debconf/priority select critical
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i console-setup/layoutcode string us
d-i auto-install/enabled boolean true
d-i netcfg/choose_interface select eth0
d-i netcfg/disable_dhcp boolean true
d-i netcfg/get_nameservers string x.x.x.x <--- EDIT! (max 3)
d-i netcfg/get_ipaddress string x.x.x.x <--- EDIT!
d-i netcfg/get_netmask string 255.255.255.0 <--- EDIT!
d-i netcfg/get_gateway string x.x.x.x <--- EDIT!
d-i netcfg/confirm_static boolean true
d-i netcfg/get_hostname string servername <--- EDIT!
d-i netcfg/get_domain string yourdomain.com <--- EDIT!
d-i network-console/password password password <--- EDIT!
d-i network-console/password-again password password <--- EDIT!
d-i preseed/early_command string anna-install network-console
You can find the ip addresses in the current Linux normally in the /etc/network/interfaces file.
Create the new Archive:
find ./ | cpio -H newc -o > initrd-preseed
gzip initrd-preseed
Copy the Kernel and the new initrd.gz to the server
Copy these to files to the /boot/ directory on the server.
If using LiLo
You have to download the vmlinuz image and put that in the /boot directory under the name vmlinuzNew
If Grub is used: Edit the /boot/grub/menu.lst file on the server:
# menu entry before the first:(for root, look at the other menu items)
title Ubuntu Install
root xxxxx
kernel /linux
initrd /initrd-preseed.gz
savedefault 1
If Lilo is used edit the /etc/lilo.conf file on the server:
image=/boot/vmlinuzNew
label="newUbuntu"
initrd=/boot/init-preseed.gz
Reboot the serverand hopfully after some time you can login with SSH and using the username "installer" and the password you specified in the preseed fileFrom that point you can configure the server and repartition the harddiskInstall Subversionuse the command (as root) apt-get install subversionInstall Apache using proxy AJP to talk to OFBizUse the command (as root): apt-get install apache2Make symbolic links from mods-available to mods-enabled for ssl.config, ssl.load, proxy.load, proxy_ajp.load and proxy.config. Modify proxy.config and replace "Deny from all" with "Allow from all"Install Java SDKUse the command (as root): apt-get install sun-java6-jdkInstall PostGresqlUse the command (as root): apt-get install postgresql
Then logon as root, and su to the user "postgres" and issue the command: createuser "ofbiz"
Install OfbizStart ofbiz.....and look for he result in your browser.....The Apache OFBiz documentation systemOverview.
The OFBiz documentation system consist out of a number of DocBook xml
files. In general the files are stored within the subject
component either in the 'documents' or data/helpdata
directories.
The 'master' document is stored in the file
applications/commonext/documents/ApacheOfbiz.xml. The
docbook schemas are stored in the applications/content/dtd
directory and the stylesheets are
stored in the applications/content/templates/docbook directory.
the definition of the content and dataresource records can be found in
the application/content/data/ContentType.xml file at the
bottom. They are in this file because the documentation and
helpfile
are considered 'seed' data: essential for the operation of OFBiz.
If you are looking for docbook files format examples, please
look at the following files:
The master document at:
applications/commonext/documents/ApacheOfbiz.xml
An example for a chapter of a component at:
applications/accounting/documents/Accounting.xml
An example of a help screen:
applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml
An example of content creation:
applications/accounting/data/AccountingHelpData.xml
Contributing a new help screen, a few steps.
There is a difference between portlets and 'normal' screens. If a
page contains a portlet, the general help of the myportal component is shown with
at the botton a list of the portlets used at that page. Help can be obtained by clicking on
the relavant portlet.
Normal pages.
So if you would like to create a new help menu for a certain
screen, you need to do the following:
In the helplink.ftl un-comment the
${helpTopic} variable so it will appear at the
top right hand of your screenin the specific component data/helpData create
the HELP_${helpTopic}.xml file. you can find an
example in the HELP_ACCOUNTING_main.xml file.Update/create the
data/${componentName}HelpData.xml, an example
can be found in the AccountingHelpData.xml. If
new make also an entry in the
ofbiz-component.xmlLoad the HelpDataFile and the file should
show up when you click on the help button.
Submit the change to the svn repository or
create a diff file and attach it to a jira
issue.
If the help text is usefull in the ofbiz document include it in the files in the document directory.
Contributing a new Portlet) help screen.
Portlets are normally defined and explained in the ${component name}PortletData.xml files. An example
of an portlet with an existing help screen have a look at WorkEffortPortletData.xml
The content records for the help file is defined together with the portlet definition and the axual help
file is store in the related component /data/helpdata directory wit the nam HELP_PORTLET_${portletId}.xml.
Internationalization of the help system
Because the help system is making use of the content component, internationalization of the help files is very easy because
it is a basic function of the content component. If you want to make a translation of an existing help file, make a copy in the same directory
and make it unique by attaching the "_languageCode" at he end.
Create, as also was done for the english version a dataresource and content record in the data/${componentName}HelpData.xml file.
Then create an ContentAssoc record in data/${componentName}HelpData.xml file to associate this new file with the english file with the type
ALTERNATE_LOCALE. Please find below an example from the ContentHelpData.xml for a Dutch version of the root help file.
<!-- how to create alternative locales -->
<DataResource dataResourceId="HELP_ROOT_NL" localeString="nl" dataResourceTypeId="OFBIZ_FILE"
objectInfo="applications/content/data/helpdata/HELP_ROOT_NL.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y" />
<Content contentId="HELP_ROOT_NL" contentTypeId="DOCUMENT" templateDataResourceId="HELP_TEMPL"
dataResourceId="HELP_ROOT_NL" localeString="nl" statusId="CTNT_IN_PROGRESS"
contentName="Help system root in dutch" mimeTypeId="text/html"/>
<ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_ROOT_NL"
contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2006-01-12 01:01:01"/>
The switching between locales is from then on completely automatic.
Revisions Requiring Data Migration.
A List of migration actions you need to perform can be found at the OFBiz documentation site