Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention
Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition
Other one or more features, integer, step, operation, element, component and/or their group.It should be understood that when we claim member
Part is " connected " or when " coupled " to another element, it can be directly connected or coupled to other elements, or there may also be
Intermediary element.In addition, " connection " used herein or " coupling " may include being wirelessly connected or wirelessly coupling.It is used herein to arrange
Diction "and/or" includes one or more associated wholes for listing item or any cell and all combinations.
In the embodiment of the present invention, Docker is run on (SuSE) Linux OS, and Docker Registry is to be located at
Mirror image management service in Docker running environment.
Fig. 1 is the flow diagram of management optimization mode one embodiment of Docker Registry in the present invention.
Step S110: based on the regulatory requirement to Docker Registry, Docker corresponding with regulatory requirement is determined
The primary way to manage of Registry;Step S120: it is based on regulatory requirement, determines corresponding optimum management mode;Step S130:
Primary way to manage is optimized by optimum management mode, and corresponding Docker is executed by operational order after optimization
Registry management operation.
Step S110: based on the regulatory requirement to Docker Registry, Docker corresponding with regulatory requirement is determined
The primary way to manage of Registry.
Wherein, regulatory requirement includes at least one or more of following:
The change of image file storage catalogue is requested;Registry service operations request.
Wherein, the type of Registry service operations includes at least one or more of following:
Service starting;Service is closed;Server resets;Service upgrade.
Wherein, primary way to manage refers to the original way to manage of Docker Registry.
Specifically, in response to system based on the regulatory requirement to Docker Registry for being pre-configured with automatic trigger, or
Receive administrator by human-computer interaction interface input to the regulatory requirement of Docker Registry when, based on to Docker
The regulatory requirement of Registry determines the primary way to manage of Docker Registry corresponding with regulatory requirement.
For example, the direction of image file storage catalogue is locally stored in the primary way to manage of Docker Registry
Region;It is to be followed by the ginseng of complexity in the order line of execution respective service that Registry service, which start, closes, restarting, upgrade etc.,
Number.
Step S120: it is based on regulatory requirement, determines corresponding optimum management mode.
Specifically, when the change request that regulatory requirement is image file storage catalogue, in the original of Docker Registry
In students management mode, the direction local storage region of image file storage catalogue, firstly, reading the storage catalogue of image file;
When the storage catalogue for reading image file is directed toward local storage region, determine that corresponding optimum management mode is optimum management
Image file storage catalogue afterwards is directed toward concentrating type and shares mirror storage device.
When regulatory requirement be Registry service operations request when, based on Registry service operations request, determine with
The type of Registry service operations distributes file and optimization script rationally accordingly.Wherein, it includes excellent for distributing rationally in file
Change configuration parameter, such as environmental variance information, optimization script is run based on parameter is distributed rationally.
Step S130: optimizing primary way to manage by optimum management mode, and passes through operational order after optimization
Execute corresponding Docker Registry management operation.
Specifically, when the change request that regulatory requirement is image file storage catalogue, it is based on corresponding optimum management side
Concentrating type shares the information such as device identification, the device path of mirror storage device in formula, and mirror back-up is directed toward catalogue from local
Storage region, which is modified to concentrating type, shares mirror storage device.In one embodiment, it can first judge whether existing satisfaction
The concentrating type of condition shares mirror storage device;Exist if judgement determines, mirror back-up is directed toward catalogue from local storage
Domain, which is modified to concentrating type, shares mirror storage device;If judgement determination is not present, it is total to request to provide qualified concentrating type
Mirror storage device is enjoyed, and mirror back-up is directed toward catalogue and is modified from local storage region to the qualified concentrating type provided
Shared mirror storage device.
When regulatory requirement is that Registry service operations are requested, running paper is distributed rationally by cooperation and optimizes script
Come to Registry service operations, primary way to manage is optimized accordingly, and executed accordingly by operational order after optimization
Docker Registry service operations.
Optionally, the optimization script and distribute rationally file be preset.
For example, reading optimization by preset optimization script when regulatory requirement is Registry service starting request
Parameter is distributed rationally in configuration file, parameter will be distributed rationally and reaches Registry the corresponding command row, is joined based on distributing rationally
Number runs Registry the corresponding command row to execute the start-up operation of Docker Registry.
In the embodiment of the present invention, primary way to manage is carried out by optimum management mode corresponding with regulatory requirement excellent
Change, and corresponding Docker Registry management operation is executed by operational order after optimization, solves primary Docker
Registry manipulates the problems such as O&M mode is unfriendly, management is complicated for operation.For example, by by the storage catalogue of image file from
Local storage region changes to concentrating type and shares mirror storage device, i.e., is changed to concentrating type mirror image from single machine mirrored storage and deposits
Storage, in the case where large-scale cluster formula machinery equipment, can substantially reduce image file maintenance cost.For another example by more
Item Registry service operations are simplified, and the operation difficulty managed Docker Registry is reduced, and improve O&M operation
Experience.
Fig. 2 is the structural schematic diagram of management optimization device one embodiment of Docker Registry in the present invention.
For primary mode determining module 210 based on the regulatory requirement to Docker Registry, determination is corresponding to regulatory requirement
Docker Registry primary way to manage;Optimal way determining module 220 is based on regulatory requirement, determines corresponding excellent
Change way to manage;Optimum management module 230 optimizes primary way to manage by optimum management mode, and by optimization after
Operational order executes corresponding Docker Registry management operation.
For primary mode determining module 210 based on the regulatory requirement to Docker Registry, determination is corresponding to regulatory requirement
Docker Registry primary way to manage.
Wherein, regulatory requirement includes at least one or more of following:
The change of image file storage catalogue is requested;Registry service operations request.
Wherein, the type of Registry service operations includes at least one or more of following:
Service starting;Service is closed;Server resets;Service upgrade.
Wherein, primary way to manage refers to the original way to manage of Docker Registry.
Specifically, in response to system based on the regulatory requirement to Docker Registry for being pre-configured with automatic trigger, or
Receive administrator by human-computer interaction interface input to the regulatory requirement of Docker Registry when, based on to Docker
The regulatory requirement of Registry determines the primary way to manage of Docker Registry corresponding with regulatory requirement.
For example, the direction of image file storage catalogue is locally stored in the primary way to manage of Docker Registry
Region;It is to be followed by the ginseng of complexity in the order line of execution respective service that Registry service, which start, closes, restarting, upgrade etc.,
Number.
Optimal way determining module 220 is based on regulatory requirement, determines corresponding optimum management mode.
Specifically, when the change request that regulatory requirement is image file storage catalogue, in the original of Docker Registry
In students management mode, the direction local storage region of image file storage catalogue, firstly, reading the storage catalogue of image file;
When the storage catalogue for reading image file is directed toward local storage region, determine that corresponding optimum management mode is optimum management
Image file storage catalogue afterwards is directed toward concentrating type and shares mirror storage device.
When regulatory requirement be Registry service operations request when, based on Registry service operations request, determine with
The type of Registry service operations distributes file and optimization script rationally accordingly.Wherein, distributing rationally includes system in file
The information such as fixed environmental variance distribute parameter rationally to define, and optimization script is run based on parameter is distributed rationally.
Optimum management module 230 optimizes primary way to manage by optimum management mode, and by grasping after optimization
Make the corresponding Docker Registry management operation of instruction execution.
Specifically, when the change request that regulatory requirement is image file storage catalogue, it is based on corresponding optimum management side
Concentrating type shares the information such as the device identification of mirror storage device in formula, and mirror back-up is directed toward catalogue and is repaired from local storage region
It is changed to concentrating type and shares mirror storage device.In one embodiment, it can first judge whether the existing cluster for meeting condition
Formula shares mirror storage device;Exist if judgement determines, mirror back-up is directed toward catalogue and is modified from local storage region to collection
Group's formula shares mirror storage device;If judgement determination is not present, request to provide qualified concentrating type shared mirrored storage
Equipment, and mirror back-up direction catalogue is modified from local storage region to the shared mirror image of the qualified concentrating type provided and is deposited
Store up equipment.
When regulatory requirement be Registry service operations request when, by cooperation distribute rationally running paper optimize script come
To Registry service operations, primary way to manage is optimized accordingly, and is executed accordingly by operational order after optimization
Docker Registry service operations.
Optionally, the optimization script and distribute rationally parameter be preset.
For example, reading optimization by preset optimization script when regulatory requirement is Registry service starting request
Parameter is distributed rationally in configuration file, parameter will be distributed rationally and reaches Registry the corresponding command row, is joined based on distributing rationally
Number runs Registry the corresponding command row to execute the start-up operation of Docker Registry.
In the embodiment of the present invention, primary way to manage is carried out by optimum management mode corresponding with regulatory requirement excellent
Change, and corresponding Docker Registry management operation is executed by operational order after optimization, solves primary Docker
Registry manipulates the problems such as O&M mode is unfriendly, management is complicated for operation.For example, by by the storage catalogue of image file from
Local storage region changes to concentrating type and shares mirror storage device, i.e., is changed to concentrating type mirror image from single machine mirrored storage and deposits
Storage, in the case where large-scale cluster formula machinery equipment, can substantially reduce image file maintenance cost.For another example by more
Item Registry service operations are simplified, and the operation difficulty managed Docker Registry is reduced, and improve O&M operation
Experience.
Those skilled in the art of the present technique are appreciated that the present invention includes being related to for executing in operation described herein
One or more equipment.These equipment can specially design and manufacture for required purpose, or also may include general
Known device in computer.These equipment have the computer program being stored in it, these computer programs are selectively
Activation or reconstruct.Such computer program can be stored in equipment (for example, computer) readable medium or be stored in
It e-command and is coupled in any kind of medium of bus respectively suitable for storage, the computer-readable medium includes but not
Be limited to any kind of disk (including floppy disk, hard disk, CD, CD-ROM and magneto-optic disk), ROM (Read-Only Memory, only
Read memory), RAM (Random Access Memory, immediately memory), EPROM (Erasable Programmable
Read-Only Memory, Erarable Programmable Read only Memory), EEPROM (Electrically Erasable
Programmable Read-Only Memory, Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or light card
Piece.It is, readable medium includes by equipment (for example, computer) with any Jie for the form storage or transmission information that can be read
Matter.
Those skilled in the art of the present technique be appreciated that can be realized with computer program instructions these structure charts and/or
The combination of each frame and these structure charts and/or the frame in block diagram and/or flow graph in block diagram and/or flow graph.This technology neck
Field technique personnel be appreciated that these computer program instructions can be supplied to general purpose computer, special purpose computer or other
The processor of programmable data processing method is realized, to pass through the processing of computer or other programmable data processing methods
The scheme specified in frame or multiple frames of the device to execute structure chart and/or block diagram and/or flow graph disclosed by the invention.
Those skilled in the art of the present technique have been appreciated that in the present invention the various operations crossed by discussion, method, in process
Steps, measures, and schemes can be replaced, changed, combined or be deleted.Further, each with having been crossed by discussion in the present invention
Kind of operation, method, other steps, measures, and schemes in process may also be alternated, changed, rearranged, decomposed, combined or deleted.
Further, in the prior art to have and the step in various operations, method disclosed in the present invention, process, measure, scheme
It may also be alternated, changed, rearranged, decomposed, combined or deleted.
The above is only some embodiments of the invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.