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
Copy file name to clipboardExpand all lines: source/installation-guide/installation-guide.rst
+17-11Lines changed: 17 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -278,31 +278,37 @@ Defaults are set in :code:`OS2IoT-frontend/src/environments/environment.ts`
278
278
OS2IoT-Mosquitto broker
279
279
^^^^^^^^^^^^^^^^^^^^^^^
280
280
281
-
To get the mosquitto broker working, you have to create some certificates and update some values. These following steps is done with Windows and it's required that you have openssl installed. If you use linux, then write :code:`sudo` before the commands (you still have to install openssl).
281
+
To get the mosquitto broker working, you have to create some certificates and update some values. These following steps is done with Windows. If you use linux, then write :code:`sudo` before the commands.
282
+
283
+
Prerequisites: openssl installed and accesible from path
284
+
285
+
Generate files:
282
286
283
287
1. Open the command prompt in administrator mode.
284
-
285
-
2. The following certificates and keys HAS to be placed in the folder "OS2IoT-docker/configuration/mosquitto-broker-os2iot", so it's recommended to navigate to that folder from the start.
286
288
287
-
3. Create a certificate authority(CA) key with this command: :code:`openssl genrsa -des3 -out ca.key 2048`. You will be prompted to enter a password. It's very important that you save this password, since it will be used later.
289
+
2. Create a certificate authority(CA) key with this command: :code:`openssl genrsa -des3 -out ca.key 2048`. You will be prompted to enter a password. It's very important that you save this password, since it will be used later.
288
290
289
-
4. Create the CA certificate with this command: :code:`openssl req -new -x509 -days 1826 -key ca.key -out ca.crt`. You will be asked to enter the password from the step before. After this, you will be prompted to enter informations. These values are not important, except one: "Common name". Common name HAS to be the ip/hostname of your broker.
291
+
3. Create the CA certificate with this command: :code:`openssl req -new -x509 -days 1826 -key ca.key -out ca.crt`. You will be asked to enter the password from the step before. After this, you will be prompted to enter informations. These values are not important, except one: "Common name". Common name HAS to be the ip/hostname of your broker.
290
292
291
-
5. Create the server key (for the broker) with the command: :code:`openssl genrsa -out server.key 2048`
293
+
4. Create the server key (for the broker) with the command: :code:`openssl genrsa -out server.key 2048`
292
294
293
295
6. Create the server signing request with the command: :code:`openssl req -new -out server.csr -key server.key`. You will be prompted to enter some informations. These values are not important, except one: "Common name". Common name HAS to be the ip/hostname of your broker. The rest of the values should not be exact the same as in step 4.
294
296
295
297
7. Create the server certificate (that is signed by the CA) with this command: :code:`openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 360`. You will be prompted to enter the password from step 3.
296
298
297
-
8. If the ca.crt, ca.key, server.crt and server.key aren't placed in the folder "OS2IoT-docker/configuration/mosquitto-broker-os2iot" then place them in that folder.
299
+
If you want to get docker container with mosquitto running, then follow these steps:
300
+
301
+
1. Place the generated files, ca.key, ca.crt, server.key and server.crt from the above steps in the folder "OS2IoT-docker/configuration/mosquitto-broker-os2iot". You don't need the server.csr.
302
+
303
+
2. Open the mosquitto-os2iot.conf file placed in OS2IoT-docker/configuration/mosquitto-broker-os2iot in a text editor and update the values to match your database.
298
304
299
-
9. Open the mosquitto-os2iot.conf file placed in OS2IoT-docker/configuration/mosquitto-broker-os2iot in a text editor and update the values about your database.
305
+
3. Copy the files ca.crt and ca.key and place them in OS2IoT-backend/resources.
300
306
301
-
10. Copy the files ca.crt and ca.key and place them in OS2IoT-backend/resources.
307
+
4. Update the :code:`MQTT_BROKER_HOSTNAME` with the ip/hostname that you used for step 4 and 6, and :code:`CA_KEY_PASSWORD` with the password that you entered in step 3 in the docker-compose.yml file placed in OS2IoT-docker.
302
308
303
-
11. Update the :code:`MQTT_BROKER_HOSTNAME` with the ip/hostname that you used for step 4 and 6, and :code:`CA_KEY_PASSWORD` with the password that you entered in step 3 in the docker-compose.yml file placed in OS2IoT-docker.
309
+
If you want to use kubernetes to host mosquitto then you need some futher steps.
304
310
305
-
If you want to use kubernetes to host mosquitto then you need some futher steps. First you have to install kubectl.
311
+
Prerequisites: kubectl installed and accesible from path
0 commit comments