Skip to content

Commit 4103834

Browse files
committed
Deployment: Python Brasil 2025
1 parent cb68235 commit 4103834

6 files changed

Lines changed: 56 additions & 54 deletions

File tree

docs/plone-deployment/deploy.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Plone backend
2525
Postgres 14 database
2626
: Handles data persistence.
2727

28-
You can find this stack at {file}`devops/stacks/ploneconf2025-<your-github-username>.tangrama.com.br.yml`. It's modular, allowing integration of additional services, such as {term}`Varnish`, `Solr`, or `ElasticSearch`.
28+
You can find this stack at {file}`devops/stacks/pybr25-<your-github-username>.tangrama.com.br.yml`. It's modular, allowing integration of additional services, such as {term}`Varnish`, `Solr`, or `ElasticSearch`.
2929

3030
```{seealso}
3131
[Traefik Proxy with HTTPS](https://dockerswarm.rocks/traefik/)
@@ -69,7 +69,7 @@ Utilize the {file}`Makefile` at {file}`devops/Makefile` for manual deployment.
6969

7070
### Deploy the stack
7171

72-
Execute the following command from your project's {file}`devops/ansible` directory to deploy the stack defined in {file}`devops/stacks/ploneconf2025-<your-github-username>.tangrama.com.br.yml` to the remote server.
72+
Execute the following command from your project's {file}`devops/ansible` directory to deploy the stack defined in {file}`devops/stacks/pybr25-<your-github-username>.tangrama.com.br.yml` to the remote server.
7373

7474
```shell
7575
uv run ansible-playbook playbooks/deploy.yml --tags project
@@ -80,13 +80,13 @@ uv run ansible-playbook playbooks/deploy.yml --tags project
8080
To check the status of all services in your stack, access the remote server:
8181

8282
```shell
83-
ssh root@ploneconf2025-<your-github-username>.tangrama.com.br
83+
ssh root@pybr25-<your-github-username>.tangrama.com.br
8484
```
8585

8686
And then run the command:
8787

8888
```shell
89-
docker stack ps ploneconf2025-<your-github-username>-tangrama-com-br
89+
docker stack ps pybr25-<your-github-username>-tangrama-com-br
9090
```
9191

9292
### Create Plone site
@@ -108,7 +108,7 @@ docker service logs traefik_traefik --follow`
108108
```
109109

