Creating a Common Component
This section describes how to create a static common application component using ServiceStage. For details, see Deploying a Component.
Prerequisites
- An application has been created cause components can only be added to applications. For details, see Creating an Application.
- If you create a microservice component based on the source code repository or template, create repository authorization first. For details, see Authorizing a Repository.
- If you create a microservice component based on the software package, upload the software package to the DevCloud software release repository, software repository or OBS bucket.
- Upload the software package to the DevCloud software release library.
- Upload the software package to the software repository. For details, see Uploading the Software Package.
- Upload the software package to OBS. For details, see Uploading a File.
Procedure
- Log in to ServiceStage, choose Application Management > Application List, select the created application, and click Create Component in the Operation column.
- Select Custom for Configuration Method, select Common for Component Type, and click Next.
- Select Runtime System and click Next.
Different frameworks support different runtime systems. For details, see Microservice Components.
- Select whether you want to save the preceding configurations as a template for future use.
- If Docker is not selected in 3, click Next, and go to 6. If Docker is selected in 3:
- Enter a component name.
- Create a component.
- Click Create Now to create a static component.
- Click Create and Deploy. The deployment page is displayed. For details, see Deploying a Component.
After the component is created, you can view the component status in the Component List on the application details page.
- Configure component information according to the following table. Parameters marked with an asterisk (*) are mandatory.
Table 1 Basic component information Parameter
Description
*Name
Component name.
*Source Code/Software Package
- Source code repository: Create authorization by referring to Authorizing a Repository and set the code source.
- JAR package/WAR package/ZIP package, set Upload Method.
Select the corresponding software package from the DevCloud software release repository. Upload the software package to the software release repository in advance.
Select the corresponding software package from the SWR software repository. Upload the software package to the software repository in advance. For details, see Uploading the Software Package.
Upload the software package to OBS. For details, see Uploading a File.
NOTE:Select JAR package if Java8 is selected as the Runtime System.
Select WAR package if Tomcat8 is selected as the Runtime System.
Select ZIP package if Nodejs8, Php7, or Python3 is selected as the Runtime System.
- Set the following parameters if Template is selected.
- ServiceStage provides template frameworks. You can select one to quickly create an application component.
- Set Code Archive. See Authorizing a Repository to create authorization and set Username/Organization and Repository.
NOTE:This parameter is invalid if you select Python3 for Runtime System in 3.
*Python framework
This parameter is mandatory if you select Python3 in 3.
Set Module Name and Variable Name for all Python frameworks except Python3-Django.
- If the entry point file of the Python project is server.py, Module Name is server.
- If the application function of the server.py entry point file of the Python project is app=get_wsgi_application(), Variable Name is app.
Custom Build
(Optional) Set Custom Build parameters for building application components.
- Create a component.
- Click Create Now to create a static component.
- Click Create and Deploy. The deployment page is displayed. For details, see Deploying a Component.
After the component is created, you can view the component status in the Component List on the Overview tab page.
Last Article: Creating a Web Component
Next Article: Deploying Application Components
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.