Add the following signedoff-by git hook using the following steps:
- Create a new file (from above) and add it to the project's git folder
.git/hooks/commit-msg
- Make the hook executable
chmod +x .git/hooks/commit-msg
There is a script called tedge-cert.sh
which can be used to managed the certificate used by thin-edge.
The device.id (which will be used as the Common Name in the certificate) will be controlled by an environment variable (for now). So before using the tedge-cert.sh
script, the environment variable needs to be set. Ideally this is done when creating the docker environment, or alternatively a dummy certificate can be created us
The following commands are supported by the tedge-cert.sh
script.
#!/bin/sh | |
set -e | |
# TODO: | |
# * Run stop_services if there is an actual update (e.g. check if apt-get will actually do something or not) | |
# * Look at using a nicer command console progresss bar: printf "\033c"; | |
# * Sometimes restart some services is required to get everything to work, e.g. | |
# * systemctl restart tedge-mapper-c8y | |
# * systemctl restart tedge-agent | |
# * systemctl restart c8y-log-plugin |
The script is a convience script to get started with thin-edge.io and AWS as quick as possible.
By default thin-edge.io will only be installed if it is not already, but if you want to update to the latest version you can provide the --update
flag.
For more details check the --help
of the script.
#!/bin/sh | |
cleanup() { | |
sudo systemctl stop tedge-agent || true | |
sudo rm -f /run/lock/tedge-agent.lock | |
} | |
test_case_1() { | |
echo | |
echo "--------------------------------------------------------" |
By default thin-edge.io persists logs under the /var/log
folder. On some devices the /var
folder is volatile, which means that the folder is newly created after each device reboot.
Normally, the folder structure under /var/log
is created by thin-edge.io during the installation process, but since the /var/log
folder is deleted, some thin-edge.io services do not function as expected.
There are two main ways to solve this problem, they are listed below.
#!/bin/bash | |
################################################################################################## | |
# Install and bootstrap thin-edge.io to enable AWS communication | |
# A custom tedge and tedge-mapper version is used as the AWS functionality has not been | |
# merged into the main branch. | |
# | |
# Usage: | |
# sudo ./tedge-aws-bootstrap.sh | |
# | |
# Checkout the following links for more guidance on how to setup AWS and connect thin-edge.io to it |
#!/bin/bash | |
# ------------------------------------------------------------------------------------------------------- | |
# Pre-requisites | |
# This should be manually installed by the user (though it might be automatically installed by brew?) | |
# xcode-select --install | |
# ------------------------------------------------------------------------------------------------------- | |
# Options | |
HOMEBREW_NO_SUDO=true | |
HOMEBREW_INSTALL_PATH= |
<# | |
.SYNOPSIS | |
Provides argument completions for dynamic data by querying Cumulocity for the values | |
#> | |
$RoleCompleter = { | |
param ($commandName, $parameterName, $wordToComplete) | |
if ($wordToComplete -is [array]) { | |
$searchFor = $wordToComplete | Select-Object -Last 1 | |
} else { | |
$searchFor = $wordToComplete |