Complete setup guide, step-by-step


#1

Hi everyone,
I am trying to deploy Senaite Health on a Digital Ocean Droplet. I get as far as installing Plone and configuring a second buildout file (senaite.cfg) but when it comes to running buildout to fetch Senaite Health, I have been getting a multitude of errors. Would anyone have a complete step-by-step guide for setting up Senaite Health on Ubuntu 18.04? Ideally from the initial Plone setup.
Thanks.


#2

Hi @emmk , have you checked the “Installation” section from senaite.lims here?:

Install first the system dependencies, and then follow the well-documented installation instructions for Plone 4 here (4.3.18 version recommended): https://docs.plone.org/4/en/manage/installing/index.html

Unifier installer for Plone 4.3.18 can be downloaded from here: https://launchpad.net/plone/+milestone/4.3.18

Once installed, modify the buildout.cfg (as explained in the first link posted above), but add senaite.health in the eggs section of the buildout.cfg file too. Your buildout.cfg should look close to the following (note that besides senaite.health egg, I stick here to Plone 4.3.18 of and I’ve also added index section):

[buildout]
parts =
    instance
extends =
    http://dist.plone.org/release/4.3.18/versions.cfg
find-links =
    http://dist.plone.org/release/4.3.18
    http://dist.plone.org/thirdparty
index = 
    https://pypi.python.org/simple/
eggs =
    Plone
    Pillow
    senaite.lims
    senaite.health
zcml =
eggs-directory = ${buildout:directory}/eggs

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 0.0.0.0:8080
eggs =
    ${buildout:eggs}
zcml =
    ${buildout:zcml}

[versions]
setuptools =
zc.buildout =

Once you have buildout.cfg in place, you only need to run bin/buildout and wait a little bit until it finishes. Then, just start the instance (bin/instance start for standalone mode or bin/zeoserver start + bin/client1 start for zeo mode). Open a browser and type http://localhost:8080 , install the Senaite site and you are done.


#3

emmk,

I too had trouble installing Senaite on Ubuntu Server 18.04. The instructions on GitHub worked for installing Plone but failed as soon as I added senaite.lims to the eggs. Follow those instructions with the modifications in bold below.

Here is the step-by-step.

Download Plone 4.3.18 unified installer and install
$sudo ./install.sh --build-python --password=YourPassword zeo
cd into your build directory and edit the buildout.cfg
$cd /usr/local/Plone/zeocluster
$sudo gedit buildout.cfg
add senaite.lims in the eggs section
add cairocffi = 0.9.0 to the versions section
The newest version of cairocffi requires Python 3 and we’re using Python 2.7 virtualenv. You’ll get an error if you don’t require version 0.9.0 or lower.
$sudo -u plone_buildout bin/buildout
You’ll likely get some warnings and maybe syntax errors about “return outside function” from the bika package. Notice these but don’t worry unless the buildout fails.
$sudo chown -R plone_daemon: /usr/local/Plone
Ownership permission step must be done because senaite.lims egg creates a few files/directories with wrong permissions. This prevents plone_daemon from starting the process. The first permission problem was a log file couldn’t be created by plone_daemon. After that I gave up and did the whole directory recursively with the above command. Then
$sudo bin/plonectl start
Wait a few seconds then test in your browser at localhost:8080
Worked for me on two machines running 18.04.


#4

Hi,

I am trying to install senaite lims on my desktop a fedora workstation 29.

I am able to install plone 4.3.18 but the I struggle to understand how to install senaite.lims.

Could you please help?

When ask to "modify “buildout.cfg” are you talking about the one in senaite.lims?

should I put senaite.lims in Plone/zinstance?

thanks in advance.

Abibabou


#5

Hi @abibabou,

In case you want to use the python egg from pypi, you can modify the buildout.cfg under zinstance (probably Plone/zintance/buildout.cfg in your case). It is okay for testing purposes, but I would not recommend it for production use.

While using the python egg makes Senaite installation easier, note that using the development environment will offer the most recent modifications and bugfixes. Also, it will allow you to install customized addons.

Here a snipped of my buildout.cfg from Plone (directory: mycomputer/Plone/zinstance/buildout.cfg):

...
...
effective-user = userp
# This user will own the rest of the installation, and should be used to
# run buildout.
buildout-user = userp
# A flag to tell the Unified Installer whether or not to document sudo use.
need-sudo = no

############################################
# Eggs
# ----
# Add an indented line to the eggs section for any Python
# eggs or packages you wish to include in your Plone instance.
#
# Note that versions may be specified here or in the [versions]
# section below. You should always specify versions that you know
# are compatible with the Plone release and at an acceptable
# development level.
#
# If you update to a later version of Plone, remove the hotfix.
#
eggs =
    Plone
    Pillow
    senaite.lims

############################################
# ZCML Slugs
# ----------
# Some eggs need ZCML slugs to tell Zope to
# use them. This is increasingly rare.
zcml =
#    plone.reload

