CN105704188B - Using the dispositions method and device with service - Google Patents

Using the dispositions method and device with service Download PDF

Info

Publication number
CN105704188B
CN105704188B CN201410708070.2A CN201410708070A CN105704188B CN 105704188 B CN105704188 B CN 105704188B CN 201410708070 A CN201410708070 A CN 201410708070A CN 105704188 B CN105704188 B CN 105704188B
Authority
CN
China
Prior art keywords
instance
entity
information
resource data
management node
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
Application number
CN201410708070.2A
Other languages
Chinese (zh)
Other versions
CN105704188A (en
Inventor
沙晋
陈仁华
谢峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410708070.2A priority Critical patent/CN105704188B/en
Publication of CN105704188A publication Critical patent/CN105704188A/en
Application granted granted Critical
Publication of CN105704188B publication Critical patent/CN105704188B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The embodiment of the present invention provides the dispositions method and device of a kind of application and service, and this method passes through the deployment descriptor file for obtaining preparatory layout, includes the dependence between at least two entities in deployment descriptor file;Wherein, any entity at least two entity is application or service;Successively at least two entity is disposed further according to the dependence between at least two entity;Wherein, the deployment sequence for the entity being relied on is prior to relying on the deployment for the entity being relied on sequentially.The problem of access information that can be realized application and the binding between application, service and service, and be able to solve the person of being relied on can not inform dependent after changing.

Description

Using the dispositions method and device with service
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of dispositions methods and device of application and service.
Background technique
Platform services (English: Platform as a Service, abbreviation PaaS), be it is a kind of server platform or Person develops the business model that environment is provided as service.Currently, being proposed application in the industry cycle current PaaS platform With the concept of service: service provides special interface and ability, provides the business function for meeting user demand using the service of dependence.
With Cloud Foundry (Cloud Foundry is first open source PaaS cloud platform of industry, support a variety of frames, Language, runtime environment, cloud platform and application service support developer to be completed in a short time the deployment and extension of application) For, application that user is developed is by binding specific Service Instance come using the ability of service, when application deployment, The access information (Credential) of service is returned to application by Cloud Foundry, and application in this way can access service simultaneously Use service ability.But current Cloud Foundry is only supported using binding service, and in actual design/exploitation scene, Using the demand that can also have ability dependence between application, between service and service, this is also a complicated applications/service ring The basic demand in border, any one total solution require to meet the primary demand, it can are interpreted as existing Cloud Foundry only considers individually how application accesses the basic capacity individually serviced, and an operation flow generally requires User demand can be just finally achieved with multiple application and service, it is clear that Cloud Foundry is very big in this field presence Defect.
In addition, needing to state the visit of relied on Service Instance in application deployment according to the realization of Cloud Foundry Ask information, cloud controller (English: Cloud Controller, abbreviation: CC) can get the access information of Service Instance, and In the running environment of creation application, access information is injected into the running environment by way of environmental variance.Using opening Parsing environmental variance can obtain the access information of relied on Service Instance when dynamic.It can be seen that using this technology On condition that the Service Instance relied on completes deployment before application deployment, and when the access information of follow-up service occurs When variation, application can not perceive this variation, to will lead to service access failure.
In conclusion current Cloud Foundry only supports not defining and apply and application, clothes using binding service Dependence between business and service, thus cannot achieve the target of application access application, service access service under cloud environment, Application and service is such as information island one by one under these scenes, in this case, does not have channel energy between different applications Enough discoveries and the mechanism for accessing ability each other, can not concatenate to form a complex business process, and each service is also independent list Member, a service cannot reuse and construct more complicated ability by finding and accessing other services, cause overlapping development with And the rising of development cost, and the change of the access information for the person of being relied on can not inform dependent, will lead to using subsequent visit Ask serv-fail.Therefore, application and the binding between application, service and service how to be realized, and how the person's of being relied on The problem of dependent is current urgent need to resolve is informed after access information change.
Summary of the invention
The embodiment of the present invention provides the dispositions method and device of a kind of application and service, applies and application, clothes to realize Binding between business and service, and dependent can not be informed after solving the problems, such as the access information change for the person of being relied on.
In a first aspect, providing the dispositions method of a kind of application and service, which comprises
Obtain the deployment descriptor file of preparatory layout, include in the deployment descriptor file between at least two entities according to The relationship of relying;Wherein, any entity at least two entity is application or service;
Successively at least two entity is disposed according to the dependence between at least two entity;Its In, the deployment for the entity being relied on is sequentially prior to the deployment sequence for the entity being relied on described in dependence.
With reference to first aspect, in the first possible implementation, the dependence between at least two entity Include at least: first instance depends on second instance, wherein the first instance and the second instance are described at least two There is the entity for the relationship that directly relies in any two in entity, then the dependence according between at least two entity is closed System successively carries out deployment at least two entity
The portion of the first instance and the second instance is determined according to the dependence between at least two entity Administration's sequence, the deployment sequence is the first instance prior to the second instance;
The example of the first instance and the example of the second instance is respectively created, obtains the resource of the first instance The resource data of data and the second instance;
The second instance is disposed according to the resource data of the first instance, obtains the access letter of the second instance Breath;
The first instance is disposed according to the resource information of the second instance, the resource information of the second instance includes The access information of the resource data of the second instance and the second instance.
The possible implementation of with reference to first aspect the first, in the second possible implementation, the difference The example of the first instance and the example of the second instance are created, the resource data and described of the first instance is obtained The resource data of two entities includes:
Create the virtual machine and the first management node of the first instance, wherein first management node operate in it is described On the virtual machine of first instance;
The example for creating the first instance by first management node;
The resource data of the first instance is obtained, the resource data of the first instance includes the void of the first instance The information of the example of quasi- machine information and the first instance;
Create the virtual machine and the second management node of the second instance, wherein second management node operate in it is described On the virtual machine of second instance;
The example for creating the second instance by second management node;
The resource data of the second instance is obtained, the resource data of the example of the second instance includes described second real The information of the example of the virtual machine information of body and the second instance.
The possible implementation of second with reference to first aspect, in the third possible implementation, the basis The resource data of the first instance disposes the second instance, and the access information for obtaining the second instance includes:
The resource data of the first instance is injected into the second instance by second management node;
The resource data of the first instance is carried out on the second instance by second management node persistently Change processing;
Start the second instance by second management node, reads the second instance and configure described first The resource data of entity;
The access information of the second instance is obtained, the access information of the second instance includes the reality of the second instance The access credentials of the example of the ID and second instance of example.
The possible implementation of second with reference to first aspect, in the fourth possible implementation, the basis The resource information of the second instance disposes the first instance, and the resource information of the second instance includes the second instance Resource data and the access information of the second instance include:
The resource information of the second instance is injected into the first instance by second management node;
The resource information of the second instance is carried out on the first instance by first management node persistently Change processing;
Start the first instance by first management node, reads the first instance and configure described second The resource information of entity, so that the first instance is according to the access of the resource data and the second instance of the second instance Second instance described in message reference.
Any one into the 4th kind of possible implementation of first aspect with reference to first aspect, in the 5th kind of possibility Implementation in, further includes:
When the Web Service of third entity, the updated resource information of the third entity is obtained;Described Three entities are any one entity at least two entity;
The dependence between at least two entity is inquired, determines the 4th entity for relying on the third entity;
The updated resource information of the third entity is notified into the 4th entity by third management node, it is described The updated resource information of third entity includes the updated resource data and the third entity of the third entity Updated access information, so as to according to the 4th entity according to the updated resource data of the third entity and described The updated access information of third entity accesses the third entity.
Second aspect, provides the deployment device of a kind of application and service, and described device includes:
Pre-programmed unit includes at least in the deployment descriptor file for obtaining the deployment descriptor file of preparatory layout Dependence between two entities;Wherein, any entity at least two entity is application or service;
Deployment unit, for according to the dependence between at least two entity successively at least two entity It is disposed;Wherein, deployment sequence of the deployment sequence for the entity being relied on prior to the entity being relied on described in dependence.
In conjunction with second aspect, in the first possible implementation, the dependence between at least two entity Include at least: first instance depends on second instance, wherein the first instance and the second instance are described at least two There is the entity for the relationship that directly relies in any two in entity, the deployment unit includes:
Order determination unit is disposed, for determining that described first is real according to the dependence between at least two entity The deployment sequence of body and the second instance, the deployment sequence is the first instance prior to the second instance;
Creating unit, for being respectively created the example of the first instance and the example of the second instance, described in acquisition The resource data of the resource data of first instance and the second instance;
Entity deployment unit, for disposing the second instance according to the resource data of the first instance, described in acquisition The access information of second instance;
The first instance is disposed according to the resource information of the second instance, the resource information of the second instance includes The access information of the resource data of the second instance and the second instance.
In conjunction with the first possible implementation of second aspect, in the second possible implementation, the creation Unit is specifically used for:
Create the virtual machine and the first management node of the first instance, wherein first management node operate in it is described On the virtual machine of first instance;
The example for creating the first instance by first management node;
The resource data of the first instance is obtained, the resource data of the first instance includes the void of the first instance The information of the example of quasi- machine information and the first instance;
Create the virtual machine and the second management node of the second instance, wherein second management node operate in it is described On the virtual machine of second instance;
The example for creating the second instance by second management node;
The resource data of the second instance is obtained, the resource data of the example of the second instance includes described second real The information of the example of the virtual machine information of body and the second instance.
In conjunction with second of possible implementation of second aspect, in the third possible implementation, the entity Deployment unit is specifically used for:
The resource data of the first instance is injected into the second instance by second management node;
The resource data of the first instance is carried out on the second instance by second management node persistently Change processing;
Start the second instance by second management node, reads the second instance and configure described first The resource data of entity;
The access information of the second instance is obtained, the access information of the second instance includes the reality of the second instance The access credentials of the example of the ID and second instance of example.
In conjunction with second of possible implementation of second aspect, in the fourth possible implementation, the entity Deployment unit is specifically used for:
The resource information of the second instance is injected into the first instance by second management node;
The resource information of the second instance is carried out on the first instance by first management node persistently Change processing;
Start the first instance by first management node, reads the first instance and configure described second The resource information of entity, so that the first instance is according to the access of the resource data and the second instance of the second instance Second instance described in message reference.
In conjunction with second aspect to second aspect the 4th kind of possible implementation in any one, in the 5th kind of possibility Implementation in, described device further includes updating unit, and the updating unit is specifically used for:
When the Web Service of third entity, the updated resource information of the third entity is obtained;Described Three entities are any one entity at least two entity;
The dependence between at least two entity is inquired, determines the 4th entity for relying on the third entity;
The updated resource information of the third entity is notified into the 4th entity by third management node, it is described The updated resource information of third entity includes the updated resource data and the third entity of the third entity Updated access information, so as to according to the 4th entity according to the updated resource data of the third entity and described The updated access information of third entity accesses the third entity.
The embodiment of the present invention provides the dispositions method and device of a kind of application and service, and this method is by obtaining preparatory layout Deployment descriptor file, include the dependence between at least two entities in the deployment descriptor file;Wherein, it is described at least Any entity in two entities is application or service;Further according to the dependence between at least two entity successively to institute At least two entities are stated to be disposed;Wherein, entity of the deployment for the entity being relied on sequentially prior to being relied on described in dependence Deployment sequence.Compared to existing technologies, it does not need to apply or service preparatory deployment before the binding, can be realized application With the binding between application, service and service, and be able to solve the person of being relied on access information change after can not inform dependent The problem of.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, for this For the those of ordinary skill of field, without any creative labor, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the structural schematic diagram of a kind of application provided in an embodiment of the present invention with the deployment device of service;
Fig. 2 is the flow diagram of a kind of application and the dispositions method of service provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of another application and the dispositions method of service provided in an embodiment of the present invention;
Fig. 4 is the schematic diagram of application and the dependence in the dispositions method of service provided in an embodiment of the present invention;
Fig. 5 is that provided in an embodiment of the present invention apply carries out entity portion according to dependence with the dispositions method of service The schematic diagram of administration;
Fig. 6 is application provided in an embodiment of the present invention and the deployment flow diagram in the dispositions method of service;
Fig. 7 is the flow diagram of another application and the dispositions method of service provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of another application provided in an embodiment of the present invention with the deployment device of service;
Fig. 9 is the structural schematic diagram of application provided in an embodiment of the present invention with the deployment unit in the deployment device of service.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
For convenience of explanation, the network architecture of the application of the embodiment of the present invention is simply introduced first.The present invention is real Applying example can be applied to PaaS platform, the service that traditional network carries out program offer be referred to as software service (it is English: Software as a Service, referred to as: SaaS), and corresponding server platform or exploitation environment in cloud computing scene Being there is provided as service just becomes PaaS, so PaaS actually refers to using the platform of research and development of software as a kind of service, User is submitted to the mode of SaaS.In the PaaS platform applied by the embodiment of the present invention, including cloud controller, Duo Geshi Body and the corresponding multiple management nodes (Agent is referred to as node manager or agency) of multiple entities, each management Node runs (English: Virtual Machine, abbreviation: VM) on the virtual machine of its corresponding entity, has deployment, monitoring The function of entity, wherein above-mentioned each entity either using (English: Application, referred to as: App) can also be with It is service (Service).
The embodiment of the present invention also provides the deployment device 00 of a kind of application and service, as shown in Figure 1, described device 00 is wrapped It includes: processor 001, memory 002, interface 003;Processor 001, memory 0022, interface 0033 are electrically connected by bus 004 It connects;Interface 003 with other equipment for interacting;Memory 002 is for storing computer program 0021;Processor 001 is for holding Row computer program 0021 is used for:
Obtain the deployment descriptor file of preparatory layout, include in the deployment descriptor file between at least two entities according to The relationship of relying;Wherein, any entity at least two entity is application or service;
Successively at least two entity is disposed according to the dependence between at least two entity;Its In, the deployment for the entity being relied on is sequentially prior to the deployment sequence for the entity being relied on described in dependence.
Optionally, the dependence between at least two entity includes at least: first instance depends on second instance, Wherein, the first instance and the second instance exist for any two at least two entity directly relies on relationship Entity, then processor 001 execute computer program 0021 can be specifically used for:
The portion of the first instance and the second instance is determined according to the dependence between at least two entity Administration's sequence, the deployment sequence is the first instance prior to the second instance;
The example of the first instance and the example of the second instance is respectively created, obtains the resource of the first instance The resource data of data and the second instance;
The second instance is disposed according to the resource data of the first instance, obtains the access letter of the second instance Breath;
The first instance is disposed according to the resource information of the second instance, the resource information of the second instance includes The access information of the resource data of the second instance and the second instance.
Optionally, processor 001 executes computer program 0021 and can be specifically used for:
Create the virtual machine and the first management node of the first instance, wherein first management node operate in it is described On the virtual machine of first instance;
The example for creating the first instance by first management node;
The resource data of the first instance is obtained, the resource data of the first instance includes the void of the first instance The information of the example of quasi- machine information and the first instance;
Create the virtual machine and the second management node of the second instance, wherein second management node operate in it is described On the virtual machine of second instance;
The example for creating the second instance by second management node;
The resource data of the second instance is obtained, the resource data of the second instance includes the void of the second instance The information of the example of quasi- machine information and the second instance.
Optionally, processor 001 executes computer program 0021 and can be specifically used for:
The resource data of the first instance is injected into the second instance by second management node;
The resource data of the first instance is carried out on the second instance by second management node persistently Change processing;
Start the second instance by second management node, reads the second instance and configure described first The resource data of entity;
The access information of the second instance is obtained, the access information of the second instance includes the reality of the second instance The access credentials of the example of the ID and second instance of example.
Optionally, processor 001 executes computer program 0021 and can be specifically used for:
The resource information of the second instance is injected into the first instance by second management node;
The resource information of the second instance is carried out on the first instance by first management node persistently Change processing;
Start the first instance by first management node, reads the first instance and configure described second The resource information of entity, so that the first instance is according to the access of the resource data and the second instance of the second instance Second instance described in message reference.
Optionally, processor 001 executes computer program 0021 and can be also used for:
When the Web Service of third entity, the updated resource information of the third entity is obtained;Described Three entities are any one entity at least two entity;
Inquire the dependence between at least two entity, determine rely on the third entity entity at least one Entity;
The updated resource information of the third entity is notified at least one described entity by third management node, The updated resource information of the third entity includes the updated resource data and third reality of the third entity The updated access information of body, so as to the updated number of resources according at least one described entity according to the third entity The third entity is accessed according to the updated access information with the third entity.
In the embodiment of the present invention, above-mentioned cloud controller can be using the deployment device 00 with service.
The present embodiment for realizing each method embodiment described below, in the present embodiment the workflow of each unit and Working principle see below the description in each method embodiment, and details are not described herein.
The embodiment of the present invention provides the deployment device of a kind of application and service, the deployment which passes through the preparatory layout of acquisition File is described, includes the dependence between at least two entities in the deployment descriptor file;Wherein, described at least two is real Any entity in body is application or service;Further according to the dependence between at least two entity successively to it is described at least Two entities are disposed;Wherein, the deployment sequence for the entity being relied on is prior to the deployment for the entity being relied on described in dependence Sequentially.Compared to existing technologies, it does not need to apply or service preparatory deployment before the binding, can be realized and apply and answer With, service service between binding, and be able to solve the person of being relied on access information change after can not inform asking for dependent Topic.
The embodiment of the present invention provides the dispositions method of a kind of application and service, as shown in Fig. 2, this method comprises:
Step 101, the deployment descriptor file for obtaining preparatory layout include at least two entities in the deployment descriptor file Between dependence;Wherein, any entity at least two entity is application or service.
Step 102 successively carries out at least two entity according to the dependence between at least two entity Deployment;Wherein, deployment sequence of the deployment sequence for the entity being relied on prior to the entity being relied on described in dependence.
The embodiment of the present invention provides the dispositions method of a kind of application and service, the deployment that this method passes through the preparatory layout of acquisition File is described, includes the dependence between at least two entities in the deployment descriptor file;Wherein, described at least two is real Any entity in body is application or service;Further according to the dependence between at least two entity successively to it is described at least Two entities are disposed;Wherein, the deployment sequence for the entity being relied on is prior to the deployment for the entity being relied on described in dependence Sequentially.Compared to existing technologies, it does not need to apply or service preparatory deployment before the binding, can be realized and apply and answer With, service service between binding, and be able to solve the person of being relied on access information change after can not inform asking for dependent Topic.
In order to enable those skilled in the art to be more clearly understood that technical solution provided in an embodiment of the present invention, lead to below Specific embodiment is crossed, the dispositions method of application and service that the embodiment of the present invention provides is described in detail, such as Fig. 3 institute Show, this method comprises:
Step 201, cloud controller obtain the deployment descriptor file of preparatory layout.
Wherein, including the dependence between at least two entities in the deployment descriptor file;Wherein, described at least two Any entity in a entity can be application or service.The preparatory layout of the deployment file can complete layout simultaneously by administrator It is input to the cloud controller, can also be controlled by cloud and preparatory layout is carried out according to preset strategy, or can also be by other Device with layout function completes layout and is input to the cloud controller, and wherein layout can be understood as that (service) will be applied It is organized in the direct interaction of service (application) and dependence.
In embodiments of the present invention, when carrying out layout, any example for not needing to apply or service is in operating status, That is when carrying out layout, need to carry out the application of layout or there is not yet for service.
Illustratively, it is illustrated with the sample of following programmed deployment descriptor file:
In the sample of above-mentioned deployment descriptor file, there are two application orderApp (being properly termed as " order application "), ManagerApp (being properly termed as " management application ") and two service databaseService (are properly termed as " database clothes Business "), nosqlService (being properly termed as " non-relational database service "), can from the sample of above-mentioned deployment descriptor file To find out, depend on using orderApp using managerApp and service databaseService, service DatabaseService is dependent on service nosqlService, using managerApp dependent on service databaseService.Wherein service databaseService is relied on by two applications, and the two application dependences is Service two different instances of databaseService.Above-mentioned dependence can enter shown in Fig. 4.
Wherein, it should be noted that instance (example) 000~instance004 is intended merely to indicate each application Or the example of service, it is 5 different marking variables, is not actual example ID, after the creation of the example of application or service, Actual example ID can replace these marking variables.Wherein instance002 and instance004 belongs to service DatabaseService, indicates two different examples of service databaseService, if wishing, the two applications are relied on Same instance is then bound identical instance variable to the two applications and is identified.
In addition, above-mentioned orderApp, managerApp, databaseService, nosqlService are merely exemplary , it can also be other possible applications or service.
Step 202, cloud controller are successively real to described at least two according to the dependence between at least two entity Body is disposed.
Cloud controller needs to parse dependence therein after obtaining deployment descriptor file, and parsing, which relies on, closes The purpose of system is the sequencing in order to establish example deployment, in, the deployment sequence for the entity being relied on is prior to described in dependence The deployment sequence for the entity being relied on, to guarantee that the dependence of the bottom in the dependence is disposed at first.Formerly deployment in this way Entity example creation after, the access information of the example is injected into the upper level entity of the entity first disposed, For disposing the upper level entity.It equally, can be as shown in Figure 5 with the confirmable deployment sequence of dependence shown in Fig. 4. Id00000001~id00000005 in Fig. 5 be respectively used to indicate instance003, instance004, instance002, The actual example ID of instance001, instance000, what id00000001~id00000005 was merely exemplary.
In order to be illustrated the step of clearly deployment to entity, with the deployment of any two entity during deployment It is described in detail, specifically, for first instance and second instance, wherein first instance depends on second instance, described the One entity and the second instance are not that any two at least two entity described in file exist directly for described in The entity of dependence is connect, illustratively, terminal (Client) can be installed on the first instance and the second instance Software Development Tools (English: Software Development Kit, referred to as: SDK, as shown in fig. 6, first instance and second The deployment process of entity may include:
Step 01, cloud controller determine the first instance and institute according to the dependence between at least two entity State the deployment sequence of second instance.
Since first instance depends on second instance, so deployment sequence is the first instance prior to described the Two entities.
The example of the first instance and the example of the second instance is respectively created in step 02, cloud controller, obtains institute State the resource data of first instance and the resource data of the second instance.
Specifically, the example of creation first instance may include:
Firstly, cloud controller creates the virtual machine and the first management node of the first instance, wherein first management Node operates on the virtual machine of the first instance.
Secondly, the example that cloud controller creates the first instance by first management node.
The example for creating the first instance may include, will be in the software installation to first instance of required example.
Then, cloud controller obtains the resource data of the first instance, and the resource data of the first instance includes institute State the information of the virtual machine information of first instance and the example of the first instance.
After the example for creating first instance, cloud controller obtains the resource data of first instance from the first management node, this In resource data may include the virtual machine information of first instance, and the first instance just created example information etc., The virtual machine information of first instance for example can be the IP address of virtual machine, and the information of the example of first instance can be the example Port numbers, such as can be the port (port) number for the software installed in above-mentioned steps.
Finally, cloud controller records the money of the first instance after the resource data that the first management node obtains first instance Source data.
Creation second instance example may include:
Firstly, cloud controller creates the virtual machine and the second management node of the second instance, wherein second management Node operates on the virtual machine of the second instance.
Secondly, the example that cloud controller creates the second instance by second management node;
Again, cloud controller obtains the resource data of the second instance, the resource data of the example of the second instance The information of the example of virtual machine information and the second instance including the second instance.
Wherein, the specific steps for creating the example of second instance are identical as the example of creation first instance, do not repeating.
Step 03, cloud controller dispose the second instance according to the resource data of the first instance, obtain described the The access information of two entities.Specifically, may include:
Firstly, the resource data of the first instance is passed through second management node injection described second by cloud controller Entity.
Secondly, second management node carries out the resource data of the first instance persistently on the second instance Change processing.Above-mentioned persistence refers to the mechanism for converting program data between permanent state and instantaneous state.Such as it will be in memory Object be stored in the database of relationship type, naturally it is also possible to be stored in disk file, extensible markup language (English: Extensible Markup Language, referred to as: XML) in data file etc..Briefly, exactly by first instance Resource data is stored on the second instance.
Again, second management node starts the second instance.
Then, the second instance reads and configures the resource data of the first instance.
After the deployment for completing second instance, the access information of second instance is obtained, which may include: second real The ID and access credentials of the example of body change access credentials for example and can be user name, the password of example etc. of access second instance Information.
The second last management node informs that the deployment of cloud controller second instance is completed, and above-mentioned access information is informed cloud control Device processed.
Step 04, cloud controller dispose the first instance according to the resource information of the second instance.Described second is real The resource information of body includes the resource data of the second instance and the access information of the second instance.
Cloud controller obtain second instance access information after, the resource data for the second instance that step 02 is obtained with Resource information of the access information of the second instance as the second instance is then believed according to the resource of the second instance Breath deployment first instance.Specifically, including
Firstly, the resource information of the second instance is passed through second management node injection described first by cloud controller Entity.
Secondly, first management node carries out the resource information of the second instance persistently on the first instance Change processing.
Again, second management node starts the first instance,
Then, the first instance reads and configures the resource information of the second instance.
Finally, the first instance is visited according to the resource data of the second instance and the access information of the second instance Ask the second instance.
First instance is according to the IP of the second instance virtual machine in the resource data of second instance and the example of second instance The port numbers example that can find the second instance, pass through the ID of the example of the second instance in the access information of second instance The example is just able to access that with access credentials, thus the ability for making first instance that there is access second instance.
In addition to the above described differences, the specific steps for disposing first instance are identical as deployment second instance, do not repeating.
It can be seen that first disposing the entity being relied on, then it regard the access information injection for the entity being relied on as dependent Entity dispose the entity as dependent so that the entity that there is the entity as dependent access to be relied on Ability.
In addition, there are the possibility that the access information of some entity changes, such as cloud controller to expand after completing deployment The management node of third entity is opened up, which is also any one at least two entity in deployment descriptor file Therefore a entity when the Web Service of third entity, can also include:
Step 203, cloud controller obtain the updated resource information of the third entity.
Step 204, cloud controller inquire the dependence between at least two entity, determine and rely on the third reality 4th entity of body.
Step 205, cloud controller are notified the updated resource information of the third entity by third management node 4th entity.
Wherein, as shown in fig. 7, can specifically include:
The updated resource information of the third entity is injected institute by third management node by step 01, cloud controller State the 4th entity.
Step 02, the 4th management node are enterprising in the 4th entity by the updated resource information of the third entity The processing of row persistence.
Step 03, the 4th entity detect according to the updated resource information of the third entity and notify described The change in resources of three entities.
Specifically, the described 4th physically can also be equipped with terminal SDK, when the terminal SDK of the 4th entity obtains institute After the updated resource information for stating third entity, the resource of third entity described in the 4th entity is notified to become as terminal SDK Change.
Step 04, the 4th entity are according to the updated resource data of the third entity and the third entity Updated access information accesses the third entity.
Above-mentioned third entity and the 4th entity can be identical entity with aforementioned first instance and second instance, or Other entities.
The embodiment of the present invention provides the dispositions method of a kind of application and service, the deployment that this method passes through the preparatory layout of acquisition File is described, includes the dependence between at least two entities in the deployment descriptor file;Wherein, described at least two is real Any entity in body is application or service;Further according to the dependence between at least two entity successively to it is described at least Two entities are disposed;Wherein, the deployment sequence for the entity being relied on is prior to the deployment for the entity being relied on described in dependence Sequentially.Compared to existing technologies, it does not need to apply or service preparatory deployment before the binding, can be realized and apply and answer With, service service between binding, and be able to solve the person of being relied on access information change after can not inform asking for dependent Topic.
The embodiment of the present invention also provides the deployment device 01 of a kind of application and service, as shown in figure 8, described device 01 is wrapped It includes:
Pre-programmed unit 011 includes extremely in the deployment descriptor file for obtaining the deployment descriptor file of preparatory layout Dependence between few two entities;Wherein, any entity at least two entity is application or service;
Deployment unit 012, for according to the dependence between at least two entity successively to described at least two Entity is disposed;Wherein, deployment sequence of the deployment sequence for the entity being relied on prior to the entity being relied on described in dependence.
Optionally, the dependence between at least two entity includes at least: first instance depends on second instance, Wherein, the first instance and the second instance exist for any two at least two entity directly relies on relationship Entity, as shown in figure 9, the deployment unit 012 may include:
Order determination unit 0121 is disposed, for determining described the according to the dependence between at least two entity The deployment sequence of one entity and the second instance, the deployment sequence is the first instance prior to the second instance;
Creating unit 0122 is obtained for the example of the first instance and the example of the second instance to be respectively created The resource data of the resource data of the first instance and the second instance;
Entity deployment unit 0123 is obtained for disposing the second instance according to the resource data of the first instance The access information of the second instance;
Entity deployment unit 0123 is also used to dispose the first instance according to the resource information of the second instance, described The resource information of second instance includes the resource data of the second instance and the access information of the second instance.
Optionally, the creating unit 0122 can be specifically used for:
Create the virtual machine and the first management node of the first instance, wherein first management node operate in it is described On the virtual machine of first instance;
The example for creating the first instance by first management node;
The resource data of the first instance is obtained, the resource data of the first instance includes the void of the first instance The information of the example of quasi- machine information and the first instance;
Create the virtual machine and the second management node of the second instance, wherein second management node operate in it is described On the virtual machine of second instance;
The example for creating the second instance by second management node;
The resource data of the second instance is obtained, the resource data of the example of the second instance includes described second real The information of the example of the virtual machine information of body and the second instance.
Optionally, the entity deployment unit 0123 can be specifically used for:
The resource data of the first instance is injected into the second instance by second management node;
The resource data of the first instance is carried out on the second instance by second management node persistently Change processing;
Start the second instance by second management node, reads the second instance and configure described first The resource data of entity;
The access information of the second instance is obtained, the access information of the second instance includes the reality of the second instance The access credentials of the example of the ID and second instance of example.
Optionally, the entity deployment unit 0123 can be specifically used for:
The resource information of the second instance is injected into the first instance by second management node;
The resource information of the second instance is carried out on the first instance by first management node persistently Change processing;
Start the first instance by first management node, reads the first instance and configure described second The resource information of entity, so that the first instance is according to the access of the resource data and the second instance of the second instance Second instance described in message reference.
Optionally, described device 01 further includes updating unit 013, and the updating unit 013 can be specifically used for:
When the Web Service of third entity, the updated resource information of the third entity is obtained;Described Three entities are any one entity at least two entity;
Inquire the dependence between at least two entity, determine rely on the third entity entity at least one Entity;
The updated resource information of the third entity is notified at least one described entity by third management node, The updated resource information of the third entity include the third entity updated virtual machine information and the third The information of the updated example of entity, so as to the updated void according at least one described entity according to the third entity Third entity described in the message reference of the updated example of quasi- machine information and the third entity.
In the embodiment of the present invention, above-mentioned cloud controller can be using the deployment device 01 with service.
The present embodiment is for realizing above-mentioned each method embodiment, and the workflow of each unit and work are former in the present embodiment Reason is referring to the description in above-mentioned each method embodiment, and details are not described herein.
The embodiment of the present invention provides the deployment device of a kind of application and service, the deployment which passes through the preparatory layout of acquisition File is described, includes the dependence between at least two entities in the deployment descriptor file;Wherein, described at least two is real Any entity in body is application or service;Further according to the dependence between at least two entity successively to it is described at least Two entities are disposed;Wherein, the deployment sequence for the entity being relied on is prior to the deployment for the entity being relied on described in dependence Sequentially.Compared to existing technologies, it does not need to apply or service preparatory deployment before the binding, can be realized and apply and answer With, service service between binding, and be able to solve the person of being relied on access information change after can not inform asking for dependent Topic.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or logical of device or unit Letter connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the present invention The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various It can store the medium of program code.
Those skilled in the art can be understood that, for convenience and simplicity of description, only with above-mentioned each functional module Division progress for example, in practical application, can according to need and above-mentioned function distribution is complete by different functional modules At the internal structure of device being divided into different functional modules, to complete all or part of the functions described above.On The specific work process for stating the device of description, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (10)

1. a kind of dispositions method of application and service, which is characterized in that the described method includes:
The deployment descriptor file of preparatory layout is obtained, includes the dependence pass between at least two entities in the deployment descriptor file System;Wherein, any entity at least two entity is application or service;
Successively at least two entity is disposed according to the dependence between at least two entity;Wherein, quilt Deployment sequence of the deployment sequence of the entity of dependence prior to the entity being relied on described in dependence;
Dependence between at least two entity includes at least: first instance depends on second instance, wherein described the There is the entity for the relationship that directly relies on for any two at least two entity in one entity and the second instance, then institute It states successively at least two entity dispose according to the dependence between at least two entity and includes:
Determine that the deployment of the first instance and the second instance is suitable according to the dependence between at least two entity Sequence, the deployment sequence is the second instance prior to the first instance;
The example of the first instance and the example of the second instance is respectively created, obtains the resource data of the first instance With the resource data of the second instance;
The second instance is disposed according to the resource data of the first instance, obtains the access information of the second instance;
The first instance is disposed according to the resource information of the second instance, the resource information of the second instance includes described The access information of the resource data of second instance and the second instance.
2. dispositions method according to claim 1, which is characterized in that the example that the first instance is respectively created and The resource data of the example of the second instance, the resource data and the second instance that obtain the first instance includes:
The virtual machine and the first management node of the first instance are created, wherein first management node operates in described first On the virtual machine of entity;
The example for creating the first instance by first management node;
The resource data of the first instance is obtained, the resource data of the first instance includes the virtual machine of the first instance The information of information and the example of the first instance;
The virtual machine and the second management node of the second instance are created, wherein second management node operates in described second On the virtual machine of entity;
The example for creating the second instance by second management node;
The resource data of the second instance is obtained, the resource data of the second instance includes the virtual machine of the second instance The information of information and the example of the second instance.
3. dispositions method according to claim 2, which is characterized in that the resource data portion according to the first instance The second instance is affixed one's name to, the access information for obtaining the second instance includes:
The resource data of the first instance is injected into the second instance by second management node;
The resource data of the first instance is carried out at persistence on the second instance by second management node Reason;
Start the second instance by second management node, reads the second instance and configure the first instance Resource data;
The access information of the second instance is obtained, the access information of the second instance includes the example of the second instance The access credentials of the example of ID and the second instance.
4. dispositions method according to claim 3, which is characterized in that the resource information portion according to the second instance The first instance is affixed one's name to, the resource information of the second instance includes the resource data and the second instance of the second instance Access information include:
The resource information of the second instance is injected into the first instance by second management node;
The resource information of the second instance is carried out at persistence on the first instance by first management node Reason;
Start the first instance by first management node, reads the first instance and configure the second instance Resource information, so that the first instance is according to the resource data of the second instance and the access information of the second instance Access the second instance.
5. dispositions method according to claim 1 to 4, which is characterized in that further include:
When the Web Service of third entity, the updated resource information of the third entity is obtained;The third is real Body is any one entity at least two entity;
The dependence between at least two entity is inquired, determines the 4th entity for relying on the third entity;
The updated resource information of the third entity is notified into the 4th entity, the third by third management node The updated resource information of entity includes the update of the updated resource data and the third entity of the third entity Access information afterwards, so as to according to the 4th entity according to the third entity updated resource data and the third The updated access information of entity accesses the third entity.
6. a kind of deployment device of application and service, which is characterized in that described device includes:
Pre-programmed unit includes at least two in the deployment descriptor file for obtaining the deployment descriptor file of preparatory layout Dependence between entity;Wherein, any entity at least two entity is application or service;
Deployment unit, for successively being carried out at least two entity according to the dependence between at least two entity Deployment;Wherein, deployment sequence of the deployment sequence for the entity being relied on prior to the entity being relied on described in dependence;
Dependence between at least two entity includes at least: first instance depends on second instance, wherein described the One entity and the second instance are entity of any two at least two entity in the presence of the relationship that directly relies on, described Deployment unit includes:
Dispose order determination unit, for according to the dependence between at least two entity determine the first instance and The deployment sequence of the second instance, the deployment sequence is the second instance prior to the first instance;
Creating unit obtains described first for the example of the first instance and the example of the second instance to be respectively created The resource data of the resource data of entity and the second instance;
Entity deployment unit obtains described second for disposing the second instance according to the resource data of the first instance The access information of entity;
Entity deployment unit is also used to dispose the first instance, the second instance according to the resource information of the second instance Resource information include the resource data of the second instance and the access information of the second instance.
7. deployment device according to claim 6, which is characterized in that the creating unit is specifically used for:
The virtual machine and the first management node of the first instance are created, wherein first management node operates in described first On the virtual machine of entity;
The example for creating the first instance by first management node;
The resource data of the first instance is obtained, the resource data of the first instance includes the virtual machine of the first instance The information of information and the example of the first instance;
The virtual machine and the second management node of the second instance are created, wherein second management node operates in described second On the virtual machine of entity;
The example for creating the second instance by second management node;
The resource data of the second instance is obtained, the resource data of the example of the second instance includes the second instance The information of the example of virtual machine information and the second instance.
8. deployment device according to claim 7, which is characterized in that the entity deployment unit is specifically used for:
The resource data of the first instance is injected into the second instance by second management node;
The resource data of the first instance is carried out at persistence on the second instance by second management node Reason;
Start the second instance by second management node, reads the second instance and configure the first instance Resource data;
The access information of the second instance is obtained, the access information of the second instance includes the example of the second instance The access credentials of the example of ID and the second instance.
9. deployment device according to claim 7, which is characterized in that the entity deployment unit is specifically used for:
The resource information of the second instance is injected into the first instance by second management node;
The resource information of the second instance is carried out at persistence on the first instance by first management node Reason;
Start the first instance by first management node, reads the first instance and configure the second instance Resource information, so that the first instance is according to the resource data of the second instance and the access information of the second instance Access the second instance.
10. according to any deployment device of claim 6-9, which is characterized in that described device further includes updating unit, institute Updating unit is stated to be specifically used for:
When the Web Service of third entity, the updated resource information of the third entity is obtained;The third is real Body is any one entity at least two entity;
The dependence between at least two entity is inquired, determines the 4th entity for relying on the third entity;
The updated resource information of the third entity is notified into the 4th entity, the third by third management node The updated resource information of entity includes the update of the updated resource data and the third entity of the third entity Access information afterwards, so as to according to the 4th entity according to the third entity updated resource data and the third The updated access information of entity accesses the third entity.
CN201410708070.2A 2014-11-27 2014-11-27 Using the dispositions method and device with service Active CN105704188B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410708070.2A CN105704188B (en) 2014-11-27 2014-11-27 Using the dispositions method and device with service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410708070.2A CN105704188B (en) 2014-11-27 2014-11-27 Using the dispositions method and device with service

Publications (2)

Publication Number Publication Date
CN105704188A CN105704188A (en) 2016-06-22
CN105704188B true CN105704188B (en) 2019-04-12

Family

ID=56230390

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410708070.2A Active CN105704188B (en) 2014-11-27 2014-11-27 Using the dispositions method and device with service

Country Status (1)

Country Link
CN (1) CN105704188B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10372743B2 (en) * 2016-07-20 2019-08-06 Baidu Usa Llc Systems and methods for homogeneous entity grouping
CN108206745B (en) * 2016-12-16 2020-03-20 华为技术有限公司 Business operation method and device and cloud computing system
CN107343018B (en) * 2017-01-04 2021-03-30 成都华栖云科技有限公司 Application service arranging method and system of PaaS cloud platform
CN107766060A (en) * 2017-10-31 2018-03-06 新华三云计算技术有限公司 Application configuration dispositions method and device
CN108762769B (en) * 2018-06-04 2022-06-21 万惠投资管理有限公司 Microservice application arranging and deploying method and device and computer terminal
CN109933338B (en) * 2019-01-29 2023-06-06 浙江数链科技有限公司 Block chain deployment method, device, computer equipment and storage medium
CN112866306A (en) * 2019-11-12 2021-05-28 阿里巴巴集团控股有限公司 Resource management method and cloud service platform
CN113127006B (en) * 2019-12-30 2024-03-29 北京懿医云科技有限公司 Service deployment method, device, equipment and storage medium
CN111198852A (en) * 2019-12-30 2020-05-26 浪潮通用软件有限公司 Knowledge graph driven metadata relation reasoning method under micro-service architecture
CN113504972A (en) * 2021-07-26 2021-10-15 京东科技控股股份有限公司 Service deployment method and device, electronic equipment and storage medium
CN114546588A (en) * 2022-02-15 2022-05-27 浙江大华技术股份有限公司 Task deployment method and device, storage medium and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937353A (en) * 2010-09-20 2011-01-05 中兴通讯股份有限公司 Method and device for deploying and loading plug-in unit
CN102185900A (en) * 2011-04-18 2011-09-14 北京新媒传信科技有限公司 Application service platform system and method for developing application services
CN102497454A (en) * 2011-12-31 2012-06-13 北京新媒传信科技有限公司 Method for realizing gray publication of application in application service platform system
CN102821000A (en) * 2012-09-14 2012-12-12 乐视网信息技术(北京)股份有限公司 Method for improving usability of PaaS platform

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040215711A1 (en) * 2002-03-14 2004-10-28 Openwave Systems Inc. Mobile services platform architecture

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937353A (en) * 2010-09-20 2011-01-05 中兴通讯股份有限公司 Method and device for deploying and loading plug-in unit
CN102185900A (en) * 2011-04-18 2011-09-14 北京新媒传信科技有限公司 Application service platform system and method for developing application services
CN102497454A (en) * 2011-12-31 2012-06-13 北京新媒传信科技有限公司 Method for realizing gray publication of application in application service platform system
CN102821000A (en) * 2012-09-14 2012-12-12 乐视网信息技术(北京)股份有限公司 Method for improving usability of PaaS platform

Also Published As

Publication number Publication date
CN105704188A (en) 2016-06-22

Similar Documents

Publication Publication Date Title
CN105704188B (en) Using the dispositions method and device with service
CN107070705B (en) A kind of method of combination of cloud resource
US10505796B2 (en) Network function virtualization
CN102571698B (en) Access authority control method, system and device for virtual machine
CN108958927A (en) Dispositions method, device, computer equipment and the storage medium of container application
CN105979009A (en) Method for automatically balancing increased load of cloud application container
CN105656646A (en) Deploying method and device for virtual network element
US11392675B2 (en) Request authorization using recipe-based service coordination
CN107643927A (en) A kind of united portal method, apparatus and system
US10084652B2 (en) Customizing network configuration of virtual machines using subnet mapping rules
CN106790001A (en) Multisystem role-security management method and system based on unified interface
CN103064717B (en) A kind of apparatus and method of parallel installation of software for cluster system
KR20200115020A (en) Hyperledger fabric network creation method, controller and storage medium
CN105095103B (en) For the storage device management method and apparatus under cloud environment
CN103729234B (en) A kind of cluster virtual machine management method and device
WO2015183919A1 (en) Grouping virtual machines in a cloud application
CN109995814A (en) Moving method and device, communication equipment, the storage medium of cloud host resource
CN109992278A (en) A kind of application issued method and device based on container
KR20210065300A (en) Method and apparatus for generating automatically setup code of application software baesed autosar
US11948005B2 (en) Managed integration of constituent services of multi-service applications
CN112328170A (en) Cloud hard disk capacity expansion method and device, computer equipment and storage medium
Korte et al. Model-driven configuration management of cloud applications with OCCI
CN106708573A (en) System and method used for automatic installation of Hadoop cluster
CN106201584B (en) Version upgrading method and terminal device
CN109660575B (en) Method and device for realizing NFV service deployment

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
TR01 Transfer of patent right

Effective date of registration: 20200211

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee after: HUAWEI TECHNOLOGIES Co.,Ltd.

Address before: 210012 Ande Gate No. 94, Yuhuatai District, Jiangsu, Nanjing

Patentee before: Huawei Technologies Co.,Ltd.

TR01 Transfer of patent right