110110
```{code-block} shell
111-
:caption: frontend
111+
:caption: frontend
112112
113113
docker service logs <stack-name>_frontend --follow`
114114
```
@@ -162,7 +162,7 @@ Ensure both backend and frontend tests are successful, and images for both serve
162162
163163
1. Go to the project's repository on GitHub.
164164
1. Click the {guilabel}`Actions` tab.
165-
1. Find {guilabel}`Manual Deployment of ploneconf2025-<your-github-username>.tangrama.com.br.yml` and click {guilabel}`Run workflow`.
165+
1. Find {guilabel}`Manual Deployment of pybr25-<your-github-username>.tangrama.com.br.yml` and click {guilabel}`Run workflow`.
166166
1. For {guilabel}`Use workflow from`, select {guilabel}`Branch: main`.
167167
1. Click {guilabel}`Run workflow`.
168168

docs/plone-deployment/plone-docker-images.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ EOT
9494
FROM plone/server-prod-config:${PLONE_VERSION}
9595

9696
LABEL maintainer="Plone Community <collective@plone.org>" \
97-
org.label-schema.name="ploneconf2025-training-backend" \
98-
org.label-schema.description="Plone Conference Training Backend." \
97+
org.label-schema.name="pybr25-training-backend" \
98+
org.label-schema.description="Tutorial Python Brasil Backend." \
9999
org.label-schema.vendor="Plone Community"
100100

101101
# Copy /app from builder
@@ -169,8 +169,8 @@ EOT
169169
FROM plone/server-prod-config:uv-${PYTHON_VERSION}
170170

171171
LABEL maintainer="Plone Community <collective@plone.org>" \
172-
org.label-schema.name="ploneconf2025-training-backend" \
173-
org.label-schema.description="Plone Conference Training Backend." \
172+
org.label-schema.name="pybr25-training-backend" \
173+
org.label-schema.description="Tutorial Python Brasil Backend." \
174174
org.label-schema.vendor="Plone Community"
175175

176176
# Copy the pre-built `/app` directory to the runtime container

docs/plone-deployment/project-edit.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ myst:
99

1010
# Customize your project
1111

12-
[Please fill this form](https://forms.gle/npDRESAud4ntDnUz7).
12+
[Please fill this form](https://forms.gle/ihYVZxmnypwBnZk39).
1313

1414
Plone offers a wealth of features right out of the box. You can extend these capabilities using {term}`TTW` modifications, such as creating new content types, altering the default workflow, or configuring the top-level navigation. For additional functionalities not covered by Plone, you can either develop your own solutions or integrate existing add-ons.
1515

@@ -19,11 +19,11 @@ A Plone project is composed by, at least, a backend Python package and a fronten
1919

2020
The packages for this training are:
2121

22-
`ploneconf2025.core`
23-
: Package metadata located at {file}`backend/pyproject.toml` and code at {file}`backend/src/ploneconf2025/core`.
22+
`pybr25.core`
23+
: Package metadata located at {file}`backend/pyproject.toml` and code at {file}`backend/src/pybr25/core`.
2424

25-
`volto-ploneconf2025-core`
26-
: Package metadata located at {file}`frontend/packages/volto-ploneconf2025-core/package.json` and code at {file}`frontend/packages/volto-ploneconf2025-core/src`.
25+
`volto-pybr25-core`
26+
: Package metadata located at {file}`frontend/packages/volto-pybr25-core/package.json` and code at {file}`frontend/packages/volto-pybr25-core/src`.
2727

2828
## Integrate add-ons
2929

@@ -58,11 +58,11 @@ dependencies = [
5858
]
5959
```
6060

61-
Then we tell Zope to load the add-on run-time configurations by editing {file}`backend/src/ploneconf2025/core/dependencies.zcml` and append `kitconcept.voltolighttheme`.
61+
Then we tell Zope to load the add-on run-time configurations by editing {file}`backend/src/pybr25/core/dependencies.zcml` and append `kitconcept.voltolighttheme`.
6262

6363
```{code-block} xml
6464
:emphasize-lines: 6
65-
:caption: {file}`backend/src/ploneconf2025/core/dependencies.zcml`
65+
:caption: {file}`backend/src/pybr25/core/dependencies.zcml`
6666
6767
<?xml version="1.0" encoding="utf-8"?>
6868
<configure xmlns="http://namespaces.zope.org/zope">
@@ -73,11 +73,11 @@ Then we tell Zope to load the add-on run-time configurations by editing {file}`b
7373
</configure>
7474
```
7575

76-
And, if we want to have this add-on installed when we create a new website, edit {file}`backend/src/ploneconf2025/core/profiles/default/metadata.xml` and append `profile-kitconcept.voltolighttheme:default`.
76+
And, if we want to have this add-on installed when we create a new website, edit {file}`backend/src/pybr25/core/profiles/default/metadata.xml` and append `profile-kitconcept.voltolighttheme:default`.
7777

7878
```{code-block} xml
7979
:emphasize-lines: 8
80-
:caption: {file}`backend/src/ploneconf2025/core/profiles/default/metadata.xml`
80+
:caption: {file}`backend/src/pybr25/core/profiles/default/metadata.xml`
8181
8282
<?xml version="1.0" encoding="utf-8"?>
8383
<metadata>
@@ -92,25 +92,27 @@ And, if we want to have this add-on installed when we create a new website, edit
9292
```
9393

9494

95-
#### Frontend: incorporate a new dependency
95+
#### Frontend: incorporate two new dependencies
9696

97-
Edit {file}`frontend/packages/volto-ploneconf2025/package.json` and append `@kitconcept/volto-light-theme` to the `addons` and `dependencies` sections, as shown below:
97+
Edit {file}`frontend/packages/volto-pybr25/package.json`, add `@kitconcept/volto-light-theme` and `@plone-collective/volto-image-editor` to the `addons` and `dependencies` sections, as shown below:
9898

9999
```json
100100
"addons": [
101101
"...more add-ons",
102+
"@plone-collective/volto-image-editor",
102103
"@kitconcept/volto-light-theme"
103104
],
104105
"dependencies": {
105106
"...more dependencies": "*",
106-
"@kitconcept/volto-light-theme": "7.3.1"
107+
"@kitconcept/volto-light-theme": "7.3.1",
108+
"@plone-collective/volto-image-editor": "1.0.0-alpha.1"
107109
}
108110
```
109111

110112
Also, edit the {file}`frontend/volto.config.js` and change the theme to be `@kitconcept/volto-light-theme`:
111113

112114
```js
113-
const addons = ['volto-ploneconf2025'];
115+
const addons = ['volto-pybr25'];
114116
const theme = '@kitconcept/volto-light-theme';
115117

