The author | solitary Yi Ali cloud senior technical experts, is responsible for the development of EDAS and user experience optimization work.
Takeaway: In our last article, Best Practices for SpringCloud Applications on Kubernetes — Deployment (Development Deployment), we introduced how to deploy applications from within IDE plug-ins. In addition, EDAS now supports additional tools to cover other scenarios. This article focuses on the tool architecture around deployment on EDAS.
Related articles recommended:
- Best Practices for SpringCloud applications on Kubernetes: Development
- Best Practices for SpringCloud Applications on Kubernetes — Deployment (Development Deployment)
Deploy in IDE plug-ins
Because the IDE is the closest tool to the developer’s code, the deployment capability in IDE plug-ins is also a deployment tool specially provided for developers. It is characterized by speed and ease of use. It also covers the deployment of War/Jar in ECS cluster and Kubernetes cluster, as well as custom images. For details, we have compiled official documents. Please refer to the section “Using Cloud Toolkit to Rapidly Deploy Applications to EDAS” in the official help document of EDAS.
However, for online applications, it is not safe for any developer to make changes at will. The EDAS namespace design also takes this problem into account. The solution is the namespace on EDAS, which is used to isolate services and configurations between environments. Can be understood in the general sense of the environment, such as: development, testing, production, etc. To prevent users from accidentally changing their online environment in IDE plug-ins, we have added an option to the namespace to allow remote debugging, which can only be performed in the IDE after it is enabled. This switch is disabled by default. As shown below:
Maven plug-in for deployment
The Maven plugin is intended to be used between developers and operations, and its design is based on the popular Concept of DevOps, which allows deployment processes to be distributed in a configurable manner. That is, deployment configuration information can be placed along with the code project for version tracking, and application configuration can be differentiated according to the Profile in Spring. After the configuration is complete, you only need to run simple MVN Toolkit :deploy to complete the deployment. For details, see Deploying applications using The Toolkit – Maven-plugin in the EDAS official documentation.
CI/CD for deployment
As the most widely used CI/CD tool on the market, Jenkins is known for its ease of use and extensive plugin capabilities. EDAS also complements the plugin for this platform. This plugin also covers the deployment of all mainstream scenarios in EDAS, especially in Kubernetes, and integrates the ability to build, push, and deploy images. For details, please refer to “Building EDAS in Jenkins using edas-Jenkins-Plugin” in the official EDAS documentation.
At the same time, there are still many users using cloud service Cloud Effect, which integrates powerful pipelining capabilities. EDAS is a built-in pipelining task template named Deployment to EDAS. For details, please refer to the official EDAS document “Deploying Java Applications to EDAS using Cloud Effect”.
Use Terraform for orchestration
Terraform is a tool for building, changing, and versioning infrastructures safely and efficiently (an orchestration tool for infrastructure automation). It writes the infrastructure in the configuration file that describes the cloud resource topology, such as virtual machines, storage accounts, and network interfaces. Terraform’s Command Line Interface (CLI) provides a simple mechanism for deploying configuration files to Ali Cloud and version-controlling them.
EDAS also integrates the popular Infrastructure As Code concept, embracing the Terraform ecosystem and offering an official plugin, Enable users to orchestrate applications to the corresponding underlying IaaS layer resources and other PaaS resources in Infrastructure As Code. See “Deploying Applications to EDAS using Terraform”.
Use the CLI tool for deployment
For an experienced operations person, the most likely way to operate is the command line tool. In addition to the usage habits, the command line tool is also well scripted and can be combined with other scripting languages to provide more power.
The CLI tool in EDAS currently relies on the command line entrance of Ali Cloud, and has been built with POP API as commands and API parameters as command line parameters, that is to say, its essence is still converted into a call of POP API. For details about the official document, see Using the CLI to Rapidly Deploy EDAS applications.
Epilogue and follow-up
EDAS’s deployment tools are basically built around developer, operations, DevOps scenarios, but for a deployment, the trigger is often just a task to commit, and we’re more interested in the results of the task after it is committed, and even the impact of the results on the business. Because every task triggered by us is actually a change in the online environment, which is prone to failure and discontinuity of business. According to the experience of Alibaba Group, more than half of the serious failures are caused by change. So at the end of 2018, three principles of online change were proposed: grayscale, rollback and monitoring. EDAS has gradually implemented various capabilities in this concept in its products; So the following chapters will focus on online change, and the next lecture will move on to the first section, gray-able.
Click on the Cloud Native Architecture Whitepaper details page
“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.”