SlideShare a Scribd company logo
1 of 155
Bo-Yi Wu
2017.08.01
 聯發科技後端工程師
 DevOps
 Golang, PHP, Node.js ..
 維護數個 Go 開源專案
 Gitea
 Gin
 Drone
 appleboy @GitHub
 appleboy @twitter
 appleboy @slideshare
 appleboy46 @facebook
2
 為什麼選擇 Drone
 為什麼不用 Jenkins
 為什麼不用 GitLab CI
 Drone 基礎簡介
 Drone 架構擴展
 Drone 安裝方式
 Drone 管理介面
 Drone 測試部署
 Drone 自訂套件
開發 測試 部署
Develop CI CD
工程師
開發 測試 部署
Develop CI CD
自動化
CI/CD 工具選擇
1. Jenkins
2. Gitlab CI
http://bit.ly/devops-tool
Jenkins Drone Gitlab CI
安裝眾多 Plugin 達成需求
需安裝 plugin
你需要會 Java
http://bit.ly/devops-tool
部署基本條件
https://florianbrinkmann.com/en/3473/deployment-gitlab-ci/
https://github.com/appleboy/drone-ssh
還是無法擴充 Yaml 設定
 為什麼選擇 Drone
 為什麼不用 Jenkins
 為什麼不用 GitLab CI
 Drone 基礎簡介
 Drone 架構擴展
 Drone 安裝方式
 Drone 管理介面
 Drone 測試部署
 Drone 自訂套件
基於容器 (Container) 技術的 CI/CD 系統
Everything is a Docker Container
Git Clone
測試
打包
部署
發送訊息
使用 yaml 管理專案流程
後端測試
前端測試
上傳容器
通知訊息
 為什麼選擇 Drone
 為什麼不用 Jenkins
 為什麼不用 GitLab CI
 Drone 基礎簡介
 Drone 架構擴展
 Drone 安裝方式
 Drone 管理介面
 Drone 測試部署
 Drone 自訂套件
一個主伺服器,多個代理服務
Server
agent
agent
agent
Database
 為什麼選擇 Drone
 為什麼不用 Jenkins
 為什麼不用 GitLab CI
 Drone 基礎簡介
 Drone 架構擴展
 Drone 安裝方式
 Drone 管理介面
 Drone 測試部署
 Drone 自訂套件
How to install drone server and agent?
http://docs.drone.io/installation/
Docker Compose && Binary Install
docker pull drone/drone:0.8
docker pull drone/agent:0.8
go install github.com/drone/drone/cmd/drone-agent
go install github.com/drone/drone/cmd/drone-server
Nginx, Caddy, Apache
 為什麼選擇 Drone
 為什麼不用 Jenkins
 為什麼不用 GitLab CI
 Drone 基礎簡介
 Drone 架構擴展
 Drone 安裝方式
 Drone 管理介面
 Drone 測試部署
 Drone 自訂套件
簡單、清楚、明暸
 為什麼選擇 Drone
 為什麼不用 Jenkins
 為什麼不用 GitLab CI
 Drone 基礎簡介
 Drone 架構擴展
 Drone 安裝方式
 Drone 管理介面
 Drone 測試部署
 Drone 自訂套件
專案流程都是寫在這邊
Drone Workspace
Clone 步驟 Build 步驟 Deploy 步驟
Drone Workspace
Clone 步驟 Build 步驟 Deploy 步驟
Git Test Release Docker Discord
 執行測試指令
 分析程式碼
 驗證程式碼品質
 編譯 Binary
 部署 Binary
 編譯 Docker Image
 部署 Docker Container
 通知訊息
