Open6

ECS Plugin検証

myabaoumyabaou

を元に実施。
実行環境 Mac M1 Monterey 12.2.1

〉docker compose up
WARNING services.scale: unsupported attribute        
WARNING services.build: unsupported attribute        
WARNING services.scale: unsupported attribute        
[+] Running 18/18
 ⠿ example                        DeleteComplete                                                                      406.6s
 ⠿ Cluster                        DeleteComplete                                                                      357.6s
 ⠿ FrontendTCP5000TargetGroup     DeleteComplete                                                                      300.5s
 ⠿ LogGroup                       DeleteComplete                                                                      359.5s
 ⠿ DefaultNetwork                 DeleteComplete                                                                      357.6s
 ⠿ FrontendTaskExecutionRole      DeleteComplete                                                                      301.5s
 ⠿ LoadBalancer                   DeleteComplete                                                                      299.4s
 ⠿ CloudMap                       DeleteComplete                                                                      401.5s
 ⠿ BackendTaskExecutionRole       DeleteComplete                                                                      358.4s
 ⠿ Default5000Ingress             DeleteComplete                                                                      225.8s
 ⠿ DefaultNetworkIngress          DeleteComplete                                                                      224.9s
 ⠿ FrontendTaskDefinition         DeleteComplete                                                                      281.4s
 ⠿ BackendTaskDefinition          DeleteComplete                                                                      339.5s
 ⠿ FrontendServiceDiscoveryEntry  DeleteComplete                                                                      248.6s
 ⠿ BackendServiceDiscoveryEntry   DeleteComplete                                                                      307.5s
 ⠿ BackendService                 DeleteComplete                                                                      300.9s
 ⠿ FrontendTCP5000Listener        DeleteComplete                                                                      143.3s
 ⠿ FrontendService                DeleteComplete                                                                      136.7s
FrontendService EssentialContainerExited: Essential container in task exited

FrontendServiceが起動しない。。

myabaoumyabaou

AWS SSOのプロファイルでcontextを作成して〜
というのはエラーになったのでIAMのプロファイルで実施。

myabaoumyabaou

AmazonLinux2(Intel)上でも同じ事象が発生するのか切り分け。

$ docker context create ecs myecscontext
"docker context create" requires exactly 1 argument.
See 'docker context create --help'.

Usage:  docker context create [OPTIONS] CONTEXT

Create a context

なんだこれとおもったら以下で解決※ログインし直す必要あり。

myabaoumyabaou

Intel版でBuildしたものを再度push する必要があるんじゃね
ということで安定の失敗。

 FrontendService                CreateFailed Resource creation cancelled                                                      36.0s
myabaoumyabaou

Intelアーキテクチャ EC2上でBuildしたものを再pushしたら
正常に終了。

ec2-user@ip-192-168-24-198:~/ecs-plugin/example (master *) 
$ docker compose up
WARNING services.build: unsupported attribute        
[+] Running 18/18
 ⠿ example                        CreateComplete                                                                                                              254.0s
 ⠿ FrontendTCP5000TargetGroup     CreateComplete                                                                                                                1.0s
 ⠿ Cluster                        CreateComplete                                                                                                                7.0s
 ⠿ BackendTaskExecutionRole       CreateComplete                                                                                                               17.0s
 ⠿ FrontendTaskExecutionRole      CreateComplete                                                                                                               16.0s
 ⠿ LogGroup                       CreateComplete                                                                                                                3.0s
 ⠿ LoadBalancer                   CreateComplete                                                                                                              152.0s
 ⠿ DefaultNetwork                 CreateComplete                                                                                                                6.0s
 ⠿ CloudMap                       CreateComplete                                                                                                               47.0s
 ⠿ Default5000Ingress             CreateComplete                                                                                                                1.0s
 ⠿ DefaultNetworkIngress          CreateComplete                                                                                                                1.0s
 ⠿ FrontendTaskDefinition         CreateComplete                                                                                                                3.0s
 ⠿ BackendTaskDefinition          CreateComplete                                                                                                                3.0s
 ⠿ BackendServiceDiscoveryEntry   CreateComplete                                                                                                                2.0s
 ⠿ FrontendServiceDiscoveryEntry  CreateComplete                                                                                                                2.0s
 ⠿ BackendService                 CreateComplete                                                                                                               87.0s
 ⠿ FrontendTCP5000Listener        CreateComplete                                                                                                                2.0s
 ⠿ FrontendService                CreateComplete                                                                                                               88.0s

Warnigは気にしなくてもええんかな。

myabaoumyabaou

Copilotのほうがええんかなー。
悩ましい
ECSデプロイでterraformを利用すべきじゃなさそうというのはわかるんだけども。