CN104158905B - The creation method of web container - Google Patents
The creation method of web container Download PDFInfo
- Publication number
- CN104158905B CN104158905B CN201410431556.6A CN201410431556A CN104158905B CN 104158905 B CN104158905 B CN 104158905B CN 201410431556 A CN201410431556 A CN 201410431556A CN 104158905 B CN104158905 B CN 104158905B
- Authority
- CN
- China
- Prior art keywords
- web container
- server
- distributed server
- establishment
- script
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
This application discloses a kind of creation method of web container, including:Various web container drawing template establishments and corresponding establishment script are pre-set in main control server;For each distributed server for treating arrangement web container, main control server on determining the current distributed server when that can create web container, the OS Type used according to distributed server, determine to create the required web container drawing template establishment of web container and corresponding establishment script, by identified web container drawing template establishment and create script synchronization to distributed server;Distributed server utilizes synchronous establishment script, creates corresponding web container according to synchronous web container drawing template establishment, and feed back to main control server by result is created;Wherein, when distributed server is using Windows operating system, the synchronous establishment script is performed using the Cygwin kits under Windows systems.Establishment efficiency, the accuracy of web container can be improved using the present invention, realizes that cross-platform distribution Web container creates.
Description
Technical field
The present invention relates to computer networking technology, more particularly to a kind of creation method of web container.
Background technology
Web container is a kind of service routine, server a port just have one offer respective service program, and this
A program is exactly to handle the request sent from client, and the Tomcat containers, the IIS or PWS of ASP in such as JAVA belong to
Web container.One server can be with multiple web containers.
At present, the dispositions method of traditional web container has two kinds, and a kind of is the mode of manual creation, and another kind is to use
Bash wscript.exes are by application server file copy to associated server.
The first above-mentioned dispositions method exists due to being manual operations:It is extremely inefficient, error rate is high, be difficult creating
Port collision is detected during building, just can pinpoint the problems and change that process is cumbersome, the later stage during startup
The problems such as difficult in maintenance.
Above-mentioned second of dispositions method, carries out batch using script and creates web container, can overcome above-mentioned manual effect
The problems such as rate is low, error rate is high.It can only be that the machine is operated, and since bash scripts are only used for control Linux behaviour
Make system, therefore this method does not support windows operating platforms, it is impossible to carry out cross-platform web container and create.
Large-scale web needs large-scale distributed web container environment to support when reaching the standard grade using deployment, difference point
The application environment of cloth server will be different, may be Linux operating platforms, it is also possible to be windows operating platforms.
Therefore, large-scale web applications deployment needs a kind of web container that can support cross-platform operation to create scheme.
The content of the invention
In view of this, it is a primary object of the present invention to provide a kind of creation method of web container, this method has higher
Establishment efficiency, accuracy is high and supports Linux and windows operating platforms at the same time.
In order to achieve the above object, technical solution proposed by the present invention is:
A kind of creation method of web container, including:
A, various web container drawing template establishments are pre-set in main control server and create script accordingly;
B, the current distribution is being determined for each distributed server for treating arrangement web container, the main control server
When web container can be created on formula server, according to the OS Type of distributed server use, determine at described point
The required web container drawing template establishment of web container and corresponding establishment script are created on cloth server, by identified web
Container drawing template establishment and script synchronization is created on the distributed server;
C, the distributed server utilizes the synchronous establishment script, and mould is created according to the synchronous web container
Plate creates corresponding web container, and the corresponding result that creates is fed back to the main control server;Wherein, when the distribution
When server is using Windows operating system, the distributed server utilizes the Cygwin instruments under Windows systems
Bag performs the synchronous establishment script.
In conclusion the creation method of web container proposed by the present invention, by introducing a main control server, wherein
Preset various web container drawing template establishments and create script accordingly, the web container for realizing centralization by the main control server creates
Management.When the operating platform of distributed server is windows systems, it is necessary to using can be performed in Windows systems
The cygwin kits of Linux command create script to perform web container.In this way, can improve the establishment efficiency of web container,
Accuracy, can also support Linux and windows operating platforms at the same time, realize that cross-platform distribution Web container creates.
Brief description of the drawings
Fig. 1 is the flow diagram of the embodiment of the present invention one.
Embodiment
It is right below in conjunction with the accompanying drawings and the specific embodiments to make the object, technical solutions and advantages of the present invention clearer
The present invention is described in further detail.
The present invention core concept be:Introduce a main control server, wherein preset various web container drawing template establishments and
It is corresponding to create script, the web container creative management of centralization is realized by the main control server.Carry out point of web container establishment
Cloth server needs to utilize what is obtained from main control server to be used for script and the template that web container creates, and creates web and holds
Device.When the operating platform of distributed server is windows systems, it is necessary to using can be performed in Windows systems
The cygwin kits of Linux command create script to perform web container, so as to realize that cross-platform distribution Web holds
Device creates.
Fig. 1 is the flow diagram of the embodiment of the present invention one, as shown in Figure 1, the embodiment mainly includes:
Various web container drawing template establishments are pre-set in step 101, main control server and create script accordingly.
In this step, which advance web container drawing template establishment and corresponding establishment script in main control server can be by abilities
Field technique personnel are configured according to the system configuration scenarios of each server reality in distributed system, and specific method is this area
Technical staff is grasped, and details are not described herein.
Step 102, determining currently for each distributed server for treating arrangement web container, the main control server
When web container can be created on the distributed server, according to the OS Type of distributed server use, determine
The required web container drawing template establishment of web container and corresponding establishment script are created on the distributed server, will be determined
Web container drawing template establishment and create script synchronization on the distributed server.
In this step, it is preferred that following methods can be used, determine whether can be created on the current distributed server
Web container:
Step x1, described main control server judges whether that the distributed server is in network-in-dialing state, if so,
Then perform step x2;Otherwise, it determines web container cannot be created on the current distributed server.
Step x2, judge whether the distributed server has the system environments for supporting web container operation, if branch
Hold, it is determined that can create web container on the current distributed server;Otherwise, it determines on the current distributed server not
Web container can be created.
In this step, it is necessary to consider hardware environment (hard disk, memory headroom) and software environment (mesh when carrying out the judgement
The authority of record, the software that the operation of web container internal program relies on) whether meet web container service condition, specific determination methods are this
Field technology personnel are grasped, and details are not described herein.
It is preferred that in order to improve synchronous efficiency, the synchronization can be carried out using existing Rsync modes.Here,
Rsync is a kind of method of data synchronization for reducing synchronous transmitting data amount and only transmitting difference section.
It is preferred that main control server described in this step cannot create on the current distributed server is determined
During web container, terminate the web container deployment process to the distributed server, to treat that network maintenance staff carries out corresponding problem
Reparation.
Step 103, the distributed server utilize the synchronous establishment script, according to the synchronous web container
Drawing template establishment creates corresponding web container, and the corresponding result that creates is fed back to the main control server;Wherein, when described
When the operating system that distributed server uses is Windows operating system, the distributed server utilizes Windows systems
Under Cygwin kits perform the synchronous establishment script.
In this step, after getting web container drawing template establishment and corresponding establishment script, distributed server will perform should
The establishment that script carries out web container using the web container drawing template establishment is created, and after the completion of establishment, i.e., program is tested automatically
After success, return to the corresponding result that creates and give the main control server, unified management service is wherein carried out for it with storage.
Here, created by performing the cygwin kits of Linux command in Windows systems to perform web container
Script, it is possible to achieve the establishment of the web container on the distributed server of Windows systems is provided with, so as at the same time
Support Linux and windows operating platforms, realize that cross-platform distribution Web container creates.
From such scheme as can be seen that the present invention is by being realized that the web container of centralization creates pipe by the main control server
Reason, can improve establishment efficiency, the accuracy of web container, realize that cross-platform distribution Web container creates.
In conclusion the foregoing is merely a prefered embodiment of the invention, it is not intended to limit the scope of the present invention.
Within the spirit and principles of the invention, any modification, equivalent replacement, improvement and so on, should be included in the present invention's
Within protection domain.
Claims (4)
- A kind of 1. creation method of web container, it is characterised in that including:A, various web containers are set previously according to the system configuration of each server reality in distributed system in main control server Drawing template establishment and corresponding establishment script;B, current distribution clothes are being determined for the distributed server of each web container to be disposed, the main control server When can create web container on business device, according to the OS Type of distributed server use, determine in the distribution The required web container drawing template establishment of web container and corresponding establishment script are created on server, by identified web container Drawing template establishment and script synchronization is created on the distributed server;C, the distributed server utilizes the synchronous establishment script, is created according to the synchronous web container drawing template establishment Corresponding web container is built, and the corresponding result that creates is fed back into the main control server;Wherein, when the Distributed Services When device is using Windows operating system, the distributed server is held using the Cygwin kits under Windows systems The row synchronous establishment script.
- 2. according to the method described in claim 1, it is characterized in that, described determine to create on the current distributed server Web container includes:X1, the main control server judge whether that the distributed server is in network-in-dialing state, if it is, performing step Rapid x2;Otherwise, it determines web container cannot be created on the current distributed server;X2, judge whether the distributed server has the system environments for supporting web container operation, if supported, determines to work as Web container can be created on the preceding distributed server;Otherwise, it determines web cannot be created on the current distributed server Container.
- 3. according to the method described in claim 1, it is characterized in that, the method is further included:Main control server described in step b on determining the current distributed server when that cannot create web container, end pair The web container deployment process of the distributed server.
- 4. according to the method described in claim 1, it is characterized in that, the synchronization is carried out using Rsync modes in step c.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410431556.6A CN104158905B (en) | 2014-08-28 | 2014-08-28 | The creation method of web container |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410431556.6A CN104158905B (en) | 2014-08-28 | 2014-08-28 | The creation method of web container |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104158905A CN104158905A (en) | 2014-11-19 |
CN104158905B true CN104158905B (en) | 2018-04-20 |
Family
ID=51884310
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410431556.6A Active CN104158905B (en) | 2014-08-28 | 2014-08-28 | The creation method of web container |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104158905B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107807931B (en) * | 2016-09-09 | 2020-09-01 | 北京京东尚科信息技术有限公司 | Method and system for template information management |
CN106506217A (en) * | 2016-11-14 | 2017-03-15 | 天闻数媒科技(湖南)有限公司 | A kind of application software installation method and system |
CN107809470B (en) * | 2017-10-12 | 2020-12-22 | 北京京东尚科信息技术有限公司 | Method and device for automatically deploying application program |
CN109960551B (en) * | 2017-12-26 | 2023-03-28 | 中国电信股份有限公司 | Cloud desktop service method, platform and computer readable storage medium |
CN109213600B (en) * | 2018-09-11 | 2021-04-30 | 郑州云海信息技术有限公司 | GPU resource scheduling method and device based on AI cloud |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8266616B1 (en) * | 2006-05-11 | 2012-09-11 | Hewlett-Packard Development Company, L.P. | Computer system provisioning using templates |
CN102404381A (en) * | 2011-09-02 | 2012-04-04 | 西安交通大学 | Software deployment system and deployment method based on workflow in cloud computing environment |
CN103246503A (en) * | 2012-02-10 | 2013-08-14 | 上海乘亿信息科技有限公司 | Application development framework for enterprise management software |
CN103530162B (en) * | 2013-10-22 | 2016-05-11 | 中国科学院信息工程研究所 | The method and system that the on-line automatic software of a kind of virtual machine is installed |
-
2014
- 2014-08-28 CN CN201410431556.6A patent/CN104158905B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104158905A (en) | 2014-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104158905B (en) | The creation method of web container | |
CN103946800B (en) | Lossless uninterrupted message processing method during system software upgrading | |
CN107580083B (en) | Method and system for allocating IP addresses of containers | |
CN104104572B (en) | Interchanger automatic deployment method and device in a kind of SDN | |
US10795792B2 (en) | Methods, apparatuses and systems for cloud-based disaster recovery test | |
CN104601366B (en) | It is a kind of control, service node configuration service method and device | |
CN105049293B (en) | The method and device of monitoring | |
JP2018523434A (en) | Network service life cycle management method and device | |
CN107908414A (en) | A kind of method, apparatus and system of the deployment of application server version | |
CN105553741A (en) | Automatic deployment method for application system based on cloud computing | |
CN103677878B (en) | A kind of method and apparatus of patch installing | |
CN106790713B (en) | Across data center virtual machine migration method under cloud computing environment | |
CN103077034B (en) | hybrid virtualization platform JAVA application migration method and system | |
JP2010039626A (en) | Network setting program, network setting method, and network setting device | |
CN105281949B (en) | Mix the partition method and isolating device of host in memory module | |
CN105022659A (en) | Virtual machine state control method and system | |
CN104484167B (en) | Task processing method and device | |
CN108933844A (en) | The method and apparatus of DHCP service is provided | |
CN105809817A (en) | ATM fault monitoring method and device | |
CN108199962A (en) | Address transfer method, apparatus, the network equipment and readable storage medium storing program for executing | |
CN105324968B (en) | The distribution method and device of reliability resource | |
US10613708B2 (en) | Cloning a hypervisor | |
CN106209423B (en) | Virtual desktop distribution method and device | |
CN113296796A (en) | Project release method, device, system, storage medium and electronic equipment | |
CN107038094A (en) | A kind of data back up method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |