This topic describes how to install Ali-Tomcat and Pandora and configure the development environments of Eclipse and IntelliJ IDEA.

Install Ali-Tomcat and Pandora

Ali-Tomcat and Pandora are containers on which services in EDAS depend during runtime, and integrate core features such as service publishing, service subscription, and tracing. Applications must be published to the containers for running.

Notice Use Java Development Kit (JDK) 1.7 or later.
  1. Download Ali-Tomcat-8 or Ali-Tomcat-7 and decompress the downloaded package to a directory, such as d:\work\tomcat\.
  2. Download the Pandora package of the required version and decompress it to the d:\work\tomcat\deploy directory where Ali-Tomcat is saved. For more information, see Release notes for EDAS Container.
  3. View the Pandora directory structure.
    • On Linux, run the tree -L 2 deploy/ command in the relevant path to view the directory structure.
      d:\work\tomcat >  tree -L 2 deploy/
                      └── taobao-hsf.sar
                          ├── META-INF
                          ├── lib
                          ├── plugins
                          ├── sharedlib
    • On Windows, navigate to the corresponding path to view the directory structure. Pandora directory structure

    For more information about how to solve the problems related to the installation and use of Ali-Tomcat and Pandora, see FAQ about Ali-Tomcat and FAQ about Pandora.

Configure the Eclipse development environment

To configure Eclipse, you must download the Tomcat4E plug-in and save it to the directory where Ali-Tomcat and Pandora are installed. After the configuration is complete, you can publish and debug local code in Eclipse.
  1. Download the Tomcat4E plug-in. The following figure shows the files and folders extracted from the package.
    Tomcat4E plug-in
  2. Open Eclipse. In the menu bar, choose Help > Install New Software.
  3. In the Install dialog box, click Add to the right of the Work with section. In the Add Repository dialog box, click Local. In the dialog box that appears, select the d:\work\tomcat4e\ directory where the downloaded Tomcat4E package is decompressed, and click OK.
  4. Return to the Install dialog box. Click Select All and then Next.
    Complete subsequent steps as instructed. After you install the Tomcat4E plug-in, restart Eclipse to make Tomcat4E take effect.
  5. After Eclipse is restarted, choose Run As > Run Configurations from the Eclipse menu.
  6. In the left-side navigation pane, find AliTomcat Webapp and click New launch configuration in the upper part.
  7. On the page that appears, click the AliTomcat tab. In the taobao-hsf.sar Location section, click Browse. Select the local path of Pandora, such as d:\work\tomcat\deploy\taobao-hsf.sar.
  8. Click Apply or Run. Then, the configuration is complete.
    Next time, you can start this project without the need to configure it again.
  9. View the output information about the project running. If the following Pandora container information appears, the Eclipse development environment is configured.

Configure the IntelliJ IDEA development environment

Notice Only the commercial release of IntelliJ IDEA is supported. IntelliJ IDEA Community Edition is not supported.
  1. Start IntelliJ IDEA.
  2. In the menu bar, choose Run > Edit Configurations.
  3. In the left-side navigation pane of the Run/Debug Configurations page, choose Defaults > Tomcat Server > Local.
  4. Configure Ali-Tomcat.
    1. On the right of the page, click the Server tab. In the Application Server section, click Configure.
    2. On the Application Server page, click + in the upper-right corner. In the Tomcat Server dialog box, set Tomcat Home and Tomcat base directory, and click OK.
      Set Tomcat Home to the local path where the Ali-Tomcat package is decompressed. Then, Tomcat base directory is automatically set to the same path.
  5. In the Application Server section, select the configured Ali-Tomcat from the drop-down list.
  6. In the VM Options section, set the JVM startup parameters to the path that points to Pandora, and specify the vipserver port of the local lightweight configuration and registry center.
    Example: -Dpandora.location=d:\work\tomcat\deploy\taobao-hsf.sar -Dvipserver.server.port=8080

    Change d:\work\tomcat\deploy\taobao-hsf.sar to the local path where Pandora is installed. The -Dvipserver.server.port=8080 parameter specifies the vipserver port that is used to connect the application to the local lightweight configuration and registry center. This effectively accelerates local application startup when you use the new version of the lightweight configuration and registry center in the local development environment.

    You do not need to add the preceding JVM property when you deploy an application to EDAS.

  7. Click Apply or OK. Then, the configuration is complete.