Update migration authored by Daniel Palomar's avatar Daniel Palomar
......@@ -5,18 +5,24 @@ To update the version of your OC instance we do the next process:
1. Look in the Release Notes the OC team instructions. Ex. https://opencell.assembla.com/spaces/meveo-enterprise/wiki/Opencell_7_Release_note
2. Search the version you want to install
3. Look if exist any migration SQL script.
- If exists, add it to the volumes attached to the `postgres-wildfly` container in the `docker-entrypoint-initdb.d` folder to execute the script in the container startup:
- If exist, download it from the server with a `wget` command:
```
$ wget http://dl.opencellsoft.com/7.3.0/7.2.2_TO_7.3.0.sql
```
- Execute the script with `docker exec`:
```
- /home/opencell/input-files/migration-to-X.sql:/docker-entrypoint-initdb.d/migration-to-X.sql
$ docker exec -i postgres psql -U opencell opencell < 7.2.2_TO_7.3.0.sql
```
> Remember the `-i` argument, it's needed!! :eyes:
- Restart de db container.
- Remove the volume of the db migration
4. After run the migration script, if is needed, we can update the code with the `opencell-provisioning` project.
- Update the var `opencell_version` in the host_vars that you want upgrade.
- Execute the `deploy.yml` playbook.
4. Update the code of OpenCell and restart it.
- Download the `war` file of the version needed.
- Replace the `war` file used (in `input-files`) by the new `war` file.
- Restart the OC container.
> If you don't use the ElasticSearch engine to search, you need to disable it. Set the var `elasticsearch.restUri` equal to none in `opencell-admin.properties`:
```
......
......