Implement projects locally, test, and produce 3 sets of environments

Source: Internet
Author: User

We do the development, the big point of the company to compile and release these will not be done by us, the small point of the company should be the development of a one-off. But how to implement the project's local, test, production of 3 sets of different configurations of the environment, in the compilation of each other when the release is not affected by those configuration files, I think it is necessary to understand. A few days ago consulted the company's BM personnel, here to do a tidy.


First of all to say the specific compilation and release, these are also the general understanding under OK.

1, the compiler has a lot of tools, such as ant,maven,quickbulid and so on, I play the j2e, so the general compilation is to play into an ear package, and then dropped to the server on OK. The ear package contains a war packet and some load-balanced configuration files, both WebSphere and WebLogic. In fact, the compilation can be controlled to incremental compilation and full-scale compilation, incremental compilation is only the compilation part, the full compilation is all compiled, but this in the actual compilation process is not used, is generally all compiled, long is compiled after the decompression to put some files in this implementation of the so-called incremental compilation.

2, release, if the server has similar to dmgr this console of the words on the page on the point on the OK, if it is WebLogic this, run the shell script is OK, remember generally before the release of the server or service node, released after the completion to pull the service up, this does not say much.


The focus now is on how to implement partial code updates and all code updates, typically incremental and full-scale releases.


General in our development process, SVN will build 3 branches, one is the development branch, one is the test environment Branch, one is the generation Environment branch. Then BM will write us a bat file that allows us to move our code to each of the 3 branches and compile it all at once. If we implement some code updates to the test environment first, or if we want to implement all the code updates to the production environment, then I just need to list the code listing and run the associated bat file OK. Some of the updates are often specific file names, and all updates are often all folders of their own projects.


Through the above operation, there is a problem, that is, the test environment and production environment of the database is certainly not the same, if we move the code, is not the same set of configuration files? This must not be the way it is. I have done before the project has a etc file under, there are many sets of configuration, in the packaging tools such as Quickbuild Packaging tool to choose the compilation of the environment can find the relevant configuration file for us to compile, but now I play a set of configuration files, that is, the local configuration file, Because the production of these profile development generally do not have permission, or everyone is prone to change the problem is very easy, how to do in 3 branches to move code when the implementation of different configurations? is in the production environment under the branch in the establishment of a folder, such as the runtime folder, which is used to install the configuration files on the production, the previous move code is to put the code and configuration files in our normal folder, will not flush the contents of the runtime folder, so when we compile, Generally run is a shell script, such as createlinkin.sh, these compiled and published scripts are bm for me to write, in the process of compiling the runtime folder content into our project, this way to achieve the test environment and production environment 2 sets of different configurations.

Implement projects locally, test, and produce 3 sets of environments

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.