- Setup - The basics of getting started with ec2 builder
- [Dependencies] (#dependencies)
- [Beginning with ec2 builder with stand alone puppet agent](#beginning-with-mq80_base-with-stand-alone-puppet agent)
It is going to Launch EC2 Instance
In your Mac/Linux you must firt run these steps: $ sudo /opt/puppetlabs/puppet/bin/gem install aws-sdk retries $ puppet module install puppetlabs-aws --version 2.1.0 $ puppet module install puppetlabs-stdlib --version 5.0.0 $ export AWS_ACCESS_KEY_ID=your_access_key_id $ export AWS_SECRET_ACCESS_KEY=your_secret_access_key
If you already have puppet agent in your Mac/Linux and also ran all commands above, you are ready to create your first EC2 Instance using Puppet. First you should open the file command.yaml that is placed on ec2_builder/data/common.yaml. Remember that you should install this module in /etc/puppetlabs/code/environments/production/modules. If you just want to test, don't need to change anything on common.yaml file whether not, please feel free to update using change the name of VPC, subnets, security group, EC2 instance and etc... After update run this:
puppet apply -e "include ec2_builder"
Remeber that you must to have the environment variables exported to puppet be able to access AWS account. $ export AWS_ACCESS_KEY_ID=your_access_key_id $ export AWS_SECRET_ACCESS_KEY=your_secret_access_key