summaryrefslogtreecommitdiff
path: root/dryad
AgeCommit message (Collapse)AuthorFilesLines
2018-09-05Get rid of dot imports of boruta packageMaciej Wereski2-6/+6
Using dot imports should be avoided. Such imports were left only in some tests. Change-Id: I1d4db1e2b89e2fd8475c8c657ea72b70bba32c5b Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2018-08-09Change rsa.PublicKey to ssh.PublicKey in Dryad PrepareMaciej Wereski4-11/+17
Users will use SSH keys rather than plain RSA keys, so Dryad interface should accept SSH public key instead of generating it from RSA public key. Change-Id: I6e757199a7e8a0d3258c1c17ac0eee8412f2b415 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com>
2018-08-03Install public key on dryadAleksander Mistewicz5-75/+18
This patch changes interface and communication between boruta server and dryads. Key is generated on boruta server, public part is installed on dryad and private part is stored internally. It is a preparation for using user's public keys provided by an external service. Change-Id: Ic6fb087aba02553c6b2b8f7cc13cc6bd67eff36a Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
2018-08-01Inform Dryad about SSH listen addressAleksander Mistewicz2-4/+12
When multiple Dryads run under the same IP address, SSH and Dryad listen ports must be different. Change-Id: Iedf8dd5aafb0c45c6d8c6c6b45bc61d47c720041 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
2018-08-01Fix tests in CIAleksander Mistewicz3-2/+67
It skips tests when information on current running user is unavailable. Local IP address is retrieved by lookup of "localhost". IP addresses are used instead of nil values. Interface of uuid package has been changed so code using it has been adapted. Mock generated for stm.Interface has been updated. Change-Id: Ide48575fa7a589c0cad00478898c2a651fda77d5 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
2018-06-18Add STMsocket to dryad/confAleksander Mistewicz2-2/+7
Due to change in git.tizen.org/tools/muxpi/sw/nanopi/stm communication medium has changed. Preferably, dryad should connect to the running process of stm via unix socket exposing Go RPC interface. It is possible to use it in the old way by assigning "" to stm_socket configuration entry. Change-Id: If6f4b41c9dbf467e3d40772eb52b55cbbc79d749 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
2018-06-18Refactor tests to use mock instead of real STMAleksander Mistewicz4-42/+188
Testing this part of code was troublesome as a working MuxPi was needed. Due to recent changes in git.tizen.org/tools/muxpi/sw/nanopi/stm, functions of STM are exposed with Interface. It is easier to test using a mockup. Change-Id: I5c2be2ae717b448f3182896074faefd8f2ea1971 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
2018-03-05Add Caps to dryad configurationAleksander Mistewicz2-0/+12
In the future Capabilities will be read from MuxPi's hardware. Currently write to and read from it is not supported therefore it has been added to configuration. Change-Id: Idedc71205bc4eea0fa489fa595daf6c367a1082c Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com> Reviewed-on: https://mcdsrvbld02.digital.local/review/49596 Reviewed-by: Maciej Wereski <m.wereski@partner.samsung.com> Tested-by: Maciej Wereski <m.wereski@partner.samsung.com>
2018-03-05Add boruta_address to dryad configurationAleksander Mistewicz2-0/+3
Change-Id: I0627223dc2b4cd9b8c6d17564a20ac334811789f Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com> Reviewed-on: https://mcdsrvbld02.digital.local/review/49595 Reviewed-by: Maciej Wereski <m.wereski@partner.samsung.com> Tested-by: Maciej Wereski <m.wereski@partner.samsung.com>
2018-03-05Add dryad packageAleksander Mistewicz8-0/+610
Package dryad provides: * implementation of Dryad interface * utilities to manage Dryad and its users Verification steps: // compile tests GOARCH=arm GOARM=7 GOOS=linux ginkgo build -cover dryad // copy dryad/dryad.test to device // run everything ./dryad.test -ginkgo.v // run without measurements ./dryad.test -ginkgo.v -ginkgo.skipMeasurements // run prepare only ./dyrad.test -ginkgo.focus "should prepare" // private key will be printed on stderr // it can be used to verify that SSH key is properly installed Currently dryad is being run as root on muxpi. Future patches will probably use sudo and require configured file in /etc/sudoers.d/ directory. Change-Id: I095361ffd1f4b2b3fa5dfe2c000f960dd32886e2 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
2018-03-02Add Dryad configuration packageAleksander Mistewicz3-0/+172
A non-standard library for configuration serialization is used. It is licensed under MIT license. Install it with command below: go get "github.com/BurntSushi/toml" Change-Id: I71321d341ac8d64c6a9ed85f2d895524eca01fac Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>