*This works on Linux Ubuntu, Windows (Ubuntu installation is needed), or Oracle VirtualBox (Linux Ubuntu) installed on your Windows machine.
Prerequisites:
Steps to execute Puppet compiler:
Open up your terminal.
Run the following command to connect your machine to AWS EC2 Instance: Example: ssh -i 'AKP.pem' [email protected]
Once you're connected to your AWS EC2 Instance, run the following command to start docker daemon: 'sudo service docker start'
After you get Docker service running, execute the next command to pull the docker image for Puppet from DockerHub repository: 'docker pull taichernchao/puppet:latest'
You'll need to run the build command every time you make any changes to update your Dockerfile before you get into Puppet compiler: 'docker build . -t taichernchao/puppet'
Create a Puppet file so that you can execute the command to run Puppet later.
Now, run the following command to get into the Puppet compiler: 'docker run -it --privileged taichernchao/puppet bash'
Check if you have 'bundler' and 'logger' gems installed by using 'gem list' command
Lastly, run the following bundle command to compile the puppet file created on Step 6: 'bundle exec puppet apply (Puppet file name).pp'
Notice: Compiled catalog for 7c988a9274e5.us-east-2.compute.internal in environment production in 0.02 seconds Notice: Applied catalog in 0.09 seconds
The above messages indicate an example of a successful compilation of the Puppet compiler. If an error occurred, it should return texts in red or tracebacks to your terminal and something needs to be fixed.
docker pull taichernchao/puppet:latest