Creating a Common Component
This section describes how to create a static common application component using ServiceStage. For details about how to deploy a component, see Deploying a Component.
Prerequisites
- An application has been created because components can only be added to applications. For details, see Creating an Application.
- If you create a microservice component based on a source code repository or template, create repository authorization first. For details, see Authorizing a Repository.
- If you create a microservice component based on a software package, upload the software package to the OBS bucket.
Upload the software package to the OBS bucket. For details, see Uploading a File.
Procedure
- Log in to ServiceStage and choose Application Management > Application List.
- Select the created application and click Create Component in the Operation column.
- Select Custom for Configuration Method and select Common as the component type, and click Next.
- Select a 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.
- Check whether Docker is selected in 4.
- Create a Docker component.
- 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.
- No further action is required.
After the component is created, you can view the component status in the Component List on the Overview page.
- Configure component information according to the following table. Parameters marked with an asterisk (*) are mandatory.
Parameter
Description
*Name
Component name.
*Software Package
- If you select Source code repository, create authorization by referring to Authorizing a Repository and set the code source.
- If you select JAR package/WAR package/ZIP package, set Upload Method.
Upload the software package to the OBS bucket. For details, see Uploading a File.
NOTE:- Select JAR package if Java8 is selected for Select Runtime System.
- Select WAR package if Tomcat8 is selected for Select Runtime System.
- Select ZIP package if Nodejs8, Php7, or Python3 is selected for Select 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 Select Runtime System in 4.
*Python Framework
This parameter is mandatory if you select Python3 for Select Runtime System in 4.
Set Module Name and Variable Name for all 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.
Build
- If Source code repository is selected for Software Package, set Build parameters to build the application component.
Set Command and Organization, and select a cluster based on service requirements.
You can also specify Node Label to deliver the build job to a fixed node based on the node label. For details about how to add a node label, see Adding a Node Label.NOTICE:If Custom command is selected for Command:
Exercise caution when inputting sensitive information in the echo, cat, or debug command, or encrypt sensitive information to avoid information leakage.
- (Optional) If JAR package, WAR package, or ZIP package is selected for Software Package, set Build parameters to build the application component.
Set Organization and CPU Architecture, and select a cluster based on service requirements.
You can also specify Node Label to deliver the build job to a fixed node based on the node label. For details about how to add a node label, see Adding a Node Label.
- 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 page.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot