Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Adjust UPGRADE instruction #170

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ This allows for easier management of the platform and better separation of conce
3. **Move configurations to the new approach**

* Copy content of `./etc/flowforge.yml` file to `docker-compose-new.yml` file, to `configs.flowfuse.content` section. Remove all commented lines. Maintain indentation.
* Make sure, that `broker.url` is seto fo `mqtt://broker:1883`. Update if needed.
* Copy content of `./etc/flowforge-storage.yml` file to `docker-compose-new.yml` file, to `configs.flowfuse_storage.content` section. Remove all commented lines. Maintain indentation.
* Set the `DOMAIN` variable in the `.env` file to the domain used by your instance of FlowFuse platform.
* If custom certificates are used, copy their content to `.env` file, to `TLS_CERTIFICATE` and `TLS_KEY` variables. They should look like this:
Expand Down Expand Up @@ -90,38 +91,51 @@ This allows for easier management of the platform and better separation of conce
docker run --rm -v flowfuse_db:/data -v $(pwd)/db:/backup alpine sh -c "cp -a /backup/. /data/"
```

5. **Start FlowFuse**
5. **Rename files**

In order to maintain the same file structurem, rename the compose files.

```bash
mv docker-compose.yml docker-compose-old.yml
mv docker-compose-new.yml docker-compose.yml
mv docker-compose-tls.override.new.yml docker-compose-tls.override.yml
```

6. **Start FlowFuse**

Start the new FlowFuse platform using the new Docker Compose file.

* With automatic TLS certificate generation:
```bash
docker compose -f docker-compose-new.yml -f docker-compose-tls.new.override.yml --profile autossl -p flowfuse up -d
docker compose -f docker-compose.yml -f docker-compose-tls.override.yml --profile autossl -p flowfuse up -d
```

* With custom TLS certificate:

```bash
docker compose -f docker-compose.new.yml -f docker-compose-tls..new.override.yml -p flowfuse up -d
docker compose -f docker-compose.yml -f docker-compose-tls.override.yml -p flowfuse up -d
```

* In all other cases

```bash
docker compose -p flowfuse up -d
```
6. **Verify the migration**

7. **Verify the migration**

Verify that the new FlowFuse platform is working correctly and it is accessible using the domain set in the `.env` file.
Login credentials should remain the same as before the migration, as well as platform configuration.
Restart the Node-RED instances if they appear in `Starting` state.

7. **Cleanup**
8 **Cleanup**

After verifying that the new FlowFuse platform is working correctly, you can remove the old configuration files.

```bash
rm ./etc/flowforge.yml ./etc/flowforge.yml.bak
rm ./etc/flowforge-storage.yml.bak ./etc/flowforge-storage.yml
rm -rf ./db ./db.bak
rm -f ./docker-compose-old.yml
```