Uploaded image for project: 'Cloud Enablement'
  1. Cloud Enablement
  2. CLOUD-2889

Enable incremental builds in EAP CD and EAP on OS 7.2 application templates

    Details

      Description

      Complete investigation of adding 'incremental: true' to the 'sourceStrategy' section of the CD and EAP on OS 7.2 application templates. If proved a valid approach, implement it.

      "Complete investigation" basically means thinking about / double-checking a bit the following and asking the core CE team if there are any other considerations. Mark Eastman forwarded us some input from Johnathan Dowland suggesting adding this, so the basic idea is solid.

      My observations using OSO Pro and the CD 13 basic s2i template, either kitchensink or helloworld-rs quickstarts is that setting this saves about 20-30 seconds. I haven't tried in a more "clean-room" kind of test, e.g. oc cluster up on a laptop where all other processes are minimized. I did over 20 different builds. Doing a build still takes ~ 1 min, and that's just the build; doesn't cover time spent to get pods using the new build running. So, this is a meaningful but not game-changing improvement.

      I experimented with setting MAVEN_CLEAR_REPO=true in combination with this; i.e. to confirm that didn't break things. It didn't, and it shouldn't as clearing the repo removes .m2/repository/* while 'incremental: true' results in passing over the still-existing .m2. (It's expected that the combination would be non-sensical, since the cleared repo in build #1 would remove the benefit of the incremental build for build #2. I was just checking that it wouldn't fail.)

      A tradeoff here is 'incremental: true' results in the next build pulling the previous image, while a build without that set does not. So the time to pull that image counts against any benefit from not downloading from a remote maven repo. But, at least in my testing, the tradeoff was positive.

      Given this tradeoff, I wondered whether the complexity of the application was relevant (i.e. the fewer things pulled from maven, the less the gain.) But switching from 'heavy' kitchensink' to 'lighter' helloworld-rs didn't result in an obvious worse tradeoff. If you look at the log of a build of helloworld-rs without 'incremental: true', this is not so shocking. There's a ton of maven internal stuff (plugins etc) being downloaded. Scanning the log it's hard to pick out the app dependencies themselves from the list of what's coming down. (It's possible our quickstarts are overly heavy in this regard, but that's a different topic.)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brian.stansberry Brian Stansberry
                  Reporter:
                  brian.stansberry Brian Stansberry
                  Tester:
                  Pavel Drobek
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: