GitLab全方位

GitLab全方位

建模

愿景

愿景.png

業(yè)務(wù)建模

業(yè)務(wù)用例圖

交付軟件

業(yè)務(wù)用例圖

業(yè)務(wù)序列圖

業(yè)務(wù)序列圖

需求建模

系統(tǒng)用例圖

系統(tǒng)用例圖

領(lǐng)域建模

系統(tǒng)用例 持續(xù)集成/CI

CI

Job

Script

Command

控制類:PipeLine

內(nèi)容收集

歷史

GitLab is a web-based Git-repository manager providing wiki, issue-tracking and CI/CD pipeline[6] features, using an open-source license, developed by GitLab Inc. The software was created by Dmitriy Zaporozhets and Valery Sizov,[7][not in citation given] and is used by several large tech companies including IBM, Sony, Jülich Research Center, NASA, Alibaba, Invincea, O’Reilly Media, Leibniz-Rechenzentrum (LRZ), CERN,[8][9][10] European XFEL, GNOME Foundation, Boeing, Autodata, and SpaceX.[11]

The code was originally written in Ruby, with some parts later rewritten in Go, initially as a source code management solution to collaborate with his team on software development. It later evolved to an integrated solution covering the software development life cycle, and then to the whole DevOps lifecycle. The current technology stack includes Ruby on Rails and Vue.js

It follows an open-core development model where the core functionality is released under an open source (MIT) license while the additional functionality is under a proprietary license.

收購

  • Gitorious: GitLab acquired open source hosting and on-premise enterprise Git management service provider Gitorious in March 2015.
  • Gitter: In March 2017, GitLab acquired Gitter, an instant messaging platform for developers and declared to open source Gitter codebase.
  • Gemnasium: In January 2018, GitLab acquired Gemnasium, a company providing software and services to mitigate security vulnerabilities.

Comparison of source code hosting facilities

愿景

“GitLab supports development teams with a well-documented installation and configuration processes, an easy-to-follow UI, and a flexible per-seat pricing model that supports self service. GitLab’s vision is to serve enterprise-scale, integrated software development teams that want to spend more time writing code and less time maintaining their tool chain.” - CI Wave Report, FORRESTER

GitLab is a "Strong Performer" in The Forrester New Wave: Value Stream Management Tools, Q3 2018. According to the report, “GitLab combines end-to-end capability with the power of open source. GitLab offers a DevOps tool for each step of the software development process. Top-level views sitting across these tools provide its VSM functionalities." - VSM Report, FORRESTER

2018年底,愿景

GitLab認(rèn)為DevOps開發(fā)工具的范圍應(yīng)當(dāng)在一個(gè)應(yīng)用中包括開發(fā)者、運(yùn)維人員和安全團(tuán)隊(duì)。這樣能顯著減少挫折感,增加合作,啟動(dòng)一個(gè)有競(jìng)爭(zhēng)力的優(yōu)勢(shì)。帶著上下文轉(zhuǎn)換Doing Aways并且在一個(gè)地方就有必要的信息,能夠閉環(huán),并且使得團(tuán)隊(duì)之間相互更好的理解成為可能。

GitLab reimagines the scope of DevOps tooling to include developers, operations, and security teams in one single application. This dramatically reduces friction, increases collaboration, and drives a competitive advantage. Doing away with context switching and having all of the necessary information in one place closes the loop and enables a better understanding of each team's needs.

目標(biāo):200%更快的DevOps生命周期

從項(xiàng)目計(jì)劃和源代碼管理到CI/CD和監(jiān)控,GitLab是整個(gè)DevOps生命周期的單一應(yīng)用。只有GitLab允許并行的DevOpes,使得軟件生命周期200%更快。

2018愿景
產(chǎn)品類別

用例

https://about.gitlab.com/direction/#vision

管理/Manage

計(jì)劃/Plan

創(chuàng)建/Create

驗(yàn)證/Verify

打包/Package

發(fā)布/Release

配置/Configure

監(jiān)控/Monitor

安全/Secure

特性

可視/Visible

看到任何重要的事情/See everything that matters

  • 保持在流程中/Stay in your flow
  • 不因同步而等待/Don’t wait on syncing
  • 管理項(xiàng)目,而不是工具/Manage projects, not tools
  • 改進(jìn)周期時(shí)間?/Improve cycle time.