############################################
# Development Eggs
# ----------------
# You can use paster to create "development eggs" to
# develop new products/themes. Put these in the src/
# directory.
# You will also need to add the egg names in the
# eggs section above, and may also need to add them
# to the zcml section.
#
# Provide the *paths* to the eggs you are developing here:
develop =
#    src/my.package
...
...

Regards,


#6

Adding to what @Jeff-DFWEnv said about adding cairocffi = 0.9.0 to buildout.cfg, I also had to add tinycss2 = 0.6.1.

This should be added to the [versions] section as each a new line near the end of buildout.cfg, which for me defaults to be in Plone/zinstance/buildout.cfg


#7

Please note that this manual version pinning should not be necessary for senaite.core 1.3.0:


This version should be automatically installed when running bin/buildout and fetch the proper versions.

Best regards
Ramon


#8

I tried this method (Zeo vs instance) and with the additional steps recommended without success. I am still able to get Plone working but everything fails once Senaite (lims, health) eggs are added.

Might there be a step that has been missed in the instructions?
Also, does it matter if I am working on 64 or 32 bit 18.04?


#9

emmk,
An update to the installation instructions since release of senaite.lims 1.3
No longer need to pin cairocffi in your buildout.cfg [versions]
Now need to pin Products.AdvancedQuery =< 4 in [versions]

Can you install as standalone
$sudo ./install.sh --password=YourPassword standalone
then edit buildout.cfg to include senaite.lims in eggs and Products.AdvancedQuery =< 4 in versions
then build it out
$sudo -u plone_buildout bin/buildout
and start in foreground
$sudo bin/instance fg

It should start and listen on port 8080. If not then please post the output. My best guesses are that it can’t bind to port 8080 because a process is already running on the port or lack of permission for plone_daemon to certain files in the buildout_cache. If you can post the output we should be able to help.


#10

An alternate install that avoids complications caused by users/groups follows. This install will buildout and start as local user rather than root, plone_buildout, and plone_daemon. Tested on Ubuntu 18.04

Get all dependencies and packages needed

$sudo apt-get install virtualenv
$sudo apt-get install python2.7
$sudo apt-get install build-essential gcc python-dev git-core libffi-dev
$sudo apt-get install libpcre3 libpcre3-dev autoconf libtool pkg-config
$sudo apt-get install zlib1g-dev libssl-dev libexpat1-dev libxslt1.1
$sudo apt-get install gnuplot libcairo2 libpango1.0-0 libgdk-pixbuf2.0-0
$sudo apt-get install libxslt-dev python-pil libjpeg-turbo8-dev

Go to your home folder
$cd /home/jeff

Create a python 2.7 virtual environment then activate it
$virtualenv --python=/usr/bin/python2.7 --no-site-tools /home/jeff/Plone
$cd Plone
$source bin/activate

Git Clone Senaite LIMS
$git clone https://github.com/senaite/senaite.lims.git
$cd senaite.lims
$python bootstrap.py

The buildout.cfg here has lots of parts you don’t need for a test install. For developing you will need them. I recommend making only one change. Pin [versions] Products.AdvancedQuery =< 4
Alternatively you can copy the minimal buildout.cfg at the bottom of this message.
Build it out
$bin/buildout

Start the instance
$bin/instance fg
(password is in the buildout.cfg admin:admin)

A stripped down buildout.cfg that contains just the basic parts:

[buildout]
extends = http://dist.plone.org/release/4.3.18/versions.cfg

index = https://pypi.python.org/simple/

find-links =
http://dist.plone.org/release/4.3.18
http://dist.plone.org/thirdparty

parts =
instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs =
Plone
Pillow
senaite.core
senaite.lims

[versions]
Products.AdvancedQuery =< 4


#11

Thanks, this worked for me with some minor modifications and using some of the instructions from your post that followed this. I installed this with a local user (eg. usrlcl).

  1. I set up Ubuntu 18.04 x64 as standard with a non-root admin user (usrlcl).

  2. Installed dependencies:

  • $sudo apt-get install libreadline-dev wv poppler-utils
  1. Set up Plone 4.3.18 as per instructions for standalone Plone (I guess the filenames would change depending on the Plone version being installed)
  • $wget --no-check-certificate https://launchpad.net/plone/4.3/4.3.18/+download/Plone-4.3.18-UnifiedInstaller.tgz
  • Extract the downloaded file: $tar -xf Plone-4.3.18-UnifiedInstaller.tgz
  • Go the folder containing installer script: $cd Plone-4.3.18-UnifiedInstaller
  • Run install script (can take a while): $./install.sh standalone
  • Make a note of the admin account credentials provided at the end of the installation.

To start the server:

  • $cd ~/Plone/zinstance
  • $bin/plonectl start
  • Check successful plone installation from your browser at http://your-server:8080

