Using DevOps pipelines to create distribution bundles of applications

元气小坏坏 提交于 2020-05-16 22:38:07

问题


We want to create bundles of our applications in order to distribute to clients etc. An application can have more than one component. Ex: an application can have a spring server and a scheduler so in order to distribute this application both jars will have to be given to the client.

We want to use Docker/Docker compose to accomplish this. Ex: we give a client a bundle containing a Docker compose file, and they just run docker-compose up to start the application.

We currently have a Jenkins pipeline that when run will produce a zip file containing .tar files of all the Docker images of the components. There will also be a start.sh (or start.bat) file that, when run, will load all the Docker images and run docker-compose up.

Some of these components have properties that the client needs to configure according to their environment (ex: SCM URL). If the component is Spring/Java based, we would externally mount the application.properties file into the docker image in the docker-compose.yml

This all works, I just want to know if the current process we are using is compliant with industry standards or is there a better way of meeting the requirement? Any open source tools that would simplify the process?

UPDATE: The only "problem" we ran into while doing the above process is having to change the configuration properties to fit with our docker-compose environment. For example in one of the application.properties files that the developer has checked in to the SCM he has specified the MySQL host as localhost whereas when deploying in our Docker compose environment the MySQL container will have a host name mysql. How do we handle a problem like this? In a Java/Spring application do we use profiles? Ex: application-dev.properties & application-docker.properties. Or is there a better way to do application configuration management

来源:https://stackoverflow.com/questions/61631311/using-devops-pipelines-to-create-distribution-bundles-of-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!