thin-edge.io icon indicating copy to clipboard operation
thin-edge.io copied to clipboard

Bash scripts for device management

Open abelikt opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe.

As as thin-edge developer I want to have a set of bash scripts that set up a device from scratch, prepare to run system tests, and run system tests So that we can set up and test thin-edge without GitHub workflows and are also able to simplify our GitHub workflows.

AC a bash script that sets up a device for thin edge for development AC a bash script that sets up a device for system testing AC modified and updated scripts to run different parts of the system tests or all of them

abelikt avatar Feb 02 '22 13:02 abelikt

Is it a must that it be a bash script? Can't that device creation logic be abstracted into a Python module like c8y_environment? Even for setting up the system for tests, Pysys's recommended way is to use runners that supports both setup and teardown. Wouldn't those suffice or you expect these scripts to be reused outside of pysys tests as well?

albinsuresh avatar Feb 03 '22 07:02 albinsuresh

What does 'setup' here entail? Could it be done directly from the Rust tests? (If not, what's stopping that?)

TheNeikos avatar Feb 03 '22 08:02 TheNeikos

The idea here is to setup and prepare the device itself. We start with a stock image, execute the script and are able to work afterwards. Similar to our install script https://github.com/thin-edge/thin-edge.io/blob/main/get-thin-edge_io.sh . Besides of simplifying our Ansible playbooks and GitHub workflows, it should also help new people to get started. That feature was requested when I presented the Ansible device setup.

I would propose a bash or a sh/dash scripts here. Neither Python nor Rust should be needed to run them.

abelikt avatar Feb 03 '22 19:02 abelikt

@gligorisaev I think now you have a script to fulfil this request.

rina23q avatar Sep 19 '22 12:09 rina23q

I do have it, I showed it on the last sprint demo

gligorisaev avatar Sep 19 '22 12:09 gligorisaev

We already have a such a script in this PR (going to be merged soon). https://github.com/thin-edge/thin-edge.io/pull/1449 Therefore, I would close this issue.

rina23q avatar Sep 19 '22 12:09 rina23q