#author("2020-09-02T09:10:16+00:00","","") #mynavi(AWSメモ) #setlinebreak(on); * 概要 [#da86ba60] #html(<div class="pl10">) Azure Blob のアップロードをトリガーにして起動する処理は、Blobトリガーを使用すれば簡単に実装できるが、 ここでは Azure Blob のアップロード時に webhook で 他のWebAPI サーバにイベントデータを飛ばす仕組みを構築してみた。 尚、この記事では WebAPI サーバは Azure の仮想マシンに上に構築する。(サーバ自体は今回はGoで実装する) #html(</div>) * 目次 [#t64b850c] #contents - 関連 -- [[Azureメモ]] -- [[Azure Functions を Go で書く]] -- [[GoでAzureのBlobファイルを読み書き]] - 参考 -- [[Azure Event Grid イベントに対するイベント ハンドラーとしての Webhook、Automation Runbook、Logic Apps>https://docs.microsoft.com/ja-jp/azure/event-grid/handler-webhooks]] -- [[Webhook のイベント配信>https://docs.microsoft.com/ja-jp/azure/event-grid/webhook-event-delivery]] -- [[HTTP エンドポイントへのイベントの受信>https://docs.microsoft.com/ja-jp/azure/event-grid/receive-events]] * 構築イメージ [#oe0c917e] #html(<div class="pl10">) #TODO #html(</div>) * リソース作成 [#ue84466d] #html(<div class="pl10">) // START tabs1 #html(){{ <div id="tabs1"> <ul> <li><a href="#tabs1-1">0_env.sh</a></li> <li><a href="#tabs1-2">1_create_resources.sh</a></li> <li><a href="#tabs1-3">2_setup_vm.tmpl</a></li> <li><a href="#tabs1-4">Dockerfile</a></li> <li><a href="#tabs1-5">apiserver.go</a></li> </ul> }} // START tabs1-1 #html(<div id="tabs1-1">) #html(</div>) // END tabs1-1 // START tabs1-2 #html(<div id="tabs1-2">) #html(</div>) // END tabs1-2 // START tabs1-3 #html(<div id="tabs1-3">) #html(</div>) // END tabs1-3 // START tabs1-4 #html(<div id="tabs1-4">) #html(</div>) // END tabs1-4 // START tabs1-5 #html(<div id="tabs1-5">) #html(</div>) // END tabs1-5 #html(</div>) // END tabs1 #html(<script>$(function() { $("#tabs1").tabs(); });</script>) ** リソース作成の実行 [#n8627ad1] #myterm2(){{ ./1_create_resources.sh --create }} #html(</div>) * フックの設定 [#ccd81ffc] #html(<div class="pl10">) #TODO #html(</div>) * 動作確認 [#x46aacb8] #html(<div class="pl10">) #TODO #html(</div>) * 解説 [#bb978839] #html(<div class="pl10">) #TODO #html(</div>) * TODO [#e920c52a] #html(<div class="pl10">) - APIサーバのログ出力 及び docker volume のマウント - Application insight への連携(実現可否の調査) - NSG で EventGrid 以外を拒否 - ストレージアカウントの料金 #html(</div>)