Git Test Release Docker Discord
/drone/src/github.com/appleboy/hello-world
Drone 特定字 (勿改)
所有步驟都可以存取此目錄資料
預設進入目錄,所有指令都在此目錄執行
Drone 關鍵字勿改
自己撰寫 clone 指令
將 Tags 一起拉下來
務必打勾
Git Test Release Docker Discord
Drone 關鍵字勿改
名稱可自訂
自選 Image
拉最新版
執行指令
Parallel Execution
前端及後端一起測試
平行測試
平行測試
Mysql, Postgres, Redis
服務名稱
全域變數
服務名稱
服務名稱
Branch, Event, Status, Environment, Matrix
Matrix
只有 Pull request 才跑測試
測試成功才跑
只有上傳 tag 才跑部署到 China
china 標籤才執行
限制 git tag
成功或失敗都通知訊息
Git Test Release Docker Discord
請善用 plugin Marketplace
http://plugins.drone.io/
https://github.com/appleboy/drone-scp
Plugin 映像檔
Deploy Key
打包列表
遠端目錄
https://github.com/appleboy/drone-ssh
Plugin 映像檔
Script 列表
多主機 Host 列表
Git Test Release Docker Discord
Plugin 映像檔
Git Test Release Docker Discord
Plugin Image
方便下次執行更快速
vendor, node_modules
Drone Workspace
Clone 步驟 Build 步驟 Deploy 步驟
建立快取使用快取
雲端儲存
Volume or SFTP cache
http://plugins.drone.io/appleboy/drone-sftp-cache/
http://plugins.drone.io/drillster/drone-volume-cache/
[skip cache] or [cache skip]
Only for SFTP cache
http://plugins.drone.io/drone-plugins/drone-downstream/
http://plugins.drone.io/appleboy/drone-gitlab-ci/
http://plugins.drone.io/appleboy/drone-jenkins/
 為什麼選擇 Drone
 為什麼不用 Jenkins
 為什麼不用 GitLab CI
 Drone 基礎簡介
 Drone 架構擴展
 Drone 安裝方式
 Drone 管理介面
 Drone 測試部署
 Drone 自訂套件
擴充 Yaml 參數
 撰寫程式
 打包 Docker Image
 上傳到 Docker Hub
 測試外掛
任何語言都可以寫 Plugin
PHP, Ruby, Bash, Go, Python …
自訂參數
自訂參數
自訂參數
前置符號 PLUGIN_
如何在本機端測試及除錯?
$ drone exec
啟動速度超快 (低記憶體用量)
啟動速度超快 (低記憶體用量)
不需要管理者 (簡單的 UI 介面)
啟動速度超快 (低記憶體用量)
不需要管理者 (簡單的 UI 介面)
可在本機端運行測試
啟動速度超快 (低記憶體用量)
不需要管理者 (簡單的 UI 介面)
可在本機端運行測試
完全基於 Container 開發
啟動速度超快 (低記憶體用量)
不需要管理者 (簡單的 UI 介面)
可在本機端運行測試
完全基於 Container 開發
任何語言都可以寫 Plugin
啟動速度超快 (低記憶體用量)
不需要管理者 (簡單的 UI 介面)
可在本機端運行測試
完全基於 Container 開發
任何語言都可以寫 Plugin
支援 matrix 編譯 (多版本)
DevOpsDay 優惠價: 1600
http://bit.ly/devops-taipei
Coupon Code: DEVOPSDAY
謝謝大家參與

More Related Content

What's hot

Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
E. Camden Fisher
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
amscanne
 

What's hot (20)

Windows Server 2016上でLinuxコンテナが動いた!
Windows Server 2016上でLinuxコンテナが動いた!Windows Server 2016上でLinuxコンテナが動いた!
Windows Server 2016上でLinuxコンテナが動いた!
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
[PHP 也有 Day #64] PHP 升級指南
[PHP 也有 Day #64] PHP 升級指南[PHP 也有 Day #64] PHP 升級指南
[PHP 也有 Day #64] PHP 升級指南
 
CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)
CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)
CI、CD、Automation你還沒準備好!?(Agile Tour Kaohsiung 2017)
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
左と右の話
左と右の話左と右の話
左と右の話
 
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...
 
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
[개인 프로젝트] 쿠버네티스를 이용한 개발환경 자동화 구축시스템 - 프로토타입
 
使用 laravel 的前與後
使用 laravel 的前與後使用 laravel 的前與後
使用 laravel 的前與後
 
시니어가 들려주는 "내가 알고 있는 걸 당신도 알게 된다면"
시니어가 들려주는 "내가 알고 있는 걸 당신도 알게 된다면"시니어가 들려주는 "내가 알고 있는 걸 당신도 알게 된다면"
시니어가 들려주는 "내가 알고 있는 걸 당신도 알게 된다면"
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
我的 DevOps 故事
我的 DevOps 故事我的 DevOps 故事
我的 DevOps 故事
 
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...How to test infrastructure code: automated testing for Terraform, Kubernetes,...
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
 
Jenkins使ってみた~Windows編~
Jenkins使ってみた~Windows編~Jenkins使ってみた~Windows編~
Jenkins使ってみた~Windows編~
 
コード品質を保つために心がけたいこと
コード品質を保つために心がけたいことコード品質を保つために心がけたいこと
コード品質を保つために心がけたいこと
 
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥
 
twMVC#44 讓我們用 k6 來進行壓測吧
twMVC#44 讓我們用 k6 來進行壓測吧twMVC#44 讓我們用 k6 來進行壓測吧
twMVC#44 讓我們用 k6 來進行壓測吧
 

Viewers also liked

Viewers also liked (16)

Gorush: A push notification server written in Go
Gorush: A push notification server written in GoGorush: A push notification server written in Go
Gorush: A push notification server written in Go
 
用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務用 Go 語言實戰 Push Notification 服務
用 Go 語言實戰 Push Notification 服務
 
Introduction to Gitea with Drone
Introduction to Gitea with DroneIntroduction to Gitea with Drone
Introduction to Gitea with Drone
 
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)Continuous Delivery Workshop with Ansible x GitLab CI (2nd)
Continuous Delivery Workshop with Ansible x GitLab CI (2nd)
 
