WO2023155536A1 - 一种系统适配方法、装置及电子设备和存储介质 - Google Patents

一种系统适配方法、装置及电子设备和存储介质 Download PDF

Info

Publication number
WO2023155536A1
WO2023155536A1 PCT/CN2022/135357 CN2022135357W WO2023155536A1 WO 2023155536 A1 WO2023155536 A1 WO 2023155536A1 CN 2022135357 W CN2022135357 W CN 2022135357W WO 2023155536 A1 WO2023155536 A1 WO 2023155536A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
target
container
installation script
download
Prior art date
Application number
PCT/CN2022/135357
Other languages
English (en)
French (fr)
Inventor
李美影
荆荣讯
邢良占
连爱朋
Original Assignee
苏州浪潮智能科技有限公司
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 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Publication of WO2023155536A1 publication Critical patent/WO2023155536A1/zh

Links

Images

Classifications

    • 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
    • G06F9/4451User profiles; Roaming
    • 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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Definitions

  • the present application relates to a system adaptation method and device, an electronic device, and a computer-readable storage medium.
  • PaaS provides the platform for software development as a service to users. Users do not need to manage or control the bottom layer, reducing the need for system management.
  • different companies use different server systems.
  • a PaaS product is often only designed, developed, deployed, and tested for a certain common operating system, and it is often difficult to deploy and use it on other systems. For example, if a product is designed for CentOS 7.5, the product can be deployed and run on CentOS 7.5. Because of problems such as software dependency conflicts, it may not be able to be deployed and run on CentOS 8.0 or other systems normally.
  • a good PaaS Products should be able to satisfy as many customers as possible, and should be able to deploy and run on various operating systems.
  • a system adaptation method, device, electronic equipment, and computer-readable storage medium are provided.
  • a system adaptation method comprising:
  • system list includes the target system that needs to be adapted
  • software list includes the target software that needs to be adapted
  • a system adaptation device comprising:
  • the obtaining module is used to obtain a system list and a software list; wherein, the system list includes target systems that need to be adapted, and the software list includes target software that needs to be adapted;
  • the configuration module is used to configure the software installation script corresponding to the target system and pull the container system image corresponding to the target system;
  • An operation module configured to run a virtualized system environment corresponding to the target system based on the container system image
  • the download module is used to download the target software to the download directory in the container by using the software installation script.
  • An electronic device comprising:
  • One or more processors configured to implement the steps of the system adaptation method described in any one of the above when executing computer-readable instructions.
  • a non-volatile computer-readable storage medium computer-readable instructions are stored on the computer-readable storage medium, and when the computer-readable instructions are executed by one or more processors, the system adaptation method described in any one of the above is implemented A step of.
  • Fig. 1 is a flowchart of a system adaptation method shown according to one or more embodiments
  • Fig. 2 is a structural diagram of a system adaptation device according to one or more embodiments
  • Fig. 3 is a structural diagram of an electronic device according to one or more embodiments.
  • Fig. 4 is a structural diagram of a non-volatile computer-readable storage medium according to one or more embodiments.
  • the embodiment of the present application discloses a system adaptation method, which improves the system adaptation efficiency.
  • FIG. 1 a flowchart of a system adaptation method according to one or more embodiments, as shown in FIG. 1, includes:
  • S101 Obtain a system list and a software list; wherein, the system list includes target systems that need to be adapted, and the software list includes target software that needs to be adapted;
  • the software installation script corresponding to the target system is configured, which includes the software installation instruction corresponding to the target system.
  • the software installation script corresponding to the centos system includes the yum installation instruction
  • the software installation script corresponding to the ubuntu system includes the apt-get installation instruction
  • the software installation script corresponding to the SUSE system includes the zypper installation instruction, etc.
  • the configuration of the command-line package manager can also be set so that the package cache will not be deleted after the software is installed.
  • the docker run command can complete the installation and startup of the virtualization system in seconds, and the container and the host share the network without additional IP configuration.
  • S104 Utilize the software installation script to download the target software to the download directory in the container.
  • the target software in the software list is downloaded to the download directory by executing the software installation instruction in the software installation script. Download and install the target software that needs to be adapted in the corresponding container of each system, and the adaptation of the offline software package is completed.
  • this step includes: mounting the mapping relationship between the host directory and the download directory in the container, and mounting the software list, software installation script and download directory; using the software installation script to The target software in the software inventory is downloaded to the download directory.
  • the -v command can be used to mount the mapping relationship between the host directory and the download directory in the container, and the -v command can be used to mount the software list, software installation script and download directory.
  • the -v command can be used to mount the software list, software installation script and download directory.
  • docker run-id --name centos75-v/home/software_list:/home/-v/home/install.sh:/home/-v/home/download_centos75:/home/centos:7.5/bin/bash /home/install.sh can run a centos7.5 container and complete the software download installation and adaptation.
  • the script will copy the cached offline package to /home/download_centos75, and at the same time on the host
  • the adapted offline package is obtained, that is, the target software is adapted in the host directory based on the mapping relationship.
  • step S101 needs to be manually configured, and other steps can be automatically judged and processed by scripts.
  • the system adaptation method provided by the embodiment of this application is based on the container virtualization technology to replace the work of installing a virtual machine or server system, configuring an IP address, etc.
  • the entire adaptation process only requires the user to fill in the list of systems to be adapted and the software to be adapted
  • the checklist can automatically complete all the adaptation work, improving the efficiency of system adaptation.
  • steps in the flow chart of FIG. 1 are displayed sequentially as indicated by the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in Fig. 1 may include multiple sub-steps or multiple stages, these sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, the execution of these sub-steps or stages The order is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • a system adaptation device provided in an embodiment of the present application is introduced below, and a system adaptation device described below and a system adaptation method described above may refer to each other.
  • FIG. 2 a structural diagram of a system adaptation device according to one or more embodiments, as shown in FIG. 2, includes:
  • An acquisition module 201 configured to acquire a system list and a software list; wherein, the system list includes target systems that need to be adapted, and the software list includes target software that needs to be adapted;
  • the configuration module 202 is configured to configure the software installation script corresponding to the target system, and pull the container system image corresponding to the target system;
  • the running module 203 is used to run the virtualization system environment corresponding to the target system based on the container system image;
  • the download module 204 is configured to download the target software to the download directory in the container by using the software installation script.
  • the system adaptation device provided by the embodiment of this application is based on the container virtualization technology to replace the work of installing a virtual machine or server system, configuring an IP address, etc.
  • the entire adaptation process only requires the user to fill in the list of systems to be adapted and the software to be adapted
  • the checklist can automatically complete all the adaptation work, improving the efficiency of system adaptation.
  • configuration module 202 includes:
  • a configuration unit configured to configure a software installation script corresponding to the target system
  • the pulling unit is used to use the docker pull command to pull the container system image corresponding to the target system.
  • the running module 203 is specifically a module that uses the docker run command to run the virtualization system environment corresponding to the target system based on the container system image.
  • download module 204 includes:
  • a mount unit configured to mount the mapping relationship between the host directory and the download directory in the container, and mount the software list, software installation script and download directory;
  • the download unit is used to download the target software in the software list to the download directory by using the software installation script.
  • the software installation script includes software installation instructions corresponding to the target system
  • the downloading unit is specifically a unit that downloads the target software in the software list to the download directory by executing the software installation instructions in the software installation script.
  • the download module 204 also includes:
  • the adaptation unit is configured to adapt the target software in the host directory based on the mapping relationship.
  • the mount unit specifically uses the -v command to mount the mapping relationship between the host directory and the download directory in the container, and uses the -v command to mount the software list, software installation script and download The unit of the directory.
  • each module in the above-mentioned system adapting device may be fully or partially realized by software, hardware or a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, and can also be stored in the memory of the computer device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
  • FIG. 3 is a structural diagram of an electronic device according to one or more embodiments. As shown in Figure 3, the electronic equipment includes:
  • Communication interface 1 which can exchange information with other devices such as network devices;
  • the processor 2 is connected to the communication interface 1 to implement information interaction with other devices, and is used to execute the system adaptation method provided by one or more of the above technical solutions when running computer-readable instructions. Instead, computer readable instructions are stored on the memory 3 .
  • bus system 4 is used to realize connection and communication between these components.
  • the bus system 4 also includes a power bus, a control bus and a status signal bus.
  • the various buses are labeled as bus system 4 in FIG. 3 .
  • the memory 3 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of such data include: any computer readable instructions for operating on an electronic device.
  • the memory 3 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories.
  • the non-volatile memory can be read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory) Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (Flash Memory), Magnetic Surface Memory , CD, or CD-ROM (Compact Disc Read-Only Memory); magnetic surface storage can be disk storage or tape storage.
  • the volatile memory may be random access memory (RAM, Random Access Memory), which is used as an external cache.
  • RAM random access memory
  • RAM Random Access Memory
  • many forms of RAM are available, such as Static Random Access Memory (SRAM, Static Random Access Memory), Synchronous Static Random Access Memory (SSRAM, Synchronous Static Random Access Memory), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, SyncLink Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory ).
  • the memory 3 described in the embodiment of the present application is intended to include but not limited to these and any other suitable types of memory.
  • Processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 2 or instructions in the form of software.
  • the aforementioned processor 2 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.
  • the processor 2 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • a general purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in the storage medium, and the storage medium is located in the memory 3, and the processor 2 reads the program in the memory 3, and completes the steps of the foregoing method in combination with its hardware.
  • the embodiment of the present application also provides a storage medium, that is, a computer storage medium, specifically a non-transitory computer-readable storage medium 40, for example including stored computer-readable instructions 41, the above-mentioned computer
  • the readable instructions 41 can be executed by one or more processors, so as to complete the steps of the system adaptation method in any one or more embodiments described above.
  • the computer-readable storage medium can be memories such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
  • the electronic device and computer-readable storage medium provided by the embodiment of the present application are based on the container virtualization technology to replace the work of installing a virtual machine or server system and configuring an IP address.
  • the entire adaptation process only requires the user to fill in the list of systems to be adapted and the The adapted software list can automatically complete all the adaptation work, improving the efficiency of system adaptation.
  • the above-mentioned integrated units of the present application are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium and includes several instructions for Make an electronic device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media capable of storing program codes such as removable storage devices, ROM, RAM, magnetic disks or optical disks.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

