Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
demo-build-curd-app-with-serverless-elixir
ohr486
June 02, 2019
Technology
3
96
demo-build-curd-app-with-serverless-elixir
ohr486
June 02, 2019
Tweet
Share
More Decks by ohr486
See All by ohr486
Plug & WAF
ohr486
2
110
elixirをプロダクションに導入する
ohr486
1
180
IEx maniacs
ohr486
3
210
Hack and Read Elixir
ohr486
2
230
Running App on AppRunner
ohr486
0
250
sponsor-talk-drecom-heisei-ruby-kaigi
ohr486
0
460
ex-app-on-k8s
ohr486
0
64
AWS-DEV-DEV-tokyo-serverless-elixir-with-aws-lambda
ohr486
2
150
Hacking Elixir How-To
ohr486
2
920
Other Decks in Technology
See All in Technology
Agile and Requirement : アジャイルな要件定義について考える
kawaguti
PRO
10
3.6k
Steps toward self-service operations in eureka
fukubaka0825
0
980
開発者のための GitHub Organization の安全な運用と 継続的なモニタリング
flatt_security
3
4k
Oracle Database Technology Night #55 Oracle Autonomous Database 再入門
oracle4engineer
PRO
1
140
Data Warehouse or Data Lake, which one do I choose?
ahana
0
150
YAMLを書くだけで構築できる分散ストレージ
sat
PRO
0
230
新規ゲームのリリース(開発)前からのSRE活動
tmkoikee
1
580
OSS ことはじめ
hsbt
3
590
家の明るさ制御 / Brightness Control in My House
1024jp
0
140
スクラムマスターの「観察」スキルを掘り下げる / Scrum Fest Niigata 2022
ama_ch
0
850
KubeCon Recap -Platform migration at Scale-
inductor
0
110
Stripe Search APIを利用した、LINEとStripeの顧客情報連携/line-dc-202205
stripehideokamoto
0
130
Featured
See All Featured
Writing Fast Ruby
sferik
612
57k
Music & Morning Musume
bryan
35
4.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
237
19k
YesSQL, Process and Tooling at Scale
rocio
157
12k
GraphQLとの向き合い方2022年版
quramy
16
8.1k
Git: the NoSQL Database
bkeepers
PRO
415
59k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
15
920
Happy Clients
brianwarren
89
5.6k
The Language of Interfaces
destraynor
148
20k
Code Review Best Practice
trishagee
41
6.8k
How GitHub (no longer) Works
holman
296
140k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
38
12k
Transcript
DEMO build crud app with serverless elixir おーはら@tokyo.ex
agenda • about me • how to run • demo
• まとめ
about me • Tsunenori Ohara/おーはら ◦ Twitter: @ohrdev ◦ Github:
ohr486
how to run repo: https://github.com/ohr486/serverless_elixir_demo 利用ライブラリ: - erllambda - mix_erllambda
以下のようなアプリを作成します - CR(U)D操作のできるAPI - 環境はAWS、Lambda、ApiGatewayを利用 - DBはDynamoDBを利用
step0 • release buildの為のdocker imageのbuild ◦ https://github.com/alertlogic/erllambda_docker • build ◦
mix deps.get ◦ docker run -it --rm -v `pwd`:/buildroot -w /buildroot -e MIX_ENV=prod erllambda:21-elixir mix erllambda.rellease
step1 • cloudformationの為のS3 bucketを作成
step2 • パッケージング ◦ aws cloudformation package --template-file etc/template.yaml --output-template-file
packaged.yaml --s3-bucket japanex-demo
step3 • deploy ◦ aws cloudformation deploy --capabilities CAPABILITY_IAM --template-file
packaged.yaml --stack-name japanex-demo
step4 • deployスタックを確認 ◦ aws cloudformation describe-stacks --stack-name japanex-demo --query
'Stacks[].Outputs' ◦ 作成したendpointを確認 • API ENDPOINTの設定 ◦ export APIENDP=xxxxxxx
step5 • アイテムの作成 (CRUD) ◦ curl -X POST "$APIENDP?id=foo2&bar=quz2"
step6 • アイテムリスト取得 ◦ curl $APIENDP
step7 • アイテム削除 ◦ curl -X DELETE "$APIENDP?id=foo2"
step8 • アプリ削除 ◦ aws cloudformation delete-stack --stack-name japanex-demo
まとめ • 簡単なCR(U)Dアプリをserverlessで作成するデモを行いました • デモの通り、まだまだオペレーションが煩雑です ◦ このあたりをいい具合にラップしてくれるツール /FW等は現状まだありません ◦ oss貢献のチャンス!