Author: Zhou Xinyuan
Personal profile
Hello everyone, my name is Zhou Xinyuan. I am an undergraduate student at Hangzhou Normal University. I will go to Yunnan University for postgraduate study in September this year. Undergraduate research direction is the application of docker container in network attack and defense. Currently, as a sealer member, he has joined the research and development of the core module sealer runtime.
Personal homepage: https://github.com/starComingup
introduction
sealer is a cluster mirroring software open sourced by Alibaba. It is a delivery tool for quickly installing Kubernetes. It can complete the installation of a new cluster with one click in a short time. The concept of "cluster mirroring" advocated by sealer can help users who use docker to smoothly transition to Kubernetes.
As a quasi-research "post-00", at the beginning of June 2022, I joined the sealer's Developers queue with a longing for open source. At this time, it has been a year since the start of sealer, and I entered the CNCF sandbox stage around April 2022. .
I believe that many people are the same. Most of the people who come into contact with Github are cloned from it and then change it to hand in an assignment, at least for undergraduates. As a real Github community project, it needs to have an active ecology, active submissions (Pull Request), and active suggestions (Issues). And I, with the git commit/pull/clone/push that I used in my practice, had no idea how to join the community.
The following is a story of my personal growth with sealer to lead you to experience the open source journey from Xiaobai to core function developer. At the same time, this article is also an article leading the introduction of open source Xiaobai for your reference.
Accidental and inevitable participation in sealer open source
After finishing the postgraduate entrance examination in the last semester of my senior year, I relied on Java, SpringBoot, docker and other technologies accumulated by my undergraduate project experience to find a job. At this time, it coincides with a large number of container cloud jobs in Hangzhou. I was fortunate to join Hangzhou Harmony Cloud Technology Co., Ltd., and by chance, I entered the cloud native project in cooperation with Alibaba Cloud, and I met the leader of the team at the position. -- Sun Hongliang. Later, it coincided with the need for technical research. I browsed on Github every day and found that the team was operating the open source delivery tool sealer, but I only heard of the name of sealer - it is known as "delivering a cluster through cluster mirroring in three minutes". So sealer cast a veil of mystery in my mind, coinciding with the admission notice at the end of April, I wonder if I can contribute to open source in the future.
Around mid-May, I decided on my plan to go to graduate school. At this time, I was quite confused because I couldn’t stay in Hangzhou, but I was reluctant to stick to the cloud native field for three years. I heard at a weekly meeting that sealer is attracting open source volunteers to participate in the Summer of Open Source-2022 (hereinafter referred to as OSPP). I heard: Isn't this a clear opportunity? So I left the team at the end of May and started to work on the sealer's project proposal on OSPP to support the installation of K0s. June's selection is on schedule - of course, with the support of Hongliang.
The mysterious attraction of CNCF sealer to me
If participation in open source through OSPP is a necessity, there must be a reason for choosing among the many projects. I just started to follow three cloud-native communities, one Java debugging ceiling Arthas community, another Kubesphere community, and sealer.io community, and the projects of the latter two communities can be said to replace each other (KubeKey and sealer). Why finally focus on sealer, I think there are three unswerving reasons:
- sealer is a CNCF Sandbox project. I believe that everyone has seen CNCF's Landscape panorama more or less, and the three stages of project growth: Sandbox, Incubating, Graduated. I wonder if I can have a project that goes from sandboxing to incubation to graduation to accompany my growth.
- sealer has the innovative power of "cluster mirroring". As a docker user, I admire the convenience brought by dockerfile and docker image technology. After seeing the cluster image, I can't help but imagine how sealer encapsulates cloud infrastructure in Kubefile.
- Sealer is full of more challenges. In the joint promotion of the community and users, there are some immature places in the project. These problems are listed in RoadMap and Issue, not only the tasks of OSPP.
Getting started with sealer open source stumbling block
As a newcomer, it can be said that when I just joined the community, I can't be fluent in Git, I don't know how to submit an Issue, I can't initiate a code merge request (Pull Request). Most of the students who want to participate in open source are in a similar situation to me.
Joining the community midway is not as difficult as starting a project, but it is complex enough for a novice. After using sealer to install a cluster and experience its functions, an important step in transforming into a developer is to become familiar with the code. I thought it would be done by opening the code editor Goland, but as the community maintainer said, "Don't buy in all", open source The code and community are not 100% great. As a binary installation tool, the verification code is not intuitive, and the unit test is not perfect, which also causes a lot of trouble in verifying the code logic.
The first stick of fighting tiger: eating official documents and source code
During the project launch period in June, it is a silky experience to combine the official documentation with the README and source code in the project. First of all, from the official documentation, we can understand its architecture, modules, and functions, which are very important for newcomers who are on the road. From a personal point of view, I focus more on runtime and its related architecture. The official documentation mainly focuses on the construction of cluster mirrors and the design of cluster mirror warehouses. In terms of code, compare the official installation documentation of kubeadm to see the business logic in the runtime module, and the interface invoked from the cobra command line follows the source code to the implementation layer.
The second hit of the tiger: the first issue to the sealer
The first issue in the sealer community was relatively fierce. It was proposed that the Runtime module has a high degree of coupling, and the extension support for K0s, K3s, and K8s is not very friendly, and at the same time abstracts the top-level cluster management interface. When I clicked comment for the first time, I repeatedly used the Chinese-English translation software to check every sentence, for fear that the grammar and words were wrong. But soon the community maintainers responded and expressed their willingness to give me this opportunity to transform, so I started the installation research and transformation of K8s and its downstream versions for half a month.
The third stick to beat the tiger: the first Pull Request to the sealer
The advantage of joining a CNCF-approved community is that there are guide documents for CODE_OF_CONDUCT, CONTRIBUTING, etc., and I quickly learned Git skills such as fork and rebase. The first submission is about modifying the Github Issue template for bug feedback, and it is also the first time to familiarize yourself with the PR process. But when the PR was submitted for the first time, the first check on the DCO signature failed. After a long time of anxiety, the signature was finally fixed. As a result, the commits branched due to multiple submissions. In the end, the PR was directly re-opened again. The first PR was recognized and merged by the community after 3 accidents.
Gradually integrate into sealer
The installation function of sealer supporting K0s and K3s will meet with you soon. The following is a simple demonstration of use. Package your own application into the cluster image through Kubefile, and you can start a K3s cluster through sealer run.
FROM k3s:v1.24.1
COPY imageList manifests
After completing the basic steps of participating in open source, I invested in the reconstruction of the core module runtime, polished many versions of the design draft before development, and used official installation tools such as Kubeadm, K0s, K0sctl, and K3s-install to install the cluster several times. Finally, the installation experience of various clusters and the abstraction of common interfaces are formed. There are also many problems, such as: which installation bootstrap to choose, whether the actions to manage the cluster are consistent, whether the configuration file can be pulled from the Registry after modifying the mirror repository to SeaHub:5000, how to create K0s, K3s clusters mirroring, etc.
The picture below is the draft I formed when I researched the K0s, K3s, and K8s bootstrap programs. By studying the installation of various downstream versions of K8s, I helped sealer to complete the refactoring of the runtime module, supplemented the unit test, and facilitated the subsequent development of the extended runtime.
Step-by-step participation in community meetings
The sealer community has a Maintainer meeting every two weeks. I like this meeting very much. A group of students with technical enthusiasm are here to deal with some issues related to Feature and Issue. Everyone has different ideas and proposes some future functions and bugs of sealer. Understand and help the sealer community build better. I remember the first time I was in a panic when I spoke at a community meeting, and I just needed to share the design draft of the runtime. The design draft has been written quite clearly, but because I have to introduce and accept questions from the community maintainers, I feel a little nervous when I speak. In the end, I participated and found that everyone was amiable and did not ask questions. On the contrary, they gave me a lot of suggestions to promote thinking.
How to get involved in the open source community as a novice
The first is the RoadMap developed by the open source community with clear goals. In this case, the open source community generally recruits community volunteers through some open source activities. Such opportunities come every year, such as the summer of open source at home and abroad, as well as open source propositions regularly given by various Internet manufacturers. Most of these propositions are willing to give students Chance.
The second is to find errors and locate the code during use, or find that the description in the official documentation is inaccurate. At this time, you can draw the community's attention to the individual by raising an Issue and submitting a PR.
Of course, if you are very interested in participating in the open source community, learning to send a self-recommendation email is an important step towards the community. At the same time, during the participation process, you must communicate with the community maintainers in a timely manner, so that you will gain more many ideas.
Summarize
Open source is a form of inclusiveness and openness, quoting a sentence in "The Law of Open Source": "Open source is not synonymous with free, it is the successful practice of technology openness, the driving force for the sustainable development of innovation, full of opportunities and risk."
Participating in the open source community is not an easy task, especially if you want to maintain the community better. As a novice in open source, when there is no rich experience in coding and open source, the first thing that is easy to persuade is your heart. But as a newcomer, I think: sealer is very good now, then I can draw nourishment from the community, and when it grows to a certain level, then I can in turn promote the progress of sealer. Looking back on the past month and a half of participating in the community, now when faced with sealer issues, I can easily raise or comment on Issues on Github, and I can also participate in discussions in the Maintainer Group. The sealer community focuses on code specifications, annotation specifications, functional design, and collaborative construction. It has given me room for rapid growth.
From using the software to raising an Issue to launching a Pull Request, and changing from a user to a developer, such an entry point for participating in open source is a good way to start for open source beginners.
Of course, sealer is also progressing in a more stable direction with the joint efforts of users and developers. Here, let us also look forward to the sealer's ecology will be stronger in the future.
Welcome to scan the QR code below or search the group number 34619594 to join the CNCF sealer community exchange group!
Click here to learn about the sealer project now!
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。