Continuous Delivery - 敏捷開發的最後一哩路
Continuous Delivery - 敏捷開發的最後一哩路Continuous Delivery - 敏捷開發的最後一哩路
Continuous Delivery - 敏捷開發的最後一哩路
 
Intercom's first pitch deck!
Intercom's first pitch deck!Intercom's first pitch deck!
Intercom's first pitch deck!
 
Front series A deck
Front series A deckFront series A deck
Front series A deck
 
Mattermark 2nd (Final) Series A Deck
Mattermark 2nd (Final) Series A DeckMattermark 2nd (Final) Series A Deck
Mattermark 2nd (Final) Series A Deck
 
Airbnb Pitch Deck From 2008
Airbnb Pitch Deck From 2008Airbnb Pitch Deck From 2008
Airbnb Pitch Deck From 2008
 
Dwolla Startup Pitch Deck
Dwolla Startup Pitch DeckDwolla Startup Pitch Deck
Dwolla Startup Pitch Deck
 
The investor presentation we used to raise 2 million dollars
The investor presentation we used to raise 2 million dollarsThe investor presentation we used to raise 2 million dollars
The investor presentation we used to raise 2 million dollars
 
Mixpanel - Our pitch deck that we used to raise $65M
Mixpanel - Our pitch deck that we used to raise $65MMixpanel - Our pitch deck that we used to raise $65M
Mixpanel - Our pitch deck that we used to raise $65M
 
Foursquare's 1st Pitch Deck
Foursquare's 1st Pitch DeckFoursquare's 1st Pitch Deck
Foursquare's 1st Pitch Deck
 
Linkedin Series B Pitch Deck
Linkedin Series B Pitch DeckLinkedin Series B Pitch Deck
Linkedin Series B Pitch Deck
 
SEOmoz Pitch Deck July 2011
SEOmoz Pitch Deck July 2011SEOmoz Pitch Deck July 2011
SEOmoz Pitch Deck July 2011
 
The slide deck we used to raise half a million dollars
The slide deck we used to raise half a million dollarsThe slide deck we used to raise half a million dollars
The slide deck we used to raise half a million dollars
 

Similar to 用 Drone 打造 輕量級容器持續交付平台

Clojure cnclojure-meetup
Clojure cnclojure-meetupClojure cnclojure-meetup
Clojure cnclojure-meetup
sunng87
 
Coscup2011: porting android to brand-new cpu architecture
Coscup2011: porting android to brand-new cpu architecture Coscup2011: porting android to brand-new cpu architecture
Coscup2011: porting android to brand-new cpu architecture
lusecheng
 

Similar to 用 Drone 打造 輕量級容器持續交付平台 (20)

容器與 Gitlab CI 應用
容器與 Gitlab CI 應用容器與 Gitlab CI 應用
容器與 Gitlab CI 應用
 
Software Engineer Talk
Software Engineer TalkSoftware Engineer Talk
Software Engineer Talk
 
Introduction to Golang final
Introduction to Golang final Introduction to Golang final
Introduction to Golang final
 
Build Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratchBuild Your Own Android Toolchain from scratch
Build Your Own Android Toolchain from scratch
 
How to integrate GitLab CICD into B2B service
How to integrate GitLab CICD into B2B serviceHow to integrate GitLab CICD into B2B service
How to integrate GitLab CICD into B2B service
 
和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂
 
Clojure cnclojure-meetup
Clojure cnclojure-meetupClojure cnclojure-meetup
Clojure cnclojure-meetup
 
CICD Workshop 20180922
CICD Workshop 20180922CICD Workshop 20180922
CICD Workshop 20180922
 
桃園市教育局Docker技術入門與實作
桃園市教育局Docker技術入門與實作桃園市教育局Docker技術入門與實作
桃園市教育局Docker技術入門與實作
 
Docker Compose
Docker ComposeDocker Compose
Docker Compose
 
Git 入门实战
Git 入门实战Git 入门实战
Git 入门实战
 
Go 語言基礎簡介
Go 語言基礎簡介Go 語言基礎簡介
Go 語言基礎簡介
 
Coscup2011: porting android to brand-new cpu architecture
Coscup2011: porting android to brand-new cpu architecture Coscup2011: porting android to brand-new cpu architecture
Coscup2011: porting android to brand-new cpu architecture
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境
 
Docker 基礎介紹與實戰
Docker 基礎介紹與實戰Docker 基礎介紹與實戰
Docker 基礎介紹與實戰
 
Flutter實作概述 | GDSC NYCU
Flutter實作概述 | GDSC NYCUFlutter實作概述 | GDSC NYCU
Flutter實作概述 | GDSC NYCU
 
twMVC#12 | 如何在實務上使用 TDD 來開發
twMVC#12 | 如何在實務上使用 TDD 來開發twMVC#12 | 如何在實務上使用 TDD 來開發
twMVC#12 | 如何在實務上使用 TDD 來開發
 
如何在實務上使用TDD來開發 twmvc#12
如何在實務上使用TDD來開發 twmvc#12如何在實務上使用TDD來開發 twmvc#12
如何在實務上使用TDD來開發 twmvc#12
 
Docker容器微服務 x WorkShop
Docker容器微服務 x WorkShopDocker容器微服務 x WorkShop
Docker容器微服務 x WorkShop
 

More from Bo-Yi Wu

You must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryYou must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular Library
Bo-Yi Wu
 

More from Bo-Yi Wu (20)

用 Go 語言打造多台機器 Scale 架構
用 Go 語言打造多台機器 Scale 架構用 Go 語言打造多台機器 Scale 架構
用 Go 語言打造多台機器 Scale 架構
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Drone 1.0 Feature
Drone 1.0 FeatureDrone 1.0 Feature
Drone 1.0 Feature
 
Drone CI/CD Platform
Drone CI/CD PlatformDrone CI/CD Platform
Drone CI/CD Platform
 
GraphQL IN Golang
GraphQL IN GolangGraphQL IN Golang
GraphQL IN Golang
 
drone continuous Integration
drone continuous Integrationdrone continuous Integration
drone continuous Integration
 
用 Go 語言 打造微服務架構
用 Go 語言打造微服務架構用 Go 語言打造微服務架構
用 Go 語言 打造微服務架構
 
用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot用 Go 語言打造 DevOps Bot
用 Go 語言打造 DevOps Bot
 
A painless self-hosted Git service: Gitea
A painless self-hosted Git service: GiteaA painless self-hosted Git service: Gitea
A painless self-hosted Git service: Gitea
 
Write microservice in golang
Write microservice in golangWrite microservice in golang
Write microservice in golang
 
用 Docker 改善團隊合作模式
用 Docker 改善團隊合作模式用 Docker 改善團隊合作模式
用 Docker 改善團隊合作模式
 
Git flow 與團隊合作
Git flow 與團隊合作Git flow 與團隊合作
Git flow 與團隊合作
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
 
Why to choose laravel framework
Why to choose laravel frameworkWhy to choose laravel framework
Why to choose laravel framework
 
How to choose web framework
How to choose web frameworkHow to choose web framework
How to choose web framework
 
Git Flow and JavaScript Coding Style
Git Flow and JavaScript Coding StyleGit Flow and JavaScript Coding Style
Git Flow and JavaScript Coding Style
 
You must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryYou must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular Library
 
Automating your workflow with Gulp.js
Automating your workflow with Gulp.jsAutomating your workflow with Gulp.js
Automating your workflow with Gulp.js
 

用 Drone 打造 輕量級容器持續交付平台

Editor's Notes

  1. 持續開發 持續測試 持續部署
  2. http://bit.ly/devops-tool
  3. 真的只要會簡單的 docker 指令及 bash 就可以寫 plugin 提供給更多人使用 相較於其他 CI/CD 工作有辦法做到嗎? jenkins