Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the practice of DevOps based on K8s

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article is to share with you about the practice of DevOps based on K8s. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it with the editor.

User story

First of all, we look at the user story from the whole development process and think about how to make the platform easier.

DevOps development phase

From the development process on the diagram, we can sort out that the current requirements mainly include: for service solution, cloud development platform, CI/CD, IaaS based on K8s, observability, edge computing, Serverless, DApp, we have finally identified four core functions that need to be completed and prioritized:

CI/CD

IaaS based on K8s

Data visualization

Cloud development platform

After defining the requirements, we have considered whether the above functions need to be directly acquired or developed by ourselves. The advantage of external procurement is that it can be deployed quickly, but in the actual research and development process, we only need some of these functions, and the bundling of "family bucket" can not meet the needs of flexible customization, so it is difficult to carry out further evolution and development. According to the actual situation, we finally consider self-development step by step.

Product design

In the product design stage, we need not only to ensure fast launch, but also to meet the late local modification, we have done a Lego loose coupling design for this long-term project:

Architecture diagram

The loosely coupled architecture allows each layer to complete only this part of the function, minimizing the coupling of the upper and lower parts, and ensuring that the local modification has the least impact on the whole system. For example, we need to deploy a Prometheus monitor, and OPS students do not need to manage the source code. We just need to start the deployment directly from the configuration or cache the image locally.

The way to practice 1.CI/CD

Before starting, we first identified the Git workflow, we considered the backbone development, taking into account the subjective and objective conditions and our goal is to make development a simple thing, we finally adopted the following figure of the development process.

We originally chose Jenkins for CI/CD research and development. But our Git uses Bitbucket, the initial user experience is not very good, and the deployment of access control, account system are relatively cumbersome. In order to achieve a better user experience, we are now trying to use Bamboo to develop CI/CD.

In addition to the user experience, during the use of Jenkins, the pre-Jenkinsfile management is also relatively rough, the number of projects becomes more bifurcated, iteration and maintenance are very cumbersome. In order to better manage the configuration of Bamboo, we use Git subtree to achieve the effect of convenient upgrade; at the same time, we also script the execution actions to ensure that difference management can be separated from the CI/CD system, and independent debugging and development can be completed locally.

two。 test

The biggest problems encountered in the whole process of practice are testing, test promotion and rapid construction of various integrated test environments.

Test promotion is more of a management problem, research and development can mainly involve in: automatic generation of some tests and base mirrors to help the project quickly complete some of the tests.

On how to quickly build various integrated test environments, we use Helm to deploy each project. Build the associated environment as quickly as possible through the dependency of the main Helm package.

Environment building is just the beginning, we have environments, we need to test them, and automated testing is most appropriate right now.

It will be much easier if the testing department is involved in this process, and each test will be managed and maintained according to the line of business and scenario.

What should we do without the participation of the testing department? If the code is a large repository of the same language, this problem will also be very simple, as long as the correlation regression. But the reality we are faced with is that a CDN system design involves various components, environments and languages. Our solution is to put all aspects of the test chain into their own projects, and the principle of who develops and who is responsible. We only manage the relationship chain and return before we go online.

two。 test

The biggest problems encountered in the whole process of practice are testing, test promotion and rapid construction of various integrated test environments.

Test promotion is more of a management problem, research and development can mainly involve in: automatic generation of some tests and base mirrors to help the project quickly complete some of the tests.

On how to quickly build various integrated test environments, we use Helm to deploy each project. Build the associated environment as quickly as possible through the dependency of the main Helm package.

Environment building is just the beginning, we have environments, we need to test them, and automated testing is most appropriate right now.

It will be much easier if the testing department is involved in this process, and each test will be managed and maintained according to the line of business and scenario.

What should we do without the participation of the testing department? If the code is a large repository of the same language, this problem will also be very simple, as long as the correlation regression. But the reality we are faced with is that a CDN system design involves various components, environments and languages. Our solution is to put all aspects of the test chain into their own projects, and the principle of who develops and who is responsible. We only manage the relationship chain and return before we go online.

Rapid deployment of associated system solutions

3. Cloud development platform

Many developers will encounter the problem of switching between the development environments of multiple projects, for example: many new and old projects with the same language have different versions and need to customize the environment settings; or many newcomers spend a lot of time to start a project to build a development environment.

Our principle is to make development a very simple thing. We are trying to use Eclipse Che's workspace management approach to manage the project development environment to lower the barriers to development. Eclipse Che is an open source solution, not too much introduction here, interested friends can learn about it.

Thinking about the future

What might the final shape of the product look like?

At present, according to the current priority, the four core functions on the right side of the rocket are our priority. As mentioned above, the loosely coupled architecture is conducive to the local iterative upgrade of the product, and the local quantitative change may bring about the qualitative change of the product.

Step forward, what do we need to do to get closer to the user? It should be a micro-service solution.

What do we need to do in the next step to get closer to cloud services? At present, what is certain is that the standard product is the container cloud, and the selling point of this platform is the container cloud of a complete development tool chain.

With regard to edge computing, maybe our products have the ability of edge computing by replacing k8s with KubeEdge as the IaaS layer.

If the DApp of the blockchain or the mature IaaS layer of Serverless are modified and replaced, it is easier for the product to adapt to the market quickly.

The above is what the DevOps practice based on K8s is like. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report