How to combine Vagrant with Jenkins for the perfect Continuous Integration Environment?

前端 未结 3 1643
心在旅途
心在旅途 2021-01-29 17:49

You have a project which has got some SW requirements to run (e.g.: a specific version of Apache, a version of PHP, an instance of a MySQL database and a couple of other pieces

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-29 18:47

    it is a good solution for build system, my suggestion:

    1. Your current jenkins works as master CI (probably started by user jenkins)
    2. Create another user in same machine or another machine to work as jenkins slave mode
      • jenkins slave can be invoked from jenkins master, and it can use different user like vagrant who had permission and environment for vagrant, therefore it will not interfere the original jenkins master server
      • create your base vagrant box, then it can be reused to speedup for your deployment
    3. Most of the installation information (packages) could be managed by puppet (or chef) to be loaded into your vm box.

    Probably you can take a look at veewee, which can create vagrant box on fly.

    Here is the Make CI easier with Jenkins CI and Vagrant for my guideline for this suggestion.

提交回复
热议问题