Hello everyone, MY name is Wang Shengsong. I have introduced myself many times, but I will not talk about it here.

At the beginning of 2021, I put on the shelves a gold digging-book, Implementing a CI/CD Process from 0 to 1. It took one year from idea to landing, two rounds of output, hundreds of people participated in the internal test, and finally hit the shelves to dig gold. So here, I share with you the birth process of my little book.

The previous content

A little bit of background. In 2019, the team did a baseKubernetes 的 CI/CDPlatform, including continuous build, continuous deployment, pipeline, artifact library and other functions.

In the middle of 2020, Teacher Zhang Renyang came to me and asked me if I could issue a CI/CD training camp for Everest. This is where the story begins.

At that time, Beijing was hit by a new epidemic, and the team worked from home. It gives me some extra time to write. There was only one issue: useJenkins + GitlabDo the CI,AnsibleDo the CD deployment.NexusMake a mirror library. Under the pressure of working overtime, I wrote the first issue every morning, and finally wrote it for about a month.

After the camp opened, hundreds of students came to sign up. Most of them are senior front-end development engineers in their companies, and a large number of them are from big companies such as Baidu and Didi.

I also did a questionnaire before I started, asking them what they knew about the CI/CD tool chain. A total of 163 questionnaires were collected. After looking at the data, there are 31 students who have practiced Docker. There is only one student who has practiced Kubernetes.

This number is more or less, say less is not less, for the front end is already very ok. At the end of the first phase, the page views reached more than 5K, among which some students wrote articles and gave feedback after practice.


I was inspired by the positive feedback of the first phase, and Miss Zhang also consulted me about the second phase in September, which I accepted without hesitation. The second phase is only Kubernetes. Not so much CICD camp II as CD camp. At the same time, the preparation time of the second phase is longer, up to 2 months or so.

idea

At the end of the second phase, Mr. Zhang asked me if I was interested in publishing a small book, and I started to think about it from that moment on. After struggling, I decided to apply for a try.

I submitted the application information through the Nuggets pamphlet author application form. Feedback from the official staff was also very fast, and I got the permission to write the booklet that afternoon. Once again, the application questionnaire from the previous booklet is attached: wj.qq.com/s2/7104567/…

Transformation & Merger

Because the first and second phases did not take into account so much when writing, they were not coherent in the design, resulting in a serious fragmentation of the content of the second phase, so we considered to do transformation after merger. But the costs of renovation and consolidation are still considerable.

The specific transformation is as follows:

  1. Cut one issueAnsible.SSHDeploy, replace with laterKubernetes 
  2. Cut offDocker in Docker 。
  3. GitThe source forGitee 
  4. Phase I merger

Ansible was cut because Kubernetes was already available to replace Ansible deployment, and Ansible was just a bulk operation service in phase 1, so it didn’t make sense.

Docker in Docker was cut down because of security vulnerabilities, and this fixed service is also suitable for native deployment. So Jenkins was deployed on the machine as a native deployment.

Git source replacement is mainly due to cost. Gitlab is resource-intensive and costly to deploy. And the goal is only to learn the role of Git in CICD, which has little relevance to the platform. So I switched to Gitee Free.

There are only so many specific changes to content. In addition, we also made some changes in content organization structure:

Optimize the spread and independence of individual articles

Independence is something to consider and optimize. In the process of the small volume, often a piece of middle knowledge or space, will rely heavily on the preceding knowledge. It’s hard to spread a single article. Spread the word, the reader will also feel obscure reading.

So when designing the catalog, I try to break down the process into concepts, and put the summary and process series at the end. This advantage is convenient for readers can break to continue learning, but also conducive to the spread and promotion of the content of a single length.


Of course, in order to accommodate the readers of the small volume, there are many explanations and descriptions of the basic knowledge. Examples are service discovery, grayscale publishing, and rolling publishing. This will best accommodate the majority of readers, making it a smoother and friendlier read.

Optimize the title

Even if the style of the content is progressive, the title friendly can help to understand. Below is a comparison of grayscale publishing and scrolling publishing titles. The title adds some narrative language, which can briefly explain the gains and benefits of learning this chapter, and can stimulate the reader’s interest in learning.

Learning grayscale publishing, what is the role of rolling publishing? This is to solve the problem of downtime and unavailability when publishing deployment services. Then put this advantage in a popular explanation on the title, the reader will be interested to trigger reading.

The reader comes to learn this part of the knowledge, some to learn from the beginning to the end, and some to learn only a small part of the difficulty and confusion. For example, grayscale rolling publishing, health probe DNS. After the title is written clearly, grasp the pain points of this part of the readers, and also encourage this part of the readers to read.

Problem driven

You can also see that learning can be incremental in this volume. For example, after you learn to integrate Jenkins + Nexus + Docker, you can also deploy your own service using SSH, but it is not as good as K8S experience and performance. Therefore, the study of each chapter is actually solving some deficiencies and loopholes in the previous knowledge.

After we broke the process down into concepts in the first transformation,Can add the current length to solve the pain points and problems, will be more conducive to learning and understanding. For example, inConfigMapIn this chapter, first write down the problems solved by the concept, and then write down the positioning and meaning of the concept. Readers will have a clearer understanding and deeper understanding of the concept to be learned.

Editorial Board review

The Nuggets had three rounds of editorial board reviews. There will be one round at the time of application, one round after the general content is determined, and one round after the final content is completed. The overall process will take 2-3 weeks, and there will be a special person for docking. I won’t say much here

Divided into

Post an arc of friends

conclusion

The most common feeling I experience when WRITING is helplessness. Worried about what happens if you don’t get on the fight? What if it ends badly? But fortunately, I persevered. And of course it ends well.

I’m not going to write much else, there are a lot of stories in between. We welcome your questions in the comments section.

Thank you again for the coordination and support of Brother Youhu and sister @Xiao Wu. Thanks to Teacher Zhang Renyang, Teacher Scott and the students of Qomolangma for their comments and suggestions.