cancel
Showing results for 
Search instead for 
Did you mean: 

Nuxeo Demodata from GitHub fails

olaf_
Champ on-the-rise
Champ on-the-rise

The DemoData script

00-DownloadAndSetUpFullNuxeoDemo.sh
as can be found on GitHub: https://github.com/nuxeo/presales-vmdemo/wiki/Create-a-demo-from-one-of-Nuxeo-generic-demo-datasets is in more than one way troublesome.

  1. It does not work on the VMs for 5.8 and 5.9.1 : nuxeoctl can not be found
  2. Has a typo in the text: You should also probably expend the virtual hard drive to have enough space to get the demo dataset. --> expand (which is not entirely true so it seems)
  3. A presumed role does not exists (see below)
  4. rm command in script is invoked incorrectly (see below)
  5. The script does not allow for symlinks to be more flexible regarding diskspace. A symlink in /etc/nuxeo for downloads is removed and replaced by a directory causing the root to fill to 100%

This was extensively tested on various platforms (hypervisors, OVFs, handmade VMs based on Debian Wheezy 64bit). Is it just me or is the script (no longer) functioning as intended?

unzipping distribution
Backup of original nuxeo conf
Stopping possibly running nuxeo server
Detected Tomcat server.
Nuxeo home:          /var/lib/nuxeo/server
Nuxeo configuration: /etc/nuxeo/nuxeo.conf
Include template: /var/lib/nuxeo/server/templates/common-base
Include template: /var/lib/nuxeo/server/templates/common
Include template: /var/lib/nuxeo/server/templates/postgresql
Include template: /var/lib/nuxeo/server/templates/collaboration
Include template: /var/lib/nuxeo/server/templates/dam

Stopping server........................Server stopped.
Updating nuxeo.conf
nuxeo.templates=postgresql,collaboration,dam
nuxeo.templates=postgresql,/etc/nuxeo/nuxeo_DAM_en_demo/templates/custom
Deleting current data
Deleting current server
Copying fresh distrib
rm: missing operand
Try `rm --help' for more information.
/var/lib/nuxeo/server
/etc/nuxeo/nuxeo.conf
Initializing server and installing default packages (dm, dam, social collab)
Detected Tomcat server.
Nuxeo home:          /var/lib/nuxeo/server
Nuxeo configuration: /etc/nuxeo/nuxeo.conf
Include template: /var/lib/nuxeo/server/templates/common-base
Include template: /var/lib/nuxeo/server/templates/common
Include template: /var/lib/nuxeo/server/templates/postgresql
Include template: /etc/nuxeo/nuxeo_DAM_en_demo/templates/custom
Added /var/lib/nuxeo/server/setupWizardDownloads/4de36049ad3925bac0282a1ceeb8c7ad
Added /var/lib/nuxeo/server/setupWizardDownloads/3eb30388a93328a895798878a4a2d1f7
Added /var/lib/nuxeo/server/setupWizardDownloads/c5c145e8f173b9f639bc515b8e8cb68e
Added /var/lib/nuxeo/server/setupWizardDownloads/e61f403ef72ecaa6a90275465009a232
Detected Tomcat server.
Nuxeo home:          /var/lib/nuxeo/server
Nuxeo configuration: /etc/nuxeo/nuxeo.conf
Include template: /var/lib/nuxeo/server/templates/common-base
Include template: /var/lib/nuxeo/server/templates/common
Include template: /var/lib/nuxeo/server/templates/postgresql
Include template: /etc/nuxeo/nuxeo_DAM_en_demo/templates/custom
Relax restriction to target platform cap-5.9.2-I20140206_0119 because of package nuxeo-cmf

Removed nuxeo-social-collaboration-5.9.2-I20140206_0119
Detected Tomcat server.
Nuxeo home:          /var/lib/nuxeo/server
Nuxeo configuration: /etc/nuxeo/nuxeo.conf
Include template: /var/lib/nuxeo/server/templates/common-base
Include template: /var/lib/nuxeo/server/templates/common
Include template: /var/lib/nuxeo/server/templates/postgresql
Include template: /etc/nuxeo/nuxeo_DAM_en_demo/templates/custom

Dependency resolution:
  Installation order (3):        nuxeo-dm-5.9.2-I20140206_0119/nuxeo-rest-api-5.9.2-I20140206_0119/nuxeo-dam-5.9.2-I20140206_0119
  Local packages to install (3): nuxeo-rest-api:5.9.2-I20140206_0119, nuxeo-dm:5.9.2-I20140206_0119, nuxeo-dam:5.9.2-I20140206_0119

Installing nuxeo-dm-5.9.2-I20140206_0119
Installing nuxeo-rest-api-5.9.2-I20140206_0119
Installing nuxeo-dam-5.9.2-I20140206_0119
Detected Tomcat server.
No instance.clid found, the hotfixes will not be installed on the server. Altough not mandatory, it is highly recommended. The instance.clid is looked for in the parent of the nuxeo_demo folder. In your case in:
/etc/nuxeo
instance.clid files can be generated by registering another instance and getting the instance.clid file.
A fresh updated server is now available in demo data. A proper reset should be done now to reset the server
Resetting the server with the demo data. The server will stop if you close the window after (just restart the server in that case)
Initializing variables
reseting nuxeo.conf
Detected Tomcat server.
Nuxeo home:          /var/lib/nuxeo/server
Nuxeo configuration: /etc/nuxeo/nuxeo.conf
Include template: /var/lib/nuxeo/server/templates/common-base
Include template: /var/lib/nuxeo/server/templates/common
Include template: /var/lib/nuxeo/server/templates/postgresql
Include template: /etc/nuxeo/nuxeo_DAM_en_demo/templates/custom
Include template: /var/lib/nuxeo/server/templates/dam
Server is not running.
soffice.bin: no process found
Nuxeo DM Demo has been stopped.
Database will be dropped
dropdb: could not connect to database postgres: FATAL:  role "root" does not exist
2 REPLIES 2

Fred_Vadon
Star Contributor
Star Contributor

Hi,

olaf_
Champ on-the-rise
Champ on-the-rise

Thanks Fred. You were right. I was indeed user root when I executed the script. However the other points seem still to be valid. I did some further investigation on the OVF-VM download of 5.9.1. The reason the script does not execute properly there (including when being user nuxeo) is that the script assumes it can unzip Tomcat and it cannot because the unzip package is not installed. If installed beforehand the script executes properly.

I think the install script can be improved by:

  1. fixing the rm error which is still in the script
  2. checking for diskspace before downloading: parse: df
  3. allow for symlinking if space is limited in /etc/ (which in itself is not the most desirable place to store downloads imho)
  4. get the working directory and check if it is the correct one: http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
  5. get the current user and check. Then either exit with error or sudo to nuxeo: http://codeblog.vurdalakov.net/2010/12/how-to-get-current-user-name-in-bash.html and http://my-wd-local.wikidot.com/othertip:switching-users-in-a-bash-script

Links are provided for inspiration to make the script more robust. Maybe also some preliminary testing or even executing of the postgreSQL commands can also be implemented? Thank you for providing this demo data. Makes life much easier when testing! List item

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.