tools/weles.git
6 years agoAdd Config argument to Create of DryadJobManager 24/182924/1
Aleksander Mistewicz [Wed, 29 Nov 2017 15:32:38 +0000 (16:32 +0100)]
Add Config argument to Create of DryadJobManager

Change-Id: I85354ad5e1580d69a1d6ecb31e6e3cbfc567c00c
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoMerge branch 'dryad' 23/182923/1
Pawel Wieczorek [Thu, 28 Jun 2018 14:37:42 +0000 (16:37 +0200)]
Merge branch 'dryad'

Change-Id: I53430cc296457b031e5315b4c7f05af1fdd9dc33

6 years agoRename dryad_session_provider to session_provider 50/182250/2
Aleksander Mistewicz [Thu, 21 Jun 2018 13:49:29 +0000 (15:49 +0200)]
Rename dryad_session_provider to session_provider

Change-Id: I4e6dbbf5b06606e32cf3aef9e9dd9cb8d4d74134

6 years agoUse reverse SSHFS instead of scp 49/182249/2
Aleksander Mistewicz [Thu, 21 Jun 2018 13:33:24 +0000 (15:33 +0200)]
Use reverse SSHFS instead of scp

It solves the following problems:
 * some files did not fit into tmpfs or root filesystem,
 * some files could not be copied at all due to their contents,
 * paths needed to be translated.

Change-Id: I581ad3ddf22bf2e3e8aec0d2952f34f76ab90a41
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoMake Exec methods variadic 48/182248/2
Aleksander Mistewicz [Thu, 21 Jun 2018 13:30:51 +0000 (15:30 +0200)]
Make Exec methods variadic

Use mock instead of real implementation of SessionProvider in tests of
DeviceCommunicationProvider.

Change-Id: I6d62145b7982c28f93a2f44d259f0759dfd3dc6a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd reverseSSHFS 37/176237/9
Aleksander Mistewicz [Fri, 13 Apr 2018 17:09:02 +0000 (19:09 +0200)]
Add reverseSSHFS

It mounts a local directory on a remote consuming one session of ssh
connection. It makes accessing files (even big) easy in the limited
environment provided by Dryad.

Change-Id: I2e881f8e1291bac28331dea584b81dcef92e331a
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd DeviceCommunicationProvider implementation 47/162647/16
Adam Malinowski [Mon, 27 Nov 2017 05:01:15 +0000 (06:01 +0100)]
Add DeviceCommunicationProvider implementation

Change-Id: I0b98831d3ee53de05831caf7564363fdf289fcf8
Signed-off-by: Adam Malinowski <a.malinowsk2@partner.samsung.com>
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd file transfer functions to SessionProvider 36/162036/18
Adam Malinowski [Tue, 28 Nov 2017 14:31:28 +0000 (15:31 +0100)]
Add file transfer functions to SessionProvider

Change-Id: Ief14d76d93bfd041bc9809d0599719859fde69dc
Signed-off-by: Adam Malinowski <a.malinowsk2@partner.samsung.com>
6 years agoAdd SessionManager implementation 35/162035/15
Adam Malinowski [Thu, 23 Nov 2017 09:18:23 +0000 (10:18 +0100)]
Add SessionManager implementation

MuxPi is needed to perform tests. SSH key needs to be generated and
its private part has to be saved to a local file. To run tests:

ginkgo manager/dryad -- \
    -keyFile=file \
    -address=address \
    -port=port \
    -userName=login

Where:
  file    - path to a file containing private part of SSH key generated
            on Dryad
  address - IP address of Dryad
  port    - SSH port to use for connection with Dryad (default: 22)
  login   - user name for connection with Dryad

Change-Id: I1b4cf55f8082b5b0d9ec1d0311f37f87f35fb753
Signed-off-by: Adam Malinowski <a.malinowsk2@partner.samsung.com>
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoMerge branch 'controller' 50/177650/1
Pawel Wieczorek [Wed, 2 May 2018 10:59:48 +0000 (12:59 +0200)]
Merge branch 'controller'

