Setting up from scratch Part 01-阿里云开发者社区

开发者社区> 不能超过五> 正文

Setting up from scratch Part 01

简介: 原文:http://confluence.public.thoughtworks.org/display/CCNET/Setting+up+from+scratch++Part+01   Added by Ruben Willems , last edited by Rube...
+关注继续查看

原文:http://confluence.public.thoughtworks.org/display/CCNET/Setting+up+from+scratch++Part+01

 
Added by Ruben Willems , last edited by Ruben Willems on Sep 29, 2007  (view change)

We'll be setting it up step by step, so this will be a real step by step approach. The reason is you can see what the benefits are of the setups used in this document.
The first parts will seem overdone for users who used CCNet before, but it is intended for the real starters. Later parts contain tips/situations for people with the basic knowledge.

Typically a build system consists of 2 servers and X development machines, they can be on different physical machines, but they can also be hosted on 1 machine.
Or 1 physical machine with virtual machines on it, everything is possible

These 2 servers are :   
° Build server  : referenced as BuildServer
° Source Control server : referenced as SourceControl

For this example the setup will be on 1 machine, so everybody can follow this tutorial without having to maintain multiple PC's.

The easiest way to set things up is to respect the following installation order :
° windows
° IIS
° .Net framework
° Visual Studio
° extra tools (Nant, Testdriven.Net, NCover, ...)

Step 1 : Installing CCNet

Since it has an installer, it is in fact : setup, next, next, next, ...
Once this is done, you will have :
° a new folder in \Program Files : CruiseControl.Net
° a shortcut on the desktop : CruiseControl.Net
       This shortcut will start the build server.

Step 2 : Folder structure

Make the following folders

Folder Name Purpose
c:\Integration will contain the integration logs, artifacts, sources, ...
c:\Repository will contain the repository of our source control
c:\Projects will contain checked out sources to work with


note : this is not the best folder structure for sources, but for these example it will do fine.
          for setting up development trees, see Tree Surgeon (http://www.codeplex.com/treesurgeon),  CIFactory (http://www.cifactory.org/joomla), ...




 

Step 3 : First basic CCNet project

This project is just for playing around a bit with cruisecontrol, without having to do any real coding.
We'll just use a batch file, and play a bit with that.
Make a subfolder in c:\projects, named Example01
Create a command script named 'test.cmd' with the following contents

@echo off
set

 

If you run this script, you'll see all the environment variables of your machine.

Step 4 : Configuring the build server

Start the build service, (there is a desktop icon) you will see a command window wit the following :

[CCNet Server:DEBUG] The trace level is currently set to debug.  This will cause CCNet to log at the most verbose level,
which is useful for setting up or debugging the server.  Once your server is running smoothly, we recommend changing
this setting in C:\Program Files\CruiseControl.NET\server\ccnet.exe.config to a lower level.
[CCNet Server:INFO] Reading configuration file "C:\Program Files\CruiseControl.NET\server\ccnet.config"
[CCNet Server:INFO] No projects found
[CCNet Server:INFO] Registered channel: tcp
[CCNet Server:INFO] CruiseManager: Listening on url: tcp://192.168.131.72:21234/CruiseManager.rem
[CCNet Server:INFO] Starting CruiseControl.NET Server



Since there are no projects, we'll add one for this simple script. Leave the CCNet server running, it will pick up the changes to the config file after every save.
Modify CCNet.config, found in \program files\CruiseControl.Net\server
Enter the following text :
<cruisecontrol>
    <project>
        <name>SimpleExample</name>

	<triggers />

	<tasks>
	    <exec>
		<executable>c:\projects\test.cmd</executable>
	    </exec>
	</tasks>
    </project>
</cruisecontrol>

 

You'll see that the command window of the server added the following lines.

[680:INFO] Configuration changed: Restarting CruiseControl.NET Server
[680:INFO] Reading configuration file "C:\Program Files\CruiseControl.NET\server\ccnet.config"
[SimpleExample:INFO] Starting integrator for project: SimpleExample


 

Now you can also browse to the dashboard,

open your browser and surf to http://localhost/ccnet
you will see the project : SimpleExample

Press the 'Force' button to force the build. Next press 'Refresh Status' to view the result.

You see that the build was successfull

Clicking on the project name 'SimpleExample' will show a page with project related information. From there on you can go to individual builds.

This shows how to set up a very basic project in CCNet, the next topic will cover :

° improving the project setup
° setting up source control monitoring
° getting information about builds

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
阿里云服务器怎么设置密码?怎么停机?怎么重启服务器?
如果在创建实例时没有设置密码,或者密码丢失,您可以在控制台上重新设置实例的登录密码。本文仅描述如何在 ECS 管理控制台上修改实例登录密码。
10076 0
使用NAT网关轻松为单台云服务器设置多个公网IP
在应用中,有时会遇到用户询问如何使单台云服务器具备多个公网IP的问题。 具体如何操作呢,有了NAT网关这个也不是难题。
26789 0
阿里云服务器端口号设置
阿里云服务器初级使用者可能面临的问题之一. 使用tomcat或者其他服务器软件设置端口号后,比如 一些不是默认的, mysql的 3306, mssql的1433,有时候打不开网页, 原因是没有在ecs安全组去设置这个端口号. 解决: 点击ecs下网络和安全下的安全组 在弹出的安全组中,如果没有就新建安全组,然后点击配置规则 最后如上图点击添加...或快速创建.   have fun!  将编程看作是一门艺术,而不单单是个技术。
10883 0
阿里云服务器安全组设置内网互通的方法
虽然0.0.0.0/0使用非常方便,但是发现很多同学使用它来做内网互通,这是有安全风险的,实例有可能会在经典网络被内网IP访问到。下面介绍一下四种安全的内网互联设置方法。 购买前请先:领取阿里云幸运券,有很多优惠,可到下文中领取。
11818 0
windows server 2008阿里云ECS服务器安全设置
最近我们Sinesafe安全公司在为客户使用阿里云ecs服务器做安全的过程中,发现服务器基础安全性都没有做。为了为站长们提供更加有效的安全基础解决方案,我们Sinesafe将对阿里云服务器win2008 系统进行基础安全部署实战过程! 比较重要的几部分 1.
9158 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,阿里云优惠总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系.
13884 0
腾讯云服务器 设置ngxin + fastdfs +tomcat 开机自启动
在tomcat中新建一个可以启动的 .sh 脚本文件 /usr/local/tomcat7/bin/ export JAVA_HOME=/usr/local/java/jdk7 export PATH=$JAVA_HOME/bin/:$PATH export CLASSPATH=.
4659 0
阿里云服务器如何登录?阿里云服务器的三种登录方法
购买阿里云ECS云服务器后如何登录?场景不同,云吞铺子总结大概有三种登录方式: 登录到ECS云服务器控制台 在ECS云服务器控制台用户可以更改密码、更换系统盘、创建快照、配置安全组等操作如何登录ECS云服务器控制台? 1、先登录到阿里云ECS服务器控制台 2、点击顶部的“控制台” 3、通过左侧栏,切换到“云服务器ECS”即可,如下图所示 通过ECS控制台的远程连接来登录到云服务器 阿里云ECS云服务器自带远程连接功能,使用该功能可以登录到云服务器,简单且方便,如下图:点击“远程连接”,第一次连接会自动生成6位数字密码,输入密码即可登录到云服务器上。
22400 0
+关注
不能超过五
主要关注分布式系统、项目管理、教育行业互联网应用研发和运维
22
文章
2
问答
文章排行榜
最热
最新
相关电子书
更多
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载
《2021云上架构与运维峰会演讲合集》
立即下载