El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Cloud Service Engine/ Developer Guide/ Preparing the Environment

Preparing the Environment

Updated on 2023-11-08 GMT+08:00

You need to prepare the local development and commissioning environment and cloud environment.

Preparing a Local Development and Commissioning Environment

The local development and commissioning environment is used to set up a simple test environment. The options are as follows:

  • Download the local CSE.
  • Use the exclusive ServiceComb engine and open the IP address for public network access to ensure that the local environment can be accessed.

Preparing the Cloud Environment

Before deploying microservice applications on the cloud, you need to prepare the cloud environment. Perform the following procedure to prepare the environment:

Common Environment Variables

Using ServiceStage to manage environments and deploy applications simplifies user configuration. ServiceStage sets some environment variables for applications. The following table lists some common environment variables:

Table 1 Common environment variables

Name

Description

PAAS_CSE_SC_ENDPOINT

Registry center address of a ServiceComb engine.

PAAS_CSE_CC_ENDPOINT

Configuration center address of a ServiceComb engine.

PAAS_PROJECT_NAME

Name of a project.

CAS_APPLICATION_NAME

Name of a ServiceStage application.

CAS_COMPONENT_NAME

Name of a ServiceStage component.

CAS_INSTANCE_VERSION

Version of the deployed ServiceStage.

You can use these variables based on the mechanisms of different microservice development frameworks, such as the Place Holder mechanism of Spring Cloud and the mapping.yaml mechanism of Java chassis, to reduce manual input during deployment.

When creating an application on ServiceStage, you can bind middleware, such as Distributed Cache Service (DCS) and Relational Database Service (RDS), to the application. You can obtain the configuration information about the middleware bound to applications by using the following environment variables.

  • Distributed session

    Distributed sessions are stable and reliable session storage based on DCS, supporting automatic injection for mainstream web containers, such as tomcat context, node.js express-session, and PHP session handler.

    The following table describes the environment variables of distributed sessions.

    Table 2 Environment variables of DCS sessions

    Name

    Description

    DISTRIBUTED_SESSION_CLUSTER

    Whether the instance is in cluster mode. Value: true or false.

    DISTRIBUTED_SESSION_TYPE

    Storage type of a distributed session instance. Currently, only Redis is supported.

    DISTRIBUTED_SESSION_VERSION

    Version of a distributed session instance.

    DISTRIBUTED_SESSION_NAME

    Name of a distributed session instance.

    DISTRIBUTED_SESSION_HOST

    IP address for connecting to a distributed session instance.

    DISTRIBUTED_SESSION_PORT

    Port for connecting to a distributed session instance.

    DISTRIBUTED_SESSION_PASSWORD

    Password for connecting to a distributed session instance.

  • Distributed cache

    DCS is an online, distributed, in-memory cache service compatible with Redis and Memcached. It combines high reliability and scalability with instant availability and easy management, delivering high read/write performance and fast data access.

    The following table describes the environment variables of DCS.

    Table 3 Environment variables of DCS

    Name

    Description

    DISTRIBUTED_CACHE_CLUSTER

    Whether the instance is in cluster mode. Value: true or false.

    DISTRIBUTED_CACHE_TYPE

    Storage type of a distributed cache instance. Currently, only Redis is supported.

    DISTRIBUTED_CACHE_VERSION

    Version of a DCS instance.

    DISTRIBUTED_CACHE_NAME

    Name of a DCS instance.

    DISTRIBUTED_CACHE_HOST

    IP address for connecting to a DCS instance.

    DISTRIBUTED_CACHE_PORT

    Port for connecting to a DCS instance.

    DISTRIBUTED_CACHE_PASSWORD

    Password for connecting to a DCS instance.

  • Cloud database

    RDS for MySQL is a cloud-based web service that is reliable, scalable, easy to manage, and out of the box.

    The following table describes the environment variables of RDS.

    Table 4 Environment variables of RDS

    Name

    Description

    RELATIONAL_DATABASE_NAME

    Name of an RDS instance.

    RELATIONAL_DATABASE_CONNECTION_TYPE

    Connection type of an RDS instance. Value: JNDI/SPRING_CLOUD_CONNECTOR.

    RELATIONAL_DATABASE_JNDI_NAME

    JNDI name of an RDS instance. This variable is used if the connection type is JNDI.

    RELATIONAL_DATABASE_DB_NAME

    Database name of an RDS instance.

    RELATIONAL_DATABASE_DB_USER

    Database user of an RDS instance.

    RELATIONAL_DATABASE_DB_TYPE

    Database type of an RDS instance. Currently, only MySQL is supported.

    RELATIONAL_DATABASE_VERSION

    Database version of an RDS instance.

    RELATIONAL_DATABASE_HOST

    Database IP address of an RDS instance.

    RELATIONAL_DATABASE_PORT

    Database port of an RDS instance.

    RELATIONAL_DATABASE_PASSWORD

    Database password of an RDS instance.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback