thin-edge.io demo container setup to showcase thin-edge.io and all its features
The following pre-requisites are required before you can get started:
- docker
- docker compose v2 (not the python one)
Check out the list of known working setups to see what software you can use for your Operating Systemd to meet the pre-requisites.
-
Download the docker compose file from the repository
curl -LSs https://raw.githubusercontent.com/thin-edge/tedge-demo-container/main/demos/docker-compose/device/docker-compose.yaml > docker-compose.yaml
Or alternatively you can download it using
wget
wget https://raw.githubusercontent.com/thin-edge/tedge-demo-container/main/demos/docker-compose/device/docker-compose.yaml
-
Start the docker-compose project (in the background)
docker compose up -d
-
Bootstrap the device
docker compose exec tedge bootstrap.sh
-
Click on the link to your tedge device which is shown on the console
Check out the USER GUIDE for more details on other commands that can be run.
Note
The tedge container has the following default SSH user which can be used with the SSH protocol of the Cumulocity IoT Cloud Remote Access (CRA) feature.
Property | Value |
---|---|
SSH User | iotadmin |
SSH Password | iotadmin |
The project also includes another docker-compose file to build the project locally. This allows you to manually tweak any of the container images to add/remove things as you see fit.
After you have cloned the project you still need to install, just. just
is used as the project's task runner to simplify the commands required during development. Check out their installation instructions to see how to install it on your machine.
Once you have just installed, you can proceed with the following instructions:
-
Create the
.env
template filejust create-env
Fill in the values for each of the environment variables in the .env file. Whilst the settings in the
.env
file are not mandatory, it does allow you to set sensible defaults for your setup so that you don't have to enter your username or Cumulocity URL multiple times during the bootstrapping phase. -
Start the docker compose project (this will also build the containers)
just up
-
Bootstrap the main device (don't worry you only have to do this once)
just bootstrap
You will be prompted for the required details. You can hit
<enter>
to accept the default values. The default values are provided via the.env
file from the first step. -
Click on the device link shown on your console
-
That's it 🚀
Integration tests are included in the demo to ensure that everything is working as it should. The tests can be run using the following steps:
-
Edit the
.env
file and add the following environment variablesDEVICE_ID=tedge_unique_name_abcdef C8Y_BASEURL=example.tenant.c8y.io [email protected] C8Y_PASSWORD="your_password"
-
Start the demo and bootstrap it
just up just bootstrap --no-prompt
-
Run the tests
just test
The following features are covered by the demo.
Main device
- Availability Monitoring
- Configuration management
- mqtt-logger (to better understand what messages are going in and out)
- Device reboot
- Device Profile
- Firmware Update (simulated)
- Log management
- log files
- Remote Access
- SSH
- Services
- tedge services
- Shell
- Software management
- apt
- container (docker, docker-compose)
- Telemetry
- Measurements (via collectd)
- Events
- On boot-up service: sends an event on startup
Child devices
- Availability Monitoring
- Configuration management
- Device reboot
- Device Profile
- Firmware Update (simulated)
- Log management
- log files
- Services
- tedge services
- Software management
- apk (Alpine based image)
- apt (Debian based image)
There are currently no known issues.