This is a creation in Article, where the information may have evolved or changed. 1.Go installation 1.1 requires pre-installation of JDK 1.2 Installing Go serverUbuntu system: Pre-Download good. Deb installation package
dpkg-i Go-server-${version}.debService Status View, start, stop
sudo/etc/init.d/go-server Status
sudo/etc/init.d/go-server Start
Sudo/etc/init.d/go-server Stop
Redhat Installation: Pre-Download RPM package
rpm-i go-server-${version}.noarch.rpm Service Status View, start, stop Related installation files:
/var/lib/go-server 二进制文件,数据库文件
/etc/go pipeline配置文件
/var/log/go-server logs文件
/usr/share/go-server 启动脚本
/etc/default/go-server 环境变量
Access to go server:http://< Server host name >:8153/go
1.3 Go Agent installation is similar to the Serverubuntu system: the agent will need to modify the server's IP in/etc/default/go-agent after installation and start the agent:/etc/init.d/go-agent Start
1.4 Registering the agent in the server when the agent appears in the agent list of the server, you need to enable it to use it later
Tips:go supports free installation using the install JDK in the Go official download Zip package, run directly under Windows
Start-server.bat , executed in a Linux environment
server.sh
2. Before upgrading the go, you need to back up
3. User Management Http://www.thoughtworks.com/products/docs/go/13.4/help/managing_users.htmlhttp://www.go.cd/documentation /user/current/configuration/dev_authentication.html Apache-based file password Authentication: http://httpd.apache.org/docs/2.0/ Programs/htpasswd.html
3.1 Creating a user
Cd/etc/go
htpasswd -c -s passwd user
The command creates a passwd file in the current directory
Add passwd file path:/etc/go/passwd to the admin interface of Go
3.2 The server configuration option in the admin interface of Go, configure the passwd file path. Generated XML path:/etc/go/cruise-config.xml
4. Basic Concepts
4.1. Agent lifecycle Go Server will find the resource matching agent based on the requirements of the job. The agent creates a sandbox directory under its own directory, and all materials in the job process are stored under this sandbox directory. To illustrate:
<pipeline name= "My-product" > <materials> <svn url= "Http://my-svn-server/tools" D est= "Tools"/> <svn url= "Http://my-svn-server/my-project" dest= "My-project"/> </materi als> <stage name= "Compile" > <job name= "Linux" > <environmentvariab les> <variable name= "FOO" > <value>bar</value> & lt;/variable> </environmentvariables> <resources> <resour ce>linux</resource> </resources> <tasks> <exec Comm And= "/usr/bin/make" args= "-F Makefile" workingdir= "Tools/my-tool"/> <ant target= "unit-test" working Dir= "My-project"/> </tasks> <artifacts> <artifact src= "my -project/target/deployabLe.jar "dest=" pkg "/> </artifacts> </job> </stage> < ;/pipeline>
- Create a directory on the agent [install-dir]/pipelines/my-product
从
svn material "http://my-svn-server/tools" on checkout code to "[install-dir]/pipelines/my-product /tools "in
- from svn material "http://my-svn-server/my-project" Download to "[Install-dir]/pipelines/my-product/my-project"
- Execute command "/usr/bin/make " under "[Install-dir]/pipelines/my-product/tools/my-tool]"
- Executing ant in the [install-dir]/pipelines/my-product/tools/my-project] Directory
- Publish "[Install-dir]/pipelines/my-product/my-project/target/deployable.jar" to Server
4.2. Pipelines
Pipelines can split complex build tasks into a series of simple stages for quick feedback, detailed and actionable validation, and continuous integration
A job is the smallest unit of work that consists of a series of small build tasks that can be executed on a demand-compliant agent.
The stage is composed of a group of jobs that can be executed concurrently, and the stages task succeeds only if all the job in the stage is completed.
Pipeline is combined by a series of stages in a specific order specified by the configuration file. The pipeline can be started manually or triggered by certain conditions, such as version updates. By default, one stage completes and the next stage is automatically triggered. We can also specify approval and then execute it manually.
Pipeline Groups:
In order to facilitate access according to the use of pipelines divided into different group, easy to manage
Pipelines dependencies:
The dependency of pipeline is set at pipeline configuration and can depend on SCM or other Peipelines
4.3.Deployment and environments
A software development environment can often be divided into development, testing, integration, and production environments.
The test can also be divided into scale test environment, regression environment, single machine environment, cluster environment, performance environment, etc. according to the requirement.
We can use software to deploy to different environments to achieve different software environment requirements.