Creating and configuring a virtual machine in Amazon EC2

Before creating and configuring a virtual machine in Amazon EC2, let's verify the existing nodes converged by Chef. Local virtual machines are only configured using Chef:

[root@devops1 Desktop]# knife node list
tomcatserver

  1. After installing knife EC2 plugin, we can use knife ec2 server create command with following parameters to create new virtual machine:

    Parameter

    Value

    Description

    -I

    ami-1ecae776

    ID of the Amazon machine image

    -f

    t2.micro

    Type of virtual machine

    -N

    DevOpsVMonAWS

    Name of the Chef node

    --aws-access-key-id

    Your access key ID

    AWS account access key ID

    --aws-secret-access-key

    Your secret access key

    AWS account secret access key

    -S

Get DevOps for Web Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.