
php5なuploaderをauroraで使う (ECS)
ECRにpush
ここは特に何も変更してないので前のpushスクリプトを作ってください
749a92f37d0d: Layer already exists
768c0eac2de9: Layer already exists
latest: digest: sha256:b2798962fad22fd7ec9af6f8d85972f3aabe6f1bde9737b2b7f53a7aa5a8a3d1 size: 4292
せっかくだし、新たなクラスターを作っておいてこか
クラスターを立てる

タスク定義
サービスを立てる前にクラスターがぶん回ってる間にタスク定義を新規作成する

相変わらずarmのセコセコ構成

環境変数がちょっとちゃうで

とりあえず面倒くさいのでPASSWORDもそのままつっこんだ。パラメーターストアから持ってくる場合は前の記事よんで
サービスの設定

最初からロードバランサーつくっておくからね
DBの用意
でまあ今schemaが例によってないのでメンテ用のec2を起動
$ mysql -uadmin -ppassword -huploader-demo.cluster-cmxstlofflyf.ap-northeast-1.rds.amazonaws.com
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.7.12 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
基本的にwriterでやればよい
MySQL [(none)]> create database uploader_demo;
とかして
schema.sql
session_data.sql
を流しこんだ

リーダーがイカれててもこのように起動はしてくる、が、まあ少し待っておこう。

ちゃんとuploadして削除できればok。てかecsを付け忘れていたので揮発しちゃうしな。
次回パフォーマンスのテストとかフェイルオーバーとかしてみよう。てか高いから一々閉じる必要があるんだよな〜ん