Skip to content

Commit 22185bf

Browse files
committed
docs: move network migration to its own page
1 parent 22d8808 commit 22185bf

File tree

5 files changed

+71
-65
lines changed

5 files changed

+71
-65
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ This is how **most** containers behave. There are exceptions so it's always a go
542542

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

docs/Updates/Changelog.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
## 2022-01-18
2424

2525
- Networking change **requiring** [migration](
26-
https://github.com/SensorsIot/IOTstack/#significant-change-to-networking).
27-
26+
../Updates/migration-network-change.md).

docs/Updates/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Periodically updates are made to project which include new or modified container
122122

123123
!!! danger "Breaking update"
124124
Recent changes will require [manual steps](
125-
https://github.com/SensorsIot/IOTstack/blob/master/README.md#significant-change-to-networking)
125+
../Updates/migration-network-change.md)
126126
or you may get an error like:
127127
`ERROR: Service "influxdb" uses an undefined network "iotstack_nw"`
128128

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Migration: network change
2+
3+
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).
4+
5+
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.
6+
7+
These changes mean that networking is **identical** under both *old* and *new* menus. To summarise the changes:
8+
9+
1. Only two internal networks are defined – as follows:
10+
11+
* "default" which adopts the name `iotstack_default` at runtime.
12+
* "nextcloud" which adopts the name `iotstack_nextcloud` at runtime.
13+
14+
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).
15+
16+
2. The only service definitions which now have `networks:` directives are:
17+
18+
* NextCloud: joins the "default" and "nextcloud" networks; and
19+
* NextCloud_DB: joins the "nextcloud" network.
20+
21+
All other containers will join the "default" network, automatically, without needing any `networks:` directives.
22+
23+
#### <a name="networkHandEdit"> adopting networking changes by hand </a>
24+
25+
If you maintain your `docker-compose.yml` by hand, you can adopt the networking changes by doing the following:
26+
27+
1. Take your stack down. This causes Docker to remove any existing networks.
28+
2. Remove **all** `networks:` directives wherever they appear in your `docker-compose.yml`. That includes:
29+
30+
* the `networks:` directives in all service definitions; and
31+
* the `networks:` specifications at the end of the file.
32+
33+
3. Append the contents of the following file to your `docker-compose.yml`:
34+
35+
```
36+
~/IOTstack/.templates/env.yml
37+
```
38+
39+
For example:
40+
41+
```
42+
$ cat ~/IOTstack/.templates/env.yml >>~/IOTstack/docker-compose.yml
43+
```
44+
45+
The `env.yml` file is the same for both *old-menu* and *master* branches.
46+
47+
4. If you run the NextCloud service then:
48+
49+
* Add these lines to the NextCloud service definition:
50+
51+
```
52+
networks:
53+
- default
54+
- nextcloud
55+
```
56+
57+
* Add these lines to the NextCloud_DB service definition:
58+
59+
```
60+
networks:
61+
- nextcloud
62+
```
63+
64+
5. Bring up your stack.

0 commit comments

Comments
 (0)