主权项 |
1. A computer-implemented method for deploying programs in a cluster node, the computer-implemented method comprising:
obtaining, by one or more processors, a dependency between a program to be deployed in a node in a cluster and other programs to be deployed in the cluster; obtaining, by one or more processors, an IP address and connection information of a sub/pub server, wherein the sub/pub server is a server that provides subscription and publication services; connecting, by one or more processors, a client computer to the sub/pub server; subscribing, by one or more processors, to the sub/pub server for a message of other programs on which the program is dependent; deploying, by one or more processors, the program in response to obtaining the subscribed message of other programs on which the program is dependent from the sub/pub server; in response to building connections with multiple nodes, receiving, by one or more processors, all programs to be installed on respective nodes and subscription information; in response to subscription information of a first node indicating that a first program to be deployed in the first node is dependent on a second program, obtaining, by one or more processors, a second node where the second program is located according to the received all programs to be installed on respective nodes; sending, by one or more processors, to the second node a request for publishing a message of the second program; and in response to receiving a message of the second program from the second node, sending, by one or more processors, the message of the second program to the first node according to the subscription information. |