Change-Id: I7b318961f834834e5ea1ae22c615e74f8159737e

6 years agoAdd NewJobManager function 68/162368/12
Lukasz Wojciechowski [Thu, 30 Nov 2017 12:29:14 +0000 (13:29 +0100)]
Add NewJobManager function

NewJobManager function creates new instance of Controller
with all internal submodules. The created structure is returned
as JobManager interface.

This is the only valid method for creation whole Controller module
in Weles and should be used to create Weles service.

Change-Id: I8ff2051a23f714a99fc2642c94e34d247ec164d7
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoImplement ListJobs in Controller with tests 67/162367/11
Lukasz Wojciechowski [Mon, 16 Apr 2018 14:10:42 +0000 (16:10 +0200)]
Implement ListJobs in Controller with tests

Implementation enhances JobsController interface and implementation.
The mockup of JobsController is regenerated using:

mockgen -package mock -destination=controller/mock/jobscontroller.go \
        git.tizen.org/tools/weles/controller JobsController

Tests for both JobsControllerImpl and Controller are updated.

Change-Id: Ie30234ac754d19616ce2811e3f30a6834d28e296
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Controller with tests 22/162022/12
Lukasz Wojciechowski [Mon, 16 Apr 2018 13:34:14 +0000 (15:34 +0200)]
Add Controller with tests

Change-Id: I4681c0e085983094f9ce2699617bb9b52d2e086a
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoMerge branch 'manager' 80/177380/1
Pawel Wieczorek [Fri, 27 Apr 2018 12:14:49 +0000 (14:14 +0200)]
Merge branch 'manager'

Change-Id: I950cbd5ee07bb735ca5a8cfd46b1239039a70b31
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
6 years agoImplement List with table driven tests 74/161474/4
Aleksander Mistewicz [Fri, 17 Nov 2017 15:50:40 +0000 (16:50 +0100)]
Implement List with table driven tests

Change-Id: Ifccf613b89cb6a21d4229b15affb533c0bb95de4
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd tests for panic recovery of dryadJob 73/161473/4
Aleksander Mistewicz [Fri, 17 Nov 2017 14:01:51 +0000 (15:01 +0100)]
Add tests for panic recovery of dryadJob

Change-Id: I7ac9ccb609a77ff5d0e4635c5d91e23cc88fd4ae
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd more complicated tests of dryadJob 72/161472/5
Aleksander Mistewicz [Fri, 17 Nov 2017 12:30:51 +0000 (13:30 +0100)]
Add more complicated tests of dryadJob

Change-Id: Ie015609731c8f25ecfe6bff31414f18390494e3b
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoUse mockups of generated interfaces in tests 71/161471/5
Aleksander Mistewicz [Thu, 16 Nov 2017 16:57:47 +0000 (17:57 +0100)]
Use mockups of generated interfaces in tests

Change-Id: I77760fa2028e3c096929e82683c8024e01ee3c06
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd generated mock of DryadJobRunner 70/161470/5
Aleksander Mistewicz [Wed, 29 Nov 2017 15:59:22 +0000 (16:59 +0100)]
Add generated mock of DryadJobRunner

Command used:
    mockgen -source=manager/manager.go \
            -destination=manager/mock_dryad_job_runner_test.go \
            -package manager

Change-Id: I015e79a3db12db02e2423bc6ce05cf4e9dfb6555
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd generated mock of interfaces in manager/dryad 69/161469/5
Aleksander Mistewicz [Thu, 16 Nov 2017 16:26:20 +0000 (17:26 +0100)]
Add generated mock of interfaces in manager/dryad

Command used:
    mockgen -source=manager/dryad/dryad.go \
            -destination=manager/mock_dryad_test.go \
            -package manager

Change-Id: I15860362b8fc144ddd9efe05e03efef2f5ebf03f
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd generated mocks for controller's internals 21/162021/11
Lukasz Wojciechowski [Mon, 27 Nov 2017 15:54:57 +0000 (16:54 +0100)]
Add generated mocks for controller's internals

