[FOLIO-1111] Add Docker-based launch descriptors to module descriptor templates Created: 07/Mar/18 Updated: 12/Nov/18 Resolved: 13/Mar/18 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P2 |
| Reporter: | Wayne Schneider | Assignee: | John Malconian |
| Resolution: | Done | Votes: | 0 |
| Labels: | ci, core, sprint34 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 3 hours, 15 minutes | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||||||
| Sprint: | |||||||||||||||||
| Description |
|
This would be very useful for auto-deployment. Assumption is that launch descriptors in module descriptors would be overridden by launch descriptors in deployment descriptors. |
| Comments |
| Comment by John Malconian [ 07/Mar/18 ] |
|
mod-authtoken Wayne Schneider I'm going to start with the first twelve on this list (up to and including mod-inventory-storage) |
| Comment by John Malconian [ 07/Mar/18 ] |
|
Based on discussions with Wayne Schneider, the agreed upon approach is to update the Module Descriptor template for each backend module to include a docker-based launch descriptor. The launch descriptor should be docker repository agnostic and 'dockerPull' should be set to 'false' by default. The FOLIO CI system will then take the generated Module Descriptor and add the correct docker repository ('folioci' for snapshot releases or 'folioorg' for non snapshot releases and change dockerPull to 'true' before posting to 'folio-registry'. Some work needs to be done in the CI before making these changes to the MD templates. Example of new MD template with launch descriptor:
{
"id": "${artifactId}-${version}",
"name": "authtoken",
"provides": [
{
"id": "authtoken",
"version": "1.2",
"handlers" : [
{
"methods" : [ "POST" ],
"pathPattern" : "/token"
}
]
}
],
"filters" : [
{
"methods" : [ "*" ],
"pathPattern" : "/*",
"phase" : "auth",
"type" : "headers",
"modulePermissions" : [ "perms.users.get" ]
}
],
"launchDescriptor": {
"dockerImage": "${artifactId}:${version}",
"dockerArgs": {
"HostConfig": { "PortBindings": { "8081/tcp": [{ "HostPort": "%p" }] } }
},
"dockerPull" : false
}
}
|
| Comment by John Malconian [ 07/Mar/18 ] |
|
Bumping this to P2 since it will make module deployment easier for CI tests (
|
| Comment by Adam Dickmeiss [ 08/Mar/18 ] |
|
A lot of modules to be updated "launchDescriptor": { "dockerImage": "$m:$v", "dockerArgs": { "HostConfig: { "PortBindings": { "8081/tcp": [{ "HostPort": "%p" }] } } }, "dockerPull" : false } Here $m and $v is the module name and version from the the Module ID content (that was subsituted long time ago). Doing it this way COULD be a faster way to achieve this.. than updating all those modules. And I think more flexible. |
| Comment by Wayne Schneider [ 08/Mar/18 ] |
|
This would require all modules to have the same dockerArgs (and env and dockerCMD), which I think actually limits flexibility a bit. For example, right now there are (I think) 2 modules – mod-inventory and mod-circulation – that need the port binding on a different port than 8081. |
| Comment by John Malconian [ 09/Mar/18 ] |
|
I've completed a big chuck of the work in CI in order to support this change (
|
| Comment by John Malconian [ 13/Mar/18 ] |
|
All modules list above now have a launch descriptor appended to their respective module descriptor templates on the master branch and generated module descriptors have been posted to folio-registry. |