CN111949310B - Built-in service external connection method and device based on heterogeneous cloud platform - Google Patents

Built-in service external connection method and device based on heterogeneous cloud platform Download PDF

Info

Publication number
CN111949310B
CN111949310B CN202010790897.8A CN202010790897A CN111949310B CN 111949310 B CN111949310 B CN 111949310B CN 202010790897 A CN202010790897 A CN 202010790897A CN 111949310 B CN111949310 B CN 111949310B
Authority
CN
China
Prior art keywords
software
script
setting
software package
folder
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
CN202010790897.8A
Other languages
Chinese (zh)
Other versions
CN111949310A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010790897.8A priority Critical patent/CN111949310B/en
Publication of CN111949310A publication Critical patent/CN111949310A/en
Application granted granted Critical
Publication of CN111949310B publication Critical patent/CN111949310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The invention provides a built-in service external connection method and a built-in service external connection device based on a heterogeneous cloud platform, wherein the method comprises the following steps: s1, acquiring a software package to be integrated, and setting a software package name interface, a software package directory structure interface and a software package internal script interface in the software package to be integrated to generate a packaged software package; s2, setting the packaging software package as a built-in service of the heterogeneous cloud platform; s3, setting a heterogeneous cloud platform to provide built-in services for a user, providing software and versions of software package names on which the built-in services selected by the user depend according to a software package name interface, providing paths and names of all scripts in the built-in service dependent software package selected by the user according to a software package directory structure interface, providing a transmission parameter interface of all scripts in the built-in service dependent software package selected by the user according to the script interface in the software package, wherein the transmission parameter interface of each script is used for starting the script.

Description