116118
module.exports = {
@@ -144,7 +146,7 @@ git push
144146

145147
To ensure the behaviors manually applied to the Plone Site persist after the site is re-created, we need to add them via Generic Setup.
146148

147-
Create a new file {file}`backend/src/ploneconf2025/core/profiles/default/types/Plone_Site.xml` with the following content:
149+
Create a new file {file}`backend/src/pybr25/core/profiles/default/types/Plone_Site.xml` with the following content:
148150

149151
```xml
150152
<?xml version="1.0" encoding="utf-8"?>
@@ -178,7 +180,7 @@ cd backend
178180
make update-example-content
179181
```
180182

181-
Now, if you run `git status` you should see changes to files under {file}`backend/src/ploneconf2025/core/setuphandlers/examplecontent`. This is the location where `plone.exportimport` will look for the content to be for your Plone site upon creation.
183+
Now, if you run `git status` you should see changes to files under {file}`backend/src/pybr25/core/setuphandlers/examplecontent`. This is the location where `plone.exportimport` will look for the content to be for your Plone site upon creation.
182184

183185
Now we are going to add these changes to our repository by running:
184186

docs/plone-deployment/project-new.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ COOKIEPLONE_REPOSITORY_TAG=project-profiles uvx cookieplone project
2727
Answer the prompts as they appear. You can either accept the default values or enter your own.
2828

2929
```{warning}
30-
For participants in the **Plone Conference 2025 Training sessions in Jyväskylä, Finland**, please use at least the following settings:
30+
For participants in the **Tutorial Python Brasil 2025, in São Paulo, Brazil**, please use at least the following settings:
3131
32-
- {guilabel}`Project Title`: **Plone Conference Training**
33-
- {guilabel}`Project Slug`: **ploneconf2025**
34-
- {guilabel}`Project URL`: **ploneconf2025-\<your-github-username\>.tangrama.com.br**
32+
- {guilabel}`Project Title`: **Tutorial Python Brasil**
33+
- {guilabel}`Project Slug`: **pybr25**
34+
- {guilabel}`Project URL`: **pybr25-\<your-github-username\>.tangrama.com.br**
3535
- {guilabel}`Should we use prerelease versions?`: **Y(es)**
3636
- {guilabel}`Volto Version`: **19.0.0-alpha.6**
37-
- {guilabel}`Python Package Name`: **ploneconf2025.core**
37+
- {guilabel}`Python Package Name`: **pybr25.core**
3838
- {guilabel}`Language`: **1**
3939
- {guilabel}`GitHub or GitLab username or organization slug from URL`: **\<your-github-username\>**
40-
- {guilabel}`URL to the repository`: **https:\/\/github.com\/<your-github-username\>/ploneconf2025**
40+
- {guilabel}`URL to the repository`: **https:\/\/github.com\/<your-github-username\>/pybr25**
4141
- {guilabel}`GitHub Container Registry`: **1 - GitHub Container Registry**
4242
- {guilabel}`Which persistent storage to use in the deployment stack?`: **1 - RelStorage with PostgreSQL**
4343
- {guilabel}`Should we setup a caching server`: **Y(es)**
@@ -50,17 +50,17 @@ An example interaction with the `Cookieplone` wizard is shown below:
5050

5151
```{code-block} console
5252
:emphasize-lines: 1,3,4,7,9,10,13,22,23,25,30,35,39,43,47
53-
[1/20] Project Title (Project Title): Plone Conference Training
53+
[1/20] Project Title (Project Title): Tutorial Python Brasil
5454
[2/20] Project Description (A new project using Plone 6.):
55-
[3/20] Project Slug (Used for repository id) (plone-conference-training): ploneconf2025
56-
[4/20] Project URL (without protocol) (ploneconf2025.example.com): ploneconf2025-<your-github-username>.tangrama.com.br
55+
[3/20] Project Slug (Used for repository id) (plone-conference-training): pybr25
56+
[4/20] Project URL (without protocol) (pybr25.example.com): pybr25-<your-github-username>.tangrama.com.br
5757
[5/20] Author (Plone):
5858
[6/20] Author E-mail (collective@plone.org):
5959
[7/20] Should we use prerelease versions? (No): Yes
6060
[8/20] Plone Version (6.1.3):
6161
[9/20] Volto Version (19.0.0-alpha.6):
62-
[10/20] Python Package Name (ploneconf2025): ploneconf2025.core
63-
[11/20] Volto Addon Name (volto-ploneconf2025-core):
62+
[10/20] Python Package Name (pybr25): pybr25.core
63+
[11/20] Volto Addon Name (volto-pybr25-core):
6464
[12/20] Language
6565
1 - English
6666
2 - Deutsch
@@ -72,7 +72,7 @@ An example interaction with the `Cookieplone` wizard is shown below:
7272
8 - Svenska
7373
Choose from [1/2/3/4/5/6/7/8] (1):
7474
[13/20] GitHub or GitLab username or organization slug from URL (collective): <your-github-username>
75-
[14/20] URL to the repository (https://github.com/<your-github-username>/ploneconf2025):
75+
[14/20] URL to the repository (https://github.com/<your-github-username>/pybr25):
7676
[15/20] Container Registry
7777
1 - GitHub Container Registry
7878
2 - Docker Hub
@@ -104,7 +104,7 @@ An example interaction with the `Cookieplone` wizard is shown below:
104104
Navigate to your project directory:
105105

106106
```shell
107-
cd ploneconf2025
107+
cd pybr25
108108
```
109109

110110
### Understanding the code base
@@ -131,12 +131,12 @@ Install both the Plone backend and frontend with:
131131
make install
132132
```
133133

134-
This process will take a few minutes. Once completed, a success message will appear. Both the frontend and backend in their respective directories will be built.
134+
This process will take a few minutes. Once completed, a success message will appear. Both the frontend and backend in their respective directories will be built.
135135

136136
For the frontend, the Node.js version will be used that you activated in the previous chapter with `nvm use --lts`. For the backend Python version, uv will check a `requires-python` key in the {file}`pyproject.toml` file.
137137

138138
Putting too specific Node.js and Python versions in the scaffolded project setup can cause other issues.
139-
That's why the project generator gives hints for versions with ranges or `LTS`. But it is your own choice and responsibility to check for the correct major versions of both programming languages are active and available before you run `make install` in the project root or frontend and backend subdirectories for the first time.
139+
That's why the project generator gives hints for versions with ranges or `LTS`. But it is your own choice and responsibility to check for the correct major versions of both programming languages are active and available before you run `make install` in the project root or frontend and backend subdirectories for the first time.
140140

141141
### Code formatting and i18n
142142

@@ -167,7 +167,7 @@ Visit [GitHub](https://github.com) and log in.
167167

168168
Click the `+` icon in the upper right corner, select `New repository`, and fill in the details:
169169

170-
- {guilabel}`Repository name`: `ploneconf2025`
170+
- {guilabel}`Repository name`: `pybr25`
171171
- {guilabel}`Description`: `Plone Conference 2025 Training`
172172
- {guilabel}`Visibility`: `Public`
173173

@@ -206,7 +206,7 @@ Connect your local repository to the remote server. First replace `<your-github-
206206
Also set the default branch to `main`.
207207

208208
```shell
209-
git remote add origin git@github.com:<your-github-username>/ploneconf2025.git
209+
git remote add origin git@github.com:<your-github-username>/pybr25.git
210210
git branch -M main
211211
```
212212

docs/plone-deployment/project-start.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Ensure port 80 is free, then initiate the stack with:
8484
make stack-start
8585
```
8686

87-
Docker will download necessary images, build Frontend and Backend images, and initiate all services. Upon completion, a message prompts you to visit [http://ploneconf2025.localhost](http://ploneconf2025.localhost).
87+
Docker will download necessary images, build Frontend and Backend images, and initiate all services. Upon completion, a message prompts you to visit [http://pybr25.localhost](http://pybr25.localhost).
8888

8989
### Checking the Stack Status
9090

@@ -108,12 +108,12 @@ Re-run `make stack-status`, and both backend and frontend should now display a *
108108

109109
### Accessing the site
110110

111-
Your website is accessible at http://ploneconf2025.localhost.
111+
Your website is accessible at http://pybr25.localhost.
112112

113113
```{figure} _static/start_stack_localhost.png
114-
:alt: Accessing the site at `http://ploneconf2025.localhost`
114+
:alt: Accessing the site at `http://pybr25.localhost`
115115
116-
Accessing the site at `http://ploneconf2025.localhost`
116+
Accessing the site at `http://pybr25.localhost`
117117
```
118118

119119
### Updating the code base

docs/plone-deployment/server-setup.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ Customize the {file}`.env` file to match your specific deployment environment. H
3131

3232
```shell
3333
DEPLOY_ENV=prod
34-
DEPLOY_HOST=ploneconf2025-<your-github-username>.tangrama.com.br
34+
DEPLOY_HOST=pybr25-<your-github-username>.tangrama.com.br
3535
DEPLOY_PORT=22
3636
DEPLOY_USER=plone
3737
DOCKER_CONFIG=.docker
38-
STACK_NAME=ploneconf2025-<your-github-username>-tangrama-com-br
38+
STACK_NAME=pybr25-<your-github-username>-tangrama-com-br
3939
```
4040

4141
```{note}
@@ -58,11 +58,11 @@ Update the {file}`devops/ansible/inventory/hosts.yml` file with the appropriate
5858
---
5959
cluster:
6060
hosts:
61-
ploneconf2025-<your-github-username>.tangrama.com.br:
61+
pybr25-<your-github-username>.tangrama.com.br:
6262
ansible_user: root
63-
ansible_host: ploneconf2025-<your-github-username>.tangrama.com.br
64-
host: ploneconf2025-<your-github-username>
65-
hostname: ploneconf2025-<your-github-username>.tangrama.com.br
63+
ansible_host: pybr25-<your-github-username>.tangrama.com.br
64+
host: pybr25-<your-github-username>
65+
hostname: pybr25-<your-github-username>.tangrama.com.br
6666
swarm_node:
6767
labels:
6868
type: manager
@@ -91,8 +91,8 @@ This command executes the Ansible playbook {file}`devops/playbooks/setup.yml` pe
9191
You should now be able to SSH into the remote server as both **root** and **plone** users:
9292

9393
```shell
94-
ssh root@ploneconf2025-<your-github-username>.tangrama.com.br
95-
ssh plone@ploneconf2025-<your-github-username>.tangrama.com.br
94+
ssh root@pybr25-<your-github-username>.tangrama.com.br
95+
ssh plone@pybr25-<your-github-username>.tangrama.com.br
9696
```
9797

9898
# Review

0 commit comments

Comments
 (0)