ERP Academy iDempiere Distribution Release Work Instructions

The purpose of this page is to describe the work instructions I use to release a new version of iDempiere.

Create VM for Combined Server and Development Environment

  1. Make sure you have enough room on your host hard drive. This is a space intensive process. You need at least 40 GB.
  2. Create the Virtual Machine (READ FIRST before starting!):
    1. When creating your virtual machine (VDI) for the very first time as part of wizard,
      1. use the following naming convention (with no spaces): vbox_id_idVersion_desktopVersion_ubuntuVersion_type_releaseDate (Example: vbox_id_62_ubuntu_1804_devenv_20200330.vdi)
      2. Give the virtual disk (VDI) 60GB of space
    2. Username: ubuntu
    3. Password: ubuntu
    4. Install openssh-server so that users can ssh into the server
    5. Increase the resolution to make configuration easier "xrandr -s 1440x900"
    6. Install using the chuboe installation script with default password of "Silly" and -D option to install the desktop.
    7. Copy Eclipse desktop.launcher file copied from ~/dev/ to ~ (note this is the launcher file - not the ~/dev/eclipse executable file). Included below for reference.
      1. [Desktop Entry] Encoding=UTF-8 Type=Application Name=eclipse Name[en_US]=eclipse Icon=/home/ubuntu/dev/eclipse/icon.xpm Exec=/home/ubuntu/dev/eclipse/eclipse -vmargs -Xmx2g Comment[en_US]=
    8. Right-click Eclipse desktop.launcher => properties => executable = Y
    9. Open Eclipse from desktop icon
    10. Make sure eclipse opens to the correct workspace
    11. Make sure eclipse opens with no files opened - especially the target file!!!!
    12. Make sure eclipse opens with project explorer fully minimized for all projects
    13. Make sure eclipse opens with no errors
    14. Make sure NO guest additions are installed
    15. Install the following packages:
      1. sudo apt install virtualbox-guest-utils virtualbox-guest-dkms #note: these do not install guest additions; however, they simply install the tools needed to install guest additions later.
    16. Configure to allow sudo without password
      1. echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
    17. Make sure resolution is set back to a reasonably small value using "xrandr -s 1024x768"
    18. Put a html link on the desktop labeled readme.html pointing to the relevant release instructions (example: Release 20180126). It is ok to have this page pre-created before it is published.
    19. Edit the ~/.bash_history to remove any unneeded lines.
    20. Make sure there are no personal artifacts (vpn, ssh, pem, aws, saved website passwords, etc...).
    21. Set firefox favorites in bookmark bar
      1. webui
      2. database:8083
    22. Create a clone of the finalized environment to ensure there are no snapshots. Note this will change your vdi name.
  3. Create variables for below commands (ACTION - UPDATE ME)
    1. ReleaseVBox=vbox_id_62_ubuntu_1804_devenv_20200330
    2. ReleaseVBoxFile=$ReleaseVBox.vdi
  4. cp ~/VirtualBox\ VMs/$ReleaseVBox/$ReleaseVBoxFile ~/Downloads/.
  5. cd ~/Downloads/
  6. mkdir vbox.$ReleaseVBoxFile; cd vbox.$ReleaseVBoxFile; mv ../$ReleaseVBoxFile .
  7. tar -cvzf $ReleaseVBoxFile.tar.gz $ReleaseVBoxFile
    1. Note: this will take about 4 minutes
  8. Create md5 checksum
    1. md5sum $ReleaseVBoxFile.tar.gz > $ReleaseVBoxFile.tar.gz.md5
  9. Upload the zipped file and md5 to amazon s3
    1. aws s3 cp ./ s3://ChuckBoecking/install/ --acl public-read --exclude "*" --include "$ReleaseVBoxFile.tar.gz*" --recursive
  10. Break the tar.gz file into pieces - do this in an ec2 instance so that you can download/upload from s3 much more quickly.
    1. #Create the following variable on the remote server: $ReleaseVBoxFile
    2. mkdir step1; cd step1
    3. #wget the previously uploaded files
      1. wget https://s3.amazonaws.com/ChuckBoecking/install/$ReleaseVBoxFile.tar.gz
      2. wget https://s3.amazonaws.com/ChuckBoecking/install/$ReleaseVBoxFile.tar.gz.md5
    4. mkdir split.$ReleaseVBoxFile
    5. split -b 512m $ReleaseVBoxFile.tar.gz split.$ReleaseVBoxFile/$ReleaseVBoxFile.tar.gz.split
    6. cd split.$ReleaseVBoxFile
    7. md5sum $ReleaseVBoxFile.tar.gz.split* > ../$ReleaseVBoxFile.tar.gz.split.md5
    8. mv ../$ReleaseVBoxFile.tar.gz.split.md5 .
  11. Copy .tar.gz.split files to aws using
    1. cd split.$ReleaseVBoxFile; aws s3 cp ./ s3://ChuckBoecking/install/ --acl public-read --exclude "*" --include "$ReleaseVBoxFile.tar.gz*" --recursive
  12. Test - download and test checksum one more time from ec2 server
    1. #finish user-facing work instructions and use below section to test all downloads and checksums execute successfully.
    2. cd ~
    3. mkdir step2; cd step2
    4. ... copy/paste commands from user-facing work instructions here to ensure they work as expected (both summary and split)
  13. Reference: google sheet to help create url for downloading split