Built-in service external connection method and device based on heterogeneous cloud platform
Technical Field
The invention belongs to the technical field of heterogeneous cloud platforms, and particularly relates to a built-in service external connection method and device based on a heterogeneous cloud platform.
Background
A series of built-in services are provided based on the heterogeneous cloud platform, and the built-in services comprise certain middleware, a database and the like. The service instance built in the cloud platform can be created by a user in the platform through applying for the built-in service or in a way of creating the service instance through the built-in service, and the service instance comprises a database, middleware and the like. The software function is provided by the built-in service mode, and the problem that a user cannot conveniently install and maintain the use pain of the software domestic software is solved.
The heterogeneous cloud platform can realize the requirements by internally arranging the software with the specified version, but the internally arranged software cannot realize all versions, the full version adaptation of all the software, and the comprehensiveness of the software.
Therefore, it is very necessary to provide a built-in service external connection method and device based on a heterogeneous cloud platform to overcome the above drawbacks in the prior art.
Disclosure of Invention
Aiming at the defect that the heterogeneous cloud platform built-in software in the prior art cannot be adapted to multiple versions and multiple software, the invention provides a heterogeneous cloud platform based built-in service external connection method and device, and aims to solve the technical problems.
In a first aspect, the invention provides a built-in service external connection method based on a heterogeneous cloud platform, which comprises the following steps:
S1, acquiring a software package to be integrated, and setting a software package name interface, a software package directory structure interface and a software package internal script interface in the software package to be integrated to generate a packaged software package; the software package name interface is used for transmitting a software name and a software version; the software package directory structure is used for transmitting software script paths and names in the software package; the script interface in the software package is used for transmitting script parameters and return values;
s2, setting the packaging software package as a built-in service of the heterogeneous cloud platform;
s3, setting a heterogeneous cloud platform to provide built-in services for a user, providing software and versions of software package names on which the built-in services selected by the user depend according to a software package name interface, providing paths and names of all scripts in the built-in service dependent software package selected by the user according to a software package directory structure interface, providing a transmission parameter interface of all scripts in the built-in service dependent software package selected by the user according to the script interface in the software package, wherein the transmission parameter interface of each script is used for starting the script.
Further, the step S1 specifically includes the following steps:
s11, acquiring a software package to be integrated;
s12, setting a software package name interface in a software package to be integrated;
S13, setting a software package directory structure interface in the software package to be integrated;
and S14, setting a script interface in the software package to be integrated to generate a packaging software package. The software package name interface specifies the name and version information of the software package; the software package directory structure interface comprises a directory structure for placing scripts of various functions provided by the software package; the script interface in the software package specifies the script name and parameter requirements of the script with the specified function, and returns the value requirements; the software package can be determined to be a software package which is depended by a certain built-in service through a software package name interface, the built-in service is instantiated, and when the software service is provided, software provided by the software package can be deployed by calling a specified software package to provide the software service; the built-in service can splice the full path of the script providing a certain function of the software and the script name of the software package according to the directory structure interface of the software package and the script interface in the software package, and can transmit the designated parameters according to the parameter requirements of the script of the software package to execute the software script and complete the setting of a certain function of the software.
Further, in step S12, the folder name format of the software package to be integrated is set to the software package name + version name. The package name is used to distinguish different software, and the version name is used to distinguish different versions of software.
Further, step S14 is followed by the following steps:
s15, compressing and encrypting the software package to be integrated;
s16, setting the name format of the compressed software package to be integrated as a software including name + software version + compressed file suffix;
and S17, setting the compressed and encrypted software name format to be integrated as a software package name, a software version and a compressed encrypted file suffix.
Further, the step S13 specifically includes the following steps:
s131, setting a software state operation folder under a to-be-integrated software package folder;
s132, setting a software installation package folder under the to-be-integrated software package folder;
s133, setting a description document under a folder of the software package to be integrated;
and S134, setting a software installation package execution file under the to-be-integrated software package folder. And setting each function file under the folder of the software package to be integrated for storing script files.
Further, the step S14 includes the following steps:
s141, setting a software restart script, a software start script and a software shutdown script under the software state operation folder;
s142, setting a software installation package compressed file under a software installation package folder;
and S143, setting a configuration folder, a firewall configuration folder, an installation folder, a log folder and a monitoring folder under the software installation package execution file, setting corresponding function scripts under the function folders and setting function script parameters. The software restart script, the software start script and the software shutdown script have no parameters and are directly executed.
Further, the step S143 includes the following steps:
s1431, setting a backup script under a backup folder, wherein the backup script is used for performing backup operation and recovery backup according to backup script parameters;
s1432, setting a configuration script under the configuration file, wherein the configuration script is used for providing functions of single-node configuration, cluster configuration, password modification and password resetting according to parameters of the configuration script;
s1433, setting a firewall configuration script under the firewall configuration file folder, wherein the firewall configuration script is used for providing an opening port, a closing port, a firewall opening port and a firewall closing port according to firewall script parameters;
s1434, setting a software installation script under the installation folder, wherein the software installation script is used for providing a software installation function according to software installation script parameters;
s1435, setting a log viewing script under the log folder, wherein the log viewing script is used for providing a software installation log and a software operation log viewing function according to log viewing script parameters;
s1436, setting a monitoring script under the monitoring folder, wherein the monitoring script is used for providing monitoring item inquiry and configuration according to the monitoring script parameters and inquiring monitoring data.
In a second aspect, the present invention provides a heterogeneous cloud platform-based external device for built-in service, including:
the software package to be integrated acquiring and packaging module is used for acquiring the software package to be integrated, setting a software package name interface, a software package directory structure interface and a software package internal script interface in the software package to be integrated and generating a packaged software package; the software package name interface is used for transmitting a software name and a software version; the software package directory structure is used for transmitting software script paths and names in the software package; the script interface in the software package is used for transmitting script parameters and return values;
the software package built-in service module is used for setting the packaged software package as built-in service of the heterogeneous cloud platform;
the external built-in service module is used for setting the heterogeneous cloud platform to provide built-in services for users, providing software and versions of names of software packages depended on by the built-in services selected by the users according to the software package name interface, providing paths and names of all scripts in the built-in service dependent software packages selected by the users according to the software package directory structure interface, and providing transmission parameter interfaces of all scripts in the built-in service dependent software packages selected by the users according to the script interfaces in the software packages, wherein the transmission parameter interfaces of the scripts are used for starting the scripts.
Further, the module for acquiring and packaging the software package to be integrated comprises:
the software package to be integrated acquisition unit is used for acquiring a software package to be integrated;
the software package name interface setting unit is used for setting a software package name interface in the software package to be integrated;
the software package directory structure interface setting unit is used for setting a software package directory structure interface in the software package to be integrated;
and the script interface setting unit is used for setting a script interface in the software package to be integrated to generate a packaged software package.
Further, the software package directory structure interface setting unit includes:
the software state operation folder setting subunit is used for setting a software state operation folder under the to-be-integrated software package folder;
the software installation package folder setting subunit is used for setting a software installation package folder below the software installation package folder to be integrated;
the description document setting subunit is used for setting a description document under the folder of the software package to be integrated;
the software installation package execution file setting subunit is used for setting a software installation package execution file under the to-be-integrated software package folder;
the script interface setting unit includes:
the software state operation folder script setting subunit is used for setting a software restart script, a software start script and a software shutdown script under the software state operation folder;
The software installation package compressed file setting subunit is used for setting a software installation package compressed file under a software installation package folder;
and the software installation package execution file lower folder setting subunit is used for setting a configuration folder, a firewall configuration folder, an installation folder, a log folder and a monitoring folder under the software installation package execution file, and setting function script parameters corresponding to the function scripts under the setting of each function folder.
The invention has the beneficial effects that,
according to the built-in service external connection method and device based on the heterogeneous cloud platform, the software package name interface, the software package catalogue structure interface and the software package internal script interface are integrated in the software package, the software package is adapted to the heterogeneous cloud platform, and the heterogeneous cloud platform provides various software and various software versions to a user in a built-in service mode, so that the user can use different software in the heterogeneous cloud platform.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a first schematic flow diagram of the method of the present invention;
FIG. 2 is a second flow chart of the method of the present invention;
FIG. 3 is a schematic of the system of the present invention;
in the figure, 1-a to-be-integrated software package acquisition and packaging module; 1.1-a software package acquisition unit to be integrated; 1.2-software package name interface setting unit; 1.3-software package directory structure interface setting unit; 1.4-script interface setting unit; 2-a service module is arranged in the software package; 3-built-in external service module.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
as shown in fig. 1, the present invention provides a heterogeneous cloud platform-based external connection method for built-in services, which includes the following steps:
s1, acquiring a software package to be integrated, and setting a software package name interface, a software package directory structure interface and a software package internal script interface in the software package to be integrated to generate a packaged software package; the software package name interface is used for transmitting a software name and a software version; the software package directory structure is used for transmitting software script paths and names in the software package; the script interface in the software package is used for transmitting script parameters and return values;
s2, setting the packaging software package as a built-in service of the heterogeneous cloud platform;
s3, setting a heterogeneous cloud platform to provide built-in services for a user, providing software and versions of software package names on which the built-in services selected by the user depend according to a software package name interface, providing paths and names of all scripts in the built-in service dependent software package selected by the user according to a software package directory structure interface, providing a transmission parameter interface of all scripts in the built-in service dependent software package selected by the user according to the script interface in the software package, wherein the transmission parameter interface of each script is used for starting the script.
Example 2:
As shown in fig. 2, the invention provides a built-in service external connection method based on a heterogeneous cloud platform, which comprises the following steps:
s1, acquiring a software package to be integrated, and setting a software package name interface, a software package directory structure interface and a software package internal script interface in the software package to be integrated to generate a packaged software package; the software package name interface is used for transmitting a software name and a software version; the software package directory structure is used for transmitting software script paths and names in the software package; the script interface in the software package is used for transmitting script parameters and return values; the method comprises the following specific steps:
s11, acquiring a software package to be integrated;
s12, setting a software package name interface in a software package to be integrated; setting the name format of the folder of the software package to be integrated as the name of the software package plus the name of the version;
s13, setting a software package directory structure interface in the software package to be integrated; the method comprises the following specific steps:
s131, setting a software state operation folder under a to-be-integrated software package folder;
s132, setting a software installation package folder under the to-be-integrated software package folder;
s133, setting a description document under a folder of the software package to be integrated;
s134, setting a software installation package execution file under a to-be-integrated software package folder;
S14, setting a script interface in the software package to be integrated to generate a packaged software package; the method comprises the following specific steps:
s141, setting a software restart script, a software start script and a software shutdown script under the software state operation folder;
s142, setting a software installation package compressed file under a software installation package folder;
s143, setting a backup folder, a configuration folder, a firewall configuration folder, an installation folder, a log folder and a monitoring folder under the software installation package execution file; the method comprises the following specific steps:
s1431, setting a backup script under a backup folder, wherein the backup script is used for performing backup operation and recovery backup according to backup script parameters;
s1432, setting a configuration script under the configuration file, wherein the configuration script is used for providing functions of single-node configuration, cluster configuration, password modification and password resetting according to parameters of the configuration script;
s1433, setting a firewall configuration script under the firewall configuration file folder, wherein the firewall configuration script is used for providing an opening port, a closing port, a firewall opening port and a firewall closing port according to firewall script parameters;
s1434, setting a software installation script under the installation folder, wherein the software installation script is used for providing a software installation function according to software installation script parameters;
S1435, setting a log viewing script under the log folder, wherein the log viewing script is used for providing a software installation log and a software operation log viewing function according to log viewing script parameters;
s1436, setting a monitoring script under the monitoring folder, wherein the monitoring script is used for providing monitoring item inquiry and configuration according to monitoring script parameters and inquiring monitoring data;
s2, setting the packaging software package as a built-in service of the heterogeneous cloud platform;
s3, setting a heterogeneous cloud platform to provide built-in services for a user, providing software and versions of software package names on which the built-in services selected by the user depend according to a software package name interface, providing paths and names of all scripts in the built-in service dependent software package selected by the user according to a software package directory structure interface, providing a transmission parameter interface of all scripts in the built-in service dependent software package selected by the user according to the script interface in the software package, wherein the transmission parameter interface of each script is used for starting the script.
In certain embodiments, step S14 is followed by the following steps:
s15, compressing and encrypting the software package to be integrated;
s16, setting the name format of the compressed software package to be integrated as a software including name + software version + compressed file suffix;
And S17, setting the compressed and encrypted software name format to be integrated as a software package name, a software version and a compressed and encrypted file suffix. The software package provides the md5 file in a compressed package format including one compressed package and one compressed package. The format of the software package is the name of the software package, software version, tar.gz; the md5 file format of the software package compressed package is software package name-software version.tar.gz _ md 5; the md5 file content of the software package compressed package is a software package name-software version-tar.gz md5 value; after the software compression package is decompressed, the name of the folder is required to be the name of the software package-the software version.
Example 3:
the invention provides a built-in service external connection method based on a heterogeneous cloud platform, which comprises the following steps:
s1, acquiring a software package to be integrated, and setting a software package name interface, a software package directory structure interface and a software package internal script interface in the software package to be integrated to generate a packaged software package; the software package name interface is used for transmitting a software name and a software version; the software package directory structure is used for transmitting software script paths and names in the software package; the script interface in the software package is used for transmitting script parameters and return values; the method comprises the following specific steps:
S11, acquiring a software package to be integrated;
s12, setting a software package name interface in a software package to be integrated; setting the name format of the folder of the software package to be integrated as the name of the software package plus the name of the version;
s13, setting a software package directory structure interface in the software package to be integrated; the software package name-software version folder is a bin folder, a package folder, an README.md file or a shell folder;
the method comprises the following specific steps:
s131, setting a software state operation folder under a to-be-integrated software package folder; the bin folder is a software state operation folder;
s132, setting a software installation package folder under the to-be-integrated software package folder; the package file is a software installation package folder;
s133, setting a description document under a folder of the software package to be integrated; the READE E.md file is a software installation compression package directory structure description document, and the document describes necessary software package related information such as cautions and the like;
s134, setting a software installation package execution file under a to-be-integrated software package folder; the shell folder is a software installation package execution script folder; all folders are named full lowercase naming;
s14, setting a script interface in the software package to be integrated to generate a packaging software package; the method comprises the following specific steps:
S141, setting a software restart script, a software start script and a software shutdown script under the software state operation folder; the bin folder lower script comprises a software restart script, the name of the script is restart.sh, and the script has no parameters; starting a script by software, wherein the name of the script is start.sh, and the script has no parameter; the software closes the script, the script name is stop.sh, and the script has no parameters;
s142, setting a software installation package compressed file under a software installation package folder; the package folder is a software installation package folder, the software installation package under the folder is a compressed file, and the naming specification of the compressed file is software name-software version.tar.gz;
s143, setting a backup folder, a configuration folder, a firewall configuration folder, an installation folder, a log folder and a monitoring folder under the software installation package execution file; a backup folder backup, a configuration folder config, a protection wall configuration folder firewall, an installation folder install, a log folder log and a monitoring folder monitor are arranged below the shell folder; the method comprises the following specific steps:
s1431, setting a backup script under a backup folder, wherein the backup script is used for performing backup operation and recovery backup according to backup script parameters; a backup script is arranged under the backup folder backup, the script name is backup.sh, and the backup operation and the recovery backup operation are recommended by default;
1. The backup operation recommended parameter format is/backup-up-sh [ backup-up ] [ backup path ] [ backup file name ] [ software password ], four parameters are provided, the first parameter is the operation parameter backup, the second parameter is the backup path parameter, the third parameter is the backup file name parameter, the fourth parameter is the software password parameter, the generated backup file is the backup file name under the designated backup path, and the time stamp prevents backup failure caused by backup file renaming through the time stamp;
the method comprises the following steps that the format of recovery backup recommended parameters is/backup, sh, recovery, backup file path, backup file name and software password, the number of the parameters is three, the first parameter is an operation parameter recovery, the second parameter is a backup path parameter, the third parameter is a backup file name, the fourth parameter is a software password parameter, if a plurality of backup file names with the same name exist under a specified backup path, a timestamp is used, a backup file with the latest timestamp is recovered, and if the backup file names fail to be matched, the console prints error information;
s1432, setting a configuration script under the configuration file, wherein the configuration script is used for providing functions of single-node configuration, cluster configuration, password modification and password resetting according to parameters of the configuration script; under the configuration file folder config, a configuration file script config.sh provides the functions of configuring single node configuration, cluster configuration, password modification and password resetting; when the software is installed, a default password or no password exists, and the script mainly performs password processing;
1. The single-node configuration function recommended script parameter is one-/config.sh [ single ] [ software password ], and the single-node configuration function recommended script parameter is a cluster mode parameter, the single-node mode parameter is single, the cluster mode parameter is cluster, and the second parameter is software password;
2. the cluster configuration function recommended script parameter is [ cluster ] [ node role ] [ main node ip ] [ node software password ] [ node operating system root password ], and the cluster configuration function recommended script parameter is seven parameters which are sequentially:
2.1 the first parameter is a cluster mode parameter, cluster is expressed as cluster mode;
2.2 the second parameter is the node role, if the master node is the master node, the parameter is the master, if the slave node is the slave node, the parameter is slave, if the slave node is the auxiliary node, the parameter is assist, for example, in the redis master-slave configuration, the master node and the slave node are switched after the master node fails to be completed with the help of the sentinel node;
2.3, the third parameter is a master node IP, and the node IP with the parameter of the master 2.2 is identified;
2.4, the fourth parameter is a node IP, all configuration scripts are executed in the master node, the parameter identifier of the node is IP of the configured node, if the 2.2 parameter is master, the parameter is the master node IP, and if the 2.2 parameter is a non-master parameter, the parameter is non-master IP;
2.5 the fifth parameter is the master node software password, and the identifier 2.2 parameter is the master node software password;
2.6 the sixth parameter is a node software password, and the software password of the node IP with the 2.4 parameter is identified;
2.7, the seventh parameter is a node operating system root password, the operating system root password of the 2.4 parameter node IP is marked, and the seventh parameter is used for the script ssh to enter the 2.4 parameter node IP node to carry out 2.6 node software password configuration operation;
2.8 success of script execution returns success, failure of script execution returns error reasons;
3, the parameter of the password modification function script is "/config.sh [ updatepassword ] [ node ip ] [ node operation system root password ] [ old password ] [ new password ], and the parameter has five parameters:
3.1 the first parameter is the operation action parameter updatepassword, which is marked as the password updating action;
3.2 the second parameter is node IP, identifying the IP of the node to be modified;
3.3, the third parameter is a root password of the node operating system, the root password of the 3.2 node IP is identified, and the third parameter is used for the current script ssh to enter the 3.2 node IP for password modification;
3.4, the fourth parameter is an old password and is used for verifying the old password during password modification, and the new password can be modified only after the password is verified; if the old password fails to be verified, returning a verification result of old-password-check-fail, and identifying the failure of the old password verification;
3.5, a fifth parameter is a new password, after the verification of the old password of the parameter 3.4 is passed, the password of the software is modified into the new password, if the new password is successfully modified, success is returned, and if the new password is failed, a failure reason is returned;
4, the parameter of the password resetting function script is-/config.sh [ resetpasssword ] [ node ip ] [ node operating system root password ] [ new password ], and the four parameters are as follows:
4.1 the first parameter is the operation action parameter resetpassword, which is marked as resetting password action;
4.2 the second parameter is node IP, identifying the IP of the node to be modified;
4.3, the third parameter is a root password of the node operating system, the root password of the 4.2 node IP is marked, and the third parameter is used for resetting the password when the current script ssh enters the 4.2 node IP;
4.4 the fourth parameter is a new password, the reset software password is the new password, if the new password is reset successfully, success is returned, and if the new password is not modified, new-password-reset-failed is returned;
s1433, setting a firewall configuration script under the firewall configuration file folder, wherein the firewall configuration script is used for providing an opening port, a closing port, a firewall opening port and a firewall closing port according to firewall script parameters; the method comprises the following steps that a protecting wall is provided with a folder firewalld, a firewall configuration script firewalld.sh is arranged below the folder, and the script provides an opening port and a closing port, opens a firewall and closes the firewall function;
1, opening a port function, and recommending script parameters to be a-/live-wall.sh [ openport ] [ node IP ] [ node operating system root password ] [ network protocol ] [ port ];
1.1 parameter 1openport, marking the action as opening the port;
1.2 parameter 2 node IP, identifying IP of node of opening port;
1.3 parameter 3 node operating system root password, identifying the root password of 1.2 node IP, and using the current script ssh to enter the 1.2 node IP for port opening operation;
1.4 parameter 4 network protocol, which identifies the network protocol of the open port, wherein the network protocol comprises tcp and udp;
1.5 parameter 5 ports, identifying open ports;
1.6 parameter 1.2 node ip firewall if open, configuring open port operation, if closed, defaulting all ports to be accessible without configuring open port operation; if the execution of the open port script is successful, returning success, directly returning the closed-closed condition of the firewall, marking the execution success of the script, and returning closed-port-failed if the execution fails;
2, closing the port, and recommending script parameters of-/firewalld.sh [ closeport ] [ node ip ] [ node operating system root password ] [ port ]:
2.1 parameter 1closeport, identify action as closing port;
2.2 node IP, identifying IP of node to close port;
2.3 operating system root password of the node, marking the root password of 2.2 node IP, and using the current script ssh to enter 1.2 node IP for closing port operation;
2.4 network protocol, which identifies the network protocol for closing the port, wherein the network protocol comprises tcp and udp;
2.5 ports, identifying closed ports;
2.6 parameter 2.2 node ip firewall if open, configuring the operation of closing port, if closed, defaulting all ports to be accessible, not configuring the operation of closing port; if the port script is closed and the execution is successful, returning success; directly returning to the firewalled-closed condition under the condition that the firewall is closed; if the script is successfully executed and the execution fails, returning close-port-failed;
and 3, starting a firewall function, and recommending script parameters to be/firewalld.sh [ openfirewalld ] [ node ip ] [ node operating system root password ]:
3.1 parameter 1openfirewalld, and the identification action is used as opening the firewall;
3.2 parameter 2 node IP, identify the IP of the node to open the firewall;
3.3 parameter 3 node operating system root password, identify 3.2 node IP root password, used for the current script ssh to enter 3.2 node IP, open the firewall operation;
3.4, if the IP firewall of the 3.2 node is started, returning success, successfully starting the firewall, returning success, failing to start the firewall, and returning open-wired-failed;
4, closing the firewall function, and recommending script parameters to be/firewalld.sh [ closerowewalld ] [ node ip ] [ node operating system root password ]:
4.1 parameter 1openfirewalld, the identification action is used as closing the firewall;
4.2 parameter 2 node IP, identify the IP of the node which will close the firewall;
4.3 parameter 3 node operating system root password, identify 4.2 node IP root password, used for the current script ssh to enter 4.2 node IP, carry on the operation of closing the firewall;
4.4, parameter 4.2, if the ip firewall of the node is closed, returning success, successfully closing the firewall, returning success, failing to close the firewall, and returning close-firm-failed;
s1434, setting a software installation script under the installation folder, wherein the software installation script is used for providing a software installation function according to software installation script parameters; installing a folder install, wherein a software installation script install.sh is arranged below the folder to provide a software installation function; the software installation function script recommendation parameter is/install.sh [ node ip ] [ node operating system root password ]:
1 parameter 1 node IP, identifying IP of node to be installed with software;
2, parameter 2, the root password of the node operating system, the root password of the identification node IP, and the root password used for the current script ssh to enter the node IP for software installation operation;
3, the installation script automatically judges whether the node IP is the current node IP executed by the software installation script, if not, the software under the install folder under the package folder is copied to the default path in the node IP in a scp mode, then the node IP is installed, if the default software existing path is/var/soft default path, the software is automatically created, the copying process is ssh entering the node IP, whether the default path exists is checked, if the default path folder does not exist, the software is automatically created, then the software installation package is copied to the default folder by scp, and then the software installation action is executed;
s1435, setting a log viewing script under the log folder, wherein the log viewing script is used for providing a software installation log and a software operation log viewing function according to log viewing script parameters; a log folder log, wherein a software installation log viewing script log.sh is provided under the log folder, and a software installation log viewing function and a software operation log viewing function are provided;
1, a log viewing function is installed in software, and a recommended script parameter is { installlog } { node ip } { node operating system root password };
1.1 parameter 1installlog, identifying and viewing software installation log;
1.2 parameter 2 node IP, identifying IP of node for viewing software installation log;
1.3 parameter 3 node operating system root password, the root password for identifying the node IP, used for the current script ssh to enter the node IP and performing software operation log viewing operation;
1.4 if the node IP is not provided with software, the script returns a result of no-soft; if the software installation log exists, displaying the log content, and if no software installation log file exists, returning to no-install-log-file;
2, running a log viewing function by software, and recommending script parameters to be/log.sh [ running log ] [ node ip ] [ node operating system root password ]:
2.1 parameter 1running log, marking and checking software running log;
2.2 parameter 2 node IP, identifying IP of node to view software installation log;
2.3 parameter 3 node operating system root password, identifying the root password of the node IP, and using the current script ssh to enter the node IP to perform software operation log viewing operation;
2.4 if the node IP is not provided with software, the script returns a result of no-soft; if the software runs the log, the log content is displayed, and if no software runs the log file, no-running-log-file is returned;
S1436, setting a monitoring script under the monitoring folder, wherein the monitoring script is used for providing monitoring item inquiry and configuration according to monitoring script parameters and inquiring monitoring data; monitoring a folder monitor, wherein a monitoring script monitor is arranged under the folder, and the script provides monitoring item query, monitoring item configuration (adding/removing monitoring items) and monitoring data query;
monitoring item query function, recommending script parameters as keys, nodes and operating system root passwords;
1.1 parameter 1keys, identifying the query monitoring item list;
1.2 parameter 2 node IP, identifying IP of node to be checked software monitoring item;
1.3 parameter 3 node operating system root password, identifying the root password of the node IP, and using the current script ssh to enter the node IP to check the software monitoring item operation;
1.4, monitoring data inquiry is successful, and a returned result is recommended to be key 1; a key 2; a key 3;
1.5 monitoring data item query failure, and returning a result monitor-keys-get-failed;
2, configuring monitoring items and adding monitoring item functions, wherein the recommended script parameter is set to be equal to/monitor.
2.1 parameter 1setkey, identifying the monitoring item configuration and adding the monitoring item operation;
2.2 parameter 2key, marking the set monitoring item parameter;
2.3 node IP, identifying IP of node to be configured with software monitoring item;
2.4 operating the root password of the system by the node, identifying the root password of the node IP, and using the current script ssh to enter the node IP to perform the operation of configuring the software monitoring item and adding the monitoring item;
2.5, adding monitoring item setting, successfully executing the script, returning a result success, failing to execute, and returning a result monitor-set-key-failed;
3, configuring a monitoring item to remove a monitoring item function, wherein the recommended script parameter is deletekey key node ip node operating system root password:
3.1 parameter 1deletekey, identifying the operation of removing the monitoring item configuration of the monitoring item;
3.2 parameter 2key, marking the removed monitoring item parameter;
3.3 node IP, identifying IP of node to be configured with software monitoring item;
3.4 operating system root password of the node, the root password of the identification node IP, is used for the present script ssh to enter the node IP, carry on the configuration software and monitor and remove the operation of monitoring item;
3.5, setting monitoring items, successfully executing the script, returning a result success, failing to execute, and returning a result monitor-set-key-failed;
monitoring a data query function, and recommending script parameters to be/monitor.sh [ info ] [ node ip ] [ node operating system root password ]:
4.1 parameter 1info, identify monitor data query operation;
4.2 node IP, identifying the IP of the node to be monitored for data query;
4.3 operating system root password of the node, the root password of the identification node IP, is used for the present script ssh to enter the node IP, carry on the inquiry operation of the monitoring data;
4.4 the script is successfully executed, monitoring data is returned, and the format of the monitoring data is key1: value 1; key2 value 2; key3 value 3; key4 value 4;
4.5 the script fails to execute, and the returned result is monitor-info-get-failed;
s2, setting the packaging software package as a built-in service of the heterogeneous cloud platform;
s3, setting a heterogeneous cloud platform to provide built-in services for a user, providing software and versions of software package names on which the built-in services selected by the user depend according to a software package name interface, providing paths and names of all scripts in the built-in service dependent software package selected by the user according to a software package directory structure interface, providing a transmission parameter interface of all scripts in the built-in service dependent software package selected by the user according to the script interface in the software package, wherein the transmission parameter interface of each script is used for starting the script.
Example 4:
as shown in fig. 3, the present invention provides a built-in external service device based on a heterogeneous cloud platform, including:
The software package to be integrated acquiring and packaging module 1 is used for acquiring a software package to be integrated, setting a software package name interface, a software package directory structure interface and a software package internal script interface in the software package to be integrated, and generating a packaged software package; the software package name interface is used for transmitting a software name and a software version; the software package directory structure is used for transmitting software script paths and names in the software package; the script interface in the software package is used for transmitting script parameters and return values; the module 1 for acquiring and packaging the software package to be integrated comprises:
a to-be-integrated software package obtaining unit 1.1, configured to obtain a to-be-integrated software package;
the software package name interface setting unit 1.2 is used for setting a software package name interface in a software package to be integrated;
the software package directory structure interface setting unit 1.3 is used for setting a software package directory structure interface in the software package to be integrated; the software package directory structure interface setting unit 1.3 includes:
the software state operation folder setting subunit is used for setting a software state operation folder under the to-be-integrated software package folder;
the software installation package folder setting subunit is used for setting a software installation package folder below the software installation package folder to be integrated;
The description document setting subunit is used for setting a description document under the folder of the software package to be integrated; the software installation package execution file setting subunit is used for setting a software installation package execution file under the to-be-integrated software package folder;
the script interface setting unit 1.4 is used for setting a script interface in the software package to be integrated and generating a packaged software package; the script interface setting unit 1.4 includes:
the software state operation folder script setting subunit is used for setting a software restart script, a software start script and a software shutdown script under the software state operation folder;
the software installation package compressed file setting subunit is used for setting a software installation package compressed file under a software installation package folder;
the software installation package execution file lower folder setting subunit is used for setting a backup folder, a configuration folder, a firewall configuration folder, an installation folder, a log folder and a monitoring folder under the software installation package execution file;
the software package built-in service module 2 is used for setting the packaged software package as built-in service of the heterogeneous cloud platform;
the built-in service external module 3 is used for setting the heterogeneous cloud platform to provide built-in services for users, providing software and versions of names of software packages depended on by the built-in services selected by the users according to the software package name interface, providing paths and names of all scripts in the built-in service dependent software packages selected by the users according to the software package directory structure interface, and providing transmission parameter interfaces of all scripts in the built-in service dependent software packages selected by the users according to the script interfaces in the software packages, wherein the transmission parameter interfaces of the scripts are used for starting the scripts.
Although the present invention has been described in detail in connection with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (7)

