In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail what is the use of Syncd open source automation deployment tools. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Official website address: https://gitee.com/dreamans/syncd/issues
Syncd is an open source code deployment tool, which is simple, efficient and easy to use, which can improve the efficiency of the team. Video detailed explanation
Currently, only Linux-like systems are supported.
Characteristics
Go language development, easy to compile and efficient to run
Web interface access, interactive friendly
Flexible role permission configuration
Support for Git warehouses
Branch, tag online
Deploy hook support
Perfect online workflow
Mail notification mechanism
The principle Git Syncd service pulls the specified tag (branch) code from the warehouse by git-ssh (or password).
Construction
Run the configured build script and compile it into an online software package
In this step, you can run unit tests (such as go test php phpunit, download dependencies (such as go: glide install php: composer install), compiled software packages (such as js: npm build go: go build xx.go java: javac xx.java c: cc xx.c) and so on.
Distribute
Distribute the software package to the temporary directory of the production server of each computer room through the scp command, remotely execute the command of pre-deploy configuration, extract the software package to the target directory after execution, and then execute the post-deploy command
The distribution launch process is executed serially, and any step fails. The entire launch order will terminate the launch and set the status to failure. You need to click to launch again and try again.
In the future, it will support parallel execution of the same cluster server and serial release between clusters.
SSH trust
Establish trust between the production server and the deployment server through ssh-key
For configuration method, please refer to the key configuration section.
Installation
Preparatory work
Go
The above version of Go1.10 is recommended to compile the source code
Git
Please keep the git version of the deployed Syncd server up to date (> = 2.20)
Nginx
Web services depend on Nginx
MySQL
The system relies on Mysql to store persistent data. Mysql 5.7 is recommended.
Linux + Bash
The system will use git, ssh, scp and other commands, so it is only recommended for use on Linux, and you need to install or update the latest version of these command lines in advance.
Secret key configuration
Since the deployment server (the server where the Syncd service is located) and the production server (the code deployment target machine) communicate through the ssh protocol, the public key of the deployment server (usually here: ~ / .ssh/id_rsa.pub) needs to be added to the trust list of the production machine (usually here ~ / .ssh/authorized_keys)
You can use the ssh-copy-id command to add, or copy manually. Don't forget to test connectivity ssh {production machine user name} @ {production machine address} after copying
Finally, it is recommended to add the following configuration to the deployment server ssh configuration / etc/ssh/ssh_config and turn off the display prompt of the public key digest to prevent the background script from failing.
Host * StrictHostKeyChecking no
Please note: ssh directory permissions need to be set according to this, otherwise you will not be able to log in without secret.
~ / .ssh 0700~/.ssh/authorized_keys 0600
Installation
Binary package installation
Download address of binary package: https://github.com/dreamans/syncd/releases
Source code compilation and installation
Curl https://raw.githubusercontent.com/dreamans/syncd/master/install.sh | bash
If the syncd-deploy or syncd-deploy-xxx directory is generated in the current path, the installation is successful.
The generated syncd-deploy directory can be copied or moved to where you want, but do not try to copy this directory to another server to run, it will cause unpredictable results.
Database dependency
You need to import the github.com/dreamans/syncd/syncd.sql table structure and data into the MySQL database
Modify the configuration file
Modify the configuration information in syncd-deploy/etc/syncd.ini. For more information, please see the notes.
Start the service
Cd syncd-deploy ➜syncd-deploy. / bin/syncd-c. / etc/syncd.ini _ / / / _ / / / _ / / _ _ / (_ _) / / / _ / / / _ /\ _ _ / / _ /\ _ /\ _ _, _ / _ / Service: syncdVersion: 1.0.0Config Loaded:. / etc/syncd.iniLog: stdoutDatabase: 127.0.0.1Mail Enable: 0HTTP Service:: 8868Start Running...
Add Nginx configuration
Upstream syncdServer {server 127.0.0.1 weight=1; 8868 weight=1;} server {listen 80; server_name deploy.syncd.cc; # replace your real domain name access_log logs/deploy.syncd.cc.log; location / {try_files $uri $uri/ / index.html; root / path/syncd-deploy/public; # here / path with the real path index index.html index.htm } location ^ ~ / api/ {proxy_pass http://syncdServer; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Origin $host:$server_port; proxy_set_header Referer $host:$server_port;}}
Restart the nginx service
Modify hosts
If the domain name is not resolved, you can modify hosts for temporary resolution.
Sudo vim / etc/hosts127.0.0.1 deploy.syncd.cc
Installation completed
Open a browser and visit http://deploy.syncd.cc
Initial account number:
User name: syncd email: syncd@syncd.cc password: syncd.cc! Please change your password as soon as possible after logging in
Use
The system uses flow charts and screenshots.
This is the end of this article on "what is the use of Syncd open source automation deployment tools". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.