Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
さくらのクラウド AppRun と GitHub Actions でお手軽サーバレス構築
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
cyokozai
October 27, 2025
Technology
120
2
Share
さくらのクラウド AppRun と GitHub Actions でお手軽サーバレス構築
さくらのクラウドの新しいアプリケーション実行基盤である「AppRun(ベータ版)」を使用して、サーバレスアプリケーションを構築する方法を解説する
cyokozai
October 27, 2025
More Decks by cyokozai
See All by cyokozai
10Gb ルータを作るための下準備
yusuke427
0
11
アウトプットの質を高めるために僕はLTをやめた
yusuke427
0
12
年末なのでオンプレ Kubernetes クラスタをアップグレードしよう
yusuke427
0
9
塩漬けになったVM それ、Kubernetesで動かせますよ
yusuke427
2
210
KubeVirt の Live Migration をやってみる | Try KubeVirt's Live Migration on Nekko Cloud
yusuke427
2
660
学生プライベートクラウドはKubeVirt の夢を見るか?
yusuke427
1
150
SREについて学ぶスリーシェイクのインターン
yusuke427
1
240
学生サークルで開発するVMプロビジョニングツール
yusuke427
1
120
Juliaを書いていて「便利だな〜」と 思ってたらスライド出来上がってた
yusuke427
1
77
Other Decks in Technology
See All in Technology
ADOTで始めるサーバレスアーキテクチャのオブザーバビリティ
alchemy1115
2
270
GitHub Copilotを極める会 - 開発者のための活用術
findy_eventslides
6
3.8k
主催・運営として"場をつくる”というアウトプットのススメ
_mossann_t
0
130
TanStack Start エコシステムの現在地 / TanStack Start Ecosystem 2026
iktakahiro
1
360
ログ基盤・プラグイン・ダッシュボード、全部整えた。でも最後は人だった。
makikub
5
1.3k
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
4
14k
システムは「動く」だけでは足りない 実装編 - 非機能要件・分散システム・トレードオフをコードで見る
nwiizo
2
300
デシリアライゼーションを理解する / Inside Deserialization
tomzoh
0
230
AI前提とはどういうことか
daisuketakeda
0
170
インフラを Excel 管理していた組織が 3 ヶ月で IaC 化されるまで
geekplus_tech
3
170
推し活エージェント
yuntan_t
1
900
NgRx SignalStore: The Power of Extensibility
rainerhahnekamp
0
190
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
4 Signs Your Business is Dying
shpigford
187
22k
The Language of Interfaces
destraynor
162
26k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
350
ラッコキーワード サービス紹介資料
rakko
1
2.9M
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Faster Mobile Websites
deanohume
310
31k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Music & Morning Musume
bryan
47
7.1k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
Transcript
さくらのクラウド AppRun と GitHub Actions で お手軽サーバレス構築 井上 裕介
井上 裕介 a.k.a cyokozai 千葉工業大学大学院 情報科学研究科 情報工学専攻 修士1年 ❏ ネットワークコンテンツ研究会
Nekko Cloud Team ❏ 株式会社スリーシェイク sreake事業部 学生インターン
1. さくらのクラウド AppRun 2. 手動でサーバレスへデプロイ 3. GitHub Actions による継続デプロイ 4.
感想 アジェンダ
さくらのクラウド AppRun
AppRun β https://cloud.sakura.ad.jp/lp/apprun/ • Scale to Zero • マネージドサービス •
カナリアリリース
手動でサーバレスへ デプロイ
今回デプロイしたアプリケーション https://github.com/yannh/kubeconform Kubeconform • マニフェストのバリデーション を行ってくれるCLIツール • 各CRDに対応可能 • Kubernetesのスキーマ情報を
元に型チェックなどを行う
• YAMLを貼り付け/選択 • 「判定を実行」でPOST • 結果判定を表示 ◦ true ◦ error
手動デプロイの手順 1. コンテナレジストリ作成 2. 使用するイメージをCRへ Push 3. アプリを作成 (GUI操作) 4.
デプロイ完了
ログイン → AppRun β
新たにコンテナレジストリを作成
None
各種設定とユーザ登録
コンテナレジストリにイメージをプッシュ # CRにログイン docker login kubeconformserver.sakuracr.jp # イメージをbuildする docker build
-f Dockerfile -t kubeconformserver.sakuracr.jp/kubeconformserver:latest . # sakuracr.jpにpushする docker push kubeconformserver.sakuracr.jp/kubeconformserver:latest
Q. DockerHubを直接使いたいんだけど....? • AppRun βで利用できるコンテナレジストリはさくらのクラウドが 提供しているコンテナレジストリ (OCI準拠) のみ • DockerHubやGitHub
Container Registoryのイメージを使用する場合は、 一度ローカルにPullした上でさくらのクラウドにPushする必要がある
アプリケーションの作成
各種設定 https://manual.sakura.ad.jp/cloud/apprun/glossary.html
各種設定 さくらのコンテナ レジストリからPull 認証情報の設定 vCPU使用量の上限 (0.1~1 コア) メモリー使用量の上限 (256MiB~2GiB) アプリケーション名
ポート番号 ヘルスチェックの設定 (10秒ごとの監視) 環境変数の定義 インスタンス数の 自動調整範囲 同時リクエスト数 リクエストタイムアウト https://manual.sakura.ad.jp/cloud/apprun/glossary.html
デプロイ完了🙌
• ログ • メトリクス ◦ 平均リクエスト数 ◦ CPU ◦ メモリ
簡単な監視も可能
もっとCloud Nativeで ラクしたい!🥺
GitHub Actions による 継続デプロイ
• GoアプリケーションをさくらのAppRunにデプロイする フローを自動化するためのComposite Actions → Dockerfileがなくてもデプロイ可能 • 登録されたオブジェクトストレージのバケットに SQLite レプリカの作成
→ データ永続化 GitHub Actions: sacloud_apprun_actions
自動デプロイの処理の流れ
ワークフロー name: Kubeconformserver - Sacloud AppRun Actions on: push: branches:
- main workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Deployment id: deploy uses: ippanpeople/
[email protected]
with: use-repository-dockerfile: true app-dir: ./src sakura-api-key: ${{ secrets.SAKURA_API_KEY }} sakura-api-secret: ${{ secrets.SAKURA_API_SECRET }} container-registry: ${{ secrets.REGISTRY }} container-registry-user: ${{ secrets.REGISTRY_USER }} container-registry-password: ${{ secrets.REGISTRY_PASSWORD }} port: '8080'
Name Value REGISTRY コンテナレジストリの URL REGISTRY_USER コンテナレジストリのユーザー名 REGISTRY_PASSWORD コンテナレジストリのパスワード SAKURA_API_KEY
さくらの API キー SAKURA_API_SECRET さくらの API シークレット STORAGE_BUCKET_NAME オブジェクトストレージのバケット名 STORAGE_ACCESS_KEY オブジェクトストレージのアクセスキー STORAGE_SECRET_KEY KEY オブジェクトストレージのシークレットキー GitHubにシークレットを登録 リポジトリのSettings > Secrets and variablesから各種設定を入力
デプロイ完了 (2回目) 🙌
バージョンごとに荷重ルーティングが可能
実践 (30秒くらい時間使う)
感想
良かった点 • シンプルな設定項目 • GitHub Actionsを使用したCI/CDの構築 • Terraform使用可能 • FaaSとして簡易的なジョブを投げるのにはちょうど良い
改善してほしい点 • さくらのコンテナレジストリ (sakuracr.jp) 以外は不可 • 非httpエンドポイント, 複数ポート非対応 • 監視項目をカスタム
• Web UI の細かな修正
Thank you for yourkind attention! kubeconfirmserver リポジトリ公開中 ⇨ kubeconfirmserver 公開中
⇨