This post is all about running and refining the puppet manifest defined in part 1. That manifest defined a blog similar to this one.
You will need a VM before you start, here are a few options to pick from:
You will need a VM before you start, here are a few options to pick from:
- AWS LightSail VM (you can use any VM with a public IP available)
- Linode
- DigitalOcean
- a local VM works, but only if you enable bridged networking, so that you can visit it's IP address on your host.
Steps
1. Set up Puppet Agent host
This will be the puppet agent that we run the manifest on.
You will want to set up a Static IP on that instance, so that you can access it from the internet.
You will want to set up a Static IP on that instance, so that you can access it from the internet.
2. Install puppet
Here is the official documentation on installing puppet, but if you are using Ubuntu 22.04 (Jammy), you can do this:
wget https://apt.puppet.com/puppet8-release-jammy.deb sudo dpkg -i puppet8-release-jammy.deb sudo apt update sudo apt install puppet
3. Run 'puppet apply' and observe the results!
Recall the puppet manifest from part 1, I made a gist here for convenience.
While running the puppet apply, I found an error in the manifest:
Error: Evaluation Error: Error while evaluating a Function Call, Could not find template 'modulename/nginx.conf.erb' (file: /home/ubuntu/blog_setup.pp, line: 12, column: 16) on node ip-172-26-10-216.us-west-2.compute.internal
This is because there is no Puppet Module named 'modulename'. We will fix this in Part 3. For now this will just cover the mechanics of running puppet apply, and getting an actionable error we can fix and then get closer to the finish line.