Virtual card port system based on container cloud and service creating method thereofTechnical field
The invention belongs to virtual card vocal imitation skill field, particularly to a kind of virtual card port system based on container cloud andIts service creating method.
Background technology
In recent years, along with socioeconomic fast development, domestic motor vehicles quantity increases rapidly, in the important discrepancy in cityIt is required on the road that mouth, important region and vehicle flowrate are big virtual card port system is installed, in safe city, has a large amount ofPhotographic head need to associate the oral business of virtual card, owing to IO and CPU of main frame is consumed very big by virtual bayonet socket, therefore uniprocessor versionVirtual bayonet socket ability very limited, typically can only associate 5 photographic head, therefore be accomplished by enabling Clustering more to associatePhotographic head.
Prior art usually introduces general Clustering, needs manually needing deployment during service-creationVirtual card oral business is installed on main frame and the oral business of virtual card relies on, both wasted the substantial amounts of time, and unload also inconvenient,Deployment each time is required for the manual oral business renewal of the virtual card at main hands-operation, batch and stopping is the most loaded down with trivial details.
Summary of the invention
The present invention is in order to overcome above-mentioned the deficiencies in the prior art, it is provided that a kind of virtual bayonet socket system based on container cloudSystem, this invention simplifies host deployments process, easy to operate, during service-creation without manually needing the master that disposesVirtual card oral business is installed on machine and the oral business of virtual card relies on, save the time.
For achieving the above object, present invention employs techniques below measure:
A kind of virtual card port system based on container cloud, including docker memory element, service cluster unit andWeb services end, wherein,
Docker memory element, is administered orally business for storage by virtual card and virtual card is administered orally the common packing that relies on of businessDocker mirror image;
Service cluster unit, inside includes multiple server, and described server stores from described docker for receivingThe docker mirror image of unit, between described service cluster unit and docker memory element, two-way communication is connected;
Web services end, is administered orally the order of business, described web services end and described service cluster for sending establishment virtual cardTwo-way communication between unit.
Preferably, exist independently of one another between multiple described servers, multiple servers all by a common interface withBetween docker memory element, web services end, two-way communication connects.
Present invention also offers the service creating method of virtual card port system based on container cloud, including following stepRapid:
S1, described virtual card is administered orally business and virtual card is administered orally the dependence of business and is jointly packaged into docker mirror image;
S2, described docker mirror image is uploaded to described docker memory element;
S3, described web services end send establishment virtual card to service cluster unit and the order of business are administered orally;
If S4 described web services end obtains the information that service cluster unit returns at the appointed time, then it represents that create voidIntend bayonet socket and service successfully, information is stored in data base;If the most not obtaining the information that service cluster unit returns,Then prompting user re-creates the oral business of virtual card.
Preferably, described step S3 specifically includes following steps:
The network address that S31, described web services end provide according to service cluster unit, calls connecing of service cluster unitMouthful;
S32, described service cluster unit search internal idle server automatically to create the oral business of virtual card.
Preferably, described information includes the network address of described server and No. ID.
Further, when described virtual card be administered orally business need update time, directly virtual card is administered orally business replace to up-to-dateThe oral business of virtual card, is administered orally business by up-to-date virtual card and up-to-date virtual card is administered orally the dependence of business and is jointly packaged into dockerMirror image is uploaded to described docker memory element.
Further, during the off-capacity of described docker memory element, directly delete the docker mirror image of legacy version.
Further, the described stipulated time is 2s~20s.
The beneficial effects of the present invention is:
1), the present invention has abandoned traditional by manually needing to install on the main frame disposed the oral business of virtual card and virtualBayonet socket service rely on, the service-creation of the present invention first pass through described virtual card is administered orally business and virtual card the depending on of business is administered orallyRely and be packaged into docker mirror image, described docker mirror image is uploaded to docker memory element;Described web services end is to services setGroup unit sends establishment virtual card and the order of business is administered orally;If described web services end obtains service cluster unit at the appointed timeThe information returned, then it represents that establishment virtual card is oral is engaged in successfully, information being stored in data base;If the most not obtainingThe information that service cluster unit returns, then prompting user re-creates the oral business of virtual card.Therefore this invention simplifies main frame portionThe process of administration, easy to operate, during service-creation without manually installing the oral business of virtual card on the main frame disposed needingBusiness oral with virtual card relies on, and the adding procedure automatization of whole virtual bayonet socket saves the substantial amounts of time.
2), described service cluster unit is to be created based on container cloud, it is simple to the establishment of service and renewal;When describedVirtual card is administered orally business when needing to update, and virtual card is directly administered orally business and replaces to the oral business of up-to-date virtual card, by up-to-date voidIntend bayonet socket service and up-to-date virtual card the dependence of business is administered orally jointly to be packaged into docker mirror image and be uploaded to described docker and depositStorage unit, therefore the oral business of the virtual card of the present invention updates conveniently;During the off-capacity of described docker memory element, directly deleteExcept the docker mirror image of legacy version, facilitate virtual card and business be administered orally and virtual card is administered orally the unloading of dependence of business.
Accompanying drawing explanation
Fig. 1 is the block diagram schematic diagram of the virtual card port system based on container cloud of the present invention;
Fig. 2 is the flow chart of the service creating method of the virtual card port system based on container cloud of the present invention;
Fig. 3 is the particular flow sheet of the service creating method of the virtual card port system based on container cloud of the present invention;
Fig. 4 is the information interaction figure of the present invention.
10 docker memory element 20 service cluster unit 30 web services ends
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, completeDescribe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based onEmbodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under not making creative work premiseEmbodiment, broadly falls into the scope of protection of the invention.
As it is shown in figure 1, a kind of virtual card port system based on container cloud, including docker memory element 10, serviceCluster unit 20 and web services end 30, described docker memory element 10, for storage by the oral business of virtual card and voidIntend the docker mirror image relying on common packing of bayonet socket service;Described service cluster unit 20 is internal includes multiple server, instituteState server for receiving from the docker mirror image of described docker memory element 10, described service cluster unit 20 withBetween docker memory element 10, two-way communication connects;Described web services end 30 is administered orally the life of business for sending establishment virtual cardOrder, two-way communication between described web services end 30 and described service cluster unit 20.
Existing independently of one another between the multiple described server of described service cluster unit 20, multiple servers are all by oneBetween individual common interface with docker memory element 10, web services end 30, two-way communication is connected, and is described service cluster unit20 are created based on container cloud, and service cluster unit 20 is encoded with unit file, it is simple to the establishment of service and moreNewly, simple to operation.
As in figure 2 it is shown, the service creating method of virtual card port system based on container cloud, comprise the following steps:
S1, described virtual card is administered orally business and virtual card is administered orally the dependence of business and is jointly packaged into docker mirror image;
S2, described docker mirror image is uploaded to described docker memory element 10;
S3, described web services end 30 send establishment virtual card to service cluster unit 20 and the order of business are administered orally;
If S4 described web services end 30 obtains the information that service cluster unit 20 returns at the appointed time, then it represents that woundBuild that virtual card is oral is engaged in successfully, information being stored in data base;If the most not obtaining service cluster unit 20 to returnInformation, then prompting user re-creates the oral business of virtual card.
As it is shown on figure 3, the service creating method of virtual card port system based on container cloud, step S3 specifically include withLower step:
The network address that S31, described web services end 30 provide according to service cluster unit 20, calls service cluster unitThe interface of 20;
S32, described service cluster unit 20 are automatically searched internal idle server and are created the oral business of virtual card.
In the middle of the bayonet system of safe city, when deploying to ensure effective monitoring and control of illegal activities in needs region when, it is necessary first to go to select needs to deploy to ensure effective monitoring and control of illegal activitiesPhotographic head, then be added to virtual bayonet socket, after having added virtual bayonet socket, backstage can be called service cluster unit 20 and be providedRestful interface, service cluster unit 20 goes docker memory element 10 to pull a docker mirror image, then at service clusterCreating a service in unit 20, backstage can record No. ID of service simultaneously.When described virtual card be administered orally business need update time, directlyConnect virtual card is administered orally and be engaged in replacing to the oral business of up-to-date virtual card, up-to-date virtual card is administered orally business and up-to-date virtual cardThe dependence of oral business is jointly packaged into docker mirror image and is uploaded to described docker memory element 10, then operation service cluster listThe more newer command of unit 20, cluster will download up-to-date docker mirror image automatically, and the capacity of described docker memory element 10 is notDuring foot, directly delete the docker mirror image of legacy version.
As shown in Figure 4, container cloud platform for being managed scheduling to container, and software definition resource uses container cloudVirtualizing hardware environment, software definition resource is used for realizing container cloud platform, and container is managed scheduling and lifePeriodic maintenance, the api interface that container cloud platform provides, service, for creating each concrete container, undertakes various different meritCan, such as web services, database service, log services etc., in service, the service interface of opening is used for forming api interface useIn providing the user service.