Creating and configuring a virtual machine in Amazon EC2

Use the knife node list command to get the list of nodes to get clarity on how many nodes are already configured using Chef:

root@devops1 Desktop]# knife node listtomcatserver

Use the knife ec2 server create command with the following parameters to create a new virtual machine:

Parameter Value Description

-I

ami-1ecae776

This is the ID of the Amazon machine image

-f

t2.micro

This is the type of the virtual machine

-N

DevOpsVMonAWS

This is the name of the Chef node

--aws-access-key-id

Your access key ID

This is the access key ID of the AWS account

--aws-secret-access-key

Your secret access key

This is the secret access key of the AWS account ...

Get DevOps Bootcamp now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.