Skip to content

Commit

Permalink
Merge pull request #170 from FlowFuse/doc-upgrade-instructions-update
Browse files Browse the repository at this point in the history
docs: Adjust UPGRADE instruction
  • Loading branch information
hardillb authored Nov 24, 2024
2 parents a00cbb9 + 59b0365 commit 541f4a6
Showing 1 changed file with 19 additions and 5 deletions.
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
```

0 comments on commit 541f4a6

Please sign in to comment.