Skip to content

Commit 7e7bd19

Browse files
committed
docs/Updates: minor rewording
1 parent 39c2a7a commit 7e7bd19

File tree

1 file changed

+38
-31
lines changed

1 file changed

+38
-31
lines changed

docs/Updates/index.md

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,66 +25,73 @@ flowchart TD
2525
class GITPULL,MENU,UP,PULL command
2626
```
2727

28-
In order to keep the graph from getting too complex, some minor details were
29-
left out:
28+
!!! note "Minor details"
3029

31-
- `$ docker-compose pull` will read `docker-compose.yml`, in order to
32-
know what image tags to check for updates.
33-
- `docker-compose build --pull --no-cache` will use
34-
`~/IOTstack/.templates/*/Dockerfile` and pull referenced Docker images, if
35-
there are selected services using these Dockerfiles.
30+
In order to keep the graph simple, some minor details fudged:
31+
32+
- `$ docker-compose pull` will read `docker-compose.yml`, in order to know
33+
what image tags to check for updates.
34+
- `docker-compose build --pull --no-cache` will use
35+
`~/IOTstack/.templates/*/Dockerfile` and
36+
`~/IOTstack/services/*/Dockerfile` and pull their referenced Docker
37+
images, if there are selected services using these Dockerfiles.
3638

3739
## Backup and rollback
3840

39-
The usual way of backing up your `~/IOTstack` contents isn't sufficient to do a
40-
100% restore, as the local Docker image cache can't easily be restored back its
41-
initial state. To make matters worse, it's not unheard of that new images from
42-
hub.docker.com may [break
43-
something](https://github.com/node-red/node-red/issues/3461#issuecomment-1076348639).
44-
On the other hand, this may be a risk you're willing to take.
41+
The usual way of backing up just your `~/IOTstack` contents isn't sufficient
42+
for a 100% identical restore. Some containers may have local ephemeral
43+
modifications that will be lost when they're recreated. Currently running
44+
containers may be based on now outdated images. Recreating a container using an
45+
old image is tricky. The local Docker image cache can't easily be restored to
46+
the same state with old images and old tag references. The `docker pull` will
47+
fetch the latest images, but it's not unheard of that the latest image may
48+
break [something](
49+
https://github.com/node-red/node-red/issues/3461#issuecomment-1076348639).
50+
51+
Thus to *guarantee* a successful rollback, you have to shutdown your RPi and
52+
save a complete disk image backup of its storage using another machine.
4553

46-
To ensure a successful rollback, you have to shutdown your RPi and backup a
47-
complete image of its storage device using another machine. This will also
48-
ensure all databases are saved in a valid state.
54+
For a hobby project, not having perfect rollback may be a risk you're willing
55+
to take. Usually container image problems have fixes/workarounds within a day.
4956

5057
## Recommended: Update only Docker images
5158

5259
When you built the stack using the menu, it created the Docker Compose file
5360
`docker-compose.yml`. This file uses tag references (e.g. `:latest`) to get the
5461
image for that tag from hub.docker.com. Thus when Docker is told to pull
5562
images, it will download and update it's local cache to the newest image. No
56-
need to do any updates to `docker-compose.yml`.
63+
need to update `docker-compose.yml` or `Dockerfile`s.
5764

5865
Updating the IOTstack project templates and recreating your
5966
`docker-compose.yml` isn't usually necessary. Doing so isn't likely to provide
6067
much benefits, and may actually break something. A full update is only
6168
recommended when there is a new feature or change you need.
6269

63-
!!! note "Recommended update procedure"
70+
!!! tip "Recommended update procedure"
6471

6572
1. Shutdown your RPi, remove its storage medium and backup a full image
66-
of the storage to another machine. Reinstall your storage and power up
73+
of the storage to another machine. Reattach your storage and power up
6774
your RPi. To skip this step may cause a long downtime as you debug the
6875
problem.
6976
2. Get latest images from the web:
70-
```bash
71-
docker-compose pull
77+
``` console
78+
$ docker-compose pull
7279
```
7380
3. Rebuild localy created images based on new parent images:
74-
```bash
75-
docker-compose build --pull --no-cache
81+
``` console
82+
$ docker-compose build --pull --no-cache
7683
```
7784
Note: this may not do anything, depending on your selected services.
78-
4. Update(recreate) containers to use new images:
79-
```bash
80-
docker-compose up --build -d
85+
4. Update(recreate) containers that have new images:
86+
``` console
87+
$ docker-compose up --build -d
8188
```
8289

8390
If a service fails to start after it's updated, especially if you are updating
84-
frequently, wait for a few hours and repeat the update procedure. Sometimes
85-
there are bad releases published to hub.docker.com, but they are usually fixed
86-
in under half a day. Of course you are always welcome to report the problem to
87-
our [Discord](https://discord.gg/ZpKHnks) server. Usually someone else has
91+
frequently, wait for a few hours and repeat the update procedure. Sometimes bad
92+
releases are published to hub.docker.com, but they are usually fixed in under
93+
half a day. Of course you are always welcome to report the problem to our
94+
[Discord](https://discord.gg/ZpKHnks) server. Usually someone else has
8895
encountered the same problem and reported the fix.
8996

9097
## Full update
@@ -98,7 +105,7 @@ Periodically updates are made to project which include new or modified container
98105
2. backup your current settings: `cp docker-compose.yml docker-compose.yml.bak`
99106
3. check `git status` for any local changes you may have made to project files, ignore any reported "Untracked files". Save and preserve your changes by doing a commit: `git commit -a -m "local customization"`. Or revert them using: `git checkout -- path/to/changed_file`.
100107
4. update project files from github: `git pull origin master -r`
101-
5. recreate the compose file: `./menu.sh`, select Build Stack, don't change selections only press enter to build, and then exit.
108+
5. recreate the compose file and Dockerfile:s: `./menu.sh`, select Build Stack, don't change selections, press enter to build, and then exit.
102109
4. get latest images from the web: `docker-compose pull`
103110
5. rebuild localy created images from new Dockerfiles: `docker-compose build --pull --no-cache`
104111
6. update running containers to latest: `docker-compose up --build -d`

0 commit comments

Comments
 (0)