aws
DOK can also be tested on AWS EC2. You can refer to the following test scripts to familiarize machines. It is recommended to download the official aws cli.
Actually, Centos 7 has no updates Since 2020, most of the cloud vendors no longer maintain internally. For example, Centos 7 is not in the official image of aws, although many companies still use this distribution. However, you can find some maintenance versions that require additional fees in the aws mirror market, you can try it.
# instance type
export ec2Type=t2.medium
# create
aws ec2 run-instances --image-id ami-09d56f8956ab235b3 --count 1 --instance-type $ec2Type --key-name office-lexin --security-group-ids sg-09a16a5a8bd226113 --subnet-id subnet-03959d098b755dc22 --block-device-mappings "[{\"DeviceName\":\"/dev/sda1\",\"Ebs\":{\"VolumeSize\":20,\"DeleteOnTermination\":true}}]"
# description
aws ec2 describe-instances --filters "Name=instance-type,Values=$ec2Type"
# login
ssh ubuntu@`aws ec2 describe-instances --filters "Name=instance-type,Values=$ec2Type" --query "Reservations[].Instances[].PublicIpAddress" | cat`
# destroy
aws ec2 terminate-instances --instance-ids `aws ec2 describe-instances --filters "Name=instance-type,Values=$ec2Type" --filters Name=instance-state-name,Values=running --query "Reservations[].Instances[].InstanceId" | cat`