User:Tspc
Tony's User Boxes
|
Introduction[edit]
- My name is Tony Snook and I am from Melbourne, Australia.
- I can be contacted at tspc at dodo.com.au
- For the last 18 years I have been employed as the Systems/IT Manager for a company that manufactures a range of scientific laboratory equipment. Prior to this I worked in various technical support roles and as a C Programmer, writing software for embedded systems, Windows and DOS.
- Since 2007 I have been an active contributor to Adempiere, reporting bugs, committing bug fixes/solutions, writing wiki documentation and participating in forum discussions. Some of my contributions include: Fixing several major bugs in the early Libero Manufacturing code, managing migration script numbering between libero branch and trunk, responsible for merging fixes in release branch to trunk and the conversion of our Subversion repositories to Mercurial.
- My involvement with Adempiere began as a hobby and some self-education. In 2011 the company I currently work for decided to proceed with the implementation of ADempiere, to replace our legacy ERP system, and we went live in May. The installation is based on the code from ADempiere GLOBALQSS 361, maintained by Carlos Ruiz with customizations provided by Adaxa Pty Ltd, Australia.
Mercurial DVCS[edit]
In late 2009 a group of developers began discussing some of the issues we were having with the current version control system, Subversion (SVN). A discussion thread was established to see what other developers in the community thought about the idea of moving to a distributed version control system (DVCS). Link to the complete discussion thread: DVCS or SVN - that's the question
Following on from the initial discussions and after getting consensus amongst some of the major developers I put forward a proposal to the community recommending that we switch to the Mercurial distributed version control system: Switch to Mercurial DVCS?
From these discussions it was clear that there were a few major requirements that needed to be met, by whatever version control system we chose.
- An open source solution.
- A distributed version control system.
- Have a good set of tools available for the Linux, Microsoft Windows and Apple Macintosh operating systems, including a plug-in for the Eclipse Integrated Development Environment used by most developers.
- The ability to convert our current SVN repository to the new version control system.
Mercurial met most of the requirements, but was not able to completely convert our SVN repository, as our repository had a non-standard structure. However with some minor changes to the Python code, I was able to get the Mercurial SVN Convert software to successfully do the conversion. The following link is an outline of the steps taken to accomplish this: Converting from SVN to Mercurial
Once we had been able to demonstrate that the history of the project could be converted to Mercurial and we had community consensus on the move, I began assisting other developers in how to best use the new system and provided documents like the following: Mercurial Test Environment
The final switch over to Mercurial was announced here: Switch over to Mercurial
Notes[edit]
Steps to Release HowTo[edit]
This is a technical "HowTo" guide outlining the steps involved in producing a new release of the software: Steps to Release HowTo
Applying Migration Scripts[edit]
The appears to be a number of issues with the current methods of applying migration scripts.
- Current methods
- Manually applying each script using tools like
- (for Oracle) sqlplus, toad, sqldeveloper, ....
- (for PostgreSQL) psql, pgAdmin, ....
- Using the ant build scripts which make use of sqlplus for Oracle and psql for PostgreSQL
- Manually applying each script using tools like
Problems Include:
- large number of migration scripts and their size
makes it difficult to notice that an error has occured
- error handling varies depending on the tool and database used
SQLPLUS does not return an error code for any SQLPLUS (SP2-xxx) errors
- rolling back after errors
need to ensure that only completely successful scripts are applied and the partially completed script is rolled back.
- reporting errors
person applying the script must be notified that an error has occurred
- keeping track of which scripts have been applied
records need to be kept of which scripts have been applied to the current installation
- how migration scripts are corrected
-correcting a script once it has been committed to trunk can cause problems if someone has already applied the script -in some cases it is necessary to apply a script to undo the change and then apply the correct script
PL/Java[edit]
PL/Java Info (Tested on Fedora 7 (Linux), and Postgresql 8.2.6, PL/Java 1.3.0)
Recent security releases, of Postgresql, have altered the API for SetUserId to include an additional parameter indicating if we're in a security definer context.
- If you are running any of the following postgresql releases, then you need to upgrade PL/Java
- 8.0.x where x >= 15
- 8.1.x where x >= 11
- 8.2.x where x >= 6 (I needed it and I am running 8.2.5-11) Joseph.brower 11:52, 18 January 2008 (EST)
- 8.3.x where x >= 0
- Goto PL/Java CVS Information and check out the latest CVS of PL/Java.
- Once you have the source, simply build the source with the 'make' comand.
- If you are upgrading from pljava 1.3.0, then this is a minor upgrade.
- I simply copied the binaries over the top of the existing installation.
cp /build/pljava.jar /usr/var/lib/pljava/ cp /build/deployer.jar /usr/var/lib/pljava/ cp /build/objs/pljava.so /usr/var/lib/pljava/
- su to postgres and restart postgresql
su - postgres pg_ctl stop pg_ctl start exit
- Your PL/Java should now be updated.
PL/Java Problems
- If you are having problems with PL/Java, please check the following:
Your postgresql.conf should contain the following lines: dynamic_library_path = '\$libdir:/usr/lib/pljava' custom_variable_classes = 'pljava' pljava.classpath = '/usr/lib/pljava/pljava.jar' Where /usr/lib/pljava is the path to your PL/Java installation (on some systems /opt/pljava ) and contains the following files: deploy.jar install.sql pljava.jar pljava.so uninstall.sql
PL/Java Links
- More information on installing PL/Java can be found at the PL/Java website: PL/Java Installation Guide
- Binary and source releases can be downloaded from: PL/Java Project Filelists
Adempiere-Libero Branch[edit]
Tasks, Issues And Observations
- Libero Manufacturing installation documentation out of date and needs to be revised.
- Wiki needs to be updated to reflect new structure. Libero is now an extension.
- Libero Manufacturing Manual is out of date and needs to be revised.
Upgrading Postgresql 8.1 to 8.3 on CentOS 5.x[edit]
- Relevant information on this topic
- First, download the latest CentOS yum setup rpm:
wget http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-6.noarch.rpm
- Install the rpm package:
chmod +x pgdg-centos-8.3-6.noarch.rpm rpm -Uvh pgdg-centos-8.3-6.noarch.rpm
- Edit /etc/yum.repos.d/CentOS-Base.repo:
- add a line to exclude postgres related packages in both the base and updates sections.
- You should end up with something like this:
[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 exclude=postgresql*
#released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 exclude=postgresql*
- Dump all databases using the clean option:
pg_dumpall -U postgres -c > /var/backup/postgres/postgres_all.sql Note: Also make sure you have an ADempiere backup, just in case. (ExpDat.jar)
- Update server to latest version:
yum update
- Stop the server and move your old data directory:
service postgresql stop mv /var/lib/pgsql/data /var/lib/pgsql/data_8.1
- Init a new postgres 8.3 database cluster:
service postgresql initdb
- Update the configuration settings as necessary:
- /var/lib/pgsql/postgresql.conf
- /var/lib/pgsql/data/pg_hba.conf
- Just to be on the safe side, make sure the permissions on the config files are correct (should be owned by user postgres):
chown postgres:postgres /var/lib/pgsql/data/*.conf
- Start the database cluster:
service postgresql start
- Check that the connection to the server is working (and fix your config if it isn't):
psql -U postgres
- Restore the dump of all databases:
psql -U postgres < /var/backup/postgres/postgres_all.sql
Adempiere Related Interests[edit]
- Manufacturing Module (Victor's contribution)
- Data Transformation (Pentaho/Kettle)
- Bazaar / Community
- Mercurial DVCS
Interesting Links[edit]
Database Independence
Examining the Logic behind Database Independence
10 golden rules for running an open source project