mockgen -package mock -destination=controller/mock/boruter.go \
git.tizen.org/tools/weles/controller Boruter
mockgen -package mock -destination=controller/mock/downloader.go \
git.tizen.org/tools/weles/controller Downloader
mockgen -package mock -destination=controller/mock/dryader.go \
git.tizen.org/tools/weles/controller Dryader
mockgen -package mock -destination=controller/mock/parser.go \
git.tizen.org/tools/weles/controller Parser

Change-Id: Ie5fd939e0082c0f7975d2dbc416d730f28c311eb
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Dryader implementation with tests 20/162020/11
Lukasz Wojciechowski [Wed, 22 Nov 2017 08:53:17 +0000 (09:53 +0100)]
Add Dryader implementation with tests

DryaderImpl implements delegation and control of Job execution
in DryadJobManager.

Change-Id: I7d30f21bf0f838829f6c2d0b65362a6d7b66d0a3
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Dryader interface 19/162019/11
Lukasz Wojciechowski [Mon, 27 Nov 2017 08:15:12 +0000 (09:15 +0100)]
Add Dryader interface

Dryder interface allows delegation of Job execution and cancelation
to DryadJobManager.

Change-Id: I866f8290dc51d24ab65e2671edf306fc33f2e3c9
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Boruter implementation with tests 18/162018/11
Lukasz Wojciechowski [Tue, 21 Nov 2017 20:34:31 +0000 (21:34 +0100)]
Add Boruter implementation with tests

BoruterImpl implements communication with Boruta. It is used
for acquiring, monitoring and releasing Dryads for Weles' Jobs.

Change-Id: I91667cad4ccac176e4e01c697e2dbfbe7b54cfd3
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Boruter interface 17/162017/11
Lukasz Wojciechowski [Thu, 23 Nov 2017 17:02:23 +0000 (18:02 +0100)]
Add Boruter interface

Boruter defines interface for delegation of communication with Boruta.
Communication is used for acquiring, monitoring and releasing Dryads.

Change-Id: Id6c310220839c1d196f86b8c86123cd1a720f526
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd generated mockup for boruta.Requests 16/162016/11
Lukasz Wojciechowski [Thu, 23 Nov 2017 17:01:10 +0000 (18:01 +0100)]
Add generated mockup for boruta.Requests

mockgen -package mock -destination=controller/mock/requests.go \
git.tizen.org/tools/boruta Requests

Change-Id: I3cd7673db7ff0eb5e7fb3ead8ea3d31a83430bee
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Downloader implementation with tests 15/162015/10
Lukasz Wojciechowski [Mon, 20 Nov 2017 05:04:31 +0000 (06:04 +0100)]
Add Downloader implementation with tests

DownloaderImpl is responsible for parsing Job's config and searching
for information about files (artifacts) related to the test.
It delegates to ArtifactsManager downloading images and testfiles
required to run Job (Push). It creates also paths for output
artifacts (Pull). It updates Job's config with proper paths
for these artifacts.

It does also monitor process of downloading files in ArtifactManager
and finally it notifies Controller when all files are downloaded
or in case of failure.

Change-Id: I578108dd1a924aaf36435e4dbc5d8dcce50214ee
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Downloader interface 14/162014/8
Lukasz Wojciechowski [Thu, 23 Nov 2017 10:06:07 +0000 (11:06 +0100)]
Add Downloader interface

Downloader defines action run for a Job to download artifacts required
to run the Job.

Change-Id: I932b1630a97dc9573aa0cbf0c4726a91fb042339
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Parser implementation with tests 13/162013/8
Lukasz Wojciechowski [Tue, 14 Nov 2017 10:37:11 +0000 (11:37 +0100)]
Add Parser implementation with tests

ParserImpl implements parsing phase of Job handling.
It saves yaml file in ArtifactDB, parses it and sets up config.

Change-Id: Icb52b7c1943c29744f82532877aade2bb085c345
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Parser interface 12/162012/8
Lukasz Wojciechowski [Wed, 22 Nov 2017 16:39:51 +0000 (17:39 +0100)]
Add Parser interface

