Skip to content

Commit 75300a9

Browse files
utnapischtimntarocco
authored andcommitted
wip: update migration script
1 parent 9392078 commit 75300a9

File tree

1 file changed

+58
-23
lines changed

1 file changed

+58
-23
lines changed

docs/releases/v13/upgrade-v13.0.md

Lines changed: 58 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ The steps listed in this article require an existing local installation of Inven
1515
In case you have an InvenioRDM installation older than v12, you can gradually upgrade
1616
to v12 and afterwards continue from here.
1717

18+
!!! read through the whole upgrade steps before upgrading
19+
1820
## Upgrade Steps
1921

2022
Make sure you have the latest `invenio-cli` installed. For InvenioRDM v13, it
21-
should be v1.5.0+
23+
should be v1.7.0+
2224

2325
```bash
2426
$ invenio-cli --version
25-
invenio-cli, version 1.5.0
27+
invenio-cli, version 1.7.0
2628
```
2729

2830
!!! info "Virtual environments"
@@ -50,17 +52,20 @@ running `invenio-cli` or `pipenv` commands below.
5052

5153
Python 3.9 or 3.11 or 3.12 is required to run InvenioRDM v12.
5254

55+
Note: endoflife of python3.9 will be 31. October 2025. There will be no
56+
python3.9 related updates done after that date.
57+
5358
There are two options to upgrade your system:
5459

5560
#### Upgrade option 1: In-place
5661

5762
This approach upgrades the dependencies in place. Your virtual environment for the
58-
v11 version will be gone afterwards.
63+
v12 version will be gone afterwards.
5964

6065
```bash
6166
cd <my-site>
6267

63-
# Upgrade to InvenioRDM v12
68+
# Upgrade to InvenioRDM v13
6469
invenio-cli packages update 13.0.0
6570

6671
# Re-build assets
@@ -69,7 +74,7 @@ invenio-cli assets build
6974

7075
#### Upgrade option 2: New virtual environment
7176

72-
This approach will create a new virtual environment and leaves the v11 one as-is.
77+
This approach will create a new virtual environment and leaves the v12 one as-is.
7378
If you are using a docker image on your production instance this will be the
7479
option you choose.
7580

@@ -124,6 +129,11 @@ invenio alembic upgrade
124129

125130
Execute the data migration:
126131

132+
```bash
133+
invenio shell $(find $(pipenv --venv)/lib/*/site-packages/invenio_app_rdm -name migrate_12_0_to_13_0.py)
134+
```
135+
136+
127137
### Configuration change for `nginx`
128138

129139
The new PDF file previewer is based on `pdfjs-dist` v4, which uses ECMAScript modules (`.mjs`) over CommonJS files (`.js`).
@@ -143,7 +153,25 @@ types {
143153
}
144154
```
145155

146-
### TODO
156+
### if you plan to use `APP_RDM_DEPOSIT_NG_FILES_UI_ENABLED`
157+
158+
you have to add following
159+
160+
```
161+
"script-src": [
162+
"'self'", "blob:", "'wasm-unsafe-eval'" # for WASM-based workers, e.g. hash-wasm
163+
],
164+
```
165+
166+
in the `invenio.cfg` file to the
167+
168+
```
169+
APP_DEFAULT_SECURE_HEADERS = {
170+
"content_security_policy": {}
171+
}
172+
```
173+
174+
configuration.
147175

148176
### New Index Template for Job Logs
149177

@@ -181,21 +209,11 @@ curl -X PUT "http://localhost:9200/_index_template/job-logs-v1.0.0" -H "Content-
181209

182210
### Rebuild search indices
183211

184-
TODO if not destroying and rebuiliding for names we need to update the mappings:
185-
186-
```bash
187-
invenio index update names-name-v2.0.0 --no-check
188-
```
189-
190-
TODO: this is also required to create the mapping for the new `copyright` field.
212+
#### full rebuild
191213

192214
```bash
193215
invenio index destroy --yes-i-know
194216
invenio index init
195-
# if you have records custom fields
196-
invenio rdm-records custom-fields init
197-
# if you have communities custom fields
198-
invenio communities custom-fields init
199217
invenio rdm rebuild-all-indices
200218
```
201219

@@ -205,6 +223,17 @@ rather than having indices registered directly in `Invenio-Search`. As such, the
205223
search indices for statistics are not affected by `invenio index destroy
206224
--yes-i-know` and are totally functional after the rebuild step.
207225

226+
#### possible live update
227+
228+
CHECK if that works
229+
```bash
230+
invenio index update names-name-v2.0.0 --no-check
231+
```
232+
233+
TODO: this is also required to create the mapping for the new `copyright` field.
234+
235+
236+
208237
### Updated vocabularies
209238

210239
InvenioRDM now supports ROR v2, and you should update your affiliations and
@@ -230,8 +259,8 @@ server {
230259
```
231260

232261
### New roles
262+
nothing yet
233263

234-
### TODO
235264

236265
### New configuration variables
237266

@@ -243,21 +272,27 @@ ADMINISTRATION_DISPLAY_VERSIONS = [
243272
]
244273
```
245274

275+
### Changed configuration variables
276+
277+
- change from `APP_ALLOWED_HOSTS` to `TRUSTED_HOSTS` due flask >= 3
278+
279+
246280
## Big Changes
247281

248282
- feature: invenio jobs module, periodic tasks administration panel
249283
- feature: invenio vocabularies entries deprecation
250284
- improvement: search mappings and analyzers to improve performance
251285
- OpenSearch min version now required v2.12 due to breaking changes in `geo-shape` fields, see issue [here](https://github.com/inveniosoftware/invenio-rdm-records/issues/1807) and related OpenSearch issue and comment [here](https://github.com/opensearch-project/OpenSearch/issues/10958#issuecomment-2037882756).
252-
- change from `APP_ALLOWED_HOSTS` to `TRUSTED_HOSTS` due flask >= 3
253286
- dashboard: `shared_with_me` drafts and requests. See [issue[(https://github.com/inveniosoftware/docs-invenio-rdm/blob/master/docs/releases/v13/upgrade-v13.0.md)
254287
- custom fields: thesis subfields renamed (TODO: migration recipe)
255288
- custom fields: meeting url changed to identifiers subfield (TODO: migration recipe)
256-
257-
### TODO
289+
- experimental: using uv (instead of pipenv), rspack (instead of webpack) and pnpm (instead of npm)
258290

259291
Document this error, or actually add it to the upgrade recipe
260292

293+
294+
## OPEN PROBLEMS
295+
261296
```
262297
opensearchpy.exceptions.AuthorizationException: AuthorizationException(403, 'security_exception', 'no permissions for [cluster:admin/component_template/put] and User [name=inveniordm-qa, backend_roles=[], requestedTenant=null]')
263298
@@ -270,6 +305,6 @@ Go to OpenSearch Dashboards -> Security -> Roles -> <instance name>, edit role a
270305
- `cluster:admin/component_template/put`
271306
- `indices:admin/index_template/put`
272307

273-
## OPEN PROBLEMS
274308

275-
### TODO
309+
## OPEN PROBLEMS
310+
nothing yet

0 commit comments

Comments
 (0)