What is the best way install a Plone Instance

I think that is a disservice to users, and should be changed, especially since it eventually leads to Install — Plone Documentation v6.0 where users who install Plone are faced with reality.

Marketing of Plone is not my domain. I just do docs.

Again, see https://github.com/orgs/plone/projects/16. Contributions and help welcome. Let's stop talking about it and document it. If you don't see a relevant open issue there, then create one. LFG!

I know, but from a typical Wordpress user's point of view that probably does not 'make a difference'
(They buy the domain and gets a question if they need hosting and answer yes). Here in Norway, that is just €3/month so a lot of people just order it without checking)

When I make a Plone site for somebody, they have usually bought a domain AND hosting even before talking to me (since they thought that they need it).

I know this is 'not comparable', but still many will…
@

I can't run Docker locally (company security policies to satisfy contracts that I really don't know the details for) and unless I misunderstand cookiecutter, it is making and maintaining Docker containers.

Anyway it does sound like the reason other installation methods aren't documented is a lack of documenters/time, and not because those methods are encouraged. I do appreciate that Plone is opensource and entirely volunteer. I would like to help out with documentation but I do not feel like an expert on this topic - I have 10+ years with Plone but I learn a lot from this community's work (and documentation!). Maybe it would be better to start with a write up of how I did my setup on this forum and solicit feedback, or is it better to do this all as a PR? Like @mekell my setup is necessarily opinionated and not general.

Can someone point me to the 'correct docs' for this use case.

  1. Install Plone 6, classic, no docker/containers etc
  2. Site exists in 5.2, need to try if it (the add-ons) also works in 6 and that it 'upgrades OK'.

Correct. See for example cookiecutter-plone-starter/{{ cookiecutter.project_slug }}/backend/Dockerfile at main · collective/cookiecutter-plone-starter · GitHub.

This is the way for opinionated documentation. Generalized documentation may be integrated into the officially supported Plone 6 Documentation, and we may reference opinionated documentation from time to time.

As a side note, one thing that has hurt documentation is when people post their content on their own blog, website, or other external site, which then just goes away. archive.org has archived some of that lost content, but it does not capture everything and it is currently suffering from slow response times. The Plone organization controls this instance of Discourse, thus its content will not become bit rot, and we are confident to reference it. Plus the ensuing discussions are valuable.

  1. Perhaps start by cloning the cookiecutter repo, then looking into the backend's Dockerfile to see what it does to build Plone 6 backend? Dockerfiles are similar to a collection of terminal commands. I don't know for sure, but if you try it and it gets you where you need, then please let us know.
  2. Start here: Upgrade guide — Plone Documentation v6.0

Plone 6 can also be installed using buildout as previous versions are.

We are running a couple of Plone 6's on production using buildout. Basically the same setup we have for Plone 5.2 works for Plone 6.

We create our project's buildout using a mr.bob templates which is here:

1 Like

I got it to install, but I could not find 'what buildout.cfg to use, so I had to 'guess how it should be'. Is there an 'official' buildout.cfg (without volto) ?

You can use the buildout.cfg that I have linked, it works perfectly without Volto.

Propably, but it would be nice if there was an 'official buildout', with 'just the basic needed stuff'. Those who just want to test Plone dont need it, and those who work with Plone knows it probably anyway. Alternatively, it could be commented out?


About the universal installer:
Just a thought: Could it be possible to have a universal installer that 'asks questions' instead of being 'for a specific version'?

So, you run ./install.sh, it asks you which plone version you want, if you want zeo etc (all the things it does today)

So, something like
./install.sh standalone --ploneversion=6.0.1 --target=/some/path … etc

If I run ./install.sh on ubuntu (without any more info), I get a UI, Maybe this UI could get 'what versions are available' from 'somewhere'.

Installing Plone 6 Classic UI is pretty simple and can be done in ca. 5 min. First you only need to install the packages with pip. And then to configure zeo and zope. They can be configured with zope.mkzeoinstance and cookiecutter-zope-instance. Both tools offer you the possibility to enter your versions and names.

Here is an example of a "minimal installer" with configurable variables.

# set path
PATH=
PATH=${PATH}:/usr/local/bin
PATH=${PATH}:/usr/bin
PATH=${PATH}:/bin
echo ${PATH}
PYTHON_TARGET_DIR=/usr/bin

# set variables
PLONE_VERSION=6.0.1
PLONE_NAME=Plone-${PLONE_VERSION}
PLONE_HOME=${HOME}/${PLONE_NAME}
PLONE_CONSTRAINTS_URL=https://dist.plone.org/release/${PLONE_VERSION}/constraints.txt
PLONE_REQUIREMENTS_URL=https://dist.plone.org/release/${PLONE_VERSION}/requirements.txt

PLONE_SITE_NAME=Plone
ZEO_HOST=127.0.0.1
ZEO_PORT=8202
ZEO_NAME=zeoserver
ZOPE_INSTANCE_NAME=client2
ZOPE_INSTANCE_HOST=localhost
ZOPE_INSTANCE_PORT=8084
DEBUG_MODE=on
ADMIN_USERNAME=admin
ADMIN_PASSWORD=secret

