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
rclonefunction
Search
YAEGASHI Takeshi
September 25, 2021
Technology
960
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
rclonefunction
Japan Azure User Group 11周年イベント
https://jazug.connpass.com/event/223585/
YAEGASHI Takeshi
September 25, 2021
More Decks by YAEGASHI Takeshi
See All by YAEGASHI Takeshi
Microsoft Entra IDとAzure App Serviceによる エンタープライズWebアプリ・サービスのプラットフォーム構築
yaegashi
0
190
Microsoft Entra/Azure による Redmine の企業内利用向けカスタマイズと運用
yaegashi
0
680
バンダイナムコスタジオにおけるクラウドネイティブなゲーム開発スタジオの挑戦
yaegashi
2
1.7k
Bandai Namco DX Cloud Studios の全貌
yaegashi
0
310
DX(開発者体験)の向上を目指す ゲーム開発インフラの進化とDX(デジタル変革)
yaegashi
0
230
Azure AD対応の認証プロキシサーバをGoで作っている話
yaegashi
0
300
ゲーム開発におけるクラウドネイティブな CI/CD の最新動向
yaegashi
0
600
大規模ゲーム開発を支えるAzure DevOpsによるクラウドネイティブなCI/CDの紹介
yaegashi
5
2.9k
社員全員が利用できるWebダッシュボードをAzureで作ってみた話
yaegashi
3
2.9k
Other Decks in Technology
See All in Technology
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
Railsのように考える: See through the Master
snoozer05
PRO
5
1.2k
Genieを崇めよ
kameitomohiro
0
170
積み重なった技術負債への挑戦 〜初手としての全社ゴト化〜
techtekt
PRO
0
1.5k
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
1.1k
2026-09-18 gotanda.sre Terraformで複数環境作ったり、複数Stateに分割したりそれとTerragrunt / Terraform multi envs and multi states
masasuzu
4
690
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
170
AI de Idea
kawaguti
PRO
2
130
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
2
1k
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
10
5k
絵ではじめるKubernetesセキュリティ
aoi1
4
690
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
500
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Balancing Empowerment & Direction
lara
6
1.3k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
550
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
200
Chasing Engaging Ingredients in Design
codingconduct
0
320
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
The Cult of Friendly URLs
andyhume
79
7k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
Transcript
rclonefunction 2021-09-25 Japan Azure User Group 11周年イベント 八重樫 剛史 Takeshi
Yaegashi
自己紹介 2 八重樫 剛史 Takeshi Yaegashi 株式会社バンダイナムコスタジオ所属 Linux・Unix・OSS・Go 言語が好きなエンジニア 組み込みシステム開発、ゲームサーバ開発、CI/CD
インフラ開発、 開発環境のクラウドシフトなどの業務に従事 活動場所 ホームページ・ブログ https://l0w.dev GitHub https://github.com/yaegashi GitLab https://gitlab.com/yaegashi Twitter https://twitter.com/hogegashi
今日の話題 - rclonefunction 3 https://github.com/yaegashi/rclonefunction ▪ 実験的に作ってみた Azure Functions アプリ
▪ 特定の Azure Blob Storage のコンテナの変更を監視して、 変更があったファイルを別の場所のストレージに同期してくれる
Rclone 4 https://rclone.org ▪ 様々なクラウドサービスやプロトコルの間でファイルの同期が できる万能のコマンドラインツール − Azure Storage, AWS
S3, Google Cloud Storage, OneDrive, Amazon Drive, Google Drive, Dropbox, ownCloud, Nextcloud, WebDAV, SFTP, DLNA, etc. − クラウドに対応した rsync コマンド ▪ Go 言語で実装されている − ひとつの実行ファイルだけで動く − Windows・macOS・Linux・BSD や Intel/ARM/MIPS など、 多数のOS・CPUのコンパイル済みバイナリが用意されている ▪ rclonefunction では rclone を利用してファイルを同期している
rclonefunction のアーキテクチャ 5 ▪ EventGrid により Blob Storage の更新 イベントを
Queue Storage にためる ▪ rclonefunction が Queue Storage を監 視して rclone コマンドを起動する
rclonefunction 関数アプリの詳細 6 ▪ Go 言語で実装したカスタムハンドラによる Linux 関数アプリ − handler.go
ファイルひとつだけ ▪ 外部コマンド (rclone) を起動するという関数アプリらしくない ことをしている ▪ 大量の更新イベントがキューに溜まったとき、都度 rclone を 起動してしまわないように、web サーバの goroutine と rclone 実行の goroutine が buffered chan で通信して連携している
Bicep → ARM → Deploy to Azure ボタン 7 ▪
README.md の Deploy to Azure ボタンですぐに試せる ▪ 関数アプリ・ストレージアカウント・ほか関連リソースをまと めてデプロイ ▪ Bicep で記述し ARM テンプレートに変換して GitHub に配置 − 2 つのリソースグループを含み 4 つの Bicep ファイルにまたがる大作 (サブスクリプションスコープのテンプレート) − Bicep は ARM テンプレートと較べて開発効率が非常によい Bicep がなければ完成しなかった ▪ 関数アプリ本体は GitHub Actions で ZIP のリリースを作り、 WEBSITE_RUN_FROM_PACKAGE 設定で URL を指定してデプロイ
質問と回答 ① 8 ▪ SharePoint Online が宛先なら Logic Apps や
Power Automate 使わないのはなぜ? − 当初は Logic Apps や Power Automate でお気軽に作る予定だった − 標準の SharePoint Online のコネクタでは、大きなファイルのアップロードができなかった ので断念した − たしか数MBくらいが限界 − 10MB ~ 数GB のファイルを SharePoint Online に転送できる必要がある
質問と回答 ② 9 ▪ なぜわざわざ Blob Storage を経由して SharePoint Online
にコピーするのか? CI/CD から直接 SharePoint Online にアップロードすればよいのでは? − 権限の問題 − Microsoft 365 は特定のフォルダ・ドキュメントライブラリのみにアクセス可能な OAuth2 トークンを発行することができない − 会社の Azure AD 管理者ではないのでサービス専用アカウントを気軽に作ることができない
質問と回答 ③ 10 ▪ ファイルの利用者に SharePoint Online にアクセスさせるのはなぜか? 直接 Blob
Storage にアクセスさせればよいのでは? − SharePoint Online のほうがユーザーフレンドリー − わかりやすい Web インターフェース − ユーザー・グループを活用したアクセス権限設定が容易 − 通信コストの節約 − Azure Blob Storage からのダウンロードは 13円/GB の通信量が課金される − Microsoft 365 からのダウンロードは無料
まとめ 11 ▪ rclonefunction という関数アプリを作ってみました − 外部コマンドとして rclone を起動する関数アプリらしくない実装 −
Bicep は非常に使いやすく ARM テンプレートへの変換も簡単で Deploy to Azure ボタンがすぐに作れるのですばらしい − rclonefunction 自体はまだ使いにくいところがありますがぜひ試してみてください!
おわり 12