Testing Considerations

Keep for Future Reference

Did not want to throw away:
  1. Create a new bitbucket branch representing the current most stable for that release. The datestamp is the currently released version (see ERP Academy => Releases section). Example: id4.1ubuntu1604Rel20170530
  2. Create a new bitbucket branch to test updates. Example: 20180126_51_test. Note that all branches that begin with a date are transient.
  3. Update code in new branch and make changes
    1. If you are updating iDempiere but keeping the ubuntu version, change the following
      1. chuboe.properties. Examples below:
        1. CHUBOE_PROP_IDEMPIERE_VERSION="5.1"
        2. CHUBOE_PROP_IDEMPIERE_RELEASE="20180126"
        3. CHUBOE_PROP_JENKINS_CURRENT_CHANGESET="12048"
      2. chuboe_jenkins_install_configure.sh - update to reflect how to successfully build in jenkins (see below section for details)
    2. If you are updating ubuntu
      1. ... will document this when it next happens
  4. Connect to jenkins.chuckboecking.com
    1. See if there is enough disk space: df -h
    2. Add more drive if needed (link to resize if needed)
    3. Perform:
      1. cd /opt/source/idempiere_source/idempiere
      2. sudo hg pull
    4. See current branches with: hg branches
    5. Update to the desired branch and issue the next command to see the current revision. Note: You will use this number later in jenkins.
      1. hg identify --num
  5. Test to make sure the build will success.
    1. Copy the current Jenkins project into a new project with an updated date stamp.
    2. Look in jenkins.idempiere.com:8080 to see the current community build.
    3. Update buckminster or any other tool if needed. (install buckminster)
      1. Reference: iDempiere headless build instructions
    4. Update the newly created project with version (i.e. 4.1 to 5.1 if needed)
    5. Update jenkins: Configure page => Source Code Management field => Revision from above
    6. Try to build the project.
  6. Review the list of items that have been added to iDempiere
    1. Review Google Groups Forum for recently reported issues
    2. Review https://idempiere.atlassian.net/
      1. recently updated: "ORDER BY Updated DESC"
      2. recently closed: "status = Closed ORDER BY Updated DESC"
      3. Common Status: Open, Closed, Resolved, Peer Review Queue
    3. Review commit history from the mercurial command line (be sure to update the rev to one past the current released rev)
      1. Navigate to the Jenkins project repository /var/lib/jenkins/workspace/[yourprojectname]
      2. sudo -u jenkins hg log --rev "11589:11673" --template "{branch} | {rev} | {date|isodatesec} | {author|user} | {desc|strip|firstline}\n" | sort -r | grep IDEMPIERE-
        1. where 11589 was the revision after the last release and 11673 is the current release
        2. Reference: https://stackoverflow.com/questions/19640301/hg-log-between-two-changesets-of-a-branch
      3. To view the current release rev
        1. Go to jenkins.chuckboecking.com
        2. To to the current released project
        3. In the build history, click on the desired (i.e. most recent build)
        4. Click on Changes in the left menu
        5. Scroll down until you see the first changeset box. Note the highest changeset number
      4. Copy the results of the above hg log statement into an email. Search and release "IDEMPIERE-" with "https://idempiere.atlassian.net/browse/IDEMPIERE-" to make them hyper links. Remove any trailing colons if exists.
        1. vim command --    :%s#IDEMPIERE-#https://idempiere.atlassian.net/browse/IDEMPIERE-#g
      5. Make double spaced so that when inserted into wordpress that it can easily be bullitized
        1. vim command --    :g/^/pu _
      6. Convert http://... text to hyperlinks and paste into WordPress => text (not visual) tab
        1. tool to convert text to html
    4. Look for anything that might cause issues or instability in the current release
  7. Create a new Release page in ERP Academy => Release section.