diff --git a/aws-code/create_client_instances.sh b/aws-code/create_client_instances.sh new file mode 100755 index 000000000..f23fd5521 --- /dev/null +++ b/aws-code/create_client_instances.sh @@ -0,0 +1,8 @@ +# security_group_name=$1 +# security_group_description=$2 +# instanceName=$3 +aws ec2 create-security-group --group-name mcDG --description "mcdg" +aws ec2 authorize-security-group-ingress --group-name MySecurityGroup --protocol tcp --port all --cidr 0.0.0.0/0 + +aws ec2 run-instances --image-id ami-a9d09ed1 --count 5 --instance-type t2.micro --key-name main --security-group-ids mcDG \ +--user-data user-data.sh --iam-instance-profile Name=CodeDeployDemo-EC2-Instance-Profile --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=Client}]' diff --git a/aws-code/create_instances.sh b/aws-code/create_instances.sh index 9736654e9..f23fd5521 100755 --- a/aws-code/create_instances.sh +++ b/aws-code/create_instances.sh @@ -1,7 +1,8 @@ # security_group_name=$1 # security_group_description=$2 +# instanceName=$3 aws ec2 create-security-group --group-name mcDG --description "mcdg" aws ec2 authorize-security-group-ingress --group-name MySecurityGroup --protocol tcp --port all --cidr 0.0.0.0/0 -aws ec2 run-instances --image-id ami-a9d09ed1 --count 1 --instance-type t2.micro --key-name main --security-group-ids mcDG \ ---user-data user-data.sh --iam-instance-profile Name=CodeDeployDemo-EC2-Instance-Profile \ No newline at end of file +aws ec2 run-instances --image-id ami-a9d09ed1 --count 5 --instance-type t2.micro --key-name main --security-group-ids mcDG \ +--user-data user-data.sh --iam-instance-profile Name=CodeDeployDemo-EC2-Instance-Profile --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=Client}]' diff --git a/aws-code/create_node_instances.sh b/aws-code/create_node_instances.sh new file mode 100755 index 000000000..c02ec0433 --- /dev/null +++ b/aws-code/create_node_instances.sh @@ -0,0 +1,8 @@ +# security_group_name=$1 +# security_group_description=$2 +# instanceName=$3 +aws ec2 create-security-group --group-name mcDG --description "mcdg" +aws ec2 authorize-security-group-ingress --group-name MySecurityGroup --protocol tcp --port all --cidr 0.0.0.0/0 + +aws ec2 run-instances --image-id ami-a9d09ed1 --count 5 --instance-type t2.micro --key-name main --security-group-ids mcDG \ +--user-data user-data.sh --iam-instance-profile Name=CodeDeployDemo-EC2-Instance-Profile --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=Node}]'