I've started to dive into AWS DevOps and I'm trying to use the AWS Chef 12 Stack. I'm brand new to Chef but I have downloaded the ChefDK on my Mac (10.11.4) and successfully created my first Cookbook directory running the chef generate cookbook cookbook-name-here
command. My goals are to:
Goals:
- Create a Linux based LAMP stack Cookbook to configure my AWS EC2 instance
- Package the Cookbook
- Add it to my GitHub account (I have this covered)
- Link my AWS OpsWorks Chef 12 stack to the GitHub account containing the Cookbook (I have this covered)
- Deploy a new EC2 instance that gets configured correctly based on the Cookbook
- Use Cookbook/Recipe to Update/Add a simple HTML file to the EC2 instance
All that said, this leads me to ask the following Chef newbie questions.
Additional Chef Questions:
Now that my demo Cookbook has been created, how do I create my own custom Recipes?
- Do I manually create the recipe ruby files or use terminal command line (CLI)?
- Once the files are created do I need to run any other Chef CLI command to compile, format, or correctly place the chef recipe ruby file in the Cookbook?
How do I correctly add chef dependencies to my cookbook from the Chef Supermarket? create my own custom recipes.
- How do I package all of that up to upload to GitHub or S3.
Any directions, tips, resource links, etc... would be much appreciated. I have also listed my system's chef -v
output below:
chef -v
Chef Development Kit Version: 0.12.0
chef-client version: 12.8.1
berks version: 4.3.0
kitchen version: 1.6.0