tree: 69bec2131d5748ef97d4866c3db0bf0336f12cf1 [path history] [tgz]
  1. Nicolas/
  2. patch/
  3. site-enabled3/
  4. .nanorc
  5. .selected_editor
  6. all-manual-nicely.sh
  7. all-manual.sh
  8. check-svn-update.sh
  9. FrameworkIntro_3_ArtRefOverview.mov
  10. FrameworkIntro_4_ExampleAppOverview.mov
  11. FrameworkIntro_5_EntityDefs.mov
  12. FrameworkIntro_6_ServiceDefSmImpl.mov
  13. FrameworkIntro_7_UiReqVwScrFrm.mov
  14. FrameworkIntro_8_ArtRefWithDetails.mov
  15. FrameworkIntro_9_SomeSimpleChanges.mov
  16. next-manual-nicely.sh
  17. next-manual.sh
  18. ofbizDemo.crontab
  19. README.md
  20. RUN-DEMOS-AS-ofbizDemo-USER-ONLY-NOT-ROOT
  21. stable-manual-nicely.sh
  22. stable-manual.sh
  23. trunk-manual-nicely.sh
  24. trunk-manual.sh
  25. trunk.sh
demo-backup/README.md

General description

Three instances of OFBiz run on the OFBiz demo VM at https://ofbiz-vm1.apache.org.

  • trunk: the trunk version
  • stable: the last stable version (currently 18.12)
  • next: the next stable version (currently 22.01)

This is the 3rd instance of VM we use hence the 3 in its domain name. The root of https://ofbiz-vm1.apache.org is the so called bigfiles directory which is actually at /var/www/ofbiz/big-files.

We own 3 Apache sub domains

The Puppet configuration is at https://github.com/apache/infrastructure-p6/blob/production/data/nodes/ofbiz-vm1.apache.org.yaml It‘s currently impossible to directly modify, it’s a private Github repo. Just create an Infra Jira asking for the wanted change...and be patient ;)

Actions on demos

SSH to ofbiz-vm1.apache.org server (a VM actualy), then follow the below procedure. You will need to use OTP (One Time Password). For documentation on how to use OPIE (One time Passwords In Everything), see this page.

Note: Only run the ofbiz demos using the ‘ofbizDemo’ user, never run as root.

You need to be registered as a sudoer (ask Infra).

Then sudo to the ofbizDemo user:

sudo -s -u ofbizDemo -H

Sudo uses OTP. Use a tool like https://selfserve.apache.org/otp-md5.html to generate the OTP
You can then start/stop as required.

To check if the demos are being run as the ofbizDemo user:

ps aux | grep ofbizDemo

The first column on the left tell you the username the demo is
being run as - it should say ofbizDemo (UID).

Type 'exit' to exit the ofbizDemo user and return to your username.

Also note that the demos are usually updated and started/stopped automatically using the check-svn-update.sh script in this directory. It is run by an ofbizDemo cron job every 24 hours at 3 AM. You should therefore only need to start/stop manually if there is a problem.

Upgrade stable and next demos

You need first to create a branchAA.mm directory under the ofbizDemo directory and to clone the related releaseAA.mm in this new directory. Then to copy and apply the patches contained in the next-manual.sh and stable-manual.sh files, read the comments in these files for details.

Looking at the Puppet configuration (see above) you will see that you only need to change the next-manual.sh and stable-manual.sh files to upgrade stable and next demos. Because they are defined in the Puppet configuration by respectively

stable: ProxyPass / ajp://localhost:18009/
next   : ProxyPass / ajp://localhost:28009/

Finally you need to kill the current stable and next processes before running again the demos using

./all-manual-nicely.sh

Letsencrypt certificate update

It was a time when every 3 months we needed to manually update our Letsencrypt certificate. It was automated before, it‘s now again, so no worries. Anyway, if necessary it’s quite easy to do so. Simply connect to the demo VM and run

sudo certbot renew

I got this message today (2020-04-17):

Processing /etc/letsencrypt/renewal/ofbiz-vm1.apache.org.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certs are not due for renewal yet:
  /etc/letsencrypt/live/ofbiz-vm1.apache.org/fullchain.pem expires on 2020-06-08 (skipped)
No renewals were attempted.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

and always since: it‘s OK. Nothing to do, it’s automated. :) In case you get an issue, simply restart the VM and restart the demos. That happened once: https://issues.apache.org/jira/browse/INFRA-23637

Current restriction

If you want to restart only a single instance you can respectively use trunk-manual-nicely.sh stable-manual-nicely.sh next-manual-nicely.sh This does not work. See why at https://issues.apache.org/jira/browse/OFBIZ-10287 So you need to use ./all-manual-nicely.sh from ofbizDemo From time to time (every months?) better to delete nohup.out.

Keep the VM clean

From time to time (I‘d say when it’s hundreds of MB) we need to delete the nohup.out file. It's used when you manually start the demos and acts as an issues history. Then simply sign in as ofbizDemo user and delete the file.

Also, it's OK for months but at some point I had to clean the Gradle cache. For now just verify with “df” command that we are not graping too much space, around 50% on /dev/xvda1 is OK