Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Certificates and Testing

Pre-release
Pre-release
Compare
Choose a tag to compare
@owulveryck owulveryck released this 29 Dec 13:53
· 415 commits to master since this release

Security

Mutual authentication of executor and orchestrator

Orchestrator and Executor now use x509 certificates to authenticate each-others.
A tool for generating self signed certificates has also been included in security/util

Orchestrator

Bug fix

A major rewrite has been done in the concurrency code. The sync.Broadcast function is no longer used. Instead a fanOut function which rely on channels has been implemented.

Testing

A lot of more testing case has been developed. 87.7% of the code is covered so far:

go test -coverprofile=/tmp/coverage.out github.com/owulveryck/gorchestrator/orchestrator
ok      github.com/owulveryck/gorchestrator/orchestrator        8.797s  coverage: 87.7% of statements

go tool cover -func=/tmp/coverage.out
github.com/owulveryck/gorchestrator/orchestrator/executor.go:21:        Init            90.9%
github.com/owulveryck/gorchestrator/orchestrator/graph.go:36:           getNodeFromName 0.0%
github.com/owulveryck/gorchestrator/orchestrator/graph.go:44:           Run             100.0%
github.com/owulveryck/gorchestrator/orchestrator/graph.go:114:          Check           100.0%
github.com/owulveryck/gorchestrator/orchestrator/node.go:46:            Execute         66.7%
github.com/owulveryck/gorchestrator/orchestrator/node.go:108:           Run             93.5%
github.com/owulveryck/gorchestrator/orchestrator/structure.go:38:       Error           100.0%
github.com/owulveryck/gorchestrator/orchestrator/util.go:22:            fanOut          100.0%
github.com/owulveryck/gorchestrator/orchestrator/util.go:34:            fanIn           100.0%
total:                                                                  (statements)    87.7%

Race conditions

The code has been tested against race conditions. 4 of them has been detected and eradicated:

go test -race .
ok      github.com/owulveryck/gorchestrator/orchestrator        9.374s

API enchancement

  • a GET /tasks is now listing all the tasks
  • a DELETE /tasks/{id} Now stops a tasks (actually sets its timeout to 0)

The changes has also been ported to the swagger "contract"

Executor

A basic shell engine has been hardcoded for testing purpose.

Misc

A Makefile has been included and is helpful to build the executables with tests certificates.

Clients

A TOSCA client is in progress. So far it is able to parse the examples files in the standard documentation (eg single_instance_wordpress).

TESTING the release

Download the binary or grab the source, install tmux and run make testing