一种系统适配方法、装置及一种电子设备和计算机可读存储介质,该方法包括:获取系统清单和软件清单(S101);其中,系统清单包括需要适配的目标系统,软件清单包括需要适配的目标软件;配置目标系统对应的软件安装脚本,并拉取目标系统对应的容器系统镜像(S102);基于容器系统镜像运行目标系统对应的虚拟化系统环境(S103);利用软件安装脚本将目标软件下载至容器内的下载目录中(S104)。

Description

一种系统适配方法、装置及电子设备和存储介质
相关申请的交叉引用
本申请要求于2022年02月17日提交中国专利局,申请号为202210144060.5,申请名称为“一种系统适配方法、装置及电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种系统适配方法、装置及一种电子设备和一种计算机可读存储介质。
背景技术
随着信息技术的快速发展与广泛应用,PaaS解决方案越来越常见,PaaS将软件研发的平台作为一种服务提供给使用者,使用者不需要管理或控制底层,减少了系统管理的需求。然而不同公司使用的服务器系统不尽相同,一款PaaS产品往往只针对某一款常见的操作系统进行的设计、开发、部署、测试等,往往很难在其他系统上部署与使用起来。例如一款产品针对CentOS7.5设计的,则该产品能够部署运行在CentOS7.5上,因为软件依赖冲突等问题很可能无法正常部署与运行到CentOS8.0或其他系统上,一款好的PaaS产品应该能够满足尽可能多的客户,应该能够部署与运行到各种操作系统上。
在相关技术中,对于产品系统适配需要将PaaS产品在需要适配的系统中联网部署一遍,获取该系统下能够安装运行的离线基础软件包。安装联网的虚拟机或者服务器系统、配置IP地址、软件安装与保存、软件离线包拷贝。其中虚拟机搭建需要安装虚拟机工作站或其他,然后下载系统iso镜像进行挂载安装,安装过程需要进行语言、时区、分区、账号密码等配置,发明人意识到,整个过程需要大量人为干预十分缓慢。安装完操作系统后开始配置IP地址,需要找到网络配置文件进行修改,需要配置ip地址、网关、子网掩码等,以便能够联网与被访问,需要大量操作,过程十分耗时。软件离线包的拷贝需要将包从自建的虚拟机或系统中拷贝出来,需要人为操作且过程也比较耗时。
发明内容
根据本申请公开的各种实施例,提供一种系统适配方法、装置、电子设备和计算机 可读存储介质。
一种系统适配方法,包括:
获取系统清单和软件清单;其中,系统清单包括需要适配的目标系统,软件清单包括需要适配的目标软件;
配置目标系统对应的软件安装脚本,并拉取目标系统对应的容器系统镜像;
基于容器系统镜像运行目标系统对应的虚拟化系统环境;以及
利用软件安装脚本将目标软件下载至容器内的下载目录中。
一种系统适配装置,包括:
获取模块,用于获取系统清单和软件清单;其中,系统清单包括需要适配的目标系统,软件清单包括需要适配的目标软件;
配置模块,用于配置目标系统对应的软件安装脚本,并拉取目标系统对应的容器系统镜像;
运行模块,用于基于容器系统镜像运行目标系统对应的虚拟化系统环境;以及
下载模块,用于利用软件安装脚本将目标软件下载至容器内的下载目录中。
一种电子设备,包括:
存储器,用于存储计算机可读指令;
一个或多个处理器,用于执行计算机可读指令时实现如上任一项所述的系统适配方法的步骤。
一种非易失性计算机可读存储介质,计算机可读存储介质上存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时实现如上任一项所述的系统适配方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。附图是用来提供对本申请的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本申请,但并不构成对本申请的限制。在附图中:
图1为根据一个或多个实施例示出的系统适配方法的流程图;
图2为根据一个或多个实施例示出的系统适配装置的结构图;
图3为根据一个或多个实施例示出的电子设备的结构图;
图4为根据一个或多个实施例示出的非易失性计算机可读存储介质的结构图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。另外,在本申请实施例中,“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本申请实施例公开了一种系统适配方法,提高了系统适配效率。
参见图1,根据一个或多个实施例示出的一种系统适配方法的流程图,如图1所示,包括:
S101:获取系统清单和软件清单;其中,系统清单包括需要适配的目标系统,软件清单包括需要适配的目标软件;
在本步骤中,配置需要适配的系统清单OS_list文件,其中包括需要适配的目标系统,例如:
1.centos:7.5
2.ubuntu:20.04
进一步的,配置需要适配的软件清单software_list,其中包括需要适配的目标软件,例如:
1.pciutils
2.perl
3.net-tools
S102:配置目标系统对应的软件安装脚本,并拉取目标系统对应的容器系统镜像;
可以理解的是,不同的系统对应的操作指令不同,因此,在本步骤中,配置目标系统对应的软件安装脚本,其中包括目标系统对应的软件安装指令。例如,centos系统对应的软件安装脚本中包含yum安装指令,ubuntu系统对应的软件安装脚本中包含apt-get安装指令,SUSE系统对应的软件安装脚本中包含zypper安装指令等。进一步的,还可以设置命令行软件包管理器配置,使得软件安装后软件包缓存下来不删除。
进一步的,解析系统清单后,可以利用docker pull命令拉取目标系统对应的容器系 统镜像,例如,执行cat OS_list|xargs-n 1docker pull即可完成不同镜像的拉取工作。
S103:基于容器系统镜像运行目标系统对应的虚拟化系统环境;
在本步骤中,可以利用docker run命令基于容器系统镜像运行目标系统对应的虚拟化系统环境。docker run命令可以在秒级完成虚拟化系统的安装与启动工作,且容器与宿主机共享网络,无需额外配置IP。
S104:利用软件安装脚本将目标软件下载至容器内的下载目录中。
在本步骤中,通过执行软件安装脚本中的软件安装指令将软件清单中的目标软件下载至下载目录中。在各系统对应的容器中将需要适配的目标软件均下载安装一遍,即完成了离线软件包的适配工作。
进一步的,可以将下载目录挂载出来,这样就免去了将离线包从系统中拷贝出来的操作。也即在一个或多个实施例中,本步骤包括:挂载宿主机目录与容器内的下载目录之间的映射关系,并挂载软件清单、软件安装脚本和下载目录;利用软件安装脚本将软件清单中的目标软件下载至下载目录中。
在具体实施中,可以利用-v命令挂载宿主机目录与容器内的下载目录之间的映射关系,并利用-v命令挂载软件清单、软件安装脚本和下载目录。例如,通过docker run-id--name centos75-v/home/software_list:/home/-v/home/install.sh:/home/-v/home/download_centos75:/home/centos:7.5/bin/bash/home/install.sh即可运行起一个centos7.5的容器并完成软件下载安装与适配,适配结束后脚本会将缓存的离线包拷贝至/home/download_centos75下,与此同时在宿主机上就得到了适配好的离线包,也即基于映射关系在宿主机目录中适配目标软件。
可见,在本实施例中,只有步骤S101需要人为配置,其他步骤均可由脚本自动化判断与处理完成。
本申请实施例提供的系统适配方法,基于容器虚拟化技术替代安装虚拟机或者服务器系统、配置IP地址等工作,整个适配过程只需要用户填写需要适配的系统清单与需要适配的软件清单即可自动化完成所有适配工作,提高了系统适配效率。
应该理解的是,虽然图1的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或 者交替地执行。
下面对本申请实施例提供的一种系统适配装置进行介绍,下文描述的一种系统适配装置与上文描述的一种系统适配方法可以相互参照。
参见图2,根据一个或多个实施例示出的一种系统适配装置的结构图,如图2所示,包括:
获取模块201,用于获取系统清单和软件清单;其中,系统清单包括需要适配的目标系统,软件清单包括需要适配的目标软件;
配置模块202,用于配置目标系统对应的软件安装脚本,并拉取目标系统对应的容器系统镜像;
运行模块203,用于基于容器系统镜像运行目标系统对应的虚拟化系统环境;以及
下载模块204,用于利用软件安装脚本将目标软件下载至容器内的下载目录中。
本申请实施例提供的系统适配装置,基于容器虚拟化技术替代安装虚拟机或者服务器系统、配置IP地址等工作,整个适配过程只需要用户填写需要适配的系统清单与需要适配的软件清单即可自动化完成所有适配工作,提高了系统适配效率。
在一个或多个实施例中,配置模块202包括:
配置单元,用于配置目标系统对应的软件安装脚本;以及
拉取单元,用于利用docker pull命令拉取目标系统对应的容器系统镜像。
在一个或多个实施例中,运行模块203具体为利用docker run命令基于容器系统镜像运行目标系统对应的虚拟化系统环境的模块。
在一个或多个实施例中,下载模块204包括:
挂载单元,用于挂载宿主机目录与容器内的下载目录之间的映射关系,并挂载软件清单、软件安装脚本和下载目录;以及
下载单元,用于利用软件安装脚本将软件清单中的目标软件下载至下载目录中。
在一个或多个实施例中,软件安装脚本包括目标系统对应的软件安装指令,下载单元具体为通过执行软件安装脚本中的软件安装指令将软件清单中的目标软件下载至下载目录中的单元。
在一个或多个实施例中,下载模块204还包括:
适配单元,用于基于映射关系在宿主机目录中适配目标软件。
在一个或多个实施例中,挂载单元具体为利用-v命令挂载宿主机目录与容器内的下载目录之间的映射关系,并利用-v命令挂载软件清单、软件安装脚本和下载目录的单元。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的 实施例中进行了详细描述,此处将不做详细阐述说明。关于系统适配装置的具体限定可以参见上文中对于系统适配方法的限定,在此不再赘述。上述系统适配装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
基于上述程序模块的硬件实现,且为了实现本申请实施例的方法,本申请实施例还提供了一种电子设备,图3为根据一个或多个实施例示出的一种电子设备的结构图,如图3所示,电子设备包括:
通信接口1,能够与其它设备比如网络设备等进行信息交互;
处理器2,与通信接口1连接,以实现与其它设备进行信息交互,用于运行计算机可读指令时,执行上述一个或多个技术方案提供的系统适配方法。而计算机可读指令存储在存储器3上。
当然,实际应用时,电子设备中的各个组件通过总线系统4耦合在一起。可理解,总线系统4用于实现这些组件之间的连接通信。总线系统4除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图3中将各种总线都标为总线系统4。
本申请实施例中的存储器3用于存储各种类型的数据以支持电子设备的操作。这些数据的示例包括:用于在电子设备上操作的任何计算机可读指令。
可以理解,存储器3可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速 率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本申请实施例描述的存储器3旨在包括但不限于这些和任意其它适合类型的存储器。
上述本申请实施例揭示的方法可以应用于处理器2中,或者由处理器2实现。处理器2可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器2中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器2可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器2可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器3,处理器2读取存储器3中的程序,结合其硬件完成前述方法的步骤。
处理器2执行程序时实现本申请实施例的各个方法中的相应流程,为了简洁,在此不再赘述。
在一个或多个实施例中,本申请实施例还提供了一种存储介质,即计算机存储介质,具体为非暂态计算机可读存储介质40,例如包括存储的计算机可读指令41,上述计算机可读指令41可由一个或多个处理器执行,以完成前述任意一个或多个实施例的系统适配方法的步骤。计算机可读存储介质可以是FRAM、ROM、PROM、EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器。
本申请实施例提供的电子设备和计算机可读存储介质,基于容器虚拟化技术替代安装虚拟机或者服务器系统、配置IP地址等工作,整个适配过程只需要用户填写需要适配的系统清单与需要适配的软件清单即可自动化完成所有适配工作,提高了系统适配效率。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实 施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台电子设备(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种系统适配方法,其特征在于,包括:
    获取系统清单和软件清单;其中,所述系统清单包括需要适配的目标系统,所述软件清单包括需要适配的目标软件;
    配置所述目标系统对应的软件安装脚本,并拉取所述目标系统对应的容器系统镜像;
    基于所述容器系统镜像运行所述目标系统对应的虚拟化系统环境;以及
    利用所述软件安装脚本将所述目标软件下载至容器内的下载目录中。
  2. 根据权利要求1所述的方法,其特征在于,所述获取系统清单和软件清单,包括:
    配置需要适配的系统清单;以及
    配置需要适配的软件清单。
  3. 根据权利要求1所述的方法,其特征在于,所述配置所述目标系统对应的软件安装脚本,包括:
    配置所述目标系统对应的软件安装脚本中包含的软件安装指令。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    设置命令行软件包管理器配置,以使得响应于所述目标软件安装完成,缓存所述目标软件的软件包。
  5. 根据权利要求1所述的方法,其特征在于,所述拉取所述目标系统对应的容器系统镜像,包括:
    利用docker pull命令拉取所述目标系统对应的容器系统镜像。
  6. 根据权利要求1所述的方法,其特征在于,所述基于所述容器系统镜像运行所述目标系统对应的虚拟化系统环境,包括:
    利用docker run命令基于所述容器系统镜像运行所述目标系统对应的虚拟化系统环境。
  7. 根据权利要求1所述的方法,其特征在于,所述利用所述软件安装脚本将所述目标软件下载至容器内的下载目录中,包括:
    挂载宿主机目录与容器内的下载目录之间的映射关系,并挂载所述软件清单、所述软件安装脚本和所述下载目录;以及
    利用所述软件安装脚本将所述软件清单中的目标软件下载至所述下载目录中。
  8. 根据权利要求7所述的方法,其特征在于,所述软件安装脚本包括所述目标系 统对应的软件安装指令,所述利用所述软件安装脚本将所述软件清单中的目标软件下载至所述下载目录中,包括:
    通过执行所述软件安装脚本中的软件安装指令将所述软件清单中的目标软件下载至所述下载目录中。
  9. 根据权利要求7所述的方法,其特征在于,所述利用所述软件安装脚本将所述软件清单中的目标软件下载至所述下载目录中之后,还包括:
    基于所述映射关系在所述宿主机目录中适配所述目标软件。
  10. 根据权利要求7所述的方法,其特征在于,所述挂载宿主机目录与容器内的下载目录之间的映射关系,并挂载所述软件清单、所述软件安装脚本和所述下载目录,包括:
    利用-v命令挂载宿主机目录与容器内的下载目录之间的映射关系,并利用-v命令挂载所述软件清单、所述软件安装脚本和所述下载目录。
  11. 一种系统适配装置,其特征在于,包括:
    获取模块,用于获取系统清单和软件清单;其中,所述系统清单包括需要适配的目标系统,所述软件清单包括需要适配的目标软件;
    配置模块,用于配置所述目标系统对应的软件安装脚本,并拉取所述目标系统对应的容器系统镜像;
    运行模块,用于基于所述容器系统镜像运行所述目标系统对应的虚拟化系统环境;以及
    下载模块,用于利用所述软件安装脚本将所述目标软件下载至容器内的下载目录中。
  12. 根据权利要求11所述的装置,其特征在于,所述下载模块还用于:
    挂载宿主机目录与容器内的下载目录之间的映射关系,并挂载所述软件清单、所述软件安装脚本和所述下载目录;以及
    利用所述软件安装脚本将所述软件清单中的目标软件下载至所述下载目录中。
  13. 一种电子设备,其特征在于,包括:
    存储器,用于存储计算机可读指令;
    一个或多个处理器,用于执行所述计算机可读指令以实现:获取系统清单和软件清单;其中,所述系统清单包括需要适配的目标系统,所述软件清单包括需要适配的目标软件;配置所述目标系统对应的软件安装脚本,并拉取所述目标系统对应的容器系统镜像;基于所述容器系统镜像运行所述目标系统对应的虚拟化系统环境;以及利 用所述软件安装脚本将所述目标软件下载至容器内的下载目录中。
  14. 根据权利要求13所述的电子设备,一个或多个所述处理器用于执行所述计算机可读指令以在实现所述获取系统清单和软件清单时,实现配置需要适配的系统清单;以及配置需要适配的软件清单。
  15. 根据权利要求13所述的电子设备,一个或多个所述处理器用于执行所述计算机可读指令以在实现配置所述目标系统对应的软件安装脚本时,实现配置所述目标系统对应的软件安装脚本中包含的软件安装指令。
  16. 根据权利要求13所述的电子设备,一个或多个所述处理器还用于执行所述计算机可读指令以实现设置命令行软件包管理器配置,以使得响应于所述目标软件安装完成,缓存所述目标软件的软件包。
  17. 根据权利要求13所述的电子设备,一个或多个所述处理器用于执行所述计算机可读指令以在实现拉取所述目标系统对应的容器系统镜像时,实现利用docker pull命令拉取所述目标系统对应的容器系统镜像。
  18. 根据权利要求13所述的电子设备,一个或多个所述处理器用于执行所述计算机可读指令以在实现利用所述软件安装脚本将所述目标软件下载至容器内的下载目录中时,实现挂载宿主机目录与容器内的下载目录之间的映射关系,并挂载所述软件清单、所述软件安装脚本和所述下载目录;以及利用所述软件安装脚本将所述软件清单中的目标软件下载至所述下载目录中。
  19. 根据权利要求18所述的电子设备,所述软件安装脚本包括所述目标系统对应的软件安装指令,一个或多个所述处理器用于执行所述计算机可读指令以在实现所述利用所述软件安装脚本将所述软件清单中的目标软件下载至所述下载目录中时,实现通过执行所述软件安装脚本中的软件安装指令将所述软件清单中的目标软件下载至所述下载目录中。
  20. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1至10任一项所述的方法的步骤。
PCT/CN2022/135357 2022-02-17 2022-11-30 一种系统适配方法、装置及电子设备和存储介质 WO2023155536A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210144060.5A CN114201239B (zh) 2022-02-17 2022-02-17 一种系统适配方法、装置及电子设备和存储介质
CN202210144060.5 2022-02-17

Publications (1)

Publication Number Publication Date
WO2023155536A1 true WO2023155536A1 (zh) 2023-08-24

Family

ID=80645483

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135357 WO2023155536A1 (zh) 2022-02-17 2022-11-30 一种系统适配方法、装置及电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN114201239B (zh)
WO (1) WO2023155536A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117369953A (zh) * 2023-12-08 2024-01-09 中电云计算技术有限公司 镜像同步方法、装置、设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114201239B (zh) * 2022-02-17 2022-05-17 苏州浪潮智能科技有限公司 一种系统适配方法、装置及电子设备和存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648741A (zh) * 2016-10-18 2017-05-10 广州视睿电子科技有限公司 一种应用系统部署方法及装置
CN110955494A (zh) * 2019-11-15 2020-04-03 北京浪潮数据技术有限公司 一种虚拟机磁盘镜像构建方法、装置、设备、介质
CN112181588A (zh) * 2020-09-18 2021-01-05 济南浪潮数据技术有限公司 一种应用容器化方法、装置及电子设备和存储介质
CN113238766A (zh) * 2021-05-28 2021-08-10 浪潮电子信息产业股份有限公司 一种软件部署方法、装置及相关设备
US20210365256A1 (en) * 2020-05-22 2021-11-25 International Business Machines Corporation Remote installation, customization and deployment of mainframe components
CN114201239A (zh) * 2022-02-17 2022-03-18 苏州浪潮智能科技有限公司 一种系统适配方法、装置及电子设备和存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8261258B1 (en) * 2005-10-28 2012-09-04 Google Inc. Common installer client
CN108847950B (zh) * 2018-04-02 2022-06-07 重庆金融资产交易所有限责任公司 电子装置、云系统软件自动部署方法及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648741A (zh) * 2016-10-18 2017-05-10 广州视睿电子科技有限公司 一种应用系统部署方法及装置
CN110955494A (zh) * 2019-11-15 2020-04-03 北京浪潮数据技术有限公司 一种虚拟机磁盘镜像构建方法、装置、设备、介质
US20210365256A1 (en) * 2020-05-22 2021-11-25 International Business Machines Corporation Remote installation, customization and deployment of mainframe components
CN112181588A (zh) * 2020-09-18 2021-01-05 济南浪潮数据技术有限公司 一种应用容器化方法、装置及电子设备和存储介质
CN113238766A (zh) * 2021-05-28 2021-08-10 浪潮电子信息产业股份有限公司 一种软件部署方法、装置及相关设备
CN114201239A (zh) * 2022-02-17 2022-03-18 苏州浪潮智能科技有限公司 一种系统适配方法、装置及电子设备和存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117369953A (zh) * 2023-12-08 2024-01-09 中电云计算技术有限公司 镜像同步方法、装置、设备及存储介质
CN117369953B (zh) * 2023-12-08 2024-03-15 中电云计算技术有限公司 镜像同步方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN114201239B (zh) 2022-05-17
CN114201239A (zh) 2022-03-18

Similar Documents

Publication Publication Date Title
WO2023155536A1 (zh) 一种系统适配方法、装置及电子设备和存储介质
US8417796B2 (en) System and method for transferring a computing environment between computers of dissimilar configurations
US20100205604A1 (en) Systems and methods for efficiently running multiple instances of multiple applications
US20090210869A1 (en) Advanced packaging and deployment of virtual appliances
US20100235813A1 (en) Method and system for configuring software modules to execute in an execution environment
CN111782339B (zh) 一种容器创建方法、装置、电子设备及存储介质
US8171116B2 (en) Configuring processing entities according to their roles in a data processing system with a distributed architecture
WO2018054351A1 (zh) 操作系统的安装
JP6089065B2 (ja) アップデート方法及びコンピュータシステム
CN110908753B (zh) 一种智能融合的云桌面服务器、客户端及系统
US20120102159A1 (en) Resource conflict avoidance system and method
WO2022213850A1 (zh) 安卓运行环境构建的方法及装置
JP2013522788A (ja) コンピュータシステムにおけるオペレーティングシステムの通信ネットワーク経由でのロードおよびブートを最適化するための方法、コンピュータプログラム、および装置
US9747091B1 (en) Isolated software installation
JP2007052519A (ja) 情報処理装置および方法、並びにプログラム
US20210392039A1 (en) Automated Initialization Of Bare Metal Servers
CN112130917A (zh) 远程加载系统镜像方法
WO2023098052A1 (zh) 一种服务器运维方法、装置、设备及存储介质
CN114756290B (zh) 一种操作系统安装方法、设备及可读存储介质
CN113296805A (zh) 一种辅助容器实现热升级的方法及装置
US20230229480A1 (en) Provisioning dpu management operating systems using firmware capsules
CN115291946A (zh) 鸿蒙系统移植方法、装置、电子设备及可读介质
US20110314471A1 (en) Manufacturing Information Handling Systems
CN114115917A (zh) 操作系统安装方法及装置
JP7410268B2 (ja) コンテナ・ベースの仮想化システムに関する方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22926840

Country of ref document: EP

Kind code of ref document: A1