Dubbo 3.0 is a fusion of Dubbo and High-speed Service Framework (HSF) frameworks. You can update an HSF application to a Dubbo 3.0 application in the Enterprise Distributed Application Service (EDAS) console. You can develop the updated application by using the original method or the microservice governance feature provided by EDAS for Dubbo applications.

Background information

The microservice governance feature of EDAS provides more comprehensive governance capabilities for Dubbo applications. In addition, this feature is continuously iterated. To better manage your HSF application, we recommend that you update it to a Dubbo 3.0 application.

To run an HSF application, you require the application and EDAS Container. EDAS Container provides a Java environment, Ali-Tomcat, and Pandora. EDAS Container V4.x is a part of Dubbo 3.0, which is commercially released. To update your HSF application to a Dubbo 3.0 application, you need to only set the version of Pandora to V4.0.0 for your HSF application in the EDAS console.

This way, you can use the microservice governance feature provided by EDAS for Dubbo applications.

Important Before you update your application in the cloud, update it in the test environment and verify the test result.

Update an HSF application in an ECS cluster to a Dubbo 3.0 application

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications.
  3. In the top navigation bar, select a region. In the upper part of the Applications page, select a microservice namespace from the Microservice Namespace drop-down list. Select ECS Clusters from the Cluster Type drop-down list. Click the name of the HSF application that you want to update.
  4. On the Basic Information tab, click Upgrade or Downgrade Runtime Environment in the upper-right corner.
  5. In the Upgrade or Downgrade Runtime Environment dialog box, set the Pandora Version parameter to 4.0.0, set other parameters based on your requirements, and then click OK.
    hsfRunEnvir
    The application is redeployed. Wait several minutes until the redeployment is complete. You can check the change process on the Change Details page. For more information, see View change details.

Update an HSF application in a Kubernetes cluster to a Dubbo 3.0 application

EDAS allows you to deploy an HSF application by using a WAR package or an image. This topic describes how to update an HSF application deployed in a Kubernetes cluster by using a WAR package or an image to a Dubbo 3.0 application.

Update an HSF application deployed by using a WAR package to a Dubbo 3.0 application

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications.
  3. In the top navigation bar, select a region. In the upper part of the Applications page, select a microservice namespace from the Microservice Namespace drop-down list. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list. Click the name of the HSF application that you want to update.
  4. In the upper-right corner of the Application Overview page, choose Deploy > Deploy.
  5. In the Phased Release section of the Select Deployment Mode page, click Start Deployment in the upper-right corner.
  6. On the Batch Release page, set the Application Runtime Environment parameter to EDAS-Container 4.0.0 [Support FatJar Deployment], set other parameters based on your requirements, and then click OK.
    For more information about how to set other parameters, see Use the EDAS console to implement phased releases of applications in Kubernetes clusters.
    The application is redeployed. Wait several minutes until the redeployment is complete. You can check the change process on the Change Details page. For more information, see View change details.

Update an HSF application deployed by using an image to a Dubbo 3.0 application

In EDAS, we recommend that you use a Dockerfile to create an image. In this example, an image is created by using a Dockerfile. For more information, see Example of the Dockerfile for an HSF application.

# Using the centos7 + openjdk8 + ali tomcat7 + pandora 3.5.9 for the base 
FROM apaas/edas-centos-openjdk8-alitomcat7:latest
MAINTAINER Alibaba Cloud EDAS Team<edas-dev@list.alibaba-inc.com>

ENV TZ="Asia/Shanghai"

# Default put your application package into /home/admin/app/
ENV APP_HOME /home/admin/app/

#####----> First case: deploy a fat-jar file 
ARG APP_LOCATION=https://edas-hz.oss-cn-hangzhou.aliyuncs.com/prod/demo/HSF_PROVIDER.jar

#####----> Second case: deploy a war file, simply change the file name your wanted.
#ARG APP_LOCATION=https://edas-hz.oss-cn-hangzhou.aliyuncs.com/prod/demo/HSF_PROVIDER.war

#####----> Third case: deploy a local storage file.
#ARG APP_LOCATION=/Users/yanliang.lyl/workspace/java/demo/HSF_PROVIDER.war

# Then download to package into /home/admin/app/
ADD ${APP_LOCATION} ${APP_HOME}/

# Default working dir is set to /home/admin
# WORKDIR /home/admin

# Entry point set to /home/admin/bin/start.sh, 
# which including inside basic image (apaas/edas-centos-openjdk8-alitomcat8)
# CMD ["/home/admin/bin/start.sh"]             
  1. Add the following configuration to the Dockerfile file of the HSF application that you want to update to set the version of Pandora to V4.0.0 for your HSF application:
    # Set the version of Pandora.
    ENV UPGRADED_CONTAINER_VERSION 4.0.0        
    RUN /home/admin/bin/upgradecontainer.sh            
  2. Access the directory in which the Dockerfile is stored. Run the docker build command to build an image.
    docker build -t [Label name, preferably application name]:[Version].
    docker build -t [Label name, preferably application name]:[Version] -f /path/to/custom_dockerfile_name. # Run this docker build command if the created Dockerfile resides in another directory or is not named Dockerfile. 

    Example:

    docker build -t hsf-provider:1.0.0 .            
  3. Run the docker images grep <Image tag name> command to view the packaged on-premises image.
  4. Upload the on-premises image to an image repository.
    We recommend that you use Alibaba Cloud Container Registry. For more information about how to upload an image, see Use a Container Registry Enterprise Edition instance to push and pull images.
  5. Deploy the Dubbo 3.0 application by using the created image to the Kubernetes cluster in EDAS. For more information, see Use images to deploy microservices applications in Kubernetes clusters.

Verify the result

After you update the application, you can check the microservice governance feature by choosing Microservices Governance > HSF or Microservices Governance > Dubbo in the left-side navigation pane of the EDAS console. You can also verify the feature for your updated application.