Remote automatic deployment

Source: Internet
Author: User
The following section of remote automatic deployment is the script used after Jenkins automatic compilation: add to Build-& gt; ExecuteShell, [plain] sshpass-ppwdssh-troot@192.168.1.55 & amp; #39; servicemy_webstop & amp; #39; sshpass-ppwd remote automatic deployment the following section is the script used after automatic Jenkins compilation: add to Build-> Execute Shell, [plain] sshpass-p pwd ssh-t root@192.168.1.55 'service my_web stop' sshpass-p pwd scp bin/my_web root@192.168.1.55: /home/dist/web/sshpass-p pwd ssh-t root@192.168.1.55 'service my_web start '& Then you can. The remote machine is also Ubuntu, IP: 192.168.1.55, and the/etc/init. d/my_web script has been set, and it is agreed to copy the program to the/home/dist/web directory. The password is also set. Install sshpass on the Jenkins machine, and first try it. Press yes. Sshpass can pass the password. the-t parameter is used to simulate keyboard input. This script ends with &; otherwise Jenkins build will be suspended. This is a simple method. if more information needs to be controlled during deployment, a dedicated web server should be deployed like Google. The program only needs to upload the binary program to be deployed and the configuration.
Related Article

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.