1. A built-in service external connection method based on a heterogeneous cloud platform is characterized by comprising the following steps:
s11, acquiring a software package to be integrated;
s12, setting a software package name interface in a software package to be integrated;
s13, setting a software package directory structure interface in the software package to be integrated; the method comprises the following specific steps:
s131, setting a software state operation folder under a to-be-integrated software package folder;
s132, setting a software installation package folder under the to-be-integrated software package folder;
s133, setting a description document under a folder of the software package to be integrated;
S134, setting a software installation package execution file under a to-be-integrated software package folder;
s14, setting a script interface in the software package to be integrated to generate a packaged software package; the software package name interface is used for transmitting a software name and a software version; the software package directory structure is used for transmitting software script paths and names in the software package; the script interface in the software package is used for transmitting script parameters and return values;
s2, setting the packaging software package as a built-in service of the heterogeneous cloud platform;
s3, setting a heterogeneous cloud platform to provide built-in services for a user, providing software and versions of software package names on which the built-in services selected by the user depend according to a software package name interface, providing paths and names of all scripts in the built-in service dependent software package selected by the user according to a software package directory structure interface, providing a transmission parameter interface of all scripts in the built-in service dependent software package selected by the user according to the script interface in the software package, wherein the transmission parameter interface of each script is used for starting the script.
2. The heterogeneous cloud platform-based built-in service external connection method of claim 1, wherein in step S12, a folder name format of the software package to be integrated is set to be a software package name + version name.
3. The heterogeneous cloud platform-based built-in service external connection method according to claim 1, wherein the step S14 is followed by the following steps:
s15, compressing and encrypting the software package to be integrated;
s16, setting the name format of the compressed software package to be integrated as a software including name + software version + compressed file suffix;
and S17, setting the compressed and encrypted software name format to be integrated as a software package name, a software version and a compressed encrypted file suffix.
4. The heterogeneous cloud platform-based built-in service external connection method of claim 2, wherein the step S14 specifically comprises the following steps:
s141, setting a software restart script, a software start script and a software shutdown script under the software state operation folder;
s142, setting a software installation package compressed file under a software installation package folder;
and S143, setting a configuration folder, a firewall configuration folder, an installation folder, a log folder and a monitoring folder under the software installation package execution file, setting corresponding function scripts under the function folders and setting function script parameters.
5. The heterogeneous cloud platform-based built-in service external connection method of claim 4, wherein the specific steps of step S143 are as follows:
S1431, setting a backup script under a backup folder, wherein the backup script is used for performing backup operation and recovery backup according to backup script parameters;
s1432, setting a configuration script under the configuration file, wherein the configuration script is used for providing functions of single-node configuration, cluster configuration, password modification and password resetting according to configuration script parameters;
s1433, setting a firewall configuration script under the firewall configuration folder, wherein the firewall configuration script is used for providing an opening port, a closing port, a firewall opening port and a firewall closing port according to firewall script parameters;
s1434, setting a software installation script under the installation folder, wherein the software installation script is used for providing a software installation function according to software installation script parameters;
s1435, a log viewing script is set under the log folder, and the log viewing script is used for providing a software installation log and a software running log viewing function according to log viewing script parameters;
s1436, a monitoring script is set under the monitoring folder, and the monitoring script is used for providing monitoring item query and configuration according to monitoring script parameters and querying monitoring data.
6. The utility model provides a built-in external device of service based on heterogeneous cloud platform which characterized in that includes:
The to-be-integrated software package obtaining and packaging module (1) comprises:
a to-be-integrated software package obtaining unit (1.1) for obtaining a to-be-integrated software package;
the software package name interface setting unit (1.2) is used for setting a software package name interface in the software package to be integrated;
the software package directory structure interface setting unit (1.3) is used for setting a software package directory structure interface in the software package to be integrated; the software package directory structure interface setting unit (1.3) includes:
the software state operation folder setting subunit is used for setting a software state operation folder below the to-be-integrated software package folder;
the software installation package folder setting subunit is used for setting a software installation package folder below the software package folder to be integrated;
the description document setting subunit is used for setting a description document under the folder of the software package to be integrated;
the software installation package execution file setting subunit is used for setting a software installation package execution file under the to-be-integrated software package folder;
the script interface setting unit (1.4) is used for setting a script interface in the software package to be integrated and generating a packaged software package; the software package name interface is used for transmitting a software name and a software version; the software package directory structure is used for transmitting software script paths and names in the software package; the script interface in the software package is used for transmitting script parameters and return values;
The software package built-in service module (2) is used for setting the packaged software package as built-in service of the heterogeneous cloud platform;
the external built-in service module (3) is used for setting the heterogeneous cloud platform to provide built-in services for users, providing software and versions of names of software packages depended on by the built-in services selected by the users according to the software package name interface, providing paths and names of all scripts in the built-in service dependent software packages selected by the users according to the software package directory structure interface, and providing transmission parameter interfaces of all scripts in the built-in service dependent software packages selected by the users according to the script interfaces in the software packages, wherein the transmission parameter interfaces of the scripts are used for starting the scripts.
7. The heterogeneous cloud platform-based built-in service peripheral device according to claim 6, wherein the script interface setting unit (1.4) comprises:
the software state operation folder script setting subunit is used for setting a software restart script, a software start script and a software shutdown script under the software state operation folder;
the software installation package compressed file setting subunit is used for setting a software installation package compressed file under a software installation package folder;
and the software installation package execution file lower folder setting subunit is used for setting a configuration folder, a firewall configuration folder, an installation folder, a log folder and a monitoring folder under the software installation package execution file, corresponding function scripts under the setting of each function folder and setting function script parameters.
CN202010790897.8A 2020-08-07 2020-08-07 Built-in service external connection method and device based on heterogeneous cloud platform Active CN111949310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010790897.8A CN111949310B (en) 2020-08-07 2020-08-07 Built-in service external connection method and device based on heterogeneous cloud platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010790897.8A CN111949310B (en) 2020-08-07 2020-08-07 Built-in service external connection method and device based on heterogeneous cloud platform