高效/Efficient

無需等待地合作/Collaborate without waiting

  • 立即開始/Start immediately
  • 并行工作/Work concurrently
  • 沒有多余的傳遞/No more handoffs

治理/Governed

自信地開發(fā)和運(yùn)維/Develop and operate with confidence

  • 內(nèi)置的安全和合規(guī)/Security and compliance already built-in
  • 簡(jiǎn)化用戶管理/Simplify user management
  • 順暢的審計(jì)/Expedite auditing
  • 有把握地行動(dòng)/Act with certaint

業(yè)務(wù)建模

業(yè)務(wù)用例:交付軟件,運(yùn)維系統(tǒng)

定義

Continuous integration (CI) systems provide automation of the software build and validation process driven in a continuous way by running a configured sequence of operations every time a software change is checked into the source code management repository. These are closely associated with agile development practices and closely related to the emerging DevOps toolsets.

來自 https://blogs.gartner.com/it-glossary/continuous-integration-ci/

DevOps

DevOps represents a change in IT culture, focusing on rapid IT service delivery through the adoption of agile, lean practices in the context of a system-oriented approach. DevOps emphasizes people (and culture), and seeks to improve collaboration between operations and development teams. DevOps implementations utilize technology — especially automation tools that can leverage an increasingly programmable and dynamic infrastructure from a life cycle perspective.

來自:https://blogs.gartner.com/it-glossary/?s=devops

業(yè)務(wù)序列圖

軟件生命周期的各個(gè)階段:

軟件生命周期

管理

Gain visibility and insight into how your business is performing.
GitLab helps teams manage and optimize their software delivery lifecycle with metrics and value stream insight in order to streamline and increase their delivery velocity. Learn more about how GitLab helps to manage your end to end value stream.

Reporting & Analytics

計(jì)劃/Plan

The Plan stage is about capturing ideas, organizing issues and epics, scheduling work, and communicating plans.

GitLab enables portfolio planning and management through epics, groups (programs) and milestones to organize and track progress. Regardless of your methodology from Waterfall to DevOps, GitLab’s simple and flexible approach to planning meets the needs of small teams to large enterprises. GitLab helps teams organize, plan, align and track project work to ensure teams are working on the right things at the right time and maintain end to end visibility and traceability of issues throughout the delivery lifecycle from idea to production.

  • Chat integration
  • Project and portfolio management

創(chuàng)建/Create

GitLab is used to create, collaborate, review and manage content; often source code, by many businesses. We want to make it possible for everyone to be able to contribute content and feedback using GitLab.

  • Source code management
  • Merge requests
  • Web IDE
  • Geo

驗(yàn)證/Verify

The Verify stage is all about making sure that your code does what you expected it to do, meets quality standards, and is secure; all via automated testing. We bring best practices from top development teams, and make them the easy, default way to work. But of course you can build on those defaults and customize as needed for your company.

  • Continuous Integration (CI)

GitLab CI provides an explicit build stage and the concept of build artifacts, but we might need to separate out the build artifacts from test artifacts. For example, you might want your test runner to create a JUnit-style output file which is available for external consumption, but not included in the build image sent to production. Creation of an explicit build aligns well with Docker where the result of the build stage is a Docker image which is stored in a registry and later pulled for testing and deployment.

打包/Package

- Container Registry
- Binary repository for Maven MVC Premium

發(fā)布/Release

  • Continuous Delivery (CD) / Release Automation

A key part of CD is being able to deploy. We currently have the ability via scripts in the deploy stage in .gitlab-ci.yml. We will go further.

配置/Configure

  • Application Control Panel
  • Infrastructure Configuration
  • Operations
  • Feature Management

There's a big benefit to decoupling deployment of code from delivery of a feature, mostly using feature flags. Continuous integration helps improve the speed of development, but feature flags take it to another level, giving you the confidence to integrate code even more often while providing a gradual and granular method for delivery.

監(jiān)控/Monitor

Performance is a critical aspect of the user experience, and ensuring your application is responsive and available is everyone's responsibility. We want to help address this need for development teams, by integrating key performance analytics and feedback into the tool developers already use every day.

  • Application Performance Monitoring (APM)
  • Infrastructure Monitoring
  • Production Monitoring
  • Error Tracking
  • Logging

安全/Secure

  • Security Testing
  • License Management

