美文网首页
ARTS-07月1日到07月07日

ARTS-07月1日到07月07日

作者: needrunning | 来源:发表于2019-07-22 22:36 被阅读0次

英文阅读

本文介绍了Gitlab CI CD,属于Gitlab的官方文档 https://about.gitlab.com/product/continuous-integration/

文中涉及到几个概念Gitlab CI,Gitlab CD,GitLab Runner,Pipelines

Gitlab CI

What is CI?
Continuous Integration is the practice of integrating code into a shared repository and building/testing each change automatically, as early as possible - usually several times a day.

CI翻译为持续集成,是基于团队共享代码库,开发人员合并提交代码后,触发事先编写好的pinpine构建任务,对代码进行构建,测试的过程。

CI是基于共享代码库的代码集成实践,基于每一次的更改进行构建和测试,通常一天进行很多次。

What is CD?

Continuous Delivery adds that the software can be released to production at any time, often by automatically pushing changes to a staging system.

CD用于对稳定系统的推送,在任何时候,自动的可以发布到生产环境。
Continuous Deployment goes further and pushes changes to production automatically.

Why your team needs a CI/CD workflow

Continuous Integration
Detects errors as quickly as possible: fix problems while fresh in developers mind

更快更可能的检测到错误

Reduces integration problems: smaller problems are easier to digest
降低集成问题,小的问题容易被消化

Avoid compounding problems: allows teams to develop faster, with more confidence
忽略混合问题,允许团队更快,更信任的开发

Continuous Delivery

Ensures every change is releasable: test everything, including deployment, before calling it done
确保每次更改都是可发布的
Lowers risk of each release: makes releases “boring”
对于每一次发布是低风险的
Delivers value more frequently: reliable deployments mean more releases
更多的部署代表更多的版本
Tight customer feedback loops: fast and frequent customer feedback on changes
在变化中快速频繁的接受客户的反馈

image.png

What are the advantages of GitLab CI/CD?

  • Integrated: GitLab CI/CD is part of GitLab, enabling a single conversation from planning to deployment (and beyond)
    GitLab CI/CD 是GitLab 的一部分
  • Open source: CI/CD is a part of both the open source GitLab Community Edition and the proprietary GitLab Enterprise Edition
    社区版本和企业版本均是开源的
  • Easy to learn: See our Quick Start guide
  • Seamless: Part of the single GitLab application, with a single great user experience
  • Scalable: Tests run distributed on separate machines of which you can add as many as you want
  • Faster results: Each build can be split in multiple jobs that run in parallel on multiple machines
  • Optimized for delivery: multiple stages, manual deploy gates, [environments,]
    (https://docs.gitlab.com/ee/ci/environments.html) and variables
image.png

GitLab is one application for the entire DevOps lifecycle

GitLab是整个DevOps生命周期的一部分

  • Build your application using GitLab Runners
    构建
  • Run unit and integration tests to check if your code is valid
    测试
  • Look at a live preview of your development branch with [Review Apps]
    (https://about.gitlab.com/product/review-apps/)before merging into stable
    在线预览
  • Deploy to multiple environments like staging and production, and support advanced features such as canary deployments
    基于不同环境的部署
  • Monitor performances and status of your application
    监控
    image.png
image.png

Architecture

GitLab CI/CD

GitLab CI/CD is a part of GitLab, a web application with an API that stores its state in a database. It manages projects/builds and provides a nice user interface, besides all the features of GitLab.

GitLab Runner

GitLab Runner is an application which processes builds. It can be deployed separately and works with GitLab CI/CD through an API.

In order to run tests, you need at least one GitLab instance and one GitLab Runner.

GitLab Runner

To perform the actual build, you need to install GitLab Runner which is written in Go.

It can run on any platform for which you can build Go binaries, including Linux, OSX, Windows, FreeBSD and Docker.

It can test any programming language including .Net, Java, Python, C, PHP and others.

GitLab Runner has many features, including autoscaling, great Docker support, and the ability to run multiple jobs concurrently.

Pipeline

一次 Pipeline 其实相当于一次构建任务,里面可以包含多个流程,如安装依赖、运行测试、编译、部署测试服务器、部署生产服务器等流程。

技巧呈现

php-ext-excel-export扩展使用札记

PHP环境下的导出功能优化改造,单次同步导出数据量在2万之上。 原有导出功能使用的PHP5.6+PHPExcel.这一次换成了PHP7.2+php-ext-excel-export。同步导出几万条性能还可以接受。

文章分享

分享文章 Mac安装Zookeeper带来的Zookeeper简单介绍及思考

本篇以PHP环境下Zookeeper扩展安装为起点,简单介绍了Zookeeper基本概念和使用场景,不是很完整。如果PHP和Zookeeper作为一个分布式系统的客户端而言,网上的使用案例非常有限,跟PHP环境下熔断组建的使用一样,案例非常少,稳定性不能保证。

从两方面来看这个事:一,业界基本没有这样的使用场景和技术案例,为什么没有,因为PHP语言生态不适合做这块,能做吗,或许能做,但是不适合,不是强项。二,如果有类似的需求,我们不应该选择PHP来做这块,因为整个业界都没有这样做的,我们应该把经历花在更有意义的选择上。

参考资料

用 GitLab CI 进行持续集成

相关文章

  • ARTS-07月1日到07月07日

    英文阅读 本文介绍了Gitlab CI CD,属于Gitlab的官方文档 https://about.gitlab...

  • 月到天心

    走在那秋寒的大地,那清冷的风掠过脸颊 总有一份凝重的伤感 秋风寒露无情地冰封着我的心,孤月哀叹岁月的哀愁。 眼眸所...

  • 月到中秋

    新月弯弯 明月满满 自古月华 迷痴多少俗人 不应有恨 不应有泪 从来杯满 醉倒多少情人 该是何等心境 月弯月圆都有...

  • 月到中秋

    文/龙秀 圆月爬上心房 琴声悸动了曙光 秋意氤氲在饼香里 睡梦中默念着故乡 爱寄挂在苍穹 乡愁匍匐在怀中 风缱绻着...

  • 月到中秋

    【五绝(新韵)】.月到中秋 当代/阿馨 朗月明如镜,何时照我心。 窗前遥寄语,夜半更牵魂。

  • 月到中秋

    文 / 潇 萱 总是害怕身在异乡的夜 月到中秋时分格外冷清 这月光太冷,也太矫情 或许只能躲在文字背后 念儿时中秋...

  • 月到天心

    作者:林清玄 二十多年前的乡下没有路灯,夜里穿过田野要回到家里,差不多是摸黑的,平常时日,都是借着微明的天光,摸索...

  • 月到仲秋

    2017年10月4日,雨,仲秋节,早上醒来的比较早,习惯的拿上手边的手机看下时间顺便看两眼微信,哦!今天比平时醒的...

  • 月到中秋

    还是那轮月,在苏轼但愿人长久,千里共婵娟的相思里低徊, 还是那轮月,在李白举杯邀明月,对影成三人的孤独里流连, 还...

  • 月到中秋

    月到中秋 在秋天还没开始就已经到来 一直怀疑季节是否错位 常常在开足的空调间发问 却在那个今夜还是明晚 一场来自北...

网友评论

      本文标题:ARTS-07月1日到07月07日

      本文链接:https://www.haomeiwen.com/subject/lchihctx.html