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