当前位置:网站首页>Y56. Chapter III kubernetes from entry to proficiency -- business image version upgrade and rollback (29)

Y56. Chapter III kubernetes from entry to proficiency -- business image version upgrade and rollback (29)

2022-07-04 21:12:00 Raymond999999

12. Business image version upgrade and rollback

12.1 Code deployment in traditional virtual machines

 Insert picture description here
The developer submits the code to gitlab, For operation and maintenance or development jenkins from gitlab clone Code , It can also be jenkins adopt ssh Connect to the deployment server clone Code , Use sonarqube Scan the source code , There is no problem after scanning , Use maven、ant And other tools to compile code , After compiling, generate jar Package or war package , use scp、ansibel、SaltStack And other tools to distribute the compiled jar Package or war package , from haproxy or nginx Wait until the load balancer goes offline to the server to be distributed , stop it web service , Code replacement , start-up web service , test web The server url Whether it can be accessed normally , from haproxy or nginx Wait for the load balancer to go online .

shell Scripts enable automated deployment and rollback :

[email protected]:/data/scripts/neteagle# vim raymond-app1-deploy.sh
#!/bin/bash
#
#**********************************************************************************************
原网站

版权声明
本文为[Raymond999999]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207042012025886.html