Stop the server:

  • $bin/plonectl stop
  1. First add senaite.lims:
  • Edit buildout.cfg: $sudo nano buildout.cfg
  • Add the python link as previous posts have indicated:
index = 
    https://pypi.python.org/simple/
  • Add senaite.lims to the eggs section
eggs =
    Plone
    Pillow
    senaite.lims
  • Add Products.AdvancedQuery =< 4 to the [versions] section.
  • Save your buildout.cfg
  • Run buildout: $sudo -u usrlcl bin/buildout
  • Restart server: $bin/plonectl start
  • Check successful Senaite LIMS installation at http://your-server:8080
  1. Add Senaite Health:
  • Stop the server: $bin/plonectl stop
  • Edit buildout.cfg: $sudo nano buildout.cfg
  • Add senaite.health to the eggs section
eggs =
    Plone
    Pillow
    senaite.lims
    senaite.health
  • Save your buildout.cfg
  • Run buildout: $sudo -u usrlcl bin/buildout
  • Restart server: $bin/plonectl start
  • Check successful Senaite Health installation at http://your-server:8080
  • Click on “Install Senaite LIMS”. Login with the admin credentials created during Plone installation.
  • Under the user menu -> Site setup -> Add-ons, select the Senaite Health add-on and activate it.
  • Under the user menu -> Site setup -> Site setup, provide site title/description details.
  • Proceed with further set up of the LIMS to fit your practice.

Getting distribution for 'senaite.lims' error
#12

Has something else changed now? I’ve attempted to install Senaite LIMS multiple times on CentOS and Debian, and I keep getting an errors on the bin/buildout step. As far as I know, I’ve installed all of the dependancies (however, some of them have been deprecated, and I’ve had to use the newly named ones). When I perform the buildout, I get the following:

Creating directory ‘/Plone/zinstance/eggs’.
Getting distribution for ‘mr.developer==1.38’.
no previously-included directories found matching ‘mr.developer.addon’
Got mr.developer 1.38.
mr.developer: Queued ‘senaite.api’ for checkout.
mr.developer: Queued ‘senaite.core’ for checkout.
mr.developer: Queued ‘senaite.core.listing’ for checkout.
mr.developer: Queued ‘senaite.core.supermodel’ for checkout.
mr.developer: Queued ‘senaite.impress’ for checkout.
mr.developer: Cloned ‘senaite.core.supermodel’ with git using branch ‘master’ from ‘git://github.com/senaite/senaite.core.supermodel.git’.
mr.developer: Cloned ‘senaite.core.listing’ with git using branch ‘master’ from ‘git://github.com/senaite/senaite.core.listing.git’.
mr.developer: Cloned ‘senaite.impress’ with git using branch ‘master’ from ‘git://github.com/senaite/senaite.impress.git’.
mr.developer: Cloned ‘senaite.api’ with git using branch ‘master’ from ‘git://github.com/senaite/senaite.api.git’.
mr.developer: Cloned ‘senaite.core’ with git using branch ‘master’ from ‘git://github.com/senaite/senaite.core.git’.
Getting distribution for ‘zc.buildout’.
no previously-included directories found matching ‘doc’
no previously-included directories found matching ‘old-tutorial’
Got zc.buildout 2.13.2.
Getting distribution for ‘setuptools’.
warning: no previously-included files found matching ‘pyproject.toml’
warning: install_lib: ‘build/lib’ does not exist – no Python modules to install

zip_safe flag not set; analyzing archive contents…
Installing setuptools 41.2.0
Caused installation of a distribution:
UNKNOWN 0.0.0
with a different project name.
Installing setuptools 41.2.0
Caused installation of a distribution:
UNKNOWN 0.0.0
with a different version.
Got setuptools 7.0.
Getting distribution for ‘setuptools’.
warning: no previously-included files found matching ‘pyproject.toml’
warning: install_lib: ‘build/lib’ does not exist – no Python modules to install

zip_safe flag not set; analyzing archive contents…
Installing setuptools 41.2.0
Caused installation of a distribution:
UNKNOWN 0.0.0
with a different project name.
Installing setuptools 41.2.0
Caused installation of a distribution:
UNKNOWN 0.0.0
with a different version.
Got setuptools 7.0.
While:
Installing.
Checking for upgrades.
Error: There is a version conflict.
We already have: UNKNOWN 0.0.0

Plone appears to be working fine, but I do not see any Senaite available in the add-ins section. I think the warnings in this also show that there’s a problem with no build/lib existing. I don’t know how I’d fix that.

Thanks,
Mark


#14

Please see comment here regarding the version conflict:


#15

Could you update the installation instructions?


#16

Hi @Mark

Add the following to the versions section:

cairocffi = 0.9.0
tinycss2 = 0.6.1
soupsieve = 1.9
backports.functools-lru-cache = 1.5

The cairocffi and tinycss2 versions should have been taken care of already in the code. The last two you definately need.


#17

We also updated the installation instructions on https://www.senaite.com/docs/installation