Skip to content

Commit 76806ab

Browse files
authored
Merge pull request #562 from ukkopahis/doc-improvements
Doc improvements
2 parents 4739ce1 + a439905 commit 76806ab

File tree

6 files changed

+226
-158
lines changed

6 files changed

+226
-158
lines changed

README.md

Lines changed: 4 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -15,68 +15,11 @@ See [Getting Started](https://sensorsiot.github.io/IOTstack/Getting-Started) in
1515

1616
### significant change to networking
1717

18-
Networking under both *new menu* (master branch) and *old menu* (old-menu branch) has undergone a significant change. This will not affect new users of IOTstack (who will adopt it automatically). Neither will it affect existing users who do not use the menu to maintain their stacks (see [adopting networking changes by hand](#networkHandEdit) below).
19-
20-
Users who *do* use the menu to maintain their stacks will also be unaffected *until the next menu run*, at which point it will be prudent to down your stack entirely and re-select all your containers. Downing the stack causes Docker to remove all associated networks as well as the containers.
18+
After 2022-01-18 the menu has changed to use Docker networks differently. Users from before this need to do [migration](https://sensorsiot.github.io/IOTstack/Updates/migration-network-change/) in order to add new services. In essence, just re-select all your services using the menu. If not done, docker-compose will give you an error like:
2119

22-
These changes mean that networking is **identical** under both *old* and *new* menus. To summarise the changes:
23-
24-
1. Only two internal networks are defined – as follows:
25-
26-
* "default" which adopts the name `iotstack_default` at runtime.
27-
* "nextcloud" which adopts the name `iotstack_nextcloud` at runtime.
28-
29-
If you are using docker-compose v2.0.0 or later then the `iotstack_nextcloud` network will only be instantiated if you select NextCloud as one of your services. Earlier versions of docker-compose instantiate all networks even if no service uses them (which is why you get those warnings at "up" time).
30-
31-
2. The only service definitions which now have `networks:` directives are:
32-
33-
* NextCloud: joins the "default" and "nextcloud" networks; and
34-
* NextCloud_DB: joins the "nextcloud" network.
35-
36-
All other containers will join the "default" network, automatically, without needing any `networks:` directives.
37-
38-
#### <a name="networkHandEdit"> adopting networking changes by hand </a>
39-
40-
If you maintain your `docker-compose.yml` by hand, you can adopt the networking changes by doing the following:
41-
42-
1. Take your stack down. This causes Docker to remove any existing networks.
43-
2. Remove **all** `networks:` directives wherever they appear in your `docker-compose.yml`. That includes:
44-
45-
* the `networks:` directives in all service definitions; and
46-
* the `networks:` specifications at the end of the file.
47-
48-
3. Append the contents of the following file to your `docker-compose.yml`:
49-
50-
```
51-
~/IOTstack/.templates/env.yml
52-
```
53-
54-
For example:
55-
56-
```
57-
$ cat ~/IOTstack/.templates/env.yml >>~/IOTstack/docker-compose.yml
58-
```
59-
60-
The `env.yml` file is the same for both *old-menu* and *master* branches.
61-
62-
4. If you run the NextCloud service then:
63-
64-
* Add these lines to the NextCloud service definition:
65-
66-
```
67-
networks:
68-
- default
69-
- nextcloud
70-
```
71-
72-
* Add these lines to the NextCloud_DB service definition:
73-
74-
```
75-
networks:
76-
- nextcloud
77-
```
78-
79-
5. Bring up your stack.
20+
```
21+
ERROR: Service "influxdb" uses an undefined network "iotstack_nw"
22+
```
8023

8124
### contributions
8225

docs/Basic_setup/index.md

Lines changed: 31 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,8 @@ Please don't read these assumptions as saying that IOTstack will not run on othe
116116

117117
### scripted
118118

119-
If you prefer to automate your installations using scripts, see:
120-
121-
* [Installing Docker for IOTstack](https://gist.github.com/Paraphraser/d119ae81f9e60a94e1209986d8c9e42f#scripting-iotstack-installations).
119+
If you prefer to automate your installations using scripts, see
120+
[PiBuilder](https://github.com/Paraphraser/PiBuilder).
122121

123122
## Required system patches
124123

@@ -130,7 +129,6 @@ Run the following commands:
130129

131130
``` console
132131
$ sudo bash -c '[ $(egrep -c "^allowinterfaces eth\*,wlan\*" /etc/dhcpcd.conf) -eq 0 ] && echo "allowinterfaces eth*,wlan*" >> /etc/dhcpcd.conf'
133-
$ sudo reboot
134132
```
135133

136134
See [Issue 219](https://github.com/SensorsIot/IOTstack/issues/219) and [Issue 253](https://github.com/SensorsIot/IOTstack/issues/253) for more information.
@@ -139,32 +137,32 @@ See [Issue 219](https://github.com/SensorsIot/IOTstack/issues/219) and [Issue 25
139137

140138
This patch is **ONLY** for Raspbian Buster. Do **NOT** install this patch if you are running Raspbian Bullseye.
141139

142-
#### step 1: check your OS release
140+
1. check your OS release
143141

144-
Run the following command:
142+
Run the following command:
145143

146-
``` console
147-
$ grep "PRETTY_NAME" /etc/os-release
148-
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
149-
```
144+
``` console
145+
$ grep "PRETTY_NAME" /etc/os-release
146+
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
147+
```
150148

151-
If you see the word "buster", proceed to step 2. Otherwise, skip this patch.
149+
If you see the word "buster", proceed to step 2. Otherwise, skip this patch.
152150

153-
#### step 2: if you are indeed running "buster"
151+
2. if you are indeed running "buster"
154152

155-
Without this patch on Buster, Docker images will fail if:
153+
Without this patch on Buster, Docker images will fail if:
156154

157-
* the image is based on Alpine and the image's maintainer updates to [Alpine 3.13](https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0#time64_requirement); and/or
158-
* an image's maintainer updates to a library that depends on 64-bit values for *Unix epoch time* (the so-called Y2038 problem).
155+
* the image is based on Alpine and the image's maintainer updates to [Alpine 3.13](https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0#time64_requirement); and/or
156+
* an image's maintainer updates to a library that depends on 64-bit values for *Unix epoch time* (the so-called Y2038 problem).
159157

160-
To install the patch:
158+
To install the patch:
161159

162-
``` console
163-
$ sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
164-
$ echo "deb http://httpredir.debian.org/debian buster-backports main contrib non-free" | sudo tee -a "/etc/apt/sources.list.d/debian-backports.list"
165-
$ sudo apt update
166-
$ sudo apt install libseccomp2 -t buster-backports
167-
```
160+
``` console
161+
$ sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
162+
$ echo "deb http://httpredir.debian.org/debian buster-backports main contrib non-free" | sudo tee -a "/etc/apt/sources.list.d/debian-backports.list"
163+
$ sudo apt update
164+
$ sudo apt install libseccomp2 -t buster-backports
165+
```
168166

169167
### patch 3 - kernel control groups
170168

@@ -173,10 +171,11 @@ usage. This makes commands like `docker stats` fully work. Also needed for full
173171
monitoring of docker resource usage by the telegraf container.
174172

175173
Enable by running (takes effect after reboot):
176-
```
177-
echo $(cat /boot/cmdline.txt) cgroup_memory=1 cgroup_enable=memory | sudo tee /boot/cmdline.txt
178-
```
179174

175+
``` console
176+
$ echo $(cat /boot/cmdline.txt) cgroup_memory=1 cgroup_enable=memory | sudo tee /boot/cmdline.txt
177+
$ sudo reboot
178+
```
180179

181180
## the IOTstack menu
182181

@@ -501,33 +500,15 @@ You read this as two paths, separated by a colon. The:
501500
* external path is `./volumes/nodered/data`
502501
* internal path is `/data`
503502

504-
In this context, the leading "." means "the folder containing `docker-compose.yml`", so the external path is actually:
503+
In this context, the leading "." means "the folder containing`docker-compose.yml`", so the external path is actually:
505504

506505
* `~/IOTstack/volumes/nodered/data`
507506

508-
If a process running **inside** the container modifies any file or folder within:
509-
510-
```
511-
/data
512-
```
513-
514-
the change is mirrored **outside** the container at the same relative path within:
515-
516-
```
517-
~/IOTstack/volumes/nodered/data
518-
```
519-
520-
The same is true in reverse. Any change made to any file or folder **outside** the container within:
521-
522-
```
523-
~/IOTstack/volumes/nodered/data
524-
```
525-
526-
is mirrored at the same relative path **inside** the container at:
527-
528-
```
529-
/data
530-
```
507+
This type of volume is a
508+
[bind-mount](https://docs.docker.com/storage/bind-mounts/), where the
509+
container's internal path is directly linked to the external path. All
510+
file-system operations, reads and writes, are mapped to directly to the files
511+
and folders at the external path.
531512

532513
### deleting persistent data
533514

@@ -561,7 +542,7 @@ This is how **most** containers behave. There are exceptions so it's always a go
561542

562543
!!! danger "Breaking update"
563544
Recent changes will require [manual steps](
564-
https://github.com/SensorsIot/IOTstack/blob/master/README.md#significant-change-to-networking)
545+
../Updates/migration-network-change.md)
565546
or you may get an error like:
566547
`ERROR: Service "influxdb" uses an undefined network "iotstack_nw"`
567548

docs/Updates/Changelog.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Latest
2+
<!-- what's in open pull requests that will be merged at an unknown date -->
3+
4+
- New service: [Duckdns](../Containers/Duckdns.md), deprecates the
5+
`duck/duck.sh` script.
6+
- Fixes to [bash aliases](../Basic_setup/Docker.md#aliases)
7+
- Documentation development made easier: [Writing documentation](
8+
../Developers/index.md#writing-documentation)
9+
10+
## 2022-04-26
11+
12+
- New service: [Syncthing](../Containers/Syncthing.md)
13+
- Zigbee2MQTT: [Service definition change](
14+
../Containers/Zigbee2MQTT.md#service-definition-change)
15+
- Dropping support for Home Assistant Supervised. Home Assistant **Container**
16+
still available.
17+
- [Homebridge](../Containers/Homebridge.md) is now on port 8581
18+
- Documentation: Added: [Git Setup](../Developers/Git-Setup.md). Large changes
19+
to: [Updates](../Updates/index.md), [InfluxDB](../Containers//InfluxDB.md),
20+
[Grafana](../Containers/Grafana.md), [Pi-hole](../Containers/Pi-hole.md),
21+
[Docker Logging](../Basic_setup/Docker.md#logging).
22+
23+
## 2022-01-18
24+
25+
- Networking change **requiring** [migration](
26+
../Updates/migration-network-change.md).

0 commit comments

Comments
 (0)