Through the previous article “the application life cycle management of the Choerodon pig toothed fish practice”, we have a basic understanding of the characteristics of application services and microservice architecture in the Choerodon platform. On this basis, this paper will introduce the function of importing application services in the Choerodon platform.
Background of importing application service features
Because Choerodon platform adopts microservice architecture, its applications will be decomposed into smaller and completely independent service components, which makes them have higher agility, scalability and availability. Based on these characteristics, we can componentize the application services developed in various projects, and achieve the effect of reusing application services, so as to avoid repeated wheel building.
For the sharing of application services between different projects in the same organization, we have already described in detail in the previous article (for specific steps, please refer to the application service sharing of the Choerodon pig toothed fish practice); however, if you want toSharing application services to a project in other organizationsOrChodonero will be developed in other platformsHow can we achieve this? This involves the following“Import application service”The function of.
Introduction of import application service function
Currently, there are three sources for importing application services, namely:Sharing applications(other projects in the organization are shared with the application services under this project)GitHubAndGitLab。 The purpose is to import the existing application services and their corresponding code repositories from these sources, and support the development based on the existing application services, so as to avoid the situation of repeated wheel building.
If there is an application service that meets the requirements of other projects in the same organization, it is only necessary to share the application service to this project through sharing rules; after importing the target application service in this project, the secondary development or deployment can be carried out on the basis of the original code base. (Note: after selecting to add an application service, the latest version shared by the application service will be selected by default; if the application service is imported directly, the code base and commit corresponding to the service version will be imported into the project; the version can be switched independently here.)
Import from GitHub
If the code of the target application service has been uploaded to GitHub, you only need to select “import from GitHub” in the import application service, and then enter the HTTP address of GitHub, then the application service repository can be cloned to the project for secondary development. Choerodon platform currently supports importing application services from GitHub public library, and cannot import empty libraries.
In addition, Choerodon also preset several common application service templates on GitHub for each project team to choose from. In the “import from GitHub” option, select “system preset template” as the import source. The application service template is composed of the code base of the same type of application service. After the corresponding application service template is referenced, the initial code base can be quickly created in gitlab. These include:
- Microservice microservice;
- Web front end microservicefront;
- Java library – javalib;
- Java library – springboot;
- Go library gotemplate;
- Automated test Mocha Choerodon mochatemplate;
In these templates, at least dockerfile, CI file and chart directory file are included.
Dockerfile is a script composed of a series of commands and parameters. These commands are applied to the basic image and finally create a new image, which is mainly used to control the application containerization process. The CI file in the template is mainly used to set all the stages of automatic integration after code submission. The chart directory file is used to package the containers in the platform and put them in k8s platform for management.
Import from gitlab
If the code of the target application service has been uploaded to gitlab, you only need to select “import from gitlab” in the import application service, and then enter the HTTP address of gitlab (if it is a private library, also enter the private token). Then the code warehouse of application service can be cloned into this project for secondary development. Currently, the Choerodon platform supports importing application services from public and private libraries of gitlab, and can not import empty libraries.
After the application service is imported successfully, the system will create a project as the initial code base of the application service in the gitlab group corresponding to the project by default, and then manage the application service through the corresponding page functions. At the same time, in the “code management” module, branch management, merge request management, version management, CI management, tag management and code quality monitoring can be carried out for the imported application services according to the standard development process.
The function of importing application services makes the application services in the Choerodon platform more flexible. It not only supports the sharing and reuse of application services among projects within the organization, but also realizes the reuse of existing application services across organizations and platforms by importing GitHub and gitlab, so as to give full play to the agility and scalability of microservice architecture.
About the pig toothed fish
As an agile full link technology platform for open-source multi cloud applications, choorodon is based on the open-source technologies kubernetes, istio, knave, gitlab and spring cloud to realize the integration of local and cloud environment, and realize the consistency of enterprise multi cloud / hybrid cloud application environment. By providing lean agile, continuous delivery, container environment, microservices, Devops and other capabilities, the platform helps the organization team to complete the software lifecycle management, so as to deliver more stable software faster and more frequently.
For more details, please refer to release notes and the official website.
You can also learn about the latest trends, product characteristics and participate in community contributions through the following community channels:
- Official website: http://choerodon.io
- Forum: http://forum.choerodon.io
Welcome to the choorodon pig toothed fish community to create an open ecological platform for enterprise digital services.
This article is written by Mao Zhiwei, Choerodon pig toothed fish community.