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
- Make sure you have enough room on your host hard drive. This is a space intensive process. You need at least 40 GB.
- Create the Virtual Machine (READ FIRST before starting!):
- When creating your virtual machine (VDI) for the very first time as part of wizard,
- use the following naming convention (with no spaces): vbox_id_idVersion_desktopVersion_ubuntuVersion_type_releaseDate (Example: vbox_id_62_ubuntu_1804_devenv_20200330.vdi)
- Give the virtual disk (VDI) 60GB of space
- Username: ubuntu
- Password: ubuntu
- Install openssh-server so that users can ssh into the server
- Increase the resolution to make configuration easier "xrandr -s 1440x900"
- Install using the chuboe installation script with default password of "Silly" and -D option to install the desktop.
- 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.
- [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]=
- Right-click Eclipse desktop.launcher => properties => executable = Y
- Open Eclipse from desktop icon
- Make sure eclipse opens to the correct workspace
- Make sure eclipse opens with no files opened - especially the target file!!!!
- Make sure eclipse opens with project explorer fully minimized for all projects
- Make sure eclipse opens with no errors
- Make sure NO guest additions are installed
- Install the following packages:
- 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.
- Configure to allow sudo without password
- echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
- Make sure resolution is set back to a reasonably small value using "xrandr -s 1024x768"
- 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.
- Edit the ~/.bash_history to remove any unneeded lines.
- Make sure there are no personal artifacts (vpn, ssh, pem, aws, saved website passwords, etc...).
- Set firefox favorites in bookmark bar
- webui
- database:8083
- Create a clone of the finalized environment to ensure there are no snapshots. Note this will change your vdi name.
- Create variables for below commands (ACTION - UPDATE ME)
- ReleaseVBox=vbox_id_62_ubuntu_1804_devenv_20200330
- ReleaseVBoxFile=$ReleaseVBox.vdi
- cp ~/VirtualBox\ VMs/$ReleaseVBox/$ReleaseVBoxFile ~/Downloads/.
- cd ~/Downloads/
- mkdir vbox.$ReleaseVBoxFile; cd vbox.$ReleaseVBoxFile; mv ../$ReleaseVBoxFile .
- tar -cvzf $ReleaseVBoxFile.tar.gz $ReleaseVBoxFile
- Note: this will take about 4 minutes
- Create md5 checksum
- md5sum $ReleaseVBoxFile.tar.gz > $ReleaseVBoxFile.tar.gz.md5
- Upload the zipped file and md5 to amazon s3
- aws s3 cp ./ s3://ChuckBoecking/install/ --acl public-read --exclude "*" --include "$ReleaseVBoxFile.tar.gz*" --recursive
- Break the tar.gz file into pieces - do this in an ec2 instance so that you can download/upload from s3 much more quickly.
- #Create the following variable on the remote server: $ReleaseVBoxFile
- mkdir step1; cd step1
- #wget the previously uploaded files
- wget https://s3.amazonaws.com/ChuckBoecking/install/$ReleaseVBoxFile.tar.gz
- wget https://s3.amazonaws.com/ChuckBoecking/install/$ReleaseVBoxFile.tar.gz.md5
- mkdir split.$ReleaseVBoxFile
- split -b 512m $ReleaseVBoxFile.tar.gz split.$ReleaseVBoxFile/$ReleaseVBoxFile.tar.gz.split
- cd split.$ReleaseVBoxFile
- md5sum $ReleaseVBoxFile.tar.gz.split* > ../$ReleaseVBoxFile.tar.gz.split.md5
- mv ../$ReleaseVBoxFile.tar.gz.split.md5 .
- Copy .tar.gz.split files to aws using
- cd split.$ReleaseVBoxFile; aws s3 cp ./ s3://ChuckBoecking/install/ --acl public-read --exclude "*" --include "$ReleaseVBoxFile.tar.gz*" --recursive
- Test - download and test checksum one more time from ec2 server
- #finish user-facing work instructions and use below section to test all downloads and checksums execute successfully.
- cd ~
- mkdir step2; cd step2
- ... copy/paste commands from user-facing work instructions here to ensure they work as expected (both summary and split)
- Reference: google sheet to help create url for downloading split
Testing Considerations
Keep for Future Reference
Did not want to throw away:
- 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
- Create a new bitbucket branch to test updates. Example: 20180126_51_test. Note that all branches that begin with a date are transient.
- Update code in new branch and make changes
- If you are updating iDempiere but keeping the ubuntu version, change the following
- chuboe.properties. Examples below:
- CHUBOE_PROP_IDEMPIERE_VERSION="5.1"
- CHUBOE_PROP_IDEMPIERE_RELEASE="20180126"
- CHUBOE_PROP_JENKINS_CURRENT_CHANGESET="12048"
- chuboe_jenkins_install_configure.sh - update to reflect how to successfully build in jenkins (see below section for details)
- If you are updating ubuntu
- ... will document this when it next happens
- Connect to jenkins.chuckboecking.com
- See if there is enough disk space: df -h
- Add more drive if needed (link to resize if needed)
- Perform:
- cd /opt/source/idempiere_source/idempiere
- sudo hg pull
- See current branches with: hg branches
- Update to the desired branch and issue the next command to see the current revision. Note: You will use this number later in jenkins.
- hg identify --num
- Test to make sure the build will success.
- Copy the current Jenkins project into a new project with an updated date stamp.
- Look in jenkins.idempiere.com:8080 to see the current community build.
- Update buckminster or any other tool if needed. (install buckminster)
- Reference: iDempiere headless build instructions
- Update the newly created project with version (i.e. 4.1 to 5.1 if needed)
- Update jenkins: Configure page => Source Code Management field => Revision from above
- Try to build the project.
- Review the list of items that have been added to iDempiere
- Review Google Groups Forum for recently reported issues
- Review https://idempiere.atlassian.net/
- recently updated: "ORDER BY Updated DESC"
- recently closed: "status = Closed ORDER BY Updated DESC"
- Common Status: Open, Closed, Resolved, Peer Review Queue
- Review commit history from the mercurial command line (be sure to update the rev to one past the current released rev)
- Navigate to the Jenkins project repository /var/lib/jenkins/workspace/[yourprojectname]
- sudo -u jenkins hg log --rev "11589:11673" --template "{branch} | {rev} | {date|isodatesec} | {author|user} | {desc|strip|firstline}\n" | sort -r | grep IDEMPIERE-
- where 11589 was the revision after the last release and 11673 is the current release
- Reference: https://stackoverflow.com/questions/19640301/hg-log-between-two-changesets-of-a-branch
- To view the current release rev
- Go to jenkins.chuckboecking.com
- To to the current released project
- In the build history, click on the desired (i.e. most recent build)
- Click on Changes in the left menu
- Scroll down until you see the first changeset box. Note the highest changeset number
- 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.
- vim command -- :%s#IDEMPIERE-#https://idempiere.atlassian.net/browse/IDEMPIERE-#g
- Make double spaced so that when inserted into wordpress that it can easily be bullitized
- vim command -- :g/^/pu _
- Convert http://... text to hyperlinks and paste into WordPress => text (not visual) tab
- tool to convert text to html
- Look for anything that might cause issues or instability in the current release
- Create a new Release page in ERP Academy => Release section.