Deploying a Component
This section describes how to deploy static components in the corresponding environment.
When creating an application component, you can also select Create and Deploy. The deployment procedure is the same as that described in this section.
Prerequisites
- An application component has been created or is being created, and has been configured. For details, see Creating an Application Component.
- The environment has been created. For details, see Environment Management.
- If you deploy components based on software packages or image packages, you need to upload the software packages or image packages.
- Upload the software package to the OBS bucket. For details, see Uploading a File.
- Upload the image package to the image repository. For details, see Uploading an Image.
Procedure
- Log in to ServiceStage and choose Application Management > Application List.
- Click an application. The Overview page is displayed.
- On the Component List tab, select a component and click Deploy in the Operation column.
- Set basic parameters. Parameters marked with an asterisk (*) are mandatory.
Parameter
Description
*Environment
Select an environment.
*Version
Component version number, for example, 1.0.0.
Description
Description of the component.
*Deployment System
Supports Cloud Container Engine and VM.
For details, see Deployment Mode.
*Resource Type
This parameter takes effect only when VM is selected for Deployment System.
You can select Elastic cloud server.
*Basic Resource
The basic resources contained in the selected environment are automatically loaded. Select the resources as required.
*Instances
Number of instances in an application component. An application component can have one or more instances. You can specify the number of instances as required.
Configuring multiple instances for an application component ensures high reliability of the application component. For such a component, if an instance is faulty, the component can still run properly.
NOTE:- This parameter is invalid when VM is selected for Deployment System.
- The number of component instances is determined by the number of Basic Resources.
- When the quota for the number of microservice instances specified by the engine specifications is about to be used up, the engine allows component deployment operations that exceed the remaining quota to succeed at the same time to ensure availability. Expand the capacity of the engine as soon as possible to prevent component deployment failures.
*Resource Quota
Components cannot be scheduled to nodes whose residual resources are fewer than the requested amount. For details about how to configure the request and limit parameters, see Managing Resources for Containers.
You can customize CPU and Memory as required.
NOTE:- This parameter is not displayed when the component type is Common and the runtime system is Docker.
- This parameter is invalid when VM is selected for Deployment System.
Component Status
Sets the component status as required.
NOTE:This parameter is available when the component type is Common, the runtime system is Docker, and Cloud Container Engine is selected for Deployment System.
- Click Next to configure the component.
- When the component type is Common and the runtime system is Docker, perform the following operations:
- Select an image. Multiple containers are supported. You can click Add Container to add an image.
- Select an image version.
- Enter a container name.
- (Optional) Set Resource Quota. Components cannot be scheduled to nodes whose residual resources are fewer than the requested amount. For details about how to configure the request and limit parameters, see Managing Resources for Containers. You can customize CPU and Memory as required.
- (Optional) Set Advanced Settings.
- Choose Advanced Settings > Component Configuration and set environment variables. For details, see Configuring Environment Variables of a Component.
- Choose Advanced Settings > Deployment Configuration.
- Set Startup Command and Lifecycle. For details, see Configuring the Lifecycle of an Application.
- Set Data Storage. For details, see Configuring Data Storage.
- Choose Advanced Settings > O&M Monitoring.
- Set Log Collection. For details, see Configuring a Log Policy of an Application.
- Set Health Check. For details, see Configuring Health Check.
- (Optional) Enable Public Network Access.
- Set Public Network Load Balancer.
Select an existing ELB resource in the environment.
If no ELB resource exists, click Add One. On the Edit Environment page that is displayed, click Add Optional Resource to add created ELB resources to the environment.
For details about how to create an ELB resource, see Creating a Load Balancer.
- (Optional) Set HTTPS.
If HTTPS is enabled, click Use existing to select an existing certificate.
If no certificate exists, click Create new to create a server certificate. For details about how to create a certificate, see Creating a Certificate.
- Set Domain Name.
Enter a customize domain name. For details, see Configuring Domain Name Mappings.
- Set Listening Port.
Set the listening port of the application process.
- Set Public Network Load Balancer.
- (Optional) Set Database.
Select Distributed session. For details, see Configuring Distributed Sessions.
- (Optional) Set Local Time.
Change the time zone of the container node. By default, the time zone is the same as that of the region where the container node is located.
- (Optional) Set Scheduling Policies. For details, see Configuring a Scheduling Policy of an Application Component Instance.
- (Optional) Set Upgrade Policies. For details, see Configuring an Upgrade Policy of an Application Component Instance.
- For other types of components for which Cloud Container Engine is selected for Deployment System in 4, perform the following operations:
- Set Image.
- If the application source is a software package, source code, or template, the configured static component information will be loaded.
- If Runtime System is set to Docker, select an image package from the SWR image repository.
- (Optional) Enable Public Network Access.
- Set Public Network Load Balancer.
Select an existing ELB resource in the environment.
If no ELB resource exists, click Add One. On the Edit Environment page that is displayed, click Add Optional Resource to add created ELB resources to the environment.
For details about how to create an ELB resource, see Creating a Load Balancer.
- (Optional) Set HTTPS.
If HTTPS is enabled, click Use existing to select an existing certificate.
If no certificate exists, click Create new to create a server certificate. For details about how to create a certificate, see Creating a Certificate.
- Set Domain Name.
Enter a customize domain name. For details, see Configuring Domain Name Mappings.
- (Optional) Set Listening Port.
Listening port of an application process. If Tomcat8 is selected as the Runtime System, this port is set to 8080 by default. You can customize this port.
- Set Public Network Load Balancer.
- Set Cloud Service Engine.
This parameter is mandatory for microservice components.
By default, the microservice engine added in the environment is selected. For details about how to create a microservice engine, see Creating an Exclusive Microservice Engine.
- (Optional) Set JVM.
This parameter is mandatory when Runtime System is set to Java8 or Tomcat8.
Enter the JVM parameter, for example, -Xms256m -Xmx1024m. Multiple parameters are separated by spaces. If the parameter is left blank, the default value is used.
- (Optional) Configure Tomcat parameters.
This parameter is mandatory when Runtime System is set to Tomcat8.
- Select Parameter settings. The Tomcat dialog box is displayed.
- Click Use Sample Code and edit the template file based on service requirements.
- Click OK.
- (Optional) Set Database.
Select Distributed session. For details, see Configuring Distributed Sessions.
- (Optional) Set Local Time.
Change the time zone of the container. By default, the time zone is the same as that of the region where the container node is located.
- (Optional) Set Advanced Settings.
- Choose Advanced Settings > Component Configuration and set environment variables. For details, see Configuring Environment Variables of a Component.
- Choose Advanced Settings > Deployment Configuration.
- Set Startup Command and Lifecycle. For details, see Configuring the Lifecycle of an Application.
- Set Data Storage. For details, see Configuring Data Storage.
- Set Scheduling Policy. For details, see Configuring a Scheduling Policy of an Application Component Instance.
- Set Upgrade Policy. For details, see Configuring an Upgrade Policy of an Application Component Instance.
- Choose Advanced Settings > O&M Monitoring.
- Set Log Collection. For details, see Configuring a Log Policy of an Application.
- Set Health Check. For details, see Configuring Health Check.
- Set O&M Policy. For details, see Configuring Custom Monitoring of an Application Component.
- Set Image.
- For other types of components for which VM is selected for Deployment System in 4, perform the following operations:
- (Optional) Enable Public Network Access.
- Set Public Network Load Balancer.
Select the created load balancer.
If no load balancer exists, create one. For details, see Creating a Load Balancer.
- (Optional) Set HTTPS.
If HTTPS is enabled, click Use existing to select an existing certificate.
If no certificate exists, click Create new to create a server certificate. For details about how to create a certificate, see Creating a Certificate.
- Set Domain Name.
Enter a customize domain name. For details, see Configuring Domain Name Mappings.
- Set Public Network Load Balancer.
- (Optional) Set Cloud Service Engine.
This parameter is mandatory for microservice components.
By default, the microservice engine added in the environment is selected. For details about how to create a microservice engine, see Creating an Exclusive Microservice Engine.
- (Optional) Set Environment Variables.
For details, see Configuring Environment Variables of a Component.
- (Optional) Set JVM.
This parameter is mandatory when Runtime System is set to Java8 or Tomcat8.
Enter the JVM parameter, for example, -Xms256m -Xmx1024m. Multiple parameters are separated by spaces. If the parameter is left blank, the default value is used.
- (Optional) Configure Tomcat parameters.
This parameter is mandatory when Runtime System is set to Tomcat8.
- Select Parameter settings. The Tomcat dialog box is displayed.
- Click Use Sample Code and edit the template file based on service requirements.
- Click OK.
- (Optional) Enable Public Network Access.
- When the component type is Common and the runtime system is Docker, perform the following operations:
- Click Next, confirm the specifications, and click Deploy.
After the component is deployed, you can view the component status in the Environment View 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