Parser defines action run for a Job to prepare config in parsing phase.

Change-Id: Iea53d08c89d5fbedf690036688ded53c40349741
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Notifier implementation with tests 16/162216/7
Lukasz Wojciechowski [Wed, 29 Nov 2017 15:58:33 +0000 (16:58 +0100)]
Add Notifier implementation with tests

Change-Id: Ib37b4dccf043bb8d5b914b14436929b523446afe
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Notifier interface 15/162215/7
Lukasz Wojciechowski [Wed, 29 Nov 2017 15:58:07 +0000 (16:58 +0100)]
Add Notifier interface

Change-Id: If77ebbe1df6cf2dd49bbee91efee2d8f0b9317d9
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd Notification struct 11/162011/8
Lukasz Wojciechowski [Wed, 22 Nov 2017 16:37:31 +0000 (17:37 +0100)]
Add Notification struct

The structure is used to notify Controller about events occured
during processing a Job.

Change-Id: I38077eda6fc0cb156d8224b5af1280d5b8db88af
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd JobsController implementation with tests 10/162010/8
Lukasz Wojciechowski [Thu, 9 Nov 2017 17:00:25 +0000 (18:00 +0100)]
Add JobsController implementation with tests

JobsControllerImpl structure stores actual information about all Jobs
such as status, update time, config and Dryad access. It controls
collision free JobID creation. It stores state of Jobs execution
and saves data to DB. It implements JobsController interface.

Patches enhancing tests, written by Aleksander Mistewicz squashed into
this patch.

Change-Id: Ie3e3c46660c650c48cd80a93038b8cdd05f3fc21
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd Dryad structure content 09/162009/7
Lukasz Wojciechowski [Tue, 21 Nov 2017 20:37:54 +0000 (21:37 +0100)]
Add Dryad structure content

Change-Id: Ifb754266fe16ef148fcc5c1dd7d7683b1a2638f2
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd generated mockup for JobsController 08/162008/7
Lukasz Wojciechowski [Wed, 22 Nov 2017 11:13:44 +0000 (12:13 +0100)]
Add generated mockup for JobsController

mockgen -package mock -destination=controller/mock/jobscontroller.go \
git.tizen.org/tools/weles/controller JobsController

Change-Id: I8b9fff217a683568dcedfd2971b94c23d75a0e4c
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoDefine JobsController interface 07/162007/7
Lukasz Wojciechowski [Thu, 9 Nov 2017 16:59:32 +0000 (17:59 +0100)]
Define JobsController interface

JobsController interface is designed for managing Jobs inside Controller.
It is defined to provide additional layer for strict managing Job structures
only. This allows mocking up the interface in tests.

Change-Id: I3fa5054b017f6cd2b6c95f2e5a27acd72b226ee5
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd generated mockups for modules interfaces 06/162006/4
Lukasz Wojciechowski [Tue, 28 Nov 2017 11:45:56 +0000 (12:45 +0100)]
Add generated mockups for modules interfaces

mockgen -package mock -destination=mock/artifactmanager.go \
git.tizen.org/tools/weles ArtifactManager
mockgen -package mock -destination=mock/dryadjobmanager.go \
git.tizen.org/tools/weles DryadJobManager
mockgen -package mock -destination=mock/jobmanager.go \
git.tizen.org/tools/weles JobManager
mockgen -package mock -destination=mock/parser.go \
git.tizen.org/tools/weles Parser

Change-Id: I4401a3a64babe1165016baee749bdea296a55a59
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoFix typos in JobManager 04/162004/4
Lukasz Wojciechowski [Tue, 7 Nov 2017 11:12:49 +0000 (12:12 +0100)]
Fix typos in JobManager

Change-Id: Ic16bbbb50bd82b0d6b747f05f2fd0c409d2fcf1d
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoMerge branch 'parser' 56/176356/1
Pawel Wieczorek [Wed, 18 Apr 2018 16:27:17 +0000 (18:27 +0200)]
Merge branch 'parser'

