简体   繁体   English

从一开始就构建机器人

[英]buildbot from start

should be dumb as everybody seems to installed it without trouble. 应该是愚蠢的,因为每个人似乎都可以毫不费力地安装它。 I spent hours within a fresh squeeze and tried different configurations (easy_install, aptitude and from source 0.81p.tar.gz) the best I got is a page from the localhost:9989 without any slave started. 我花了几个小时重新尝试,并尝试了不同的配置(easy_install,aptitude和来自源0.81p.tar.gz的配置),我得到的最好的结果是来自localhost:9989的页面,而没有启动任何从属。

Knowing that I made the 2 accounts : buildmaster and buildslave how to clean and reinstall it to have server and 1 slave for git ? 知道我已经建立了两个帐户:buildmaster和buildslave如何清理并重新安装它以使其具有git服务器和1个slave?

thanks in advance 提前致谢


Added : 添加 :

You are right some details are missing: 没错,一些细节丢失了:

I use buildbot from virtualBox with a Debian squeeze 6.0 in 32bits The both accounts : buildmaster and buildslave are running within this same Virtual environment. 我使用来自virtualBox的buildbot以及32位Debian挤压6.0,这两个帐户:buildmaster和buildslave在同一虚拟环境中运行。

I just tried the little example (this seems really interesting) : easy_install buildbot buildbot create-master /tmp/experimental_buildmaster buildbot start /tmp/experimental_buildmaster 我只是尝试了一个小例子(这看起来真的很有趣):easy_install buildbot buildbot create-master / tmp / experimental_buildmaster buildbot start / tmp / experimental_buildmaster

  1. as root the jinja2 was missing whereas from buildmaster there were no complain (??) 作为根,jinja2丢失了,而在buildmaster中没有抱怨(??)
  2. commented the Git calls that created errors to try to start the simplest demo 评论了创建错误的Git调用,以尝试启动最简单的演示
  3. buildslave create-slave /tmp/experimental_buildslave 127.0.0.1:9989 slave-name mypasswd buildslave创建从属/ tmp / experimental_buildslave 127.0.0.1:9989从属名称mypasswd
  4. in the log something appear allways : "No address associated with hostname" 在日志中总会出现一些东西: “没有与主机名关联的地址”

it seems I'm closer with this no ? 看来我更接近这个了吗?

If you're having trouble with the configuration, the doc is pretty comprehensive . 如果您在配置方面遇到麻烦,则该文档非常全面 I only had a few problems with stuff more obscure than the doc can answer, at which point I turned to the nice folks - a number of their developers - on their IRC channel ( #buildbot on freenode ), who were very helpful. 我只遇到了一些问题,这些问题比文档所能回答的更加晦涩难懂,这时我在他们的IRC频道( freenode上的#buildbot#buildbot -许多开发人员,他们非常有帮助。

for people like kamal this may be usefull : 对于像kamal这样的人,这可能会有用:

The little demo works now: - I did all as root with no build accounts. 现在,该小样例可以正常工作:-我完全以root身份完成,没有构建帐户。 - easy_install buildbot - buildbot create-master /tmp/experimental_buildmaster -easy_install buildbot-buildbot create-master / tmp / experimental_buildmaster

most important is here 最重要的是在这里

cp /tmp/experimental_buildmaster/master.cfg.example xperimental_buildmaster/master.cfg edit it 

and pay attention to : slavePortnum default is :9989 and git confs : buildmaster will give errors with bad params 并注意: slavePortnum的默认值是:9989和git confs :buildmaster会给出带有错误参数的错误

then 然后

buildbot start /tmp/experimental_buildmaster buildbot启动/ tmp / experimental_buildmaster

wait for the "started sucessfully" 等待“成功启动”

easy_install buildbot-slave easy_install buildbot从属

buildslave create-slave /tmp/experimental_buildslave localhost:9989 example-slave Password buildslave创建从属/ tmp / experimental_buildslave localhost:9989 example-slave密码

I strongly disagree with the proposed ".. .. .." 我强烈不同意提议的“ .....”

buildslave start /tmp/experimental_buildslave buildslave开始/ tmp / experimental_buildslave

and now for something completely different : open browser to localhost:8010 现在是完全不同的东西:打开浏览器到localhost:8010

the welcome page is here, click buildslave to see your slave: rock'n roll ! 欢迎页面在这里,单击buildslave以查看您的奴隶:摇滚!

Some additional information about configuring abd running buildslave after it's creation. 创建后,有关配置abd运行buildslave的一些其他信息。

After installing buildbot package int.d script /etc/init.d/buildbot is added to enable running buildbot as a service (starting automatically after system restart and so on). 安装buildbot软件包后,将添加int.d脚本/etc/init.d/buildbot以启用将buildbot作为服务运行(系统重启后自动启动,依此类推)。

For this script to run successfully you need to edit conf file for this script. 为了使该脚本成功运行,您需要为此脚本编辑conf文件。 File name is specified inside the script, typically it is /etc/default/buildbot . 文件名是在脚本内指定的,通常是/ etc / default / buildbot Options in this file are pretty clear. 该文件中的选项非常清楚。 One interesting thing you can tune here - the user from which buildbot will be running (default is buildbot). 您可以在此处调整的一件有趣的事情-将要运行buildbot的用户(默认为buildbot)。 Small example of when it is useful: 有用的小例子:

I had to write a buildbot task, one part of which was managing virtual machines running on builslave machine (starting, stopping, managing snapshots). 我必须编写一个buildbot任务,其中一部分是管理在builslave计算机上运行的虚拟机(启动,停止,管理快照)。 But rights for doing this had only vbox user (I used Virtual Box VMs). 但是,只有vbox用户具有执行此操作的权限(我使用Virtual Box VM)。 So I simply changed the user field in /etc/buildbot/default to accomplish this. 因此,我只是更改了/ etc / buildbot / default中user字段来完成此操作。

I hope this information will be useful to you. 希望这些信息对您有用。

Have you looked at the first run tutorial ? 您是否看过首次运行的教程

  • There is no reason to run buildbot as root (and reasons not to, as there have been a few security issues with buildbot). 没有理由以root身份运行buildbot(也没有理由不这样做,因为buildbot存在一些安全问题)。 Depending on how you installed buildbot, the jinja2 dependency will be installed in different places. 根据您安装buildbot的方式,jinja2依赖项将安装在不同的位置。 In particular, if you installed it using pip/easy_install not as root, then it is probably installed in your users directory, which root won't access by default. 特别是,如果您不是以root用户身份使用pip / easy_install进行安装的,则可能已将其安装在用户目录中,默认情况下不会访问该root用户。
  • The slave will try to figure out its hostname. 从站将尝试找出其主机名。 That might be causing the error you get about no hostname for address. 这可能是导致错误的原因,因为您没有地址的主机名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM