Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CI/CD Practice for Cloud Native -- GITC 2018
Search
Jintao Zhang
November 22, 2018
Technology
62
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CI/CD Practice for Cloud Native -- GITC 2018
Jintao Zhang
November 22, 2018
Transcript
26 slides
云原⽣时代下的 CI/CD 实践 张晋涛 1 / 20
张晋涛 Container/Docker/Kubernetes https://github.com/tao12345666333 个⼈介绍 云原⽣时代下的 CI/CD 实践 2 / 20
⽬录 云原⽣ CI 实践 CD 实践 发展⽅向 云原⽣时代下的 CI/CD 实践
3 / 20
云原⽣ 微服务 Container Kubernetes 12 Factor APP 云原⽣时代下的 CI/CD 实践
4 / 20
优势 可靠 可治理 降低复杂度 发布周期可缩短 微服务 云原⽣时代下的 CI/CD 实践 5
/ 20
优势 可靠 可治理 降低复杂度 发布周期可缩短 挑战 服务拆分粒度 基础设施⽀持 配置化 CI/CD
效率和可⽤性 微服务 云原⽣时代下的 CI/CD 实践 5 / 20
优势 资源隔离 消除环境差异 标准交付单元 (OCI) Container 云原⽣时代下的 CI/CD 实践 6
/ 20
优势 资源隔离 消除环境差异 标准交付单元 (OCI) 实现/ 运⾏时 Docker Runc CRI-O
rkt Container 云原⽣时代下的 CI/CD 实践 6 / 20
Kubernetes 云原⽣应⽤的基⽯ 容器编排 部署 扩容 管理 云⼚商⽀持 CNCF 及其⽣态 云原⽣时代下的
CI/CD 实践 7 / 20
主体内容 标准化 可移植性 可扩展 减⼩环境差异 配置分离 应⽤⽆需关注⽇志存储等 12 Factor APP
云原⽣时代下的 CI/CD 实践 8 / 20
主体内容 标准化 可移植性 可扩展 减⼩环境差异 配置分离 应⽤⽆需关注⽇志存储等 含义 应⽤有基准代码( 代码仓库)
依赖隔离 线下/ 线上环境尽量⼀致 配置管理 基础组件⽀持 12 Factor APP 云原⽣时代下的 CI/CD 实践 8 / 20
发展阶段 ⼿⼯集成 批量⼯具 ⾃动化 CI 实践 云原⽣时代下的 CI/CD 实践 9
/ 20
发展阶段 ⼿⼯集成 批量⼯具 ⾃动化 CI 服务 代码托管(GitHub/GitLab) Jenkins/JenkinsX Travis CI/Circle
CI AWS CodeBuild/Azure DevOps CI 实践 云原⽣时代下的 CI/CD 实践 9 / 20
发展阶段 ⼿⼯集成 批量⼯具 ⾃动化 CI 服务 代码托管(GitHub/GitLab) Jenkins/JenkinsX Travis CI/Circle
CI AWS CodeBuild/Azure DevOps GitLab CI 灵活/ 易⽤ 开放 C/S 架构 原⽣ Kubernetes ⽀持 CI 效率优化 CI 实践 云原⽣时代下的 CI/CD 实践 9 / 20
Pipeline 云原⽣时代下的 CI/CD 实践 10 / 20
构建镜像 image: registry.docker-cn.com/taobeier/docker:18.03 services: - name: registry.docker-cn.com/taobeier/docker:stable-dind alias: docker variables:
DOCKER_DRIVER: overlay2 IMAGE_NAME: $CI_REGISTRY/$CI_PROJECT_PATH before_script: - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY .build_template: &build_definition script: - docker build -t "$IMAGE_NAME:$IMAGE_TAG" . - docker images - docker push "$IMAGE_NAME:$IMAGE_TAG" build-latest: variables: IMAGE_TAG: latest script: <<: *build_definition 云原⽣时代下的 CI/CD 实践 11 / 20
运⾏测试 image: registry.docker-cn.com/taobeier/docker variables: DOCKER_DRIVER: overlay2 # overlay2 is best
but need kernel >= 4.2 services: - name: registry.docker-cn.com/taobeier/docker:stable-dind alias: docker build_and_test: tags: - build script: - apk add --no-cache py-pip - pip install -i https://mirrors.ustc.edu.cn/pypi/web/simple docker-compose - docker-compose up -d - docker-compose run --rm web pytest -s -v tests/test_session.py 云原⽣时代下的 CI/CD 实践 12 / 20
基础镜像选择 尽可能减少镜像体积 但并不是越⼩越好 Alpine Linux 使⽤ musl ⽽不是 glibc 云原⽣时代下的
CI/CD 实践 13 / 20
交付 源码/tag/commit id tag 包/zip 包 war 包/wheels 包/rpm 包/
⼆进制 Docker 镜像 CD 实践 云原⽣时代下的 CI/CD 实践 14 / 20
交付 源码/tag/commit id tag 包/zip 包 war 包/wheels 包/rpm 包/
⼆进制 Docker 镜像 部署 ⼿动 平台化 CD 实践 云原⽣时代下的 CI/CD 实践 14 / 20
InfraBox knative 动态 workflow 不⽀持 GitLab 平台化 云原⽣时代下的 CI/CD 实践
15 / 20
Argo DAG ⼯作流引擎 CRD All in K8S 平台化 云原⽣时代下的 CI/CD
实践 16 / 20
GitLab CI 灵活 易⽤ 平台化 云原⽣时代下的 CI/CD 实践 17 /
20
特点 All in K8S Kubectl Helm deploy: image: $CI_REGISTRY/devops/helm stage:
deploy script: - helm init --client-only - helm upgrade --install --set image.tag=$(cat VERSION) --wait --namespace $NAMESPACE only: - master GitLab CI for CD 云原⽣时代下的 CI/CD 实践 18 / 20
集中式管理 数据统计 GitLab Bot Issue 处理 授权管理 覆盖率 配置验证 发展⽅向
云原⽣时代下的 CI/CD 实践 19 / 20
Thanks! Q&A 云原⽣时代下的 CI/CD 实践 20 / 20
More Decks by Jintao Zhang
See All by Jintao Zhang
Docker 实践和原理 - NodeParty
tao12345666333
0
120
CI/CD Practice With Docker -- PyCon China 2018
tao12345666333
0
110
Other Decks in Technology
See All in Technology
Kiro Enterprise Management: 管理者が 1 か所で決め、全員の Kiro に届ける
inariku
PRO
1
160
Claude Certified Developer – Professional 試験対策
shinoisa
0
250
フロントエンドのテストカバレッジは 100%強制がいい
bengo4com
7
3.7k
PR 生成AIガバナンスの全体像がわかる本
yoshimura_datam
0
120
技術同人誌を作る方法
yoshimura_datam
0
100
正しくWeb サイトを守るためのコンテンツセキュリティーポリシー
hinalin
0
570
成長するID管理基盤における運用もコストも犠牲にしないオブザーバビリティ向上の実践 / Improving Observability for a Growing Identity Platform Without Adding Operational Burden or Cost
kaminashi
1
140
パスワードのない鍵で、 データを手元に置く
ginjihayashi
0
400
SBOM 生成ツールで 2026 Minimum Elements はどこまで満たせるのか
gokken
0
180
デザインシステムのフィードバックループをほぼ自動化した話
tongari07
0
1.1k
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
5
650
LLMごとの文章力を測ってみた話
yoshimura_datam
0
120
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
630
A better future with KSS
kneath
240
18k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
670
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
910
Technical Leadership for Architectural Decision Making
baasie
4
660
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
970
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
3k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
500
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k