Skip to content

Commit cec89fe

Browse files
committed
Use an include for creating a Classic UI instance in foreground mode
1 parent 242ba6f commit cec89fe

File tree

4 files changed

+48
-47
lines changed

4 files changed

+48
-47
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
Your instance starts in foreground mode.
3+
This should be used only for troubleshooting or local demonstration purposes.
4+
5+
Now you can visit `http://localhost:8080` in your browser.
6+
Click the button {guilabel}`Create Classic UI Plone site`.
7+
8+
Enter {guilabel}`username` of `admin`, and {guilabel}`password` of `admin`.
9+
10+
Enter values in the form, and click the button {guilabel}`Create Plone Site`.
11+
12+
You will be redirected to your new Classic UI Plone site.
13+
14+
To stop the Plone instance in foreground mode, type {kbd}`CTRL-C`.
15+

docs/admin-guide/install-buildout.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ For other installation options, see {ref}`get-started-install-label`.
3737

3838
## Installation
3939

40-
Select a directory of your choice.
40+
Select a directory of your choice, and change it to your working directory.
4141

4242
```shell
43-
mkdir -p <my_projects>/plone && cd <my_projects>/plone
43+
mkdir -p <my_projects>/plone
44+
cd <my_projects>/plone
4445
```
4546

4647
Create a Python virtual environment.
@@ -55,7 +56,7 @@ Install the minimal Python packages needed in order to run Buildout.
5556
bin/pip install -r https://dist.plone.org/release/6-latest/requirements.txt
5657
```
5758

58-
Create a `buildout.cfg` file in your directory with the following contents:
59+
Create a {file}`buildout.cfg` file in your directory with the following contents.
5960

6061
```cfg
6162
[buildout]
@@ -67,6 +68,7 @@ parts =
6768
6869
[instance]
6970
recipe = plone.recipe.zope2instance
71+
# user = username:password - Use a secure token in a production environment.
7072
user = admin:admin
7173
http-address = 8080
7274
eggs =
@@ -82,27 +84,16 @@ bin/buildout
8284
This may take a few minutes.
8385

8486

85-
## Run Plone in foreground mode
87+
## Start Plone in foreground mode
8688

8789
Start the instance for a quick test in foreground mode:
8890

8991
```shell
9092
bin/instance fg
9193
```
9294

93-
Your instance starts in foreground mode.
94-
This should be used only for troubleshooting or local demonstration purposes.
95-
96-
Now you can visit `http://localhost:8080` in your browser.
97-
Select {guilabel}`Create Classic UI Plone site`.
98-
99-
Enter {guilabel}`username` of `admin`, and {guilabel}`password` of `admin`.
100-
101-
Fill out the form as needed, and click {guilabel}`Create Plone Site`.
102-
103-
You will be redirected to your new Plone instance.
104-
105-
To stop the Plone instance in foreground mode, type {kbd}`CTRL-C`.
95+
```{include} /_inc/_create-classic-ui-instance.inc
96+
```
10697

10798

10899
## Start Plone as a background service

docs/admin-guide/install-pip.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,45 +20,51 @@ It provides a basic installation without many additional tools to help with deve
2020
For other installation options, see {ref}`get-started-install-label`.
2121
```
2222

23-
## Prerequisites
23+
(install-pip-prerequisites)=
2424

25-
- Python 3.10 or greater
25+
## Prerequisites for installation
2626

27-
On Debian-based systems you can install Python with following command:
27+
- For Plone 6.0, Python {SUPPORTED_PYTHON_VERSIONS_PLONE60}
28+
% TODO: These instructions install Plone 6.0.x. Uncomment next line and change the subsequent include when Plone 6.1 is released and "latest".
29+
% - For Plone 6.1, Python {SUPPORTED_PYTHON_VERSIONS_PLONE61}
2830

29-
```shell
30-
sudo apt install python3.12 python3.12-dev python3.12-venv
31+
32+
### Python
33+
34+
```{include} /_inc/_install-python-plone60.md
3135
```
3236

37+
3338
## Installation
3439

35-
Select a directory of your choice:
40+
Select a directory of your choice, and change it to your working directory.
3641

3742
```shell
38-
mkdir -p /opt/plone
39-
cd /opt/plone
43+
mkdir -p <my_projects>/plone
44+
cd <my_projects>/plone
4045
```
4146

42-
Create a Python virtual environment:
47+
Create a Python virtual environment.
4348

4449
```shell
4550
python3 -m venv .
4651
```
4752

48-
Install Plone and a helper package:
53+
Install Plone and a helper package, {term}`pipx`.
4954

5055
```shell
5156
bin/pip install -c https://dist.plone.org/release/6.0-latest/constraints.txt Plone pipx
5257
```
5358

59+
5460
## Create a Zope instance
5561

56-
Create a file `instance.yaml` with the following contents:
62+
Create a file {file}`instance.yaml` in your directory with the following contents.
5763

5864
```yaml
59-
# please change the password to a secure token!
6065
default_context:
6166
initial_user_name: "admin"
67+
# Use a secure token for the password in a production environment.
6268
initial_user_password: "admin"
6369
wsgi_listen: "localhost:8080"
6470
debug_mode: false
@@ -69,20 +75,20 @@ default_context:
6975
}
7076
```
7177

72-
Now run the {term}`cookiecutter` tool to create configuration for a Zope instance:
78+
Now run the {term}`cookiecutter` tool to create configuration for a Zope instance.
7379

7480
```
7581
bin/pipx run cookiecutter -f --no-input --config-file instance.yaml gh:plone/cookiecutter-zope-instance
7682
```
7783

84+
7885
## Start Plone in foreground mode
7986

80-
Start the instance for a quick test:
87+
Start the instance for a quick test.
8188

8289
```shell
8390
bin/runwsgi -v instance/etc/zope.ini
8491
```
8592

86-
Your instance starts in foreground mode, which is only advisable for troubleshooting or for local demonstration purposes.
87-
88-
Now you can call the url `http://localhost:8080` in your browser and you can add a **Classic UI Plone site**.
93+
```{include} /_inc/_create-classic-ui-instance.inc
94+
```

docs/contributing/core/index.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,8 @@ Once that's done, you can start an instance of Plone with the following command.
124124
./bin/instance fg
125125
```
126126

127-
To visit your Plone instance, you can open the link http://0.0.0.0:8080 in a web browser.
128-
129-
You will be presented with several options.
130-
Click the button {guilabel}`Create Classic UI Plone site`.
131-
132-
Enter values in the form, and click the button {guilabel}`Create Plone Site`.
133-
134-
You will be redirected to your new Classic UI Plone site.
127+
```{include} /_inc/_create-classic-ui-instance.inc
128+
```
135129

136130
```{warning}
137131
Ignore the warning about accessing the Plone backend through its Classic UI frontend.
@@ -141,11 +135,6 @@ They will not work with buildout.
141135
To contribute to Volto, you will need to start over, and follow {doc}`../volto`.
142136
```
143137

144-
To login, the default credentials are the following.
145-
146-
- username: `admin`
147-
- password: `admin`
148-
149138

150139
(contributing-core-work-with-git-label)=
151140

0 commit comments

Comments
 (0)