-
Download the
configure-ca-bundle.shscript (or either copy paste the contents and write to a file called./configure-ca-bundle.sh) -
Make the script executable
chmod +x ./configure-ca-bundle.sh
| #!/bin/sh | |
| echo "------------ System info ------------" | |
| uname -a | |
| echo "sysvinit version: $(/sbin/init --version)" | |
| echo | |
| echo "----------- Checking setup -----------" | |
| command -V service || echo "FAIL: service does not exist" | |
| command -V start-stop-daemon || echo "WARN: start-stop-daemon does not exist, this is used by the service definitions currently" |
This solution relies on using systemd override functionality require allows additional settings to be applied to existing systemd configuration files without having to redefined the entire systemd service definition.
| #!/bin/bash | |
| set -e | |
| info () { echo "INFO $*" >&2; } | |
| error () { echo "ERROR $*" >&2; } | |
| print_usage() { | |
| echo " | |
| Deploy a Cumulocity IoT microservice from a github release url |
| c8y util repeat 3 | c8y devices create --template "{name: 'device_%04d' % input.index, uuid: _.Hex(24)}" --dry | |
| c8y devices list --query "has(uuid)" | c8y identity create --template "{externalId: input.value.uuid, type: 'mytype'}" --dry |
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 "--------------------------------------------------------" |