feat: stepfunctionsの本番用設定に変更、月次バッチの設定を削除

This commit is contained in:
shimoda.m@nds-tyo.co.jp 2023-11-09 17:15:51 +09:00
parent 27134a9310
commit dc0536c5a9
2 changed files with 3 additions and 110 deletions

View File

@ -22,8 +22,6 @@ resource:
- &STG_SG_CRM_DATAFETCH "sg-0b20b7bb1cb1ab886"
# セキュリティグループ(ecs-jskult-batch-daily)
- &STG_SG_JSKULT_BATCH_DAILY "sg-020b3f6a5a6d6a3a0"
# セキュリティグループ(ecs-jskult-batch-monthly)
- &STG_SG_JSKULT_BATCH_MONTHLY "sg-05c7ad620d69e6f5f"
# セキュリティグループ(ecs-jskult-dbdump)
- &STG_SG_JSKULT_DBDUMP "sg-0967779af13538a8e"
# セキュリティグループ(ecs-jskult-batch-laundering)
@ -38,15 +36,12 @@ resource:
- &PRD_SG_ECS_ALL "sg-05df4823fc789b0fa"
# セキュリティグループ(ecs-crm-datafetch)
- &PRD_SG_CRM_DATAFETCH "sg-04de7fc3357d852af"
# TODO: 本番リリース時にIDを正式化する
# セキュリティグループ(ecs-jskult-batch-daily)
- &PRD_SG_JSKULT_BATCH_DAILY "sg-xxxxxxxxxxxxxxxx"
# セキュリティグループ(ecs-jskult-batch-monthly)
- &PRD_SG_JSKULT_BATCH_MONTHLY "sg-xxxxxxxxxxxxxxxx"
- &PRD_SG_JSKULT_BATCH_DAILY "sg-0276dc8acc80288cc"
# セキュリティグループ(ecs-jskult-dbdump)
- &PRD_SG_JSKULT_DBDUMP "sg-xxxxxxxxxxxxxxxx"
- &PRD_SG_JSKULT_DBDUMP "sg-050ab3bc0d9ed261a"
# セキュリティグループ(ecs-jskult-batch-laundering)
- &PRD_SG_JSKULT_BATCH_LAUNDERING "sg-xxxxxxxxxxxxxxxx"
- &PRD_SG_JSKULT_BATCH_LAUNDERING "sg-0d2bc30c1a2939c32"
config:
# CRMデータ取得
r-crm-datafetch-state:
@ -122,36 +117,6 @@ config:
SG_ECS_ALL: *PRD_SG_ECS_ALL
# セキュリティグループ(ecs-jskut-batch-daily)
SG_JSKULT_BATCH_DAILY: *PRD_SG_JSKULT_BATCH_DAILY
# 実消化&アルトマーク 月次バッチ
r-jskult-batch-monthly-state:
# ステージング環境
staging:
# AWSアカウントID
AWS_ACCOUNT_ID: *AWS_ACCOUNT_ID
# 東京リージョン
REGION_AP_NORTHEAST_1: *REGION_AP_NORTHEAST_1
# サブネット(PrivateSubnet1)
SUBNET_PRI_1A: *STG_SUBNET_PRI_1A
# サブネット(PrivateSubnet2)
SUBNET_PRI_1D: *STG_SUBNET_PRI_1D
# セキュリティグループ(ecs-all)
SG_ECS_ALL: *STG_SG_ECS_ALL
# セキュリティグループ(ecs-jskut-batch-monthly)
SG_JSKULT_BATCH_MONTHLY: *STG_SG_JSKULT_BATCH_MONTHLY
# 本番環境
product:
# AWSアカウントID
AWS_ACCOUNT_ID: *AWS_ACCOUNT_ID
# 東京リージョン
REGION_AP_NORTHEAST_1: *REGION_AP_NORTHEAST_1
# サブネット(PrivateSubnet1)
SUBNET_PRI_1A: *PRD_SUBNET_PRI_1A
# サブネット(PrivateSubnet2)
SUBNET_PRI_1D: *PRD_SUBNET_PRI_1D
# セキュリティグループ(ecs-all)
SG_ECS_ALL: *PRD_SG_ECS_ALL
# セキュリティグループ(ecs-jskut-batch-monthly)
SG_JSKULT_BATCH_MONTHLY: *PRD_SG_JSKULT_BATCH_MONTHLY
# 実消化&アルトマーク 日次dump取得
r-jskult-dbdump-state:
# ステージング環境

View File

@ -1,72 +0,0 @@
{
"Comment": "MeDaCA 実消化&アルトマーク 月次バッチ起動ステートマシン",
"StartAt": "params",
"States": {
"params": {
"Comment": "パラメータ設定",
"Type": "Pass",
"Parameters": {
"sns": {
"TopicArn": "arn:aws:sns:#{REGION_AP_NORTHEAST_1}:#{AWS_ACCOUNT_ID}:nds-notice-#{ENV_NAME}"
},
"ecs": {
"Cluster": "arn:aws:ecs:#{REGION_AP_NORTHEAST_1}:#{AWS_ACCOUNT_ID}:cluster/mbj-newdwh2021-#{ENV_NAME}-jskult-batch-monthly-ecs",
"LaunchType": "FARGATE",
"NetworkConfiguration": {
"AwsvpcConfiguration": {
"Subnets": [
"#{SUBNET_PRI_1A}",
"#{SUBNET_PRI_1D}"
],
"SecurityGroups": [
"#{SG_ECS_ALL}",
"#{SG_JSKULT_BATCH_MONTHLY}"
],
"AssignPublicIp": "DISABLED"
}
}
}
},
"ResultPath": "$.params",
"Next": "exec-batch-monthly"
},
"exec-batch-monthly": {
"Comment": "実消化&アルトマーク 月次バッチ起動",
"Type": "Task",
"Resource": "arn:aws:states:::ecs:runTask.sync",
"Parameters": {
"Cluster.$": "$.params.ecs.Cluster",
"LaunchType.$": "$.params.ecs.LaunchType",
"TaskDefinition": "arn:aws:ecs:#{REGION_AP_NORTHEAST_1}:#{AWS_ACCOUNT_ID}:task-definition/mbj-newdwh2021-#{ENV_NAME}-task-jskult-batch-monthly",
"NetworkConfiguration.$": "$.params.ecs.NetworkConfiguration"
},
"Retry": [
{
"ErrorEquals": ["States.ALL"],
"BackoffRate": 2,
"IntervalSeconds": 5,
"MaxAttempts": 3
}
],
"Catch": [
{
"ErrorEquals": ["States.ALL"],
"ResultPath": "$.result",
"Next": "ErrorEnd"
}
],
"ResultPath": "$.result",
"Next": "NormalEnd"
},
"NormalEnd": {
"Comment": "正常終了",
"Type": "Succeed"
},
"ErrorEnd": {
"Comment": "異常終了",
"Type": "Fail",
"Error": "StatesError",
"Cause": "StepFunctions ErrorEnd"
}
}
}