You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 2019-12-12 Added Function to add custom containers to the stack
@@ -25,15 +23,15 @@ The bulk of the README has moved to the Wiki. Please check it out [here](https:/
25
23
* 2019-11-20 BUGFIX influxdb backup: Placing docker_backup in crontab caused influxdb backup not to execute correctly
26
24
* 2019-11-20 BUGFIX disable swap: swapfile recreation on reboot fixed. Re-run from menu to fix.
27
25
* Node-RED: serial port. New template adds privileged which allows acces to serial devices
28
-
*EspurinoHub: is available for testing see wiki entry
26
+
*EspruinoHub: available for testing
29
27
30
28
***
31
29
32
30
## Highlighted topics
33
31
34
-
*[Bluetooth and Node-RED](https://github.com/gcgarner/IOTstack/wiki/Node-RED#using-bluetooth)
35
-
*[Saving files to disk inside containers](https://github.com/gcgarner/IOTstack/wiki/Node-RED#sharing-files-between-node-red-and-the-host)
36
-
*[Updating the Project](https://github.com/gcgarner/IOTstack/wiki/Updating-the-Project)
32
+
*[Bluetooth and Node-RED](https://sensorsiot.github.io/IOTstack/Node-RED#using-bluetooth)
33
+
*[Saving files to disk inside containers](https://sensorsiot.github.io/IOTstack/Node-RED#sharing-files-between-node-red-and-the-host)
34
+
*[Updating the Project](https://sensorsiot.github.io/IOTstack/Updating-the-Project/)
37
35
38
36
***
39
37
@@ -90,47 +88,47 @@ For those looking for a script that installs native applications check out [Pete
90
88
91
89
## Tested platform
92
90
93
-
Raspberry Pi 3B and 4B Raspbian (Buster)
91
+
Raspberry Pi 3B and 4B Raspbian (Buster).
94
92
95
93
### Older Pi's
96
94
97
-
Docker will not run on a PiZero or A model 1 because of the CPU. It has not been tested on a Model 2. You can still use Peter Scargill's [script](https://tech.scargill.net/the-script/)
95
+
Docker will not run on a PiZero or A model 1 because of the CPU. It has not been tested on a Model 2. You can still use Peter Scargill's [script](https://tech.scargill.net/the-script/).
98
96
99
97
## Running under a virtual machine
100
98
101
-
For those wanting to test out the script in a Virtual Machine before installing on their Pi there are some limitations. The script is designed to work with Debian based distributions. Not all the container have x86_64 images. For example Portainer does not and will give an error when you try and start the stack. Please see the pinned issue [#29](https://github.com/gcgarner/IOTstack/issues/29), there is more info there.
99
+
For those wanting to test out the script in a Virtual Machine before installing on their Pi there are some limitations. The script is designed to work with Debian based distributions. Not all the container have x86_64 images. For example Portainer does not and will give an error when you try and start the stack.
102
100
103
101
## Feature Requests
104
102
105
-
Please direct all feature requests to [Discord](https://discord.gg/W45tD83)
103
+
Please direct all feature requests to [Discord](https://discord.gg/W45tD83).
106
104
107
105
## Youtube reference
108
106
109
107
This repo was originally inspired by Andreas Spiess's video on using some of these tools. Some containers have been added to extend its functionality.
110
108
111
-
[YouTube video](https://www.youtube.com/watch?v=JdV4x925au0): This is an alternative approach to the setup. Be sure to watch the video for the instructions. Just note that the network addresses are different, see the wiki under Docker Networks.
109
+
[YouTube video](https://www.youtube.com/watch?v=JdV4x925au0): This is an alternative approach to the setup. Be sure to watch the video for the instructions. Just note that the network addresses are different, see [Networking](https://sensorsiot.github.io/IOTstack/Networking/).
112
110
113
111
### YouTube guide
114
112
115
-
@peyanski (Kiril) made a YouTube video on getting started using the project, check it out [here](https://youtu.be/5JMNHuHv134)
113
+
@peyanski (Kiril) made a [YouTube video](https://youtu.be/5JMNHuHv134) on getting started using the project.
116
114
117
115
## Download the project
118
116
119
-
1.On the lite image you will need to install git first
117
+
1. On the lite image you will need to install git first.
Due to some script restraints, this project needs to be stored in ~/IOTstack
132
130
133
-
3.To enter the directory run:
131
+
3. To enter the directory run:
134
132
135
133
```bash
136
134
cd~/IOTstack
@@ -139,13 +137,13 @@ cd ~/IOTstack
139
137
## The Menu
140
138
141
139
I've added a menu to make things easier. It is good to familiarise yourself with the installation process.
142
-
The menu can be used to install docker and build the docker-compose.yml file necessary for starting the stack. It also runs a few common commands. I do recommend you start to learn the docker and docker-compose commands if you plan on using docker in the long run. I've added several helper scripts, have a look inside.
140
+
The menu can be used to install docker and build the docker-compose.yml file necessary for starting the stack. It also runs a few common commands. I do recommend you start to learn the docker and docker-compose commands if you plan on using Docker in the long run. I've added several helper scripts, have a look inside.
143
141
144
142
Navigate to the project folder and run `./menu.sh`
145
143
146
-
### Installing from the menu
144
+
### Installing Docker from the menu
147
145
148
-
Select the first option and follow the prompts
146
+
Select "Install Docker" and follow the prompts. This ends with a reboot.
149
147
150
148
### Build the docker-compose file
151
149
@@ -165,13 +163,19 @@ From this point on make sure you are executing the commands from inside the proj
165
163
166
164
## Starting and Stopping containers
167
165
168
-
to start the stack navigate to the project folder containing the docker-compose.yml file
166
+
To start the stack:
169
167
170
-
To start the stack run:
171
-
`docker-compose up -d` or `./scripts/start.sh`
168
+
```bash
169
+
cd~/IOTstack
170
+
docker-compose up -d
171
+
```
172
172
173
-
To stop:
174
-
`docker-compose stop`
173
+
To stop the stack:
174
+
175
+
```bash
176
+
cd~/IOTstack
177
+
docker-compose stop
178
+
```
175
179
176
180
The first time you run 'start' the stack docker will download all the images for the web. Depending on how many containers you selected and your internet speed this can take a long while.
177
181
@@ -181,9 +185,26 @@ The `docker-compose down` command stops the containers then deletes them.
181
185
182
186
Docker allows you to map folders inside your containers to folders on the disk. This is done with the "volume" key. There are two types of volumes. Modification to the container are reflected in the volume.
183
187
184
-
## See Wiki for further info
188
+
## Networking
189
+
190
+
One common problem newcomers face is understanding that Docker creates an internal bridged network. A process running inside one container reaches a process running inside another container by using the **name** of that other container as the domain name. For example, if a Node-Red flow needs to:
191
+
192
+
* subscribe to an MQTT topic being managed by Mosquitto, it refers to "mosquitto" as the domain name and communicates over port 1883.
193
+
* send data to InfluxDB, it refers to "influxdb" as the domain name and communicates over port 8086.
194
+
195
+
In particular, if you are migrating Node-Red flows from a non-Docker environment, they will probably contain references to the loopback address (127.0.0.1). Those will need to be updated.
196
+
197
+
Similarly, if you are migrating a Grafana dashboard that relies on, say, InfluxDB as for its data. The data source will need to be updated to refer to "influxdb:8086".
198
+
199
+
You can discover container names like this:
200
+
201
+
```bash
202
+
cd~/IOTstack
203
+
docker-compose ps
204
+
```
205
+
206
+
See also [Networking](https://sensorsiot.github.io/IOTstack/Networking/).
0 commit comments