SVN deploys large and small business on-line Solutions (IV.)

Source: Internet
Author: User
Tags haproxy

First, SVN directory organization structure description

--branch Branch, used for testing, more than a few days of the project must be open branch, testing needs to pass, the main line is merged into the branch through, in order to merge into the main line to test

--tags version records are used

--trunk mainline, in line with the official lines, the same day not online files are not allowed to submit

Second, medium-sized enterprises on-line solutions

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/A1/wKioL1WBQ2_iRX0zAAWtWmNWWTc740.jpg "title=" 21.png "alt=" Wkiol1wbq2_irx0zaawtwmnwwtc740.jpg "/>

Standardize operation and maintenance of personnel to step together, make this unified operation script, backup file name, backup file path. So that the operation of human, unified.


Third, large companies to solve the online program

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/A1/wKioL1WBRCXAIlgxAANkXbYy5dk779.jpg "title=" 20.png "alt=" Wkiol1wbrcxailgxaankxbyy5dk779.jpg "/>

1, especially Java code environment, on-line, several machines need to be updated at the same time:

1). The local developer takes the SVN code. The same day on-line submitted to the trunk, otherwise, long-term project single open branch development, and then in the consolidated Main Line (trunk)

2). When the office intranet is developed and tested, it is deployed by the developer or configurator through the deployment platform Jenkins (i.e., on the deployment platform, control the development machine to fetch code from SVN, compile, package, and publish to development packages such as Id_dep.war).

3). The developer notifies the tester or tests with no problems, and then tags the tag.

4). Configure the management manager, according to the tag tag of the previous step, checkout out the code, and configure all the configuration of the IDC test Environment, perform the compilation, packaging (Mvn,ant) (PHP does not need), and then publish to IDC Unified Distribution server.

5). Configure the Administrator or SA on-line personnel, push the content of the distribution to the relevant test server (registration, such as Id_test.war), then notify the development and testers to test. If there is a problem, go back up.

6). If there is no problem, continue to play the tag, at this time, configure the step tag tag, checkout out the code, and configure all the configuration of the IDC environment, perform the compilation, packaging (Mvn,ant) (PHP does not need), and then publish to IDC Unified Distribution server.

7). Configure the Administrator or SA on-line personnel, push the content of the distribution to the relevant official server (registration Idc_product.war), then inform the development and testers to test. If there is no problem, publish the rollback instruction directly.

IDC formally on-line process for the Java program, can be the AB group on-line idea, that is, smooth down half of the server, and then release the update code test, no problem, hang up the server, while smoothing the other half of the server, and then release the update Code test (or directly after the release to hang on the line)

For PHP on-line method: Release can be published to the official line temporary directory, and then MV or change link to publish to the official online directory, do not need to restart

For the Java on-line approach: need to group smooth down-line (such as from load balancer to remove some of the server), after publishing the code, restart the server test

2, on-line solution considerations

1). Office test Environment--IDC Test environment---the formal production environment, all software should be version unified (such as: Operating system, Web server, Jdk,php,tomcat,resin and other versions)

2). Development Team Team Test environment test (the test environment belongs to the development team), there is a problem returned to a developer to re-develop.

3). There is a special test engineer, the program has a problem directly returned to the developer (at this time, the general program is returned to the bug, known as Bug Library), no problem for IDCI test

4). IDC test by the testers and operations personnel involved, called Idctest, to carry out the stress test of the program, there are problems directly back to the developer, no problem in the online environment online

5). Several server code distribution on-line scenario Example (Java program)

A: Assume that the same business Server has 6, the server is divided into a, b two groups, a group of three, Group B three, first to a group from the load balancer smooth offline, B group to provide services, to avoid the server due to the impact of the business.

B: The downline process is kicked out of a group a server from the RS pool (LVS,NGINX,HAPROXY,F5, etc.) through a script to avoid a negative equalizer sending the request to a group a server (at this time should be the site traffic, usually night)

C: Distribution of code to a group of servers in the site directory, a set of servers on-line and restart services, and by the professional testing personnel for access testing, test success, hang on a group of servers, while the offline Group B server, B set of code on-line Operation Test and a group of the same

6). Special Note: If the PHP program, then the online can be simplified, directly to the online code (the best full amount) published to all on-line server specific directory, after the distribution is complete, a one-time MV or LN to the site directory, of course, testing is indispensable.

7). Most portal front-end pages are already static or cache, because the dynamic part of the visit will not be particularly much

9. SVN contains code and configuration

(1), SVN storage program code (without resources, large company basic resources and procedures are separated)

(2), the configuration file for all services (lamp environment, such as: Apache httpd.conf configuration file)

(3), development Team test environment using the configuration file

(4), Office test ring use configuration file

(5), IDC testing the configuration file used

(6), the configuration file used by the online application

What is the configuration administrator?

is a position in the middle of the development and operation of a link, this position is generally set up in large companies, responsible for SVN management, on-line management, application, coordination and other work

Iv. What is smooth code on-line

is when the site code is updated, does not affect the browsing user's normal browsing Web page or other related applications that it is using


Five, some software smooth restart the way

1) Smooth restart of Apache

./bin/apachectl Gracefull


2) Smooth restart of Nginx (php-fpm Reload)

./sbin/nginx-s Reload


3) NFS Network Service

/etc/init.d/nfs Reload


4) Lvs/haproxy Service Download the operation of RS


5) F5 and NetScaler, etc. also have the corresponding offline Rs way


SVN deploys large and small business on-line Solutions (IV.)

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.