如何结合Vagrant与Jenkins完美的持续集成环境? [英] How to combine Vagrant with Jenkins for the perfect Continuous Integration Environment?

查看:420
本文介绍了如何结合Vagrant与Jenkins完美的持续集成环境?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您有一个项目需要运行某些SW需求(例如:特定版本的Apache,PHP版本,MySQL数据库实例和其他几个软件)。

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 of software).

您已经发现 Vagrant ,因此您的虚拟环境都是建立。您可以从配置文件和食谱中创建框。

You have already discovered Vagrant, so your virtual environment is all setup. You can create boxes out of your configuration files and cookbooks.

您还了解了一个持续集成系统的优点,例如 Jenkins

You have also understood the advantages of a Continuous Integration system such as Jenkins.

现在,您想将这两个世界(Vagrant和Jenkins)结合起来,以获得完美的连续集成环境。更具体地说,你不想在运行Jenkins的机器上安装你的项目所需的软件,但是你想使用Vagrant提供的虚拟环境定期在你的项目上面创建项目。 CI软件(Jenkins)将为您构建Vagrant框,并在其顶部构建和测试您的项目。

Now you would like to combine these two worlds (Vagrant and Jenkins) to get the perfect Continuous Integration Environment. To be more specific, you would like not to install the SW required by your project on the machine running Jenkins, but you would like to use the virtual environment provided by Vagrant to periodically build your project on the top of it. The CI software (Jenkins) will build the Vagrant box for you and build and test your project on the top of it.

如何设置您的环境来实现这一点?

How would you setup your environment to achieve this?

推荐答案

这是一个很好的解决方案的构建系统,我的建议:

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


  1. 您当前的jenkins用作主CI(可能由用户jenkins启动)

  2. 在同一台机器或另一台机器上创建另一个用户作为jenkins从模式

    • jenkins从机可以从jenkins主机调用,它可以使用不同的用户,如vagrant谁拥有vagrant的权限和环境,因此它不会干扰原始jenkins主服务器<


    • 大部分

  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

您可以选择请查看 veewee ,它可以在飞行中创建流浪汉盒。

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

这里是我使用Jenkins CI和Vagrant 为我的指南更容易CI。

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

这篇关于如何结合Vagrant与Jenkins完美的持续集成环境?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