Skip to content

Commit

Permalink
Merge pull request #9 from thin-edge/docs-sync-readme-notes
Browse files Browse the repository at this point in the history
docs: update readme
  • Loading branch information
reubenmiller authored Sep 10, 2024
2 parents 1520bc6 + 009110f commit b81b7d8
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ The following are required in order to deploy the container

### Step 1: Create a device certificate inside a named volume

Before you can start the containers, you need to create a device certificate inside a named volume.
Before you can start the containers, you need to create a device certificate inside a named volume, and also to persist the mosquitto data

1. Create a docker volume which will be used to store the device certificate
1. Create a docker volume which will be used to store the device certificate, and a volume for the mosquitto data

```sh
docker volume create device-certs
docker volume create mosquitto
```

2. Set the Cumulocity IoT variable (to make it easier to copy/paste the remaining instructions)
Expand Down Expand Up @@ -64,9 +65,9 @@ Before you can start the containers, you need to create a device certificate ins

```sh
docker run --rm -it --dns 8.8.8.8 --network host \
-v "device-certs:/etc/tedge/device-certs" \
-e "TEDGE_C8Y_URL=${TEDGE_C8Y_URL}" \
ghcr.io/thin-edge/tedge-container-bundle:latest tedge cert upload c8y
-v "device-certs:/etc/tedge/device-certs" \
-e "TEDGE_C8Y_URL=${TEDGE_C8Y_URL}" \
ghcr.io/thin-edge/tedge-container-bundle:latest tedge cert upload c8y
```

**Tip**
Expand All @@ -75,11 +76,11 @@ Before you can start the containers, you need to create a device certificate ins
```sh
docker run --rm -it --dns 8.8.8.8 --network host \
-v "device-certs:/etc/tedge/device-certs" \
-e "TEDGE_C8Y_URL=${TEDGE_C8Y_URL}" \
-e "C8Y_USER=$C8Y_USER" \
-e "C8Y_PASSWORD=$C8Y_PASSWORD" \
ghcr.io/thin-edge/tedge-container-bundle:latest tedge cert upload c8y
-v "device-certs:/etc/tedge/device-certs" \
-e "TEDGE_C8Y_URL=${TEDGE_C8Y_URL}" \
-e "C8Y_USER=$C8Y_USER" \
-e "C8Y_PASSWORD=$C8Y_PASSWORD" \
ghcr.io/thin-edge/tedge-container-bundle:latest tedge cert upload c8y
```
### Step 2: Start thin-edge.io
Expand All @@ -88,7 +89,9 @@ Once the device certificate has been created inside the named volume, the same v
```sh
docker run --rm -it --dns 8.8.8.8 --network host \
--restart=always \
-v "device-certs:/etc/tedge/device-certs" \
-v "mosquitto:/mosquitto/data" \
-e "TEDGE_C8Y_URL=$C8Y_DOMAIN" \
ghcr.io/thin-edge/tedge-container-bundle:latest
```
Expand All @@ -98,9 +101,11 @@ The `TEDGE_C8Y_URL` env variable is used to set the target Cumulocity IoT so tha
All of the thin-edge.io settings can be customized via environment variables, which can be useful if you want to change the port numbers like in the following example:
```sh
docker run --rm -it --dns 8.8.8.8 --network host \
docker run --dns 8.8.8.8 --network host \
-d \
--restart=always \
-v "device-certs:/etc/tedge/device-certs" \
-v "mosquitto:/mosquitto/data" \
-e TEDGE_C8Y_PROXY_BIND_PORT=9001 \
-e TEDGE_C8Y_PROXY_CLIENT_PORT=9001 \
-e TEDGE_MQTT_BIND_PORT=1884 \
Expand Down

1 comment on commit b81b7d8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
6 0 1 6 100 12.0534s

Passed Tests

Name ⏱️ Duration Suite
Get Logfile Request 2.326 s Operations
Get Configuration File 4.644 s Operations
Execute Shell Command 2.333 s Operations
Cloud Connecion is Online 0.115 s Telemetry
Service status 0.209 s Telemetry
Sends measurements 2.425 s Telemetry

Please sign in to comment.