Background
Software warehouse and software management tool are generally used together for publishing and installing software
The software repository is a prepared directory, or a series of servers storing software, or a website, which contains software packages and index files.
The software management package tool can automatically locate and acquire the correct software package in a warehouse and provide management operations for the software package such as retrieval, installation, downloading, deletion and the like.
Common software repository and package management tools, such as apt, yum, pip, etc., provide software package publishing, storage, retrieval and installation functions.
The existing software warehouse and software management tool have the following technical problems:
(1) platform and development language constraints: the drug development software is generally complex, needs to be developed by combining multiple software development languages, and needs to provide an quart platform of SDK to facilitate the butt joint of partner enterprises. The existing software warehouse and package management system can only be used for a single development language or a single operating system platform, such as apt, yum can only be used for distribution of linux system software, and pip can only be used for distribution of software written by python.
(2) Lack of authorization functionality: the drug development software is generally delivered to the partner enterprise for use in an authorized manner, and therefore a software repository with an authorization function is required. Most of the existing software warehouse and package management systems are used for open source software, and because the open source software has the characteristic of free use, the existing software warehouse does not have a software authorization function or only has a simple account password verification function.
(3) Lack of baseline definition: the drug development software is generally complex and is formed by combining dozens of software packages, the release of the software packages needs to be controlled in a baseline defining mode, the externally-released packages are convenient to manage, the cooperation of internal software developers is also convenient, most of the existing software warehouse and package management systems manage a single software package and software, and no clear baseline definition exists.
Disclosure of Invention
In view of the above technical problems, the present invention provides a drug development software warehouse and a software package management system thereof, so as to implement cross-platform and multi-development-language software package management, and make the software distribution mode more concise.
The adopted technical scheme is as follows:
a drug development software repository, comprising: the system comprises a user authentication module, a software package uploading and creating index module, a baseline release management module, an authorization management module, a software package retrieving and downloading module, an adapter plug-in and a storage layer;
the user authentication module is used for enabling a user to access software warehouse resources by using a front-end command line tool or a web page after the user authenticates through a user name and a password or an api & secret;
the software package uploading and index creating module is characterized in that a user uploads the software package and metadata of the software package through a command line or a web front-end page, and the metadata comprises the following main fields: the method comprises the steps of packet type, packet name, storage source address, deployment environment (corresponding to four software development processes of maintenance, staging, and production), operation platform (linux-64, linux-32, win-64 and the like), packet version, software dependence and software description;
after receiving the data transmitted from the front end, the software warehouse stores the metadata as meta information into a relational database for indexing; selecting a corresponding adapter plug-in according to the packet type, and storing the packet file into a corresponding storage source, wherein if the packet of the conda type adopts the conda adapter plug-in and is stored into an object storage service conforming to the conda channel specification, the system is internally provided with several adapter plug-ins of conda, docker and general file package, and besides several adapter plug-ins provided by the system, a user can write other adapter plug-ins for docking more software storage sources;
the baseline release management module is used for releasing the software and keeping the working synchronization of developers of different software package components. The management of the baseline by the system is divided into two main functions of creating the baseline and improving the baseline.
The administrator can create a base line for a large software to be released on the web interface, and select the software package components forming the base line and the version of each software package to complete the release of the software base line. After a period of iteration, when the requirement of a new stable version is reached, the baseline boost may be selected, at which point the version number of each component may be changed and new software package components added.
The baseline is abstracted into a special software package to be managed and stored inside the system, when a user creates or raises the baseline at the front end, a package of a type of baseline is created inside the system, all components are used as dependency declarations of a baseline package, and the package is stored in an object storage service through a baseline adapter.
The system of the authorization management module adopts a RBAC (Role-Based Access Control) mode to carry out authorization management, and the account can retrieve and install corresponding software packages after being authorized. The authorization is divided into baseline authorization and software package authorization, and can authorize to access all software packages contained in a certain baseline or authorize a certain software package independently.
The retrieval and downloading software package module can retrieve and download the software package within an authorized range after the authorized account number is authenticated. The system first searches corresponding meta information in the relational database, and then the system selects corresponding adapter plug-ins to download the software package according to the package type.
The adapter plug-in adapts the different software warehouses at the bottom layer through the built-in adapter plug-in and the adapter plug-in provided by a user, so that the system can store and download different object storage systems and third-party software warehouses;
the storage layer is as follows: and storing the software package by using the object storage service and the third-party software warehouse as storage services. A relational database is used to store the software package index and other metadata.
The software package in the medicine research and development software warehouse is managed by the following software package management system, and the software package management system comprises the following modules:
the authentication module is used for authenticating a user name and a password of a user or appkey & secretekey and granting different authorities to different account numbers based on a RBAC (role-based access control) mode;
the system comprises a package management service module, a WEB service module and a service module, wherein the package management service module is based on flash and is used for providing REST WEB api and realizing the management of software packages by calling different adapters;
the adapter plug-in is used for adapting different software warehouses at the bottom layer through the built-in adapter plug-in and the adapter plug-in provided by a user, so that the system can store and download different object storage systems and third-party software warehouses;
a storage layer: the software package is stored using the object storage service and a third party software repository as a storage service (e.g., docker registry, conda channel). Storing the software package index and other metadata using a relational database;
a web front-end module: providing web front-end service, so that a user can directly perform package management, authorization management, baseline management and other operations on a web page;
a command line tool module: and a command line tool is provided, so that a user can search, install and upload the software package on a command line client.
The medicine research and development software warehouse and the software package management system thereof provided by the invention have the following technical effects:
1. the system can be used for butt joint of various object storage services and software warehouses in a plug-in mode, so that cross-platform software package management with multiple development languages is realized, and the limitation that the traditional software warehouse can only be used for a single system or language is broken.
2. The system adds the functions of authentication and software authorization, so that a user can conveniently authorize the software developed in a company to be used by a partner, and the software distribution mode is simpler.
3. The system adds a baseline management function, abstracts the baseline into a special software package, thereby achieving the management and control of baseline release baseline improvement, enabling the software release to be simpler, and simultaneously improving the cooperation efficiency of internal developers in the construction of different software packages developing the same software system.
Detailed Description
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
The software warehouse architecture as described in figure 1. The system is mainly realized on the basis of a web api and a command line client developed by a flash web development framework in python2.7 language and a web front-end interface developed on the basis of an electron framework. Where the package-indexed relational data is stored in postgresql hosted on the AWS RDS, the published software packages are stored in the AWS 3, and the docker image is stored in the AWS ECR.
There are two ways a user can access the software package, one is a command line client mode and one is a web interface mode.
With the command line client mode, the user can install the command line client through the Python environment. After logging into the system via the Pubtools login command. The software packages are pushed to the system through a pubtools publish command, or the software packages are downloaded through a pubtools install command, or a software package list in the system is viewed through a pubtools search command.
The user can also log in the website of the system through the browser and view and download the software package through the web interface. Firstly, selecting a software package to be viewed in a homepage, then clicking a package name to view a software package version list, and clicking viewing details of a certain version or downloading a tab to view and download the software package.
The user can only perform baseline management through a web page, and the user clicks the baseline management on a home page- > creates a baseline. The name of the software baseline to be created is then entered. And finally, selecting the software package and the corresponding version thereof contained in the baseline, and clicking to determine that the creation is completed. When a baseline lift is needed, the user clicks on baseline management on the home page- > selects baseline lift. And then enter the software baseline name to be changed. And finally, modifying the version of the software package contained in the baseline to a new baseline version, and clicking to determine that the baseline change is completed.