Publications (2)

Publication Number Publication Date
CN111949310A CN111949310A (en) 2020-11-17
CN111949310B true CN111949310B (en) 2022-07-19

Family

ID=73331864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010790897.8A Active CN111949310B (en) 2020-08-07 2020-08-07 Built-in service external connection method and device based on heterogeneous cloud platform

Country Status (1)

Country Link
CN (1) CN111949310B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113923107B (en) * 2021-10-14 2024-02-23 海南车智易通信息技术有限公司 Method, device, equipment and medium for automatically switching multiple channels of instant messaging

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016000623A1 (en) * 2014-07-01 2016-01-07 北京奇虎科技有限公司 Method, apparatus and system for initializing intelligent terminal device
CN105511872A (en) * 2015-11-30 2016-04-20 国云科技股份有限公司 Application automatic deployment method based on cloud computing platform
CN106293775A (en) * 2016-10-12 2017-01-04 广州视源电子科技股份有限公司 The automatic generation method of a kind of script and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016000623A1 (en) * 2014-07-01 2016-01-07 北京奇虎科技有限公司 Method, apparatus and system for initializing intelligent terminal device
CN105511872A (en) * 2015-11-30 2016-04-20 国云科技股份有限公司 Application automatic deployment method based on cloud computing platform
CN106293775A (en) * 2016-10-12 2017-01-04 广州视源电子科技股份有限公司 The automatic generation method of a kind of script and device

