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
710
バンダイナムコスタジオにおけるクラウドネイティブなゲーム開発スタジオの挑戦
yaegashi
2
1.8k
Bandai Namco DX Cloud Studios の全貌
yaegashi
0
360
DX(開発者体験)の向上を目指す ゲーム開発インフラの進化とDX(デジタル変革)
yaegashi
0
250
Azure AD対応の認証プロキシサーバをGoで作っている話
yaegashi
0
310
ゲーム開発におけるクラウドネイティブな CI/CD の最新動向
yaegashi
0
610
大規模ゲーム開発を支えるAzure DevOpsによるクラウドネイティブなCI/CDの紹介
yaegashi
5
3k
社員全員が利用できるWebダッシュボードをAzureで作ってみた話
yaegashi
3
2.9k
Other Decks in Technology
See All in Technology
Oracle Database Security 詳細解説
oracle4engineer
PRO
1
190
1週間、Opus封印でお願いします
kintotechdev
1
430
これだけは抑えておきたい!後悔しない re:Invent の過ごし方 / AWS re:Invent 2026 prestudy
kinunori
2
640
AIエージェント統制はAPIから——押さえるべき5つの要素
nagix
0
110
AIで選択肢が広がった組織設計の理想と現実
konifar
16
7.5k
Lint の層を組み直した話
bengo4com
1
280
Autonomous AI Lakehouse - Live AI Hubから始めるセキュアなAIデータ活用 -
oracle4engineer
PRO
2
180
GitHub、使う?使わない?
happysamurai294
0
140
Building Audio Plugin Ecosystem for Android in 2026
atsushieno
1
110
Content Mapper APIの応用例~CSS Modules、言語ファイル~
uhyo
2
480
2拠点SRE活動始めてみた | sogaoh's LT @ ホンマでっかSRE勉強会 #3
sogaoh
PRO
0
230
視野はAIに、視座は人に / ai-for-breadth-humans-for-perspective
nkzn
6
2.7k
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
500
Typedesign – Prime Four
hannesfritz
42
3.2k
RailsConf 2023
tenderlove
30
1.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
510
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
460
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
3.6k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
970
What's in a price? How to price your products and services
michaelherold
247
13k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
390
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
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