You use Embedded Ruby (ERB) to create configuration file templates, which allows variables and logic to be used inside files on a node for host-specific information.
- [Instructor] In the last section…we updated the Apache Cookbook's server recipe…with information about the IP address…and host name of this node.…We added that information to the server recipe…in the file resource.…So remember what we did here.…We used string interpolation to insert the node attributes…for IP address and host name.…Now if you're thinking ahead at all this might bother you.…For example, I'm pasting all of the content…for an HTML page inside of that string,…what happens whenever I have a real web application…that's very large?…Am I going to paste the entire HTML code…into that content string?…That would be very impractical in the long-run.…
However, I can't just go through…and use a static HTML file here.…Do you see why I couldn't just copy…an HTML file into that directory?…I'm inserting those node attributes…for IP address and host name into the index.html page.…If I have a static HTML page, how am I going…to insert those node attributes into it?…What we actually need here is the ability…to build a real HTML file without using…
- Configuration management
- Using Chef
- Installing the Chef development kit (ChefDK)
- Provisioning a CentOS instance
- Using recipes and the Apache cookbook
- Working with nodes and node objects
- Using templates and embedded Ruby
- Hosting a Chef server
- Provisioning nodes with AWS
- Testing deployments with Kitchen
- Exploring the Chef Supermarket
- Resolving dependencies with Berkshelf
- Working with server roles, environments, and data bags
Skill Level Beginner
Setting up a Red Hat Enterprise Linux Serverwith Sandra Toner2h 46m Intermediate
1. Getting Started with Chef
2. From Recipes to Cookbooks
3. The Chef Server
4. Going Full Scale
Next steps3m 9s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.