Hi Jiang Thanks for the suggestion.
If I'm not missing anything, for issue 3, that'll be acceptable to remove wait on tcp port part in the pom.xml. right? For issue 4 I think I can make use of compose file variable substitution [1] to solve this. I'll create another PR after PR for SCB-1335 [2] is merged. [1]: https://docs.docker.com/compose/compose-file/#variable-substitution [2]: https://github.com/apache/servicecomb-pack/pull/486 Willem Jiang <willem.ji...@gmail.com> 于2019年6月30日周日 下午4:13写道: > > Hi Daniel > > Thanks for the heads up of SCB-668. The original thought of SCB-668 > is reuse the docker compose file. > As you have mentioned there are some issues of the maven docker plugin > we need to get around with. > > For the issue1, we could upgrade the docker plugin version to get the > latest fix. > For the issue2, we could use the new version of docker-compose file, I > saw you already submit a PR[1] for it. > > For the issue3, I saw the issue you reported, I just want to point we > use the log and tcp port as the wait conditions, the docker maven > plugin will stop wait process if any condition is satisfied. > For the issue4, I checked the alpha-server application profile, the > test profile is used to export the restful service which could be used > to verify the alpha received the events. We need to enable the > profile when running the accept test. > If we can pass the parameter into the docker-compose file, we can use > different JAVA options for different scenarios. > > [1]https://github.com/apache/servicecomb-pack/pull/486 > > > Willem Jiang > > Twitter: willemjiang > Weibo: 姜宁willem > > On Sun, Jun 30, 2019 at 1:48 PM Daniel Qian <chanjars...@gmail.com> wrote: > > > > Hi guys, I'm working on [SCB-668 Using docker-compose file to start > > Services from docker plugin in the Accept test] and encounter some > > problems so I start this mail thread to discuss about them: > > > > Problem 1: > > > > There is a bug in fabric8 dmp plugin version 0.28.0 (currently used) : > > > > If you define the container using external docker-compose file [1], > > the number of containers it starts will be <number of plugin defined > > containers> * <number of docker-compose file defined containers>, > > which simply means there will be multiple duplicated containers in a > > single docker:start run and cause failure. > > > > Problem 2: > > > > fabric8 dmp plugin doesn't support conditional depends_on, see this > > issue [2]. Furthermore, conditional depends_on was add in compose file > > version 2.1 [3] but removed in compose file version 3 [4] > > > > For example fabric8 dmp doesn't support this: > > > > depends_on: > > database: > > condition: service_healthy > > > > Only support this: > > > > depends_on: > > - database > > > > Problem 3: > > > > fabric8 dmp version >= 0.29.0 solved bug mentioned in problem 1, but > > the tcp wait on port always failing (see this issue [5]) > > > > Problem 4: > > > > Compose file overwrites configurations defined in dmp plugin. > > > > For example, alpha server JAVA_OPTS env variable in demo project is: > > JAVA_OPTS=-Dspring.profiles.active=prd > > > > In Acceptance Tests pom.xml is: > > <JAVA_OPTS>-Dspring.profiles.active=prd,test</JAVA_OPTS> > > > > As described in dmp doc [6], <run> configuration is used as defaults > > and are overwritten by configuration defined in docker-compose file. > > That means the final effective profile only include prd, not prd and > > test. > > > > [1]: https://dmp.fabric8.io/#docker-compose > > [2]: https://github.com/fabric8io/docker-maven-plugin/issues/888 > > [3]: > > https://docs.docker.com/compose/compose-file/compose-file-v2/#depends_on > > [4]: https://docs.docker.com/compose/compose-file/#depends_on > > [5]: https://github.com/fabric8io/docker-maven-plugin/issues/1234 > > [6]: https://dmp.fabric8.io/#docker-compose > > > > -- > > Daniel Qian > > > > 博客:https://segmentfault.com/u/chanjarster > > github:https://github.com/chanjarster -- Daniel Qian 博客:https://segmentfault.com/u/chanjarster github:https://github.com/chanjarster