By Guyi, Alibaba Cloud Senior Technical Expert, focusing on EDAS development and user experience optimization
In the article "Cloud-based Practices for Spring Cloud Applications in Kubernetes: Development", we described how to use two tools to initialize a Spring Cloud application and run it locally. In this article, we will describe how to run the application mentioned in the preceding article on the cloud.
To run an application on the cloud, you need a Kubernetes cluster. The fastest method of using a Kubernetes cluster in Enterprise Distributed Application Service (EDAS) is to import an Alibaba Cloud Container Service Kubernetes (ACK) cluster to EDAS.
If no ACK cluster is available, you can use one of the following methods to create one:
When the Kubernetes cluster is ready, you need to import the cluster in the EDAS console:
When you import a cluster, EDAS performs the following operations:
When the cluster is ready, you need to initialize a cloud application. Go to the wizard for application creation in EDAS and select the created cluster to create an application. In the Application Runtime Environment section, you will see four types, Custom, Java, Ali-Tomcat, and EDAS Container, as shown in the following figure.
Note: After an application is created, you can no longer change the type of the runtime environment. Here is a brief description of these types:
# Inherit the official image in EDAS. FROM apaas/edas # Download the file to the /home/admin/app directory. ADD http://your.domain.com/file/location.jar /home/admin/app/
Note: When you run applications in EDAS, they are actually deployments in Kubernetes that are controlled by the OAM controllers. Therefore, in addition to the preceding methods of creating EDAS applications, you can also directly convert these deployments into EDAS applications. We will dive into the conversion between EDAS applications and the deployments in Kubernetes in a dedicated section.
After initializing the application, you can pack the application and directly deploy it using the IDE plug-in during the development phase. When you deploy applications by using the plug-in, you are provided with corresponding options for the selected runtime environment, as shown in the following figure.
If you are in the development environment, we recommend that you use non-custom images in the IDE plug-in to improve development efficiency. The file upload speed in the IDE plug-in is more than three times faster than that in the console, which is ideal for uploading large deployment packages. Moreover, compared with building or pushing images before deployment, directly submitting WAR or JAR files is much faster.
For more information about how to deploy applications by using the IDE plug-in, see Use Alibaba Cloud Toolkit to deploy applications to EDAS.
In this article, we have taken the perspective of developers and described how to deploy application packages to EDAS. In the development environment, we recommend that you directly upload WAR or JAR files by using the plug-in, which is the fastest among all methods of deploying applications in Kubernetes clusters. In the next article, we will take the perspective of O&M staff and describe how to use other tools in EDAS to build deployment procedures.
Alibaba Developer - March 8, 2021
Aliware - July 20, 2020
Alibaba Developer - January 29, 2021
Aliware - July 20, 2020
Alibaba Cloud Storage - June 4, 2019
Aliware - August 18, 2021
Alibaba Cloud Container Service for Kubernetes is a fully managed cloud container management service that supports native Kubernetes and integrates with other Alibaba Cloud products.Learn More
A PaaS platform for a variety of application deployment options and microservices solutions to help you monitor, diagnose, operate and maintain your applicationsLearn More
Accelerate and secure the development, deployment, and management of containerized applications cost-effectively.Learn More
A secure image hosting platform providing containerized image lifecycle managementLearn More
More Posts by Aliware