================================================================ 3.1. 起動設定の作成 (ユーザデータ) ================================================================ .. include:: ./_defines-autoscaling.txt .. .. |AWS_DEFAULT_PROFILE| replace:: .. .. |AWS_DEFAULT_REGION| replace:: ap-northeast-1 .. .. |AWS_ID| replace:: .. .. |DIR_TMP| replace:: ${HOME}/tmp .. .. |DIR_CONF| replace:: ${HOME}/tmp/conf-autoscaling .. .. |AS_LAUNCH_CONFIG_NAME| replace:: <起動設定名> .. |FILE_EC2_USERDATA| replace:: |DIR_CONF|\ /\ |today|\ -\ |AS_LAUNCH_CONFIG_NAME|\ -userdata.bash .. .. |VPC_CIDR| replace:: 10.192.0.0/16 .. .. |VPC_ID| replace:: vpc-xxxxxxxx .. .. |VPC_TAG_NAME| replace:: vpc-handson-\ |DAY_WORK| .. |ARRAY_VPC_SG_IDS| replace:: |VPC_SG_ID| .. |EC2_INSTANCE_TAG_NAME| replace:: handson-\ |today| .. |EC2_INSTANCE_TYPE| replace:: t2.micro .. |EC2_PRIVATE_ADDR| replace:: xxx.xxx.xxx.xxx .. |EC2_INSTANCE_STATE| replace:: <ステータス> .. |EC2_IMAGE_ID| replace:: ami-2a69be4c .. |STRING_TAG_CONF| replace:: ResourceType=instance,Tags=[{Key=${\ |EC2_TAG_KEY|\ },Value=${\ |EC2_INSTANCE_TAG_NAME|\ }} .. |EC2_IMAGE_NAME| replace:: amzn-ami-hvm-2017.09.0.20170930-x86_64-gp2 .. |VPC_SG_NAME| replace:: webserver-handson-\ |DAY_WORK| .. |VPC_SG_DESC| replace:: Web Server .. |VPC_SG_ID| replace:: sg-xxxxxxxx .. |EC2_TAG_KEY| replace:: Name ---------------------------------------------------------------- 作業の目的 [why] ---------------------------------------------------------------- AutoScaling起動設定"\ |AS_LAUNCH_CONFIG_NAME|\ "を作成します。 .. include:: ../../../resource-catalog/task-autoscaling/autoscaling-launch_configuration-create/_display-condition-common-autoscaling-launch_configuration-create.txt .. include:: ../../../resource-catalog/task-autoscaling/autoscaling-launch_configuration-create/autoscaling-launch_configuration-userdata-create.txt .. 3.3. 後処理に必要な作業 .. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% .. 後処理に必要な作業があれば実施します。 ---------------------------------------------------------------- 完了 ----------------------------------------------------------------