人类对自由的追求从未停止,我们用战斗获得民族自由,我们用代码获得双手自由,同时代码作为服务器的奴隶,也开始蠢蠢欲动,革命已经开始,当代码翻身做主,作为开发者的我们又该如何适应新时代的到来?

一切皆代码的革命
代码一直是服务器中的囚徒,然而革命已来,看代码和如何一步一步掌控环境,走向服务。
1.革命:用代码控制编译打包
Pipeline as code:代表技术 Jenkins Pipeline[1]
2.革命:用代码控制服务器
Machine as code:代表技术 Docker
3.革命:用代码控制服务器集群
Server cluster as code:代表技术 K8s
4.革命:用代码控制基础资源
Infrastructure as code:代表技术 Terraform

代码即服务时代的到来
1.传统时代的代码仓库
传统的代码仓库说明中,"运行环境安装向导"文档是必备的,以 SpringBoot 代码[2]为例,自带安装向导[3]文档。
2.新时代的代码仓库
参考代码仓库 aws-lamda-spring-boot2[4],包括 springboot 运行到 aws 的 lamda 需要的全部代码。
3.主流技术对新时代的拥抱
以 Spring[5]的发展为例,从 SpringBoot 开始,不断对环境控制进行集成,直到 SpringNative,已经可以直接构建镜像。

代码即服务下的云原生架构
1.容器服务[6]:用代码控制一切

代码即服务下的研发平台战争
在代码即服务的时代,各大厂商都在建立自己的云上研发闭环,谁做好云上的开发平台,谁就能抓住下一带云原生开发者的心。
1.代码托管之战:得代码者得天下
• 微软宣布收购 GitHub[9]
• 谷歌投资 Gitlab[10]
• AWS 自建私有仓库 CodeCommit[11]
• 阿里云企业级代码托管平台 Codeup[12]
2.在线开发之战
• 微软整合 VS Code 和 Github,推出 Github Codespace[13]
• 谷歌另辟蹊径,做线下 IDE 插件 Cloud Cod[14],对接 Google Cloud
• AWS 在线云 IDE:Cloud 9[15]
• 阿里云 IDE:DevStudio[16]
3.在线构建 DevOps 之战
• Azure DevOps[17]
• Google DevOps[18]
• AWS DevOps[19]
• 阿里云云效[20]
4.研发体系发展
• 在代码即服务时代,Git 作为代码版本管理软件,加上 WebHook,可以轻松地管理整个代码的运行生命周期,GitOps 应运而生。GitHub 吸 收GitOps 思想,推出 GitHub Actions[21]。

阿里云开发平台
1.阿里云开发平台,通过整合云原生产品和云效,完成了云原生开发闭环
• 云开发平台和天猫精灵,钉钉团队合作,整合小程序的前后端一起化开发部署,解决小程序云和用户云不能打通问题,给小程序加上用户云能力。
• 云开发平台应用可以在团队内共享,团队内的技术交流,再也不仅仅是 clone 代码。
• 云开发平台市场共享,后续可以合作方的技术方案直接在市场上构建,让云服务提供商再也不用现场帮助用户构建和维护云环境。

结语
诚挚邀请大家加入云开发平台,一起共建服务百万阿里云开发者阿里云的云上研发平台。
参考资料
• [1] Jenkins Pipeline:
https://www.jenkins.io/doc/book/pipeline/ • [2] SpringBoot 代码: https://github.com/spring-projects/spring-boot • [3] 安装向导: https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/html/getting-started.html • [4] aws-lamda-spring-boot2: https://github.com/galovics/aws-lambda-spring-boot2 • [5] Spring: https://spring.io/ • [6] 容器服务: https://www.aliyun.com/product/cs/ask • [7] 微服务引擎: https://www.aliyun.com/product/aliware/product/sae • [8] 函数计算: https://www.aliyun.com/product/fc • [9] GitHub: https://github.com/ • [10] Gitlab: https://about.gitlab.com/ • [11] CodeCommit: https://aws.amazon.com/cn/codecommit/ • [12] Codeup: https://codeup.aliyun.com/ • [13] Github Codespace: https://github.com/features/codespaces/ • [14] Cloud Code: https://cloud.google.com/code • [15] Cloud 9: https://aws.amazon.com/cn/cloud9/ • [16] DevStudio: https://ide.aliyun.com/ • [17] Azure DevOps: https://azure.microsoft.com/en-us/services/devops/#customer • [18] Google DevOps: https://cloud.google.com/devops?hl=zh-cn • [19] AWS DevOps: https://aws.amazon.com/cn/devops/ • [20] 阿里云云效: https://devops.aliyun.com/ • [21] GitHub Actions: https://github.com/features/actions引用 Performance of running Spring Boot as AWS Lambda functions:
https://arnoldgalovics.com/performance-of-running-spring-boot-as-aws-lambda-functions
视频资料:阿里云 Serverless Developer Meetup 上海站