Mirroring service container together IDE plug-in, one-touch deployment, continuous integration and delivery

 

Container technology provides a standardized way of delivery, the application code and code-dependent environment are packaged together so that one has nothing to do with the environment deliverables, it can be used at any stage of the software life cycle, completely changed the traditional software payment method.
Even it can be said that after the container technology, operation and maintenance of key issues DevOps, CI / CD, etc. have a qualitative leap: dynamic creation and destruction of resources, more lightweight container technology can ensure the consistency of the environment can be further improve iterative frequency, various containers platforms can better ensure application high availability, auto-scaling, business continuity, and so on.
Today will share with you the support of two-eleven container mirror service ACR, and how it is implemented with IDE plug-ins and CICD / native cloud application delivery chain to achieve a continuous integration and deployment of key, the following is an outline of this article:
  • What is the container mirror service ACR
  • How to match the free IDE plugins to achieve a key deployment
  • How to use CICD / cloud-native application delivery chain to achieve continuous integration and delivery
Meng want to hear soft sounds Online explain? Ali goes little sister live, taught you, at 20:00 on December 5 and 9 o'clock, the studio waiting for you (there is a screen shot barrage to send gifts!)
ACR container mirror service
In order to better support the two-eleven large-scale distribution needs, container mirror service (Alibaba Cloud Container Registery, ACR) team advance planning and iterative updates, enhancing the overall performance of the large-scale distribution scene, observability and stability. Before the advent of the new two-eleven, container mirror service has reached a number PB mirror hosted amount of the average monthly mirrored pull up hundreds of millions of times , spent 544,000 transactions a smooth peak.
阿里云镜像仓库 ACR 分为默认实例版与企业版,虽然结合阿里云产品做了多维度优化,但是并不与阿里云强制绑定。ACR 默认实例版面向容器开发者,提供安全的镜像托管、便捷的镜像授权功能,方便用户进行镜像全生命周期管理,并且简化了 Registry 的搭建运维工作,支持全球 20 个地域的镜像托管。ACR 企业版面向安全需求高、业务多地域大规模部署的企业级客户,提供大规模镜像分发能力、企业级的安全独享特性,以及云原生应用交付链,全链路可观测、可跟踪以及可设置,可实现一次应用变更,多场景自动化交付。
 
如何搭配 免费 IDE 插件 实现一键部署
 
 
Cloud Toolkit 是一款免费的本地 IDE 插件,很多技术博客都有相关的测评,是一款口碑较好的插件。它能够帮助开发者更高效地开发、测试、诊断并部署应用。设置好插件的初始配置之后,可以将本地应用 一键部署 到任意服务器 Host,甚至云端(ECS、ACR、Kubernetes 和 小程序云 等);并且还内置了 Arthas 诊断、Dubbo工具、Terminal 终端、文件上传、函数计算 和 MySQL 执行器等工具,减少了切换工作界面的时间,灵巧且实用,推荐安装试用一波。下面介绍,插件如何将应用一键部署到容器镜像服务 ACR 。
开发者的部署包从形成镜像到镜像仓库,手动操作的话,每一次都需要经历下图 4 个步骤:登录阿里云Docker Registr--> 从Registry中拉取镜像 --> 将镜像推送到Registry --> 选择合适的镜像仓库地址,但是,使用 Cloud Toolkit ,开发者可以实现在本地 IDE 就能一键部署到镜像仓库。
 
(一)配置插件首选项
安装完插件之后,点击: 顶部菜单Tools --> Alibaba Cloud Toolkit --> Preferences-->左边列表的 Alibaba Cloud Toolkit--> Accounts ,出现如下界面,配置阿里云账号的 AK 和 SK,即可完成首选项配置。 (如果是子账号,则填写子账号的 AK 和 SK)
 
 
(二)设置本地 Docker 镜像打包
点击: 顶部菜单Tools --> Alibaba Cloud Toolkit --> Preferences --> 左边列表的 Alibaba Cloud Toolkit --> Docker ,如下图,设置本地 Docker 镜像打包。
 
 
(三)部署应用
第一步: 在 Intellij IDEA 中,如下图点击: 顶部菜单Tools --> Alibaba Cloud -->Deploy to ACR/ACK --> Deploy to ACR
 
 
第二步:设置 Image
  • 在 Image 标签页中,选择本地应用程序的 Context Directory 和 Dockerfile (通常会根据您本地的应用工程自动识别并设置)。
  • 选择容器镜像服务的地域、命名空间和镜像仓库。
 
 
第三步:执行部署
点击 Run 按钮之后,即可完成将本地 Docker 镜像推送到 ACR 中去。
如何运用 CICD/云原生应用交付链 实现持续集成与交付
 
 
ACR企业版的云原生交付链在 托管 交付 分发 等方面进一步提升,历经双11大促,沉淀了云原生应用万节点协同的技术经验。
目前支持容器镜像、Helm Chart 两类云原生应用资产,并采用独立网络访问控制,可细粒度控制公网及VPC 网络的访问策略,仅允许符合策略的来源方访问资产,保障访问安全。
同时实现了整个应用交付周期的流程自动化,开发者只要一次变更应用,按照配置多场景交付,即可实现一次应用变更,全球化多场景自动交付。
 
在应用交付环节,ACR EE 支持自动发起静态安全扫描并自定义配置安全阻断策略。一旦识别到静态应用中存在高危漏洞后,可自动阻断后续部署链路。用户可基于漏洞报告中的修复建议,更新优化构建成新的镜像版本,再次发起交付。
建设 CICD 体系还需要考虑到整体稳定和尽可能不断提升整体交付能力,比如监控报警、容错容灾、依赖治理、限流降级、容量规划。这里可以和大家分享 ACR 团队的相关经验:
  • 在依赖治理方面,要对云原生应用交付链中相关重点环节及外部依赖进行统一管理,识别热点仓库及追踪交付链执行结果;
  • 在限流降级方面,最好分析识别云原生应用分发核心环节的主次业务功能,优先保障主要业务逻辑完成,次要业务逻辑可降级延后处理;
  • 在容量规划方面,平台根据上下游业务变化情况,对资源进行按需扩容,确保云原生应用正常交付完成。
容器镜像服务 ACR 与 插件 Cloud Toolkit 免费面向开发者,帮助技术人员提高开发、部署效率,在减少时间成本的同时提高了业务的质量,还有双十一的顶级洪峰流量场景作为实践案例,希望这篇文章能帮助到有需要的人,并通过相关文章快速上手,真正实现业务价值。
 
 
本文为云栖社区原创内容,未经允许不得转载。

Guess you like

Origin www.cnblogs.com/yunqishequ/p/11995238.html