Reputation: 4511
I got my Chef Server and Chef workstation configured on an AWS VM running Centos. I downloaded the chef-repo from GitHub as per the instructions. I downloaded the keys from my Chef Server. I also had keys from Amazon to use their EC2 API (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY). I also created a key at Amazon for use with the instance (test.pem). All the keys are in ~chef-repo/.chef/ and in ~/.ssh/. I am trying to bootstrap an existing ec2 instance in a specific environment and under a specific role.
I have used the following command:
knife bootstrap Server_IP --ssh-user root --sudo --identity-file ~/.ssh/test.pem --environment testing --node-name Centos_Node --run-list 'role[web_server]'
This command adds the node to the default environment.
Please help me to resolve the issue.
NOTE: VPC does not have an internet gateway.
I am following this link :
http://clarkdave.net/2013/05/creating-ec2-instances-in-an-amazon-vpc-using-chef-and-knife/
Upvotes: 0
Views: 1637
Reputation: 11455
All EC2 instance weather you choose a VPC or not comes with a VPC the default VPC. I don't think there is a choice of creating a EC2 instance without a VPC
Upvotes: 0
Reputation: 23
An EC2 instance in a VPC requires more infrastructure than a standalone EC2 instance (one that is not contained within a VPC). For example, you will need subnets, routes, route tables, security groups, a gateway, and potentially one or more NAT servers.
Upvotes: 1