Skip to content

Commit

Permalink
Extra tools in dev-containers (#1988)
Browse files Browse the repository at this point in the history
* Extra tools in dev-containers

---------

Signed-off-by: Reuben Miller <[email protected]>
Co-authored-by: Reuben Miller <[email protected]>
  • Loading branch information
albinsuresh and reubenmiller authored Jul 10, 2023
1 parent 119fcaa commit 69c2b3c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
fakeroot \
# Utilities
vim \
bash-completion \
iputils-ping \
# Enable systemd
systemd \
# Testing dependencies
Expand All @@ -22,7 +24,8 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
python3-pip \
python3-venv \
# tedge dependencies
mosquitto
mosquitto \
mosquitto-clients

# Install gh utility
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
Expand All @@ -38,9 +41,13 @@ RUN mkdir -p /etc/apt/keyrings \
&& apt-get update \
&& apt-get install -y docker-ce-cli docker-compose-plugin

# Node js (for browser based tests)
# Node js (for browser based tests and documentation using docusaurus)
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs
&& apt-get install -y nodejs \
&& npm install -g yarn

# Instll just (project task runner)
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin/

# Update python deps
RUN pip3 install --upgrade pip
Expand All @@ -53,7 +60,9 @@ USER root
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
&& mkdir /commandhistory \
&& touch /commandhistory/.bash_history \
&& echo "$SNIPPET" >> "/root/.bashrc"
&& echo "$SNIPPET" >> "/root/.bashrc" \
# Enable bash-completion
&& echo "source /etc/profile.d/bash_completion.sh" >> "/root/.bashrc"

# Enable cross-rs to compile using docker-in-docker
ENV CROSS_CONTAINER_IN_CONTAINER=true
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"tamasfe.even-better-toml",
"serayuzgur.crates",
"usernamehw.errorlens",
"streetsidesoftware.code-spell-checker",
// Shell script validation
"timonwong.shellcheck",
// Containers
Expand Down

1 comment on commit 69c2b3c

@github-actions
Copy link
Contributor

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 %
238 0 5 238 100

Passed Tests

Name ⏱️ Duration Suite
Define Child device 1 ID 0.1 s C8Y Child Alarms Rpi
Normal case when the child device does not exist on c8y cloud 1.8399999999999999 s C8Y Child Alarms Rpi
Normal case when the child device already exists 0.878 s C8Y Child Alarms Rpi
Reconciliation when the new alarm message arrives, restart the mapper 1.421 s C8Y Child Alarms Rpi
Reconciliation when the alarm that is cleared 65.502 s C8Y Child Alarms Rpi
Prerequisite Parent 13.949 s Child Conf Mgmt Plugin
Prerequisite Child 0.454 s Child Conf Mgmt Plugin
Child device bootstrapping 13.892 s Child Conf Mgmt Plugin
Snapshot from device 61.289 s Child Conf Mgmt Plugin
Child device config update 63.105 s Child Conf Mgmt Plugin
Configuration types should be detected on file change (without restarting service) 40.898 s Inotify Crate
Check lock file existence in default folder 1.17 s Lock File
Check PID number in lock file 1.681 s Lock File
Check PID number in lock file after restarting the services 2.705 s Lock File
Check starting same service twice 1.449 s Lock File
Switch off lock file creation 2.006 s Lock File
Set configuration when file exists 15.85 s Configuration Operation
Set configuration when file does not exist 5.617 s Configuration Operation
Set configuration with broken url 5.074 s Configuration Operation
Get configuration 4.924 s Configuration Operation
Get non existent configuration file 4.662 s Configuration Operation
Get non existent configuration type 4.224 s Configuration Operation
Update configuration plugin config via cloud 4.72 s Configuration Operation
Modify configuration plugin config via local filesystem modify inplace 2.907 s Configuration Operation
Modify configuration plugin config via local filesystem overwrite 5.957 s Configuration Operation
Update configuration plugin config via local filesystem copy 2.417 s Configuration Operation
Update configuration plugin config via local filesystem move (different directory) 2.718 s Configuration Operation
Update configuration plugin config via local filesystem move (same directory) 2.383 s Configuration Operation
Update the custom operation dynamically 53.119 s Dynamically Reload Operation
Custom operation successful 59.678 s Custom Operation
Custom operation fails 60.914 s Custom Operation
Successful firmware operation 62.156 s Firmware Operation
Install with empty firmware name 41.092 s Firmware Operation
Prerequisite Parent 16.011 s Firmware Operation Child Device
Prerequisite Child 7.674 s Firmware Operation Child Device
Child device firmware update 6.018 s Firmware Operation Child Device
Child device firmware update with cache 5.7940000000000005 s Firmware Operation Child Device
Firmware plugin supports restart via service manager #1932 4.211 s Firmware Operation Child Device Retry
Update Inventory data via inventory.json 0.91 s Inventory Update
Inventory includes the agent fragment with version information 0.686 s Inventory Update
Retrieve a JWT tokens 33.171 s Jwt Request
Mapper recovers and processes output of ongoing software update request 15.657 s Recover And Publish Software Update Message
Check running collectd 0.89 s Monitor Device Collectd
Is collectd publishing MQTT messages? 2.972 s Monitor Device Collectd
Check thin-edge monitoring 3.68 s Monitor Device Collectd
Check grouping of measurements 8.805 s Monitor Device Collectd
Main device registration 1.525 s Device Registration
Child device registration 1.899 s Device Registration
Supports restarting the device 48.668 s Restart Device
Update tedge version from previous using Cumulocity 80.161 s Tedge Self Update
Test if all c8y services are up 35.586 s Service Monitoring
Test if all c8y services are down 41.619 s Service Monitoring
Test if all c8y services are using configured service type 43.416 s Service Monitoring
Test if all c8y services using default service type when service type configured as empty 103.71 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker stop start 46.695 s Service Monitoring
Check health status of tedge-mapper-c8y service on broker restart 25.708 s Service Monitoring
Check health status of child device service 16.643 s Service Monitoring
Successful shell command with output 3.409 s Shell Operation
Check Successful shell command with literal double quotes output 3.19 s Shell Operation
Execute multiline shell command 3.034 s Shell Operation
Failed shell command 3.165 s Shell Operation
Software list should be populated during startup 29.035 s Software
Install software via Cumulocity 41.471 s Software
Software list should only show currently installed software and not candidates 36.149 s Software
Create and publish the tedge agent supported operations on mapper restart 40.707 s Mapper-Publishing-Agent-Supported-Ops
Agent gets the software list request once it comes up 28.617 s Mapper-Publishing-Agent-Supported-Ops
Child devices support sending simple measurements 1.605 s Child Device Telemetry
Child devices support sending custom measurements 1.111 s Child Device Telemetry
Child devices support sending custom events 3.009 s Child Device Telemetry
Child devices support sending custom events overriding the type 0.956 s Child Device Telemetry
Child devices support sending custom alarms #1699 0.9 s Child Device Telemetry
Child devices support sending inventory data via c8y topic 0.974 s Child Device Telemetry
Child device supports sending custom child device measurements directly to c8y 1.275 s Child Device Telemetry
Check retained alarms 162.643 s Raise Alarms
Thin-edge devices support sending simple measurements 1.082 s Thin-Edge Device Telemetry
Thin-edge devices support sending simple measurements with custom type 0.866 s Thin-Edge Device Telemetry
Thin-edge devices support sending custom measurements 2.999 s Thin-Edge Device Telemetry
Thin-edge devices support sending custom events 0.984 s Thin-Edge Device Telemetry
Thin-edge devices support sending custom events overriding the type 1.073 s Thin-Edge Device Telemetry
Thin-edge devices support sending custom alarms #1699 3.145 s Thin-Edge Device Telemetry
Thin-edge device supports sending custom Thin-edge device measurements directly to c8y 1.479 s Thin-Edge Device Telemetry
Thin-edge device support sending inventory data via c8y topic 1.2389999999999999 s Thin-Edge Device Telemetry
thin-edge components support a custom config-dir location via flags 26.771 s Config Dir
Validate updated data path used by tedge-agent 0.451 s Data Path Config
Validate updated data path used by c8y-firmware-plugin 10.085 s Data Path Config
Validate updated data path used by tedge-agent 0.527 s Log Path Config
Check existence of init directories 0.823 s Tedge Init
Tedge init and check creation of folders 0.941 s Tedge Init
Check ownership of the folders 0.731 s Tedge Init
Change user/group and check the change 1.092 s Tedge Init
Tedge init and check if default values are restored 0.918 s Tedge Init
Install thin-edge via apt 49.187 s Install Apt
Install latest via script (from current branch) 30.344 s Install Tedge
Install specific version via script (from current branch) 21.482 s Install Tedge
Install latest tedge via script (from main branch) 17.81 s Install Tedge
Install then uninstall latest tedge via script (from main branch) 54.399 s Install Tedge
Support starting and stopping services 40.793 s Service-Control
Supports a reconnect 54.962 s Test-Commands
Supports disconnect then connect 29.76 s Test-Commands
Update unknown setting 35.081 s Test-Commands
Update known setting 41.599 s Test-Commands
It checks MQTT messages using a pattern 65.116 s Test-Mqtt
Stop c8y-configuration-plugin 0.12 s Health C8Y-Configuration-Plugin
Update the service file 0.091 s Health C8Y-Configuration-Plugin
Reload systemd files 0.312 s Health C8Y-Configuration-Plugin
Start c8y-configuration-plugin 0.087 s Health C8Y-Configuration-Plugin
Start watchdog service 10.154 s Health C8Y-Configuration-Plugin
Check PID of c8y-configuration-plugin 0.078 s Health C8Y-Configuration-Plugin
Kill the PID 0.236 s Health C8Y-Configuration-Plugin
Recheck PID of c8y-configuration-plugin 6.366 s Health C8Y-Configuration-Plugin
Compare PID change 0.001 s Health C8Y-Configuration-Plugin
Stop watchdog service 0.098 s Health C8Y-Configuration-Plugin
Remove entry from service file 0.113 s Health C8Y-Configuration-Plugin
Stop c8y-log-plugin 0.146 s Health C8Y-Log-Plugin
Update the service file 0.128 s Health C8Y-Log-Plugin
Reload systemd files 0.455 s Health C8Y-Log-Plugin
Start c8y-log-plugin 0.14 s Health C8Y-Log-Plugin
Start watchdog service 10.138 s Health C8Y-Log-Plugin
Check PID of c8y-log-plugin 0.086 s Health C8Y-Log-Plugin
Kill the PID 0.221 s Health C8Y-Log-Plugin
Recheck PID of c8y-log-plugin 6.37 s Health C8Y-Log-Plugin
Compare PID change 0.001 s Health C8Y-Log-Plugin
Stop watchdog service 0.151 s Health C8Y-Log-Plugin
Remove entry from service file 0.116 s Health C8Y-Log-Plugin
Stop tedge-mapper 0.069 s Health Tedge Mapper C8Y
Update the service file 0.102 s Health Tedge Mapper C8Y
Reload systemd files 0.307 s Health Tedge Mapper C8Y
Start tedge-mapper 0.12 s Health Tedge Mapper C8Y
Start watchdog service 10.202 s Health Tedge Mapper C8Y
Check PID of tedge-mapper 0.072 s Health Tedge Mapper C8Y
Kill the PID 0.162 s Health Tedge Mapper C8Y
Recheck PID of tedge-mapper 6.518 s Health Tedge Mapper C8Y
Compare PID change 0.001 s Health Tedge Mapper C8Y
Stop watchdog service 0.185 s Health Tedge Mapper C8Y
Remove entry from service file 0.156 s Health Tedge Mapper C8Y
Stop tedge-agent 0.078 s Health Tedge-Agent
Update the service file 0.089 s Health Tedge-Agent
Reload systemd files 0.184 s Health Tedge-Agent
Start tedge-agent 0.131 s Health Tedge-Agent
Start watchdog service 10.11 s Health Tedge-Agent
Check PID of tedge-mapper 0.159 s Health Tedge-Agent
Kill the PID 0.281 s Health Tedge-Agent
Recheck PID of tedge-agent 6.372 s Health Tedge-Agent
Compare PID change 0.001 s Health Tedge-Agent
Stop watchdog service 0.234 s Health Tedge-Agent
Remove entry from service file 0.102 s Health Tedge-Agent
Stop tedge-mapper-az 0.061 s Health Tedge-Mapper-Az
Update the service file 0.068 s Health Tedge-Mapper-Az
Reload systemd files 0.155 s Health Tedge-Mapper-Az
Start tedge-mapper-az 0.071 s Health Tedge-Mapper-Az
Start watchdog service 10.108 s Health Tedge-Mapper-Az
Check PID of tedge-mapper-az 0.107 s Health Tedge-Mapper-Az
Kill the PID 0.296 s Health Tedge-Mapper-Az
Recheck PID of tedge-agent 6.665 s Health Tedge-Mapper-Az
Compare PID change 0.016 s Health Tedge-Mapper-Az
Stop watchdog service 0.205 s Health Tedge-Mapper-Az
Remove entry from service file 0.151 s Health Tedge-Mapper-Az
Stop tedge-mapper-collectd 0.216 s Health Tedge-Mapper-Collectd
Update the service file 0.138 s Health Tedge-Mapper-Collectd
Reload systemd files 0.641 s Health Tedge-Mapper-Collectd
Start tedge-mapper-collectd 0.283 s Health Tedge-Mapper-Collectd
Start watchdog service 10.162 s Health Tedge-Mapper-Collectd
Check PID of tedge-mapper-collectd 0.132 s Health Tedge-Mapper-Collectd
Kill the PID 0.204 s Health Tedge-Mapper-Collectd
Recheck PID of tedge-mapper-collectd 6.345 s Health Tedge-Mapper-Collectd
Compare PID change 0.001 s Health Tedge-Mapper-Collectd
Stop watchdog service 0.102 s Health Tedge-Mapper-Collectd
Remove entry from service file 0.137 s Health Tedge-Mapper-Collectd
tedge-collectd-mapper health status 5.436 s Health Tedge-Mapper-Collectd
c8y-log-plugin health status 5.563 s MQTT health endpoints
c8y-configuration-plugin health status 5.592 s MQTT health endpoints
Publish on a local insecure broker 0.235 s Basic Pub Sub
Publish on a local secure broker 2.079 s Basic Pub Sub
Publish on a local secure broker with client authentication 2.203 s Basic Pub Sub
Publish events to subscribed topic 0.231 s Custom Sub Topics Tedge-Mapper-Aws
Publish measurements to unsubscribed topic 5.242 s Custom Sub Topics Tedge-Mapper-Aws
Publish measurements to subscribed topic 0.373 s Custom Sub Topics Tedge-Mapper-Az
Publish measurements to unsubscribed topic 5.64 s Custom Sub Topics Tedge-Mapper-Az
Publish events to subscribed topic 0.797 s Custom Sub Topics Tedge-Mapper-C8Y
Publish measurements to unsubscribed topic 5.555 s Custom Sub Topics Tedge-Mapper-C8Y
Check remote mqtt broker #1773 2.711 s Remote Mqtt Broker
Apply name filter 0.225 s Filter Packages List Output
Apply maintainer filter 0.135 s Filter Packages List Output
Apply both filters 0.246 s Filter Packages List Output
No filters 0.173 s Filter Packages List Output
Both filters but name filter as empty string 0.275 s Filter Packages List Output
Both filters but maintainer filter as empty string 0.239 s Filter Packages List Output
Both filters as empty string 0.14 s Filter Packages List Output
Wrong package name 0.22 s Improve Tedge Apt Plugin Error Messages
Wrong version 0.202 s Improve Tedge Apt Plugin Error Messages
Wrong type 0.418 s Improve Tedge Apt Plugin Error Messages
tedge_connect_test_positive 0.356 s Tedge Connect Test
tedge_connect_test_negative 1.102 s Tedge Connect Test
tedge_connect_test_sm_services 7.633 s Tedge Connect Test
tedge_disconnect_test_sm_services 0.565 s Tedge Connect Test
Install thin-edge.io 23.993 s Call Tedge
call tedge -V 0.077 s Call Tedge
call tedge -h 0.092 s Call Tedge
call tedge -h -V 0.064 s Call Tedge
call tedge help 0.096 s Call Tedge
tedge config list 0.072 s Call Tedge Config List
tedge config list --all 0.152 s Call Tedge Config List
set/unset device.type 0.676 s Call Tedge Config List
set/unset device.key_path 0.487 s Call Tedge Config List
set/unset device.cert_path 0.594 s Call Tedge Config List
set/unset c8y.root_cert_path 0.609 s Call Tedge Config List
set/unset c8y.smartrest.templates 0.453 s Call Tedge Config List
set/unset c8y.topics 0.405 s Call Tedge Config List
set/unset az.root_cert_path 0.386 s Call Tedge Config List
set/unset az.topics 0.254 s Call Tedge Config List
set/unset aws.topics 0.36 s Call Tedge Config List
set/unset aws.url 0.488 s Call Tedge Config List
set/unset aws.root_cert_path 0.351 s Call Tedge Config List
set/unset aws.mapper.timestamp 0.347 s Call Tedge Config List
set/unset az.mapper.timestamp 0.326 s Call Tedge Config List
set/unset mqtt.bind.address 0.319 s Call Tedge Config List
set/unset mqtt.bind.port 0.27 s Call Tedge Config List
set/unset http.bind.port 0.329 s Call Tedge Config List
set/unset tmp.path 0.307 s Call Tedge Config List
set/unset logs.path 0.327 s Call Tedge Config List
set/unset run.path 0.28 s Call Tedge Config List
set/unset firmware.child.update.timeout 0.274 s Call Tedge Config List
set/unset c8y.url 0.413 s Call Tedge Config List
set/unset az.url 0.263 s Call Tedge Config List
set/unset mqtt.external.bind.port 0.273 s Call Tedge Config List
mqtt.external.bind.address 0.275 s Call Tedge Config List
mqtt.external.bind.interface 0.291 s Call Tedge Config List
set/unset mqtt.external.ca_path 0.407 s Call Tedge Config List
set/unset mqtt.external.cert_file 0.274 s Call Tedge Config List
set/unset mqtt.external.key_file 0.272 s Call Tedge Config List
set/unset software.plugin.default 0.262 s Call Tedge Config List
Get Put Delete 1.804 s Http File Transfer Api
Set keys should return value on stdout 0.121 s Tedge Config Get
Unset keys should not return anything on stdout and warnings on stderr 0.26 s Tedge Config Get
Invalid keys should not return anything on stdout and warnings on stderr 0.305 s Tedge Config Get
Set configuration via environment variables 0.934 s Tedge Config Get
Set configuration via environment variables for topics 0.526 s Tedge Config Get
Set unknown configuration via environment variables 0.066 s Tedge Config Get

Please sign in to comment.