Also Published As

Publication number Publication date
CN111949310A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
CN105373410B (en) Base station software difference upgrade method and its device
US10255102B2 (en) Transaction control arrangement for device management system
US8548956B2 (en) Automated computing appliance cloning or migration
US8555273B1 (en) Network for updating electronic devices
CN103283209B (en) A kind of application service platform system and its implementation
US6122639A (en) Network device information collection and change detection
US20110276675A1 (en) Methods and systems for migrating networked systems across administrative domains
CN109298871B (en) Software version monitoring and deploying method for intelligent scheduling system of power grid
CN111949310B (en) Built-in service external connection method and device based on heterogeneous cloud platform
US9548891B2 (en) Configuration of network devices
US7720941B2 (en) Methods, systems and computer program products for network element information management
US20110107156A1 (en) Computer, computer system, and application execution method
CN106681861A (en) New environment isolation configuration data management method and system
CN105117263A (en) UNIX environment software system upgrading method
EP1709548A1 (en) Defining nodes in device management system
CN115344273B (en) Method and system for running application software based on shelf system
Cisco Error Messages
Cisco LightStream 2020 Command and Attribute Reference Guide
Cisco Error Messages
Cisco BASH Shell Reference
Cisco BASH Shell Reference
Cisco BASH Shell Reference
Cisco BASH Shell Reference
CN117527825B (en) Multi-channel synchronous shared data system for realizing integrated circuit design based on nfs protocol
CN114020292A (en) Virtual NAS system upgrading method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant