-
Notifications
You must be signed in to change notification settings - Fork 0
Docker Engines
Template of Docker Engine manifest can be created using the following command:
CodeReview.Orchestrator.exe new-engine-collection -o docker.yamlFile created by this command may look as follows:
defaultEngine: default
engines:
default:
os: Linux
url: unix:///var/run/docker.sock
workerImage: alpine
features:
- feature1
- feature2
windows:
os: Windows
url: npipe:////./pipe/docker_engine
workerImage: alpine
features:
- feature1
- feature2
remote:
os: Windows
url: http://remote.api:2375/
workerImage: alpine
features:
- feature1
- feature2engines section contains array of Docker Engines which can be used for workflow execution. defaultEngine property specifies which engine is used by default if no requirements specified by activity.
The following table describes properties of Docker Engine:
| Property | Description |
|---|---|
os |
Specifies type operating host operating system of Docker Engine. Possition options are Linux or Windows. |
url |
Url point to Docker Engine REST API endpoint. This can be local services like unix:///var/run/docker.sock ( npipe:////./pipe/docker_engine for Windows) or remote endpoint http://remote.api:2375/
|
workerImage |
Helper Docker Image used to create lighweight container for services activities. This kind of activities are related to import\export operations of Docker Volumes (there is no way to export content of volume without creating container). Linux images use alpine image. Windows containes can use microsoft.com/windows/nanoserver.` IMPORTANT: It's important to use version of images which matches host operating system build number. |
features |
List of tags supported by Docker Engine. Each workflow activity may have requirements which needs to be satisfied by Docker Engine. E.g. requirements specified in activity need to available in Docker Engine. If requirements can't be satisfied workflow execution error is thrown. |
Let's assume the following worflow manifest manifest is used:
activities:
git:
image: dragon/jetbrains
requirements:
os: Linux
features:
- feature1
resharper:
image: dragon/jetbrains
requirements:
os: Windows
features:
- feature2
- feature3
roslyn:
image: dragon/roslynThe following Docker Engine manifest was provided:
defaultEngine: default
engines:
default:
os: Linux
url: unix:///var/run/docker.sock
workerImage: alpine
features:
- feature1
- feature2
windows:
os: Windows
url: npipe:////./pipe/docker_engine
workerImage: alpine
features:
- feature2
- feature3Execution flow is going to look as follows:
-
gitactivity is executed usingdefaultDocker Engine. This engine matches requirements of activity (os = Linuxandfeatures = feature1). - Content of volumes is exported to local temporary folder. This happens because next activity can't be executed on current Docker Engine. Volumes are destored on
defaultDocker Engine. - Volumes are created on
windowsDocker Engine. Volumes are initializes with data exported during step 2. -
resharperactivity is executed usingwindowsDocker Engine. This engine satisfies requirements of activity (os = Windowsandfeatures in (feature2, feature3)). - Content of volumes is exported to local temporary folder. This happens because next activity can't be executed on current Docker Engine. Volumes are destored on
windowsDocker Engine. - Volumes are created on
defaultDocker Engine. Volumes are initializes with data exported during step 5. -
roslynactivity is executed usingdefaultDocker Engine because no specific requirements was specified for activity.
NOTE: Any activity without requirements specified is executed using default Docker Engine. Acivity having requirements specified is executed using matching Docker Engine. If multiple Docker Engines were found and one of them was current Docker Engine current engine is used.