Change-Id: Iee519eef6c7f9f61f66d4bdeaa1a28f871ba2ec5
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
6 years agoAdd yaml parser functionality and tests 01/161501/7
Leszek Zygo [Tue, 24 Oct 2017 10:16:44 +0000 (12:16 +0200)]
Add yaml parser functionality and tests

Change-Id: Iab4513293fbee901798c43f178ded8ee73585c9a
Signed-off-by: Leszek Zygo <l.zygo@samsung.com>
6 years agoAdd Weles parser interface 00/161500/7
Leszek Zygo [Tue, 7 Nov 2017 16:09:20 +0000 (17:09 +0100)]
Add Weles parser interface

Change-Id: If5cb8bbdf033233510f847fd3279a32b7d4c3406
Signed-off-by: Leszek Zygo <l.zygo@samsung.com>
6 years agoAdd sample_yaml 99/161499/4
Leszek Zygo [Tue, 24 Oct 2017 09:57:57 +0000 (11:57 +0200)]
Add sample_yaml

Change-Id: Ic20bc4706c4461dc184d373443d85b5378bd3ca3
Signed-off-by: Leszek Zygo <l.zygo@samsung.com>
6 years agoDefine JobManager interface and basic Job types 08/159208/10
Lukasz Wojciechowski [Tue, 7 Nov 2017 11:12:49 +0000 (12:12 +0100)]
Define JobManager interface and basic Job types

Change-Id: Ic16bbbb50bd82b0d6b747f05f2fd0c409d2fcf1d
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd ArtifactManager interface 48/160148/5
Katarzyna Gorska [Fri, 3 Nov 2017 11:54:31 +0000 (12:54 +0100)]
Add ArtifactManager interface

Change-Id: Iaae3b462c525d10b25104d3b29256ac326f3c5a8
Signed-off-by: Katarzyna Gorska <k.gorska@samsung.com>
6 years agoDefine common Weles errors 55/159255/9
Lukasz Wojciechowski [Tue, 7 Nov 2017 20:46:10 +0000 (21:46 +0100)]
Define common Weles errors

Change-Id: I392e39b6454128d6000585fba6e8db976dff32c9
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
6 years agoAdd partial implementation of DryadJobManager 68/161468/3
Aleksander Mistewicz [Mon, 13 Nov 2017 12:20:14 +0000 (13:20 +0100)]
Add partial implementation of DryadJobManager

Change-Id: Iea5ba6512b163d63f0f99fcb8cf78941ae65f15d
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd internal structures of manager package 67/161467/2
Aleksander Mistewicz [Thu, 16 Nov 2017 15:51:06 +0000 (16:51 +0100)]
Add internal structures of manager package

Change-Id: Ic19879d26dd3ed1f45518474844e51b321b1ff00
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd basic Weles structure 69/158869/10
Aleksander Mistewicz [Thu, 16 Nov 2017 15:49:59 +0000 (16:49 +0100)]
Add basic Weles structure

Each interface, used or implemented by many components, should
be defined in the file with the same name as said interface in
basic, weles, package. Definitions of all non-interface types
related to it should be stored in the same file. The remaining
types, if common to multiple interfaces, should be defined
in main package file: weles.go.

The purpose is to have packages to depend on basic package, but not each
other. Moreover a developer will not need to look into documentation or
search for definition of interface as the location of such definition
will be known by interface's name.

This patch also defines manager's interfaces and structures in described
format.

Change-Id: Ie1bf89c8e7e4af28617cc00f21d6193c4b7517d1
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
6 years agoAdd Apache 2.0 license 48/144748/1
Pawel Wieczorek [Wed, 2 Aug 2017 15:09:40 +0000 (17:09 +0200)]
Add Apache 2.0 license

Change-Id: I0d89637aba1d8c47892a4869078e492162573007

7 years agoInitial empty repository
Tizen Infrastructure [Thu, 6 Jul 2017 07:59:48 +0000 (07:59 +0000)]
Initial empty repository