edit-icon download-icon

Publish applications

Last Updated: Jan 29, 2018

Regular applications and Docker applications

  • A regular application is deployed directly on an ECS instance.
  • A Docker application is deployed through a Docker container. When a Docker application is deployed, multiple Docker container instances are created on the target ECS instance and the Docker application runs in a Docker container.

An ECS instance can be deployed with only one regular application but can be deployed with multiple applications running in different Docker containers.

You can decide to choose regular applications or Docker applications depending on your ECS resources/costs available and your specific needs for maintenance modes.

Note: Before publishing an application on an ECS instance, you must import the ECS instance (install the EDAS Agent and synchronize the ECS instance to EDAS). For details, see Import an ECS instance.

To publish an application, follow these steps:

Create an application

Two types of applications can be created:

Create a regular application

Note: Before you create an application, ensure that EDAS Agent has been successfully installed on the ECS instance.

  1. Log on to the EDAS console.

  2. Click Applications in the left-side navigation pane.

  3. Click Create Application in the upper-right corner of the Applications page.

  4. In the Create Application dialog box, enter application information and click Next.

    Create an application

    Field description:

    • Application Runtime Environment: Version of the Ali-Tomcat container in which the application runs. By default, the latest version is used.

    • Application Name: Name of the application, which must be unique under the corresponding primary account.

    • Namespace: The namespace where the application is located. After selected, the application can only be deployed on an ECS instance in this namespace.

    • Application Health Check: Optional.

      • If you configure a health check URL, EDAS periodically accesses the URL regularly and determines the survival status of the application according to the response code.

      • If no URL is specified, EDAS does not perform health check. This has no impact on the normal running of the application.

    • Note: Description of the application.

  5. Select Application Type and Cluster and specific ECS instances.

    • Application Type: Select Regular Application.

    • Cluster and ECS instances: Select cluster and ECS instances where to create the application.

      Network type deponds on the selected cluster.

  6. After you complete the setting, click Create.

Create a Docker application

Before you create a Docker application, designate a cluster and ensure that the cluster has an ECS instance that has been converted to a Docker host.

  1. Log on to the EDAS console.

  2. Click Applications in the left-side navigation pane.

  3. Click Create Application in the upper-right corner of the Applications page.

  4. In the Create Application dialog box, enter application information and click Next.

    Create an application

    Description of fields:

    • Application Runtime Environment: Version of the Ali-Tomcat container in which the application runs. By default, the latest version is used.

    • Application Name: Name of the application, which must be unique under the corresponding primary account.

    • Namespace: The namespace where the application is located. After selected, the application can only be deployed on an ECS instance in this namespace.

    • Application Health Check: Optional.

      • If you configure a health check URL, EDAS periodically accesses the URL regularly and determines the survival status of the application according to the response code.

      • If no URL is specified, EDAS does not perform health check. This has no impact on the normal operation of the application.

    • Note: Description of the application.

  5. Select Docker Application as the application type and set relevant parameters.

    Create Docker app

    Field description:

    • Cluster: Cluster where the application is deployed. The cluster cannot be changed once the application is successfully created. Application scaling is completed in the cluster. An application cannot be deployed in more than one cluster.
    • Web Port: A Docker application adopts the host network mode. Designate a web port of Tomcat when you create a Docker application. By default, the Create Application dialog box displays an available port that is automatically allocated.
    • Pre-allocated Port: When your application uses any other port than the Tomcat Web port, you can designate a reserved port to avoid port conflict.
    • Docker Quota: To isolate resources, you can declare the resources required to run the Docker application. The declarable resources include CPU and memory. The selected resources cannot exceed the available resources of the available Docker hosts in the cluster.
    • Selected Instances: After you set the application quota and number of instances, the system automatically allocates the ECS hosts used to deploy the application instances.
  6. After you complete the setting, click Create.

    After the application is successfully created, the message Creation successful is displayed in the upper-right corner.

Deploy an application

Upload the WAR package to deploy the created application. You can use the compiled sample project. The procedure of application deployment is as follows:

  1. In the application list, click the name of the created application.

  2. Click Deploy Application in the upper-right corner of the Application Details page.

  3. Set deployment parameters in the application publication order dialog box.

    Deploy app

    Description of application deployment parameters:

    • File Upload Mode:

      • Upload WAR Package: If you select this option, click Download Sample Project on the right to download the compiled WAR package. Click Select File next to Upload WAR package to open the local folder and select the WAR package to be deployed, or the downloaded sample project.

        It takes time to upload the WAR package. Wait until the upload is complete.

      • WAR URL: If you select this option, enter the accessible URL of the WAR package in the field of WAR Location, for example, http://edas-public.oss-cn-hangzhou.aliyuncs.com/install_package/edas-app-demo/app-latest.war.

      • Use Previous Version: If you select this option, select the expected version from the "Historical Version" drop-down list.

    • Specify Version: This options is applicable if you select Upload WAR Package or WAR Package Address.

      An application version identifies the version of the deployment package used to publish the application and helps you locate a specific publication during rollback.

      Note: You can add a version or text description when deploying an application. We do not recommend using a timestamp as version number.

    • Historical Version: Applicable if you select Use Previous Version. Select the expected version from the Previous Version drop-down list.

    • Target Publication Group: Group where the application to be published is located.

    • Batch: Select the number of deployment batches from the drop-down list.

    • Batch Mode: Automatic.

  4. After you complete the setting, click Publish.

    The file upload progress is shown at the top of the dialog box. After it reaches 100%, you are redirected to the Change Order page, where the application is deployed. After deployment, the status changes to Success.

Configure Load Balancing

  1. In the left-side navigation pane, select Basic Information to return to the Application Details page. In the application settings area, click Add to the right of SLB (Internet) or SLB (Intranet).

  2. In the Bind SLB to Application dialog box, select the Intranet or Internet address of your public or private SLB instance from drop-down menu.

    Config SLB

  3. If monitoring the Server Load Balancer port is required, select the SLB Port Monitoring checkbox, and set the SLB Frontend Port. Then, click Configure SLB.

    Note:

    • Do not delete the listener in the SLB console; otherwise, the application cannot be accessed normally.
    • The front-end protocol and application port of SLB have been set and cannot be modified here.

    After port listening is enabled, a port listener is then added to SLB.

Verify result

After publishing the application, copy the SLB IP address and port number, paste it in your browser's address bar, and press Enter. The application's welcome page is displayed.

Thank you! We've received your feedback.