In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Author | Xu Yunyuan, partner and senior architect of Hangzhou Heyun Technology, senior practitioner of cloud computing industry and Kubernetes ecology
Introduction: what is OAM? On October 17, 2019, Jiang Jiangwei (nickname: Xiaoxie), partner of Alibaba and general manager of Aliyun Intelligent basic products Division, announced at QCon Shanghai 2019 that Aliyun and Microsoft jointly launched the open application model Open Application Model (OAM) open source project.
The core concerns of OAM are separated: developers pay attention to the application itself, and operators focus on modular operation and maintenance capabilities, making application management easier and application delivery more controllable; platform-independent and highly scalable: application definition is decoupled from platform layer implementation, and application description supports arbitrary extension and cross-environment implementation; modular application operation and maintenance features: operation and maintenance characteristics that can be freely combined and supported modular implementation. The core module of OAM 1. Application component (Components)
In OAM, "application" is a combination of multiple concepts. The first concept is: application component (Components), which is an important part of the whole application. The application component can include both the services on which the application depends, such as the MySQL database, and the application service itself, such as the PHP server with multiple replicas. Developers can "package" the code they write into an application component, and then write configuration files to describe the relationship between the component and other services.
The concept of application components enables platform architects and other architects to decompose applications into reusable modules. This idea of modular encapsulation of application components represents a best practice for building secure and highly scalable applications: decoupling the description and implementation of application components through a fully distributed architecture model.
two。 Application deployment profile (Application Configuration)
In order to turn the description of these application components into a real running application, the application operation and maintenance staff will instantiate the running application through a special deployment configuration file that contains all the application component information. This configuration file itself is also a declarative API in the OAM specification, which is used to enable application operators to instantiate the corresponding running application according to the application description submitted by the developer or platform.
3. Apply operation and maintenance features (Traits)
The last concept is a set of application operation and maintenance characteristics (Traits), which describe the operation and maintenance characteristics of the application in the specific deployment environment, such as the horizontal scaling strategy and Ingress rules of the application. These characteristics are very important to the operation and maintenance of the application, but they are often implemented in different deployment environments. To take a simple example, the same Ingress may have a completely different implementation on the public cloud than in the local data center: the former is typically a cloud service such as SLB, while the latter may be a specialized hardware. This means that the Ingress operation and maintenance work for these two environments will be very different. But at the same time, no matter in which environment, this Ingress rule may be exactly the same for application developers.
The design of application features makes this separation of concerns possible: as long as the two environments provide the implementation of the application operation and maintenance characteristics of Ingress under the OAM model, then the application can be described by unified Ingress rules and run in these two places without difference. At the same time, infrastructure vendors in these two environments can continue to configure the implementation of these application features to meet their respective operation and maintenance requirements (for example, differences in compliance and security of Ingress implementations in different environments).
Introduction of a visualization implementation based on OAM
At present, the platform is mainly based on the V1 alpha1 version of OAM, and abstracts and encapsulates the core ideas of OAM in order to be more in line with users' habits. Behind the visualization section introduced in this article is the complete yaml file in OAM format. Visual OAM platform mainly includes two core functions:
1. Operation and maintenance feature model
The operation and maintenance feature model is mainly aimed at the specific instantiation of OAM's Traits, so that users can directly plug and unplug some complex operation and maintenance features to the application publisher to use. At present, the platform has encapsulated eight operation and maintenance features, including service release, log collection, automatic scaling, storage and mount, and so on.
Fig. 1 Operation and maintenance feature model warehouse
2. OAM application choreography
The OAM application choreography function visually realizes the whole process of OAM application release, abstracts and encapsulates the core functions of OAM, such as the addition of application components, the modification of configuration files and the addition of operation and maintenance features. OAM application orchestration currently includes the following core functions:
Component orchestration: visually add the components of the platform and set the parameters of the components; run feature choreography: add and orchestrate the operation and maintenance features based on the added platform components (also prepare for subsequent development and separation of operation and maintenance concerns); OAM version management: the platform will save all OAM release versions and provide upgrade and rollback functions.
Figure 2 main interface of OAM application orchestration
Next, we will fully analyze how to visually publish OAM on the platform with the deployment of a typical application (nginx+tomcat+redis).
Precondition
The operation and maintenance feature (Traints) application model has been installed, on the interface, you can quickly see which operation and maintenance feature application models are available, as well as their running status. Currently, only the system-defined operation and maintenance features are supported, and the life cycle management of custom operation and maintenance features will be developed later. Allows users to write their own operation and maintenance features and install them to the platform for use.
OAM application creation process
The basic publishing process of OAM applications is as follows: application creation-> New components-> Application orchestration-> Save version-> publish applications.
Create App: click App-> OAM App menu, click the * * create App * * button, and enter the required entry
Add components: click the "add components" button to set workload type, container configuration, etc.
Select the type of workload you want to create. Currently, six core workloads such as Server, Singleton Server, Task, Singleton Task, Worker and Singleton Worker have been encapsulated. Users only need to check the type of load they want to create in the drop-down box.
After selecting the load type, users can visually select the image they want to publish and the basic configuration parameters of the container. At the same time, orchestration and publishing based on multiple containers is currently supported.
According to our requirements, we add tomcat, redis and mysql in turn, and we can see the status of the components on the interface. At the same time, click "details" to see the corresponding Kubernetes resource information.
View the details of the component.
Application choreography: after creating the components that need to be deployed, our OAM application already has the properties of development.
After that, we need to add operation and maintenance features to each component according to the requirements: click to enter the application orchestration interface, and you can see that the components just added have been displayed on the canvas; click on a single component on the canvas, you can see the operation and maintenance features that are currently suitable for the component, and check the operation and maintenance features you need to quickly add them. After adding the operation and maintenance features, the configuration parameters of the operation and maintenance features will pop up in the right column, and these operation and maintenance features will take effect after the configuration is saved.
After adding the operation and maintenance features of all the components, we can see a complete orchestrated OAM application. In the V2 version of OAM, we will also increase the dependencies of applications. Users can implement dependency choreography between applications by dragging and connecting.
Save version: finally, we can click the [Save current content as version] button, enter the version number, and click [OK]
Publish App: click the "publish" button to publish the App
After publishing the application, the component status shows' instantiated'. The application instance status displays "healthy".
Click on the event tab page to display the event.
Users can quickly view and access the ingress that has been created.
Users can quickly modify and upgrade the current application by modifying traints information.
Click to enter the application orchestration interface and edit the number of tomcat instances to 4.
Saving the edited version as the current version will directly update the modified configuration to the current instance. If you choose to save as a new version, the current configuration changes are saved as a template, waiting for release. We save this change as a new version.
Click Update for this version to release the configuration you just modified. After the release, we can see that there are two versions of the OAM application template.
Check the details and confirm that the number of tomcat instances has been changed to 4, but since we also set the automatic expansion and reduction of the instance to 3, it quickly changes back to instance 3 after the capacity expansion.
At this point, a complete visual process for deploying and updating OAM applications is demonstrated.
Summary
Now that OAM Spec has iterated to the v1alpha2 version, the new version has become more Kubernetes-friendly on the basis of insisting that OAM Spec is platform-independent, balancing standards and scalability to a large extent, and better supporting existing CRD. In other words, if you have written an off-the-shelf CRD Operator, you can smoothly connect to the OAM system and enjoy the dividend of the OAM model.
For a more detailed description of the new version, you can read the new release of OAM v1alpha2: balancing standards and extensibility, flexible access to CRD operator.
The visualization platform has also been fully upgraded to v1alpha2, the new version of support can better allow users to write plug-ins to expand the functions of the platform.
The platform comes from Hangzhou Harmony Cloud Technology, a strategic partner of Aliyun. The open source version of the platform based on OAM is also on the way. Please look forward to it.
OAM platform trial URL: http://139.196.197.117:30088/ username / password: all yaml files in admin/Ab123456Demo please visit the github address to view: https://github.com/harmonycloud/oam-simple-demo
At present, the OAM specification and model have actually solved many existing problems, but its journey has only just begun. OAM is a neutral open source project, and we welcome more people to participate in it to define the future of cloud native application delivery. Mode of participation:
Nailing scan code to enter the Chinese discussion group of OAM project
Directly participate in the discussion of OAM open source implementation address through Gitter click star
Hangzhou Heyun Technology Co., Ltd. was established in July 2016, the core team of the company comes from SEL Lab of Zhejiang University. Hanyun team has profound technology accumulation in cloud computing and related fields, and has contributed more than 2 million lines of code in the world's top open source communities such as Docker, Kubernetes, Cloud Foundry and other projects, ranking fourth in the world and first in China. The team has written China's first professional book on in-depth analysis of container cloud, Docker Container and Container Cloud, which is one of the few container cloud providers in China to master the underlying core technology. It has built the largest container cluster landing case in China, supporting the largest Internet TV cloud in China.
Course recommendation
In order that more developers can enjoy the dividends brought by Serverless, this time, we have gathered 10 + technical experts in Alibaba's Serverless field to create an open Serverless course that is most suitable for developers to get started, so that you can easily embrace the new paradigm of cloud computing-Serverless.
Click to watch the course for free: https://developer.aliyun.com/learning/roadmap/serverless
"Alibaba Cloud Native focus on micro services, Serverless, containers, Service Mesh and other technology areas, focus on cloud native popular technology trends, cloud native large-scale landing practice, to be the official account of cloud native developers."
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.