# create venv
cd ${HOME}
rm -rf ${PLONE_HOME}
mkdir -p "${PLONE_HOME}"
${PYTHON_TARGET_DIR}/python3 -m venv "${PLONE_HOME}"
cd "${PLONE_HOME}"

# update pip with Plone's release versions requirements
${PLONE_HOME}/bin/python -m pip install \
    pip \
    setuptools \
    wheel \
    -c ${PLONE_REQUIREMENTS_URL}

# pip install Plone Classic UI (no Volto!)
${PLONE_HOME}/bin/pip install \
    Products.CMFPlone \
    Products.CMFPlacefulWorkflow \
    plone.app.caching \
    plone.app.iterate \
    plone.app.upgrade \
    plone.restapi \
    -c ${PLONE_CONSTRAINTS_URL}

# install zope.mkzeoinstance and cookiecutter
${PLONE_HOME}/bin/pip install \
    zope.mkzeoinstance==4.1 \
    cookiecutter==2.1.1 \
    -c ${PLONE_CONSTRAINTS_URL}

cd ${PLONE_HOME}

# configure zeo with mkzeoinstance
${PLONE_HOME}/bin/mkzeoinstance ${ZEO_NAME} ${ZEO_HOST}:${ZEO_PORT}

# configure wsgi with cookiecutter-zope-instance
cat <<EOF | tee ${PLONE_HOME}/${ZOPE_INSTANCE_NAME}.yaml
default_context:
    target: '${ZOPE_INSTANCE_NAME}'
    wsgi_listen: '${ZOPE_INSTANCE_HOST}:${ZOPE_INSTANCE_PORT}'
    initial_user_name: '${ADMIN_USERNAME}'
    initial_user_password: '${ADMIN_PASSWORD}'
    db_blobs_mode: 'shared'
    db_storage: 'zeo'
    db_zeo_server: '${ZEO_HOST}:${ZEO_PORT}'
    #db_filestorage_location: "filestorage/Data.fs"
    db_zeo_read_only: false
    db_zeo_read_only_fallback: false
    db_blobs_location: "blobstorage"
EOF
${PLONE_HOME}/bin/cookiecutter -f --no-input \
    --config-file "${PLONE_HOME}/${ZOPE_INSTANCE_NAME}.yaml" \
    --checkout 1.0.0b2  https://github.com/plone/cookiecutter-zope-instance

# set debug-mode
sed -i 's|^debug-mode.*|debug-mode '${DEBUG_MODE}'|' \
    ${PLONE_HOME}/${ZOPE_INSTANCE_NAME}/etc/zope.conf
grep --color "debug-mode.*" ${PLONE_HOME}/${ZOPE_INSTANCE_NAME}/etc/zope.conf

# start zeo as background job
${PLONE_HOME}/bin/runzeo -C ${PLONE_HOME}/${ZEO_NAME}/etc/zeo.conf &

# runwsgi in debug mode
${PLONE_HOME}/bin/runwsgi -dv ${PLONE_HOME}/${ZOPE_INSTANCE_NAME}/etc/zope.ini
1 Like

Still, it would be nice with something similar to the 'Universal Installer', but not linked to any version. This way, new users could install Plone and test it. After they have tried it, I assume they are more motivated to learn how to set up 'all the other stuff' (?)

What do you mean with "linked to any version"? Do you mean major version (4, 5, or 6)?

For Plone 4x and 5x there is a Unified Installer.

Installing Plone 6x Classic UI is really simple (see the script above in which you can configure the version). What would be the added value of an Unified Installer for Plone 6 Classic UI?

I want 1 Universal installer, not 1 for Plone 5.2.1, another for 5.2.2, another for 5.11 etc.

Could it be possible to make 1 universal installer, and when you run it, it asks about Plone version

The following is not really a "universal installer" but, when you run it, it will collect the last 10 available Unified Installers for Plone 5 from launchpad.net and ask you which one do you want. When you select one it will echo the necessary steps (wget, tar and cd). You can copy the output and run it in your shell. You can extend it to not only echo the commands but to run them.

See output below.

# pip install requests lxml console-menu

import requests
from io import StringIO
from lxml import etree
from consolemenu import ConsoleMenu
from consolemenu.items import CommandItem

response = requests.get("https://launchpad.net/plone/+download")
html = response.content.decode("utf-8")
parser = etree.HTMLParser()
tree = etree.parse(StringIO(html), parser=parser)

menu = ConsoleMenu("Plone Unified Installer",
                   "Select the version you want to install",
                   clear_screen=False)
for i in tree.xpath("//td/strong/a[contains(@href,'.tgz')]/@href"):
    version = i.split("/")[5]
    filename = i.split("/")[-1]
    menu.append_item(
        CommandItem(
            f"Plone {version}",
            f'echo wget --no-check-certificate "{i}" && echo tar -xzf "{filename}" && echo cd {filename[:-4]}',
            should_exit=True
        )
    )
menu.show()

I changed the Installing Plone page text to be more real. Good points you have here.

Thanks, @rioksane. I found more cruft. At the end of the page, there are three links that point to 5.2 docs, and with http: protocol links instead of https:.

We have not migrated them to Plone 6 Documentation yet, but work is in progress.

Thanks. Removed the old links for now. And cheked that there are no http links on that page anymore.