Skip to content

Commit 6fa058f

Browse files
committed
Update installation backend from scratch
1 parent eb56786 commit 6fa058f

File tree

3 files changed

+293
-201
lines changed

3 files changed

+293
-201
lines changed

docs/install/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ What do you want to do?
2121
- [Plone 6 with Volto frontend](https://6.demo.plone.org/)
2222
- [Plone 5.2.x with Barceloneta frontend](https://demo.plone.org/)
2323
- [Run Plone in containers](containers/index) (why use containers here.)
24-
- [Install Plone from source](source) (Why? To develop Plone add-ons or contribute to Plone packages, and more details.)
24+
- {doc}`source` (contribute to Plone packages, develop add-ons, or install Plone with full control)
2525

2626

2727
(install-index-choose-installation-method-label)=
2828

2929
## Choose an installation method
3030

31+
% TODO Explanation when to choose which installation method: container vs installation from scratch. Combination for backend and frontend?
32+
3133
Developers may choose to install Plone from either [the official container images](containers/index) or [source](source).
3234

3335
The Plone 6 container images are compliant with the [Open Container Initiative (OCI)](https://opencontainers.org/).
@@ -59,7 +61,7 @@ Perhaps merge the subsequent section into this section?
5961
System requirements depend upon your choice of installation method:
6062

6163
- [Use container images](containers/index)
62-
- [Install from source](source)
64+
- {doc}`source`
6365

6466

6567
```{toctree}

docs/install/source-step-by-step.md

Lines changed: 34 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,34 @@
11
---
22
html_meta:
3-
"description": "Install Plone 6 from source for the one who wants to look under the hood"
4-
"property=og:description": "Install Plone 6 from source for the one who wants to look under the hood"
5-
"property=og:title": "Install Plone 6 from source step by step"
6-
"keywords": "Plone 6, install, buildout, pip, mxdev, mxmake, cookiecutter, source, Zope"
3+
"description": "Install Plone 6 backend from scratch for the one who wants to look under the hood"
4+
"property=og:description": "Install Plone 6 backend from scratch for the one who wants to look under the hood"
5+
"property=og:title": "Install Plone backend from Scratch – Step by Step"
6+
"keywords": "Plone, Plone 6, install, backend, pip, mxdev, mxmake, cookiecutter, source, Zope, buildout"
77
---
88

99

1010
(install-source-stepbystep-start-label)=
1111

12-
# Install Plone Backend from Source – Step by Step
12+
# Install Plone backend from Scratch – Step by Step
1313

14-
For system requirements and Pre-requisites for the installation see {ref}`install-source-system-requirements-label`.
1514

16-
We install the Plone backend with `pip`, `cookiecutter-zope-instance`, `mxstack` and other fancy helpers.
15+
(install-source-stepbystep-backend-start-label)=
1716

17+
## Backend
1818

19-
(install-source-installation-steps-label)=
19+
For system requirements and pre-requisites for the installation see {ref}`install-source-system-requirements-label`.
2020

21-
### Installation steps
21+
We install the Plone backend with `pip`, `cookiecutter-zope-instance`, `mxdev` and other fancy helpers.
2222

23-
```{admonition} Jump in!
24-
:class: margin
25-
Go to {ref}`install-source-installation-jump-label` if you want to develop and want to jump in with all steps prepared by an overall cookiecutter.
23+
```{note}
24+
There will be one single cookiecutter template to install both backend and frontend from scratch. You will find the instructions on {ref}`install-source-installation-jump-label`. That chapter is for you if you want to develop and want to jump in with all steps prepared by an overall cookiecutter. The subsequent sections explain the installation of the backend step by step. You will learn the details of the installation included in the future overall cookiecutter.
2625
```
2726

27+
28+
(install-source-installation-steps-label)=
29+
30+
### Installation steps
31+
2832
Create a new directory to hold your project, make it your current directory, then issue the following commands in a shell session.
2933

3034
Create a Python virtual environment in the current directory.
@@ -118,22 +122,23 @@ You can stop the instance later with {kbd}`ctrl-esc`.
118122
If you now open the browser with http://localhost:8080/, you see that you already can create a Plone instance.
119123
Before doing this, we configure our Zope instance for blobs, configure add-ons, etc..
120124
For the configuration, you have two options:
121-
- manual configuration of site.zcml and zope.conf
122-
- use of helper `cookiecutter-zope-instance`
125+
- manual configuration of site.zcml and zope.conf (^[Configuring and Running Zope](https://zope.readthedocs.io/en/latest/operation.html))
126+
- apply `cookiecutter-zope-instance`
123127

124128
(install-source-cookiecutter-zope-instance-label)=
125129

126130
#### Cookiecutter Zope instance
127131

128-
`Cookiecutter` creates projects from project templates. `cookiecutter-zope-instance` is such a template that allows to create a complete Zope configuration. Zope configuration means: blob storage, type of file storage (Zope style or relational database), ZEO, you name it.
132+
`Cookiecutter` creates projects from project templates.
133+
{term}`cookiecutter-zope-instance` is such a template that allows to create a complete Zope configuration. Zope configuration means: blob storage, type of file storage (Zope style or relational database), ZEO, you name it.
129134

130135
Install cookiecutter:
131136

132137
```shell
133138
pip install cookiecutter
134139
```
135140

136-
You could now run `cookiecutter` to create a Zope instance sceleton with configuraton with the following command, which would prompt you for parameter values.
141+
You could now run `cookiecutter` to create a Zope instance sceleton including configuration with the following command. It prompts you for parameter values.
137142

138143
```shell
139144
cookiecutter https://github.com/plone/cookiecutter-zope-instance
@@ -150,7 +155,7 @@ default_context:
150155
initial_user_password: 'admin'
151156

152157
load_zcml:
153-
package_includes: ['my.awesome.addon']
158+
package_includes: ['collective.easyform']
154159

155160
db_storage: direct
156161
```
@@ -160,11 +165,11 @@ Find more [options of cookiecutter `cookiecutter-zope-instance`](https://github.
160165
The file {file}`instance.yaml` allows to set some presets.
161166
Add-ons are listed here, but need to be installed with pip.
162167
The documented installation of add-ons with pip is achieved via a {file}`requirements.txt` file.
163-
An add-on like for example `my.awesome.addon` is listed in\
168+
An add-on like for example `collective.easyform` is listed in\
164169
`requirements.txt`:
165170

166171
```
167-
my.awesome.addon
172+
collective.easyform
168173
```
169174

170175
Install your requirements:
@@ -218,11 +223,11 @@ runwsgi instance/etc/zope.ini
218223
```
219224

220225
Head over to http://localhost:8080/ and see that Plone is running.
221-
You could now create a Plone instance {ref}`install-source-create-plone-site-label` and enable the add-on `my.awesome.addon` in {guilabel}`Site Setup` [http://localhost:8080/Plone/prefs_install_products_form](http://localhost:8080/Plone/prefs_install_products_form).
226+
You could now create a Plone instance {ref}`install-source-create-plone-site-label` and enable the add-on `collective.easyform` in {guilabel}`Site Setup` [http://localhost:8080/Plone/prefs_install_products_form](http://localhost:8080/Plone/prefs_install_products_form).
222227

223228
If you want to run Plone with some add-ons, you are ready with the installation of the backend.\
224229
If you decided to go with the Plone Classic UI this is also your frontend.\
225-
If you decided to go with the Plone Volto frontend, then section {ref}`install-source-volto-frontend-label` shows your next steps.
230+
If you decided to go with the Plone Volto frontend, then section {ref}`install-source-volto-frontend-label` explains your next steps.
226231

227232
If you want to develop a Plone package, then the subsequent section is for you.
228233

@@ -267,7 +272,7 @@ collective.easyform
267272
collective.easyform==3.4.5
268273
```
269274

270-
{file}`sources.ini`
275+
{file}`mx.ini`
271276

272277
```ini
273278
[settings]
@@ -281,7 +286,7 @@ branch = master
281286
extras = test
282287
```
283288

284-
A run of mxdev reads {file}`requirements.txt` and {file}`sources.ini`, and writes new combined requirements in {file}`constraints-mxdev.txt` and writes new constraints in {file}`constraints-mxdev.txt` according to {file}`source.ini`:
289+
A run of mxdev reads {file}`requirements.txt`, {file}`constraints.txt` and {file}`mx.ini`, and writes new combined requirements in {file}`requirements-mxdev.txt` and writes new constraints in {file}`constraints-mxdev.txt` according to {file}`mx.ini`:
285290

286291
- 'version-overrides' in [settings]
287292
- checkout settings in [packagename] sections
@@ -296,11 +301,11 @@ Create
296301
297302
- {file}`requirements.txt`
298303
- {file}`constraints.txt`
299-
- {file}`sources.ini`
304+
- {file}`mx.ini`
300305
301306
```shell
302307
pip install mxdev
303-
mxdev -c sources.ini
308+
mxdev -c mx.ini
304309
pip install -r requirements-mxdev.txt
305310
runwsgi instance/etc/zope.ini
306311
```
@@ -309,10 +314,10 @@ Create
309314
So with the three files above, run `mxdev` with:
310315

311316
```shell
312-
mxdev -c sources.ini
317+
mxdev -c mx.ini
313318
```
314319

315-
You are now ready to install your packages with `pip` and the new constraints file:
320+
You are now ready to install your packages with `pip` and the new requirements file:
316321

317322
```shell
318323
pip install -r requirements-mxdev.txt
@@ -325,24 +330,7 @@ runwsgi instance/etc/zope.ini
325330
```
326331

327332
```{note}
328-
You have seen how `mxdev` helps with versions and checkouts. It can do a lot more for you. See {ref}`install-source-tools-label` for more information.
333+
You have seen how `mxdev` helps with versions and checkouts. It can do a lot more for you. See [mxdev](https://github.com/mxstack/mxdev) for more information.
329334
```
330335

331-
You can now continue with {ref}`install-source-create-plone-site-label`.
332-
333-
334-
(install-source-tweak-backend-installation-label)=
335-
336-
### Tasks on your installation from source
337-
338-
Adding an add-on
339-
: Add a line with the name of your add-on to `requirements.txt` and add it to {ref}`instance.yaml<install-source-cookiecutter-zope-instance-presets-label>`, then install with pip and apply cookiecutter:
340-
341-
```shell
342-
pip install -r requirements.txt
343-
cookiecutter -f --no-input --config-file instance.yaml https://github.com/plone/cookiecutter-zope-instance
344-
```
345-
346-
version pinning / constraints
347-
: A version can **not** be pinned in requirements.txt if the package is mentionend in the constraints of Plone.
348-
Any other package version could be pinned in requirements.txt. Instead see section {ref}`install-source-checkout-and-pin` for a clean and well documented set up of your Zope/Plone installation.
336+
You can now continue with chapter {ref}`install-source-create-plone-site-label`.

0 commit comments

Comments
 (0)