This repository has been archived by the owner on May 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
DEPLOY-278: ADR for applying extensions #67
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1cbd52c
DEPLOY-278 / DEPLOY-269: Deployment of the RM and Sync Services amps
gavincornwell 2524980
DEPLOY-278 / DEPLOY-269: Deployment of the RM and Sync Services amps
gavincornwell 2169fdd
DEPLOY-278 / DEPLOY-269: Deployment of the RM and Sync Services amps
gavincornwell e988bd3
DEPLOY-278 / DEPLOY-269: Deployment of the RM and Sync Services amps
gavincornwell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# 7. Applying Extensions to Docker Images | ||
|
||
Date: 2017-12-18 | ||
|
||
## Status | ||
|
||
Proposed | ||
|
||
## Context | ||
|
||
One of the main advantages of Docker images is their immutability. This means once an image has been tested and verified there is a high confidence it will work as intended in other environments as it doesn't change. | ||
|
||
Alfresco allows the core product to the enhanced via external modules in the form of [AMPs](https://docs.alfresco.com/5.2/concepts/dev-extensions-packaging-techniques-amps.html) or [simple JARs](https://docs.alfresco.com/5.2/concepts/dev-extensions-packaging-techniques-jar-files.html). | ||
|
||
This results in two big problems: | ||
* How do we release containers with every combination of AMP available? | ||
* How do customers apply their own extensions? | ||
|
||
We have three options: | ||
1. Apply extensions at build time, thus retaining the immutability advantage | ||
2. Apply extensions at runtime using a mechanism that doesn't change the contents of the container | ||
3. Apply extensions as the container initializes, breaking immutability. | ||
|
||
There are a number of disadvantages of applying extensions at runtime: | ||
* Immutability is lost (WAR file is changed) | ||
* Extension could fail to apply and prevent the container from starting | ||
* Slower startup time as AMP or JAR has to be fetched and applied | ||
* Potential security issue | ||
|
||
Conversely, applying extensions at build time means we will be forcing customers to build their own images depending on which official and custom extensions they require. | ||
|
||
We investigated potential approaches for option 3 using volumes and initContainers but this increases the complexity of the solution and doesn't resolve all the issues outlined above. | ||
|
||
## Decision | ||
|
||
We will proceed with the build time option as there are a number of disadvantages to applying extensions at runtime, customers are already used to applying their own extensions and they're having to learn a new deployment mechanism anyway. | ||
|
||
We will release a small number of images with and without common AMPs applied. | ||
|
||
## Consequences | ||
|
||
Only supporting extensions applied at build time will require customers to build their own images if they have custom extensions or we don't ship an image with the required combination of extensions. | ||
|
||
To mitigate the additional complexity for customers we will provide scripts and clear documentation on how to build their own images to meet their requirements. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've been asked to not write ADRs with bullets or lists, the thought being that writing out full sentences forces one to think differently and add more detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, updated to remove them.