Using Hudson to build a distributed build environment is very convenient, and the client does not need to perform too many operations, as long as it can execute java commands. Hudson is installed in master mode by default. The master is used as the master environment for Distributed building. The client does not need to install hudson and uses jnlp to establish a connection with the master.
1. Hudson-> System Management-> node management-> new node-> (enter the node name and select the "Dumb Slave" option)
2. Add the settings for creating a node on the Hudson Server:
1. of executors: number of executions, which can be configured as the number of CPUs
2. Remote FS root: Execution directory of the client hudson
3. Labels: label used to filter nodes in projects
4. Usage: Select "use this node whenever possible"
5. Launch method: use Launch slave agents via JNLP
6. Click Save.
3. Start the agent on the client and directly execute the following command:
Java-jar slave. jar-jnlpUrl
Http: // 192.168.0.110: 8080/hudson/computer/Jack/slave-agent.jnlp
4. After the client is started, you can view the connection on the server.
5. select the Job to be executed, check "Restrict where this project can be run", and add the corresponding node (corresponding to the Labels content when the node is created, if not set, it is the name of the node ).
6. Click build now to see that the task can be executed in a distributed environment.