非生命周期

性能/Performance

分發(fā)/Distribution

GitLab is the engine that powers many companies' software businesses so it is important to ensure it is as easy as possible to deploy, maintain, and stay up to date.

  • Omnibus
  • Cloud Native Installation

CI

范例:How to deploy Maven projects to Artifactory with GitLab CI/CD

參考

CI: GitLab Runner

使用Docker鏡像

什么是鏡像?

鏡像關(guān)鍵字是Docker執(zhí)行器將要運(yùn)行的Docker鏡像名字,以執(zhí)行CI任務(wù)。

The image keyword is the name of the Docker image the Docker executor will run to perform the CI tasks.

什么是服務(wù)?

服務(wù)關(guān)鍵字定義了另一個(gè)Docker鏡像,它將在任務(wù)期間運(yùn)行,并連接到image關(guān)鍵字所指定的Docker鏡像。這樣,你就可以在構(gòu)建期訪問服務(wù)鏡像。

The services keyword defines just another Docker image that is run during your job and is linked to the Docker image that the image keyword defines. This allows you to access the service image during build time.

Runner是如何啟動(dòng)CI任務(wù)中所要使用的Docker鏡像:

  1. Runner使用定義好的entrypoint啟動(dòng)一個(gè)Docker鏡像。(默認(rèn)來自于Dockerfile,可能會(huì)在.gitlab-ci.yml中被重寫)
  2. Runner將自身附加到運(yùn)行的容器;
  3. Runner準(zhǔn)備好腳本(before_script, script, after_script的組合);
  4. Runner將腳本發(fā)送到容器shell的STDIN然后接受輸出。

在構(gòu)建期Docker所執(zhí)行的步驟:

  1. 創(chuàng)建any服務(wù)容器:mysql, postgresql, monodb, redis;
  2. 創(chuàng)建緩存容器以存儲(chǔ)所有在config.toml定義的卷,以及構(gòu)建鏡像的Dockerfile(上面的例子為ruby:2.1);
  3. 創(chuàng)建構(gòu)建鏡像,然后將any服務(wù)鏡像連接到構(gòu)建鏡像;
  4. 啟動(dòng)構(gòu)建鏡像,并將任務(wù)腳本發(fā)送至該容器;
  5. 運(yùn)行任務(wù)腳本;
  6. 遷出/builds/group-name/project-name/的代碼;
  7. 執(zhí)行.gitlab-ci.yml所定義的any每一步;
  8. 檢查構(gòu)建腳本的退出狀態(tài);
  9. 刪除構(gòu)建鏡像和所有創(chuàng)建的服務(wù)鏡像;

來源:https://git.iec.io/help/ci/docker/using_docker_images.md

參考:

定義來自私人倉庫的鏡像

image
image

自動(dòng)化DevOps

與PaaS比較

Auto DevOps受到Heroku的創(chuàng)新工作的啟發(fā),并有所超越:

  1. Auto DevOps使用any Kubernetes集群;
  2. 沒有額外的成本,你可以使用自己搭建的Kubernetes集群或者公有云上的Container as a Service;
  3. Auto DevOps還包括安全測(cè)試、性能測(cè)試和代碼質(zhì)量測(cè)試;
  4. 提供增量incremental graduation path。

特性

最佳實(shí)踐,階段

  1. Auto Build
  2. Auto Test
  3. Auto Code Quality [STARTER]
  4. Auto SAST (Static Application Security Testing) [ULTIMATE]
  5. Auto Dependency Scanning [ULTIMATE]
  6. Auto License Management [ULTIMATE]
  7. Auto Container Scanning
  8. Auto Review Apps
  9. Auto DAST (Dynamic Application Security Testing) [ULTIMATE]
  10. Auto Deploy
  11. Auto Browser Performance Testing [PREMIUM]
  12. Auto Monitoring

所依賴的組件:

  • Kubernetes
  • Helm
  • Docker
  • GitLab Runner
  • Prometheus

來源:https://git.iec.io/help/topics/autodevops/index.md

參考

  • Auto DevOps
  • Multiple Kubernetes clusters [PREMIUM]
  • Incremental rollout to production [PREMIUM]
  • Disable jobs you don't need with environment variables
  • Use a static IP for your cluster
  • Use your own buildpacks to build your application
  • Prometheus monitoring

延伸閱讀

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容