Open aadeshpa opened 4 years ago
Document 1 content draft:
Problem details
In Nodejs and Nodejs-express stacks there are recursive folder structure and node modules dependencies and in stack build process Dockerfile uses single COPY command to copy all recursive folder structure. This is ideally a good Dockerfile creation practice.
However, when this runs in the pipelines it uses appsody/appsody-buildah
containers which has old Buildah version 1.9.0
and due to a bug in their version, the single COPY command in build process Dockerfile takes a lot of time, which increases the build step time in the pipelinerun.
We cannot use new appsody/appsody-buildah
container having new version of Buildah > 1.9.0 which has the bug fixed for the single recursive COPY command because it includes pre-requisite of fuse-overlayfs
in host OS, and any version of RHEL OS till 8.1 does not have the support of this pre-requisite. Redhat has replied that they would be having this support in RHEL 7.8 version which is not yet released. Hence we cannot update to the new version of appsody/appsody-buildah
and are stuck with the old version which has Buildah version 1.9.0.
For example:
Existing Dockerfile Copy command:
COPY . /project
Workaround Dockerfile Copy commands:
COPY package*.json /project/
COPY *.js /project/
COPY user-app /project/user-app
Document 2 : Pipelines Troubleshooting guide content draft:
If the pipelinerun for a particular stack is taking lot of time in the build step, this could be due the performance bug issue in the stack creation process. Please follow the link [Performance issue in the stack build process](link to Document 1 guide) to troubleshoot the issue and re-create your stack with the workaround. After the workaround return back and try to run the pipeline again for that stack.
@aadeshpa Your draft for document 1 need to be more generic. There should be no mention of pipelines as an Appsody stack creator is not necessarily going to have any.
By default Appsody will build stacks using docker so this is an edge case that many stack developers won't be concerned with, perhaps the more important audience is that of the certified stack developers. I would suggest an appropriate set of guidelines and certification steps are put in place as these stacks are created and integrated into Kabanero / ICP4A.
Reference Issue: https://github.com/kabanero-io/kabanero-pipelines/issues/121
We need to mention that current Dockerfile used in Nodejs and Nodejs-express stack had good practice COPY command to copy the app project folders to the image, however since pipelines are using
appsody-buildah
containers which has oldbuildah version 1.9.0
we need to make tweak in COPY commands of Dockerfile.So we need to identify two documentation places for the details :
Firstly, the place where the users see the document for creation of the stacks and add this issue details there explaining them the current workaround for any new stacks Dockerfile for having good performance, until kabanero pipelines uses old appsody-buildah container which has old buildah version 1.9.0 and why we can’t move to new version of it due to RHEL OS version limitations.
Secondly , again mention the same problem in our pipelines troubleshooting guide and point the link of details to the first location identified.