Ubuntu platform--jenkins via SSH Mount Salve-agent

Source: Internet
Author: User

Reference: http://blog.csdn.net/jiang1986829/article/details/51141731
Https://www.cnblogs.com/itech/archive/2011/11/10/2244690.html
http://blog.csdn.net/liuchunming033/article/details/52025541
Before the blogger wrote a win7+win7, now finally have the time (equipment) to engage in a linux+linux continuous integration platform.
The Changge that appears in the following command line is the Mater host name, and the agent is the slave agent host name. generate SSH key pair

Because we want the master host to control the slave agent, which is the master->agent access, then we generate the key pair in the master host , if you want the master and slave agents to communicate with each other, The following procedure can be repeated in the opposite direction of the agent host.
Mater Host:

SSH-KEYGEN-T RSA

You can use the-t option to select encryption, including RSA and DSA two keys, such as: $ssh-keygen-t DSA or ssh-keygen-t RSA, encryption in different ways, the name of the key is different, there is no difference, if the key is not specified, default RSA

The location of the key store, default in the user directory of the. SSH folder, enter the above instructions, the default we press three times to enter. The procedure is shown in the following illustration:

As you can see from the image above, our key id_rsa and public key id_rsa.pub are stored in the/home/changge/.ssh directory. Generate Authorized_keys

Then enter the directive:

Cat Id_rsa.pub >> Authorized_keys
chmod authorized_keys copy authorized_keys file to slave agent host

Similarly, under the slave agent host, we also enter the. SSH folder under the user directory and copy the Authorized_keys file we just copied to the folder.
Test SSH Communication setup

Master host under our input directive, SSH agent hostname @agent IP address

SSH agent@192.168.xxx.xxx

Then we agreed to add the fingerprint to the local area. Enter Yes

It can be seen that we successfully logged onto the slave agent host on master. Jenkins new Node

After opening the Jenkins, add the new node under the system Administration-> Management node . Configuring from node information

Here is simpler, the host part is slave agent host IP address, and then click the add below, adding credentials, we choose the user name password way

Username is our slave agent's hostname, password nature is its login password. Once the addition is complete, we can see that our agent has been successfully connected.

If there is no success on the face, this computer logo will have a red X hint. Test node Machine

Next we have a new test project that tests the node machine. Note that when we run the project it is best to give each contact machine a high degree of identification label, easy to manage. Of course bloggers here are two machines, a master a linux-agent enough. When we create a new project, we choose Linux-agent, which is our slave agent host.

The build command is simple, just check the Java version

After the save is complete, we click Build immediately , look at the output of the run results, the test project runs successfully, and our node mount is successful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.