The author | solitary Yi Ali cloud senior technical experts, is responsible for the development of EDAS and user experience optimization work.
There are two tools that make it easy to get a SpringCloud application from its inception to run locally. In this article, we will show you how to run the applications mentioned in the previous article on the cloud.
Initializing a Cluster
In order to run the application in the cloud, first we need a Kubernetes cluster, in EDAS to use Kubernetes cluster in the fastest way, is an Ali cloud container cluster of Kubernetes cluster (ACK cluster), import to EDAS.
If you do not already have an ACK cluster, you can create one in either of the following ways:
- Go directly to the container service console to create;
- If you already have a cluster built on the cloud, or have a cluster in other IDCs or other vendors, you can also import the cluster to the container service by “Registering the existing cluster”.
Once the Kubernetes cluster is in place, you need to do a cluster “import” on EDAS as shown below:
When importing a cluster, EDAS does the following:
-
Initialize cluster Controller and related resources of EDAS, mainly including OAM Controller based on open cloud native application standard, Agent for log collection, and Arms environment information in monitoring link, etc. Most of the controllers do not occupy the resources of the user cluster, but run in a managed cluster hosted by EDAS, which is maintained by EDAS.
-
According to the user’s plan, divide the relationship between the cluster and the namespace in EDAS. Namespaces in EDAS are used to isolate services and configurations, which can be easily interpreted as daily development environments such as development, test, and online. The cluster import also determines which environment the Kubernetes cluster is used for.
Initializing the application
After preparing the cluster, we need to initialize a cloud application. After entering the wizard of creating the application in EDAS, we select the newly created cluster to create the application. In the running environment of the application to be selected, There are four types: “Custom”, “Java”, “Tomcat”, and “EDAS Container”, as shown in the following figure:
A special note is required here, because once an application has been initially identified, it cannot be changed later:
-
Java/Tomcat/EDAS Container: After the file is uploaded, EDAS uses the file and the corresponding basic image as the application image.
-
Custom environment: After selecting the operating environment of the image, it means that each deployment is carried out by the specified custom image. The custom image needs to meet certain specifications. For details, please refer to the Aliyun Help document “Making Application Container Docker Image”. The core content is the following two lines of code:
# Inherit the official mirror of EDAS
FROM apaas/edas
Download the file to /home/admin/app
ADD http://your.domain.com/file/location.jar /home/admin/app/
Copy the code
Note: The application in EDAS is the Deployment of Kubernetes under the control of OAM controller. Therefore, in addition to creating THE EDAS application in the above way, EDAS can also read out the Deployment in the cluster. You can convert these Deployments directly into an EDAS application. For those of you who are interested in switching between EDAS applications and Deployment, we will cover this in a special section.
Deploy Kubernetes applications directly through IDE plug-ins
Once the application is initialized, it can be packaged and deployed directly to the IDE at development time. Depending on the runtime environment selected, we will also have the option to deploy in the plugin, as shown in the following figure:
If you are in a development environment, we recommend using IDE plug-ins without custom images to improve development efficiency, because plug-ins upload files more than 3 times faster than in the console, which is great for large deployment packages! It is also much faster to commit a war/ JAR deployment than to rebuild/push the image and then deploy.
For details about how to deploy the IDE plug-in, you can search the “Rapid Deployment to EDAS using Cloud Toolkit” in the official documentation of Ali Cloud.
Epilogue and its follow-up
This article introduces how to deploy a developed application package to the EDAS application on the cloud from the perspective of the developer. In the development environment, in the face of many ways to deploy Kubernetes cluster, we recommend the best way is to use war/ JAR directly from the plug-in upload deployment. This is the fastest deployment of all. Next we’ll look at how EDAS’s other tools can be used to build deployment processes from an operations perspective.
The first KubeCon 2020 Online Summit
On 30 July – August 1, alibaba cloud native, click on the link to make an appointment and polite: developer.aliyun.com/topic/aliba…
“Alibaba Cloud originator focuses on micro-service, Serverless, container, Service Mesh and other technical fields, focuses on the trend of cloud native popular technology, large-scale implementation of cloud native practice, and becomes the public account that most understands cloud native developers.”