创建ASG

创建和配置ASG

打开EC2 控制台,进入

image-20220316160641248

image-20220316160731888

image-20220316160849099

image-20220316160948833

image-20220316161012014

image-20220316161252207

image-20220316161321865

#! /bin/bash
sudo yum update -y
sudo yum install ruby wget -y
CODEDEPLOY_BIN="/opt/codedeploy-agent/bin/codedeploy-agent"
$CODEDEPLOY_BIN stop
yum erase codedeploy-agent -y
cd /home/ec2-user
wget https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/latest/install
chmod +x ./install
sudo ./install auto
sudo service codedeploy-agent start

image-20220316165644207

Leave the rest of the defaults.

  1. Choose Create launch template.

image-20220316161410173

image-20220316161445280

image-20220316161524545

image-20220316161603895

image-20220316162003349

image-20220316162113788

image-20220316162135577