about 2023 year

2023 Annual Summary Reflections and Aspirations

My 2023 Annual Summary As 2023 swiftly draws to a close, my university life is nearing its end with just half a year remaining. A friend once said, “What’s frightening is not losing your passion for work, but never being able to find it again.” This year, I encountered many people and experienced numerous events, gradually shaping my world view. I’m fond of Maslow’s hierarchy of needs and often reflect on my own state through it. I enjoy challenges, both in my work and hobbies (like hiking, cycling…). It seems I’ve successfully fulfilled the first four levels of Maslow’s theory: physiological needs, safety needs, social needs, and esteem needs. I’m probably at the stage of self-actualization needs. However, it’s worth mentioning that while Maslow’s theory is hierarchical, human needs aren’t always linear or fixed. For instance, someone at the self-actualization stage might still encounter needs from other levels at different times. If a person loses their job or faces financial difficulties, they may refocus on safety needs like financial security and stability. Similarly, the end of a close relationship or changes in one’s social network might reignite a desire for social needs. Even in everyday life, when we fall ill or feel hungry, our focus might temporarily shift from higher-level needs like self-actualization to physiological needs. ...

December 30, 2023 · 13 min · 2736 words · Xinwei Xiong, Me

Hugo Advanced Tutorial

136: Hugo Advanced Coming to the advanced part, you need to learn some advanced Hugo techniques in depth. Module Hugo modules are the core building blocks of Hugo. A module can be your main project or a smaller module that provides one or more of the 7* component types defined in Hugo: static, content, layouts, data, assets, i18n and archetypes. You can combine modules in any combination you like, and you can even mount directories from non-Hugo projects to form a large virtual union file system. ...

November 6, 2023 · 38 min · 8010 words · Xinwei Xiong, Me

Kubernetes for Kustomize Learning

Introduction About Kustomize GitHub Repository Get Started Kustomize is an open-source configuration management tool designed specifically for Kubernetes. It helps users customize Kubernetes objects and manage them declaratively without modifying the original YAML files . This means you can retain the basic settings for applications and components while overriding default settings with declarative YAML documents called “patches” without altering the original files. Kustomize provides a declarative approach that aligns with Kubernetes philosophy and allows customization of Kubernetes configurations in a reusable, fast, debuggable, and scalable manner. ...

October 31, 2023 · 24 min · 4997 words · Xinwei Xiong, Me

OpenIM Use Harbor Build Enterprise Mirror Repositories

Requirements OpenIM provides various public image registry addresses, such as aliyun, github, Docker Hub, and more. Read https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md for more image building guidelines. Most enterprises choose to set up their own image repository using Harbor, integrating it into their CI/CD pipeline to eventually replace Docker Hub and further reduce image storage costs. Additionally, in a production environment, Harbor generally enables TLS, so you will also need to prepare a valid domain name. ...

October 25, 2023 · 5 min · 1009 words · Xinwei Xiong, Me

Learn About Automated Testing

Automated testing practices and strategies for GitHub open source Go projects in the cloud native field introduce As OpenIM, a popular project on Github, how to create value in the cloud native era is very important. OpenIM is a small and high-quality team, and we do not have particularly in-depth insights in automation. Continuous Integration and Continuous Delivery (CI/CD) using GitHub Actions: GitHub Actions provides a platform to automatically build and test Go language projects. By configuring GitHub Actions workflows, you can automatically run tests when your code changes, ensuring the quality and functionality of your code (https://docs.github.com/en/actions/automating-builds-and-tests) . KubeVela project practice: KubeVela is a cloud-native and open-source project in Go that shows how to organize CI/CD processes, including automated testing, in a cloud-native environment. KubeVela uses declarative workflows to coordinate the CI/CD process. You can refer to KubeVela’s GitHub repository to understand and apply these [Practice 3](https://www.alibabacloud.com/blog/kubevela-one-of-the- hottest-golang-cloud-native-and-open-source-project_597465)4 [5](https://github.com/kubevela/workflow# :~ :text=KubeVela Workflow is an open,engine in your own repository). Cloud native testing framework and tools: In cloud native development, Contract Testing is a common testing practice, which ensures that communication between services complies with predefined API protocols. For example, Pact is used in Cloud-Native Toolkit for contract testing. By writing and integrating tests, you can verify that communication between services works as expected 6 . Code Coverage Check: When doing automated testing, it is a good practice to check code coverage. Many testing frameworks have built-in code coverage checking capabilities, and they can be configured to report code coverage of tests. For example, use the SonarQube tool to read and report code coverage information 6 . Utilize open source tools and frameworks: You can use open source tools and frameworks for testing, such as using Cypress to test cloud native applications[7](https://dev.to/litmus-chaos/cloud-native-application-testing-automation-2bh5# : ~:text=Cloud Native Application %26 Testing,Testing Using Cypress for). There are other projects and resources, such as the learning-cloud-native-go/myapp repository on GitHub, which provide completed examples of cloud native Go projects. You can refer to these examples to understand and apply cloud native testing practices[8] (https://medium.com/learning-cloud-native-go/lets-get-it-started-dc4634ef03b#:~:text=The completed project can be,The completed API). Customized automated testing process: By combining GitHub Actions and open source tools, you can customize your project’s CI/CD process, including automated testing and verification steps9 . Quantify the value of automated testing Automation obviously means that the manual cost in the later period is very low. That is to say, as time goes by and the number of automation runs increases, the value of automation and ROI becomes higher. ...

October 14, 2023 · 61 min · 12887 words · Xinwei Xiong, Me

Kubernetes Control Plane - Scheduler

Scheduler kube-scheduler is responsible for scheduling and assigning Pods to nodes within the cluster. It listens to kube-apiserver, queries for Pods that haven’t been assigned to Nodes, and then assigns nodes to these Pods based on scheduling policies (updating the Pod’s NodeName field). The scheduler needs to fully consider many factors: Fair scheduling; Efficient resource utilization; QoS; affinity and anti-affinity; data locality; inter-workload interference; deadlines. kube-scheduler scheduling is divided into two phases, predicate and priority: ...

September 28, 2023 · 9 min · 1770 words · Xinwei Xiong, Me

Kubernetes kube-apiserver: Deep Dive into API Server Components

Deep understanding of Kube-APIServer kube-apiserver is one of the most important core components of Kubernetes and mainly provides the following functions Provides REST API interface for cluster management, including authentication and authorization, data verification, cluster status changes, etc. Provides a hub for data interaction and communication between other modules (other modules query or modify data through API Server, only API Server directly operates etcd) apiserver main functions: Authentication: Use the cluster to determine identity. Authentication: Use operation CRUD, permissions are required. Access: For Kubernetes, some additional actions are required. For example, if the written value is not standardized, it needs to be modified, and verification is required after modification. Finally, it is necessary to limit the current flow to prevent maliciousness or loopholes from causing congestion. Mutating Validating +Admission Current Limit Implementation of APIServer object Access control API Server is the intermediate hub for all component interactions. ...

September 28, 2023 · 24 min · 4979 words · Xinwei Xiong, Me

Deep Dive Into the Components of Kubernetes Etcd

Before starting ETCD is the hardest of all components in Kubernetes because ETCD is stateful, not stateless. When I was doing k3s runtime design before, I learned some concepts about ETCD and Raft algorithms. As a prelude to knowledge, please go to [ETCD](https://docker.cubxxw.com/Cloud-Native-k8s/24 .html) and Raft algorithm for prelude learning. **This article will explain ETCD and Raft in depth and throughout. And analyze ETCD in depth from the perspective of Kubernetes. ** ...

September 28, 2023 · 30 min · 6230 words · Xinwei Xiong, Me

Kubernetes Port Config via Config Files

Introduction In the current module’s execution, numerous ports (ws, api, rpc, Prometheus) are passed directly. This approach can be cumbersome and doesn’t align with Kubernetes’ best practices where a pod typically exposes only one port (either 80 or 443). This proposal suggests transitioning to a configuration file-centric approach, while still retaining the capability to pass ports directly when needed. Goals Simplify the port configuration for Kubernetes deployment. Prioritize port values passed as arguments over configuration file values. Provide flexibility to users who wish to use traditional port-based or environment variable-based deployments. Proposed Solution Configuration File Instead of passing multiple ports directly, a configuration file will be introduced. By default, this file will contain predefined ports. This configuration file can be passed to the module using Kubernetes’ ConfigMap. ...

September 18, 2023 · 2 min · 399 words · Xinwei Xiong, Me

Open Source Business: From Community to Revenue

Introduction: Global Perspective at the Shenzhen Futian Convention and Exhibition Center On December 6, 2023, the GTC 2023 Global Traffic Conference was held in full swing at the Shenzhen Futian Convention and Exhibition Center. This grand event brought together technology elites from around the world to explore the cutting-edge trends and future developments in the internet industry. As a participant, I had the privilege of immersing myself in this exchange between technology and business, particularly the theme of “Focusing on Open Source and Pioneering Global Expansion,” which left a profound impression on me. ...

September 17, 2023 · 26 min · 5412 words · Xinwei Xiong, Me

OpenIM clustering design Kubernetes deploy concludes

Conference and Reference Links Conference reference documents: https://nsddd.notion.site/2899028707604b8090b36677c031cdf8?pvs=4 Video playback: Bilibili: https://www.bilibili.com/video/BV1s8411q7Um/?spm_id_from=333.999.0.0 Comment: I think that middleware can be replaced with https://kubeblocks.io which can help you manage multiple database middlewares. im reads the configuration information, and reads the config/ directory. The config.yaml hard-coded in the code can be automatically divided into rpc for different services, and then unified directories. By default, the directory is read from the binary running path. two floors openim version: https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/version.md Storage can consider using: https://github.com/openebs/openebs https://github.com/rook/rook Core target: ...

September 17, 2023 · 13 min · 2729 words · Xinwei Xiong, Me

The Art of Asking Questions in Open Source Communities

Before asking a question Before you ask a technical question via email, newsgroup, or chat room, please do the following: Try searching for answers in old articles on the forum where you are asking a question. Try searching online to find the answer. Try reading the manual to find the answer. Try reading the Frequently Asked Questions document (FAQ) to find the answer. Try to check or experiment on your own to find the answer. Ask your strong friends to find out. If you are a program developer, try reading the source code to find the answer. When you ask a question, please show that you have done the above; this will help establish that you are not a questioner who is getting something for nothing and wasting other people’s time. It would be better if you could also express what you learned in the process of doing the above efforts, because we are more willing to answer questions from people who show that they can learn from the answers. ...

September 17, 2023 · 48 min · 10169 words · Xinwei Xiong, Me

Open Source Contribution Guidelines

Task Assignment time:Within a week Complete first contribute, purpose: to understand the contribution process of open source projects Complete the construction of sealos development environment Understand the basic usage, core concepts, and functions of core components of kuberentes Basic usage: Create a pod and understand what a pod is Create a deployment and understand the relationship between deployment and pod Create a configmap and understand how to mount configuration files to pods Create a service and access pods in the cluster through service Core concepts and functions of core components: kubectl apiserver controller-manager scheduler kubelet kube-proxy etcd What do these components do? You can use a kubectl apply and a deployment to sort out what these components have done respectively. 🚸 Next time: A specific task will be assigned and the sealos source code architecture will be introduced. ...

September 16, 2023 · 15 min · 3142 words · Xinwei Xiong, Me
One modular core passes through adapters into three architecture-specific housings before final inspection

Cross Platform Compilation

Preface https://github.com/OpenIMSDK/Open-IM-Server/issues/432 Many places now have requirements for local adaptation of services. Generally, localized platforms provide an arm version of Linux cloud environment for us to deploy services, so it is necessary to build an arm version of the image. Build plan In the above issue, we describe the general construction ideas and solution steps. Let’s take a look at the construction plan. We take the most commonly used amd machine as an example to compile arm. For building the ARM version of the image, there are two ways: ...

September 16, 2023 · 14 min · 2848 words · Xinwei Xiong, Me

Github Actions Advanced Techniques

Create actions **actions are individual tasks that can be combined to create jobs and custom workflows. You can create your own actions, or use and customize actions shared by the GitHub community. ** Actions can be created by writing custom code that interacts with your repository in any way you like, including integrating with GitHub’s API and any publicly available third-party API. You can write your own actions for use in workflows, or share the actions you build with the GitHub community. To share your built actions with everyone, your repository must be public. ...

September 16, 2023 · 46 min · 9741 words · Xinwei Xiong, Me

Openim Devops Design

DevOps DevOps 🔥 DevOps is a culture and methodology for software development and operations that aims to shorten the software development cycle and improve software quality through automation and collaboration. DevOps (a portmanteau of Development and Operations) is a A culture, movement or practice that values communication and cooperation between “software developers (Dev)” and “IT operations and maintenance technicians (Ops)”. By automating the “software delivery” and “architecture change” processes, we can build, test, and release software faster, more frequently, and more reliably. ...

September 16, 2023 · 14 min · 2774 words · Xinwei Xiong, Me

Openim Multi Process Management

111: OpenIM multi-process management strategy Main modules This article will start from the most basic single-process foreground operation of OpenIM, to the nohup background operation, to the system system process, and then to Supervisord, container management, and kubernetes health detection. Current issues Read: https://github.com/cubxxw/Open-IM-Server/blob/refactor/feat-enhance/scripts/install/openim-crontask.sh source code The current process management strategy before OpenIM is started in the background through nohup. The entire project is run by multiple processes, and now a reliable keep-alive mechanism is needed to quickly pull it up when the process crashes. Openim’s solution is nothing more than to write a keep-alive script that runs in the background. If a process is found to be closed, the script will pull it up, or through the docker compose health detection mechanism: ...

September 16, 2023 · 22 min · 4522 words · Xinwei Xiong, Me

About My Blog

Hello, I am Xiong Xinwei. In the river of time, I’m so honored to step into this significant moment of my senior year. More than just a student, I’m passionate about writing those pulsating codes. Hence, I became an avid follower of open source. Welcome to explore my digital realm—My GitHub . Here, you will witness my love for technology, my third-generation blog, and I hope it becomes the ultimate link for my conversation with the world. ...

September 14, 2023 · 2 min · 318 words · Xinwei Xiong, Me
About My Hugo teaching

About My Hugo teaching

📌 Update (July 2026): This post, written in 2023, covers how the third generation of this blog was built from scratch on Hugo — the setup tutorial still holds up. Three years later I reassembled the entire blog again, and this time it wasn’t the theme that changed but the whole production line: an AI writing pipeline, a two-stage cover factory, an AI duty officer living in GitHub Actions, and GEO infrastructure. The full retrospective is in this new article (in Chinese) — read the two together: this one is the foundation, that one is how the house grew into a system. ...

September 12, 2023 · 15 min · 3011 words · Xinwei Xiong, Me

Openkf Multi Architecture Image

Automate Multi-Architecture Image Build for openkf and Push to Multiple Image Repositories https://github.com/openimsdk/openkf Description: To meet the requirements of a diverse set of users, we aim to automate the process of building the openkf Docker images for various architectures and push them to multiple image repositories seamlessly. Objective: Automatically build Docker images of openkf for linux/amd64 and linux/arm64 architectures. Push the images to Docker Hub, AliYun Docker Hub, and GitHub Container Registry. Tasks: ...

September 1, 2023 · 2 min · 318 words · Xinwei Xiong, Me

Prow Ecological Learning

why? The story starts with this proposal idea~ 🤖OpenIM cicd robot machine proposal Prow is a CI/CD system based on Kubernetes. Jobs can be triggered by various types of events and report their status to many different services. In addition to job execution, Prow also provides GitHub automation in the form of policy enforcement, chat operations via /foo style commands, and automatic PR merging. For Golang documentation, see GoDoc . Please note that these libraries are for prow use only and we do not attempt to preserve backwards compatibility. ...

August 12, 2023 · 13 min · 2593 words · Xinwei Xiong, Me

Openim Remote Work Culture

Principles Ownership & Leadership When you see issues with the team or project, don’t wait or endure. Speak up immediately, propose solutions, initiate a meeting yourself, and adjust promptly. Don’t suppress your concerns! “Every team member embodies the roles of both Owner and Leader. When issues arise, be proactive in pointing them out and offering solutions. Don’t just wait or stay silent.” Initiative Everyone must take the initiative. Whether it’s about starting something or claiming a task, if you find yourself idle, proactively identify problems and areas of improvement. Innovation stems from this. If there’s no path, pave one yourself! ...

July 13, 2023 · 5 min · 1048 words · Xinwei Xiong, Me
A mechanical quality-control line inspecting and approving changes before release

Advanced Githook Design

What to do if the community is not standardized As the COO of the OpenIM community, I am responsible for the communtiy and [GitHub configuration repository](https:/ /github.com/OpenIMSDK/.github) has been fully configured. And architect and design the entire OpenIM Makefile and CICD flows, as well as the log package, error codes, collaborative flows, contributor documents and community documents used by the entire OpenIM. There will always be some problems at this time, even if you think your Contributor Document is very awesome. , very comprehensive, but still few people are willing to take the time to learn according to the specifications you wrote. This is a very big obstacle for me to build a top open source community, so I have this document today, and I will record it on GitHub Gists , provide instructions and links for pulling and using it, and maintain it regularly. ...

June 16, 2023 · 9 min · 1856 words · Xinwei Xiong, Me

Openim Offline Deployment Design

Base Images Below are the base images and their versions you’ll need: wurstmeister/kafka redis:7.0.0 mongo:6.0.2 mysql:5.7 wurstmeister/zookeeper minio/minio Use the following commands to pull these base images: docker pull wurstmeister/kafka docker pull redis:7.0.0 docker pull mongo:6.0.2 docker pull mysql:5.7 docker pull wurstmeister/zookeeper docker pull minio/minio OpenIM & Chat Images For detailed understanding of version management and storage of OpenIM and Chat: version.md OpenIM Image Get image version info: images.md Depending on the required version, execute the following command: docker pull ghcr.io/openimsdk/openim-server:<version-name> Chat Image Execute the following command to pull the image: docker pull ghcr.io/openimsdk/openim-server:<version-name> Image Storage Selection Repositories: ...

May 19, 2023 · 2 min · 263 words · Xinwei Xiong, Me

Read Openim Project Sealos Openim Source Code

Prepare I have been waiting for this article for too long. It has been about four months. I have also experienced the process of leaping from docker to Kubernetes and CloudNative ecosystem. In turn, if you understand open source, understand sealos, and understand Kubernetes, you will have a suddenly enlightened perspective. The difference between this article and other articles is that this article is written according to my current thinking. The specific why can be found in the previous articles~ ...

May 11, 2023 · 27 min · 5724 words · Xinwei Xiong, Me

Project Management From Theory to Practice

Project management from theory to practice Theory introduction ⌀ Image no longer available · image-20230113165927930 Waterfall Model: ⌀ Image no longer available · image-20230113163949341 Agile Model: ⌀ Image no longer available · image-20230113164028753 Scrum Framework: ⌀ Image no longer available · image-20230113164207851 Differences between traditional and agile **Traditional project management methods typically follow a linear process, achieving project goals through pre-established planning, supervision, and control. Agile project management methods are more flexible and achieve project goals through iteration and continuous improvement. Agile methods emphasize teamwork, adapting to changes, and delivering value quickly. ** ...

May 7, 2023 · 28 min · 5838 words · Xinwei Xiong, Me

Stage Growth of Open Source

✨ Anyone who is familiar with me knows that I am an out-and-out open source enthusiast. After I came into contact with GitHub in my freshman year, I gradually became addicted to the open source world~ Today’s article is very special, I can refer to it and summarize it. The open source stage, as well as the steps and experience of learning open source projects. In the future, I will also grow according to my own plan. Like Learn the growth trajectory of Kubernetes , this article will be [updated long-term, and you can also contribute](https://www.notion . so/f8854a0f60d346d98b9eb2ccb6eaef8f) ~ ...

April 15, 2023 · 19 min · 3917 words · Xinwei Xiong, Me

Use Go Tools Dlv

Debugging Go project prepare: + vscode + golang 1.92 demo go mod init test In main.go file package main import ( "fmt" ) // Swap functions func swap(x, y *string) (string, string) { //XOR exchange *x, *y = *y, *x } func main() { fmt.Println("Hello, world!") //Swap functions for i := 0; i < 10; i++ { a := "a" b := "b" swap(&a, &b) fmt.Println(a, b) } } vscode generates tests with one click >gotest for package/function ::: tip They are to generate test units for packages and test units for functions. ::: Generated as follows: ...

February 24, 2023 · 16 min · 3295 words · Xinwei Xiong, Me

Participating in This Project

Participating in this Project ⚡ Introduction Welcome to our project! This project aims to establish a blockchain-based universal learning platform, promoting the widespread adoption of technology and knowledge through collective wisdom and effort. Whether you are a beginner or an experienced developer, your contributions will have a positive impact on the project. 💡 About This Project (Please Read First❗) This project is initiated by a team passionate about blockchain and software development. We are dedicated to creating an open-source, decentralized learning environment, allowing everyone to access and share knowledge. ...

February 1, 2023 · 5 min · 934 words · Xinwei Xiong, Me

Kubernetes an Article to Get Started Quickly

Kubernetes (k8s) is a container orchestration engine open-sourced by Google from its internal Borg system and hosted by the CNCF. It uses a declarative API to automate deployment, scaling, failover, and self-healing of containerized applications. You describe the desired state of your cluster, and Kubernetes drives the system to that state and keeps it there — which is why it is often called the kernel of the cloud operating system. This article walks you from architecture and components to the core resource objects. ...

April 28, 2022 · 23 min · 4819 words · Xinwei Xiong, Me