Giter VIP home page Giter VIP logo

puppet-quest-guide's Introduction

{% include '/version.md' %}

Quest Guide for the Puppet Learning VM

About the Learning VM and this Quest Guide

The Learning VM (Virtual Machine) is a self-contained learning environment that includes everything a new user needs to get started learning Puppet. Because learning Puppet requires making changes to a system's configuration, it's not wise to play with it directly on your own laptop or desktop. Not everyone who wants to learn Puppet, however, has easy access to a system where he or she can experiment freely. And even those who do will benefit from an environment with Puppet Enterprise pre-installed and a set of tools to help guide you through the basics of configuration management with Puppet.

This guide is the companion to the Learning VM. The content of the guide is paired with a quest command line tool on the VM that will provide live feedback as you progress through the list of tasks associated with each quest in this guide. By breaking each concept into a series of incremental and validated steps, we can ensure that you stay on track as you progress through the guide.

Who should use the Learning VM?

This guide should be useful for any reader with an interest in configuration management, system administration, or related tasks. We have done our best to avoid any assumptions about a reader's familiarity with a specific operating system. While users familiar with a Linux command-line interface will already be familiar with most of the commands used in this guide, those more accustomed to a graphical user interface will find all necessary commands provided.

The Learning VM comes with Puppet Enterprise installed, and some of the content is specific to Puppet Enterprise. Users interested in the open source version of Puppet will nonetheless benefit from the majority of the content. Certain features, such as the graphical web console and high availability, are exclusive to Puppet Enterprise. Content related to the Puppet master-agent architecture, Puppet code, and module structure will be generally applicable to the open source version of Puppet.

puppet-quest-guide's People

Contributors

abottchen avatar aquarion avatar asakapab0i avatar binford2k avatar brandtwilson avatar bridgetegan avatar dhasday avatar ehom avatar erinbuckley avatar gabrielnicolasavellaneda avatar gguillotte avatar isomorphisms avatar ivuk avatar jtappa avatar kbor avatar kjhenner avatar klynton avatar lucywyman avatar marrero984 avatar mikethecanuck avatar n2aws avatar ogazitt avatar orcutt989 avatar tangledhelix avatar taraswenson avatar transifex-bot avatar trevharmon avatar vanbesien avatar zg avatar zorlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-quest-guide's Issues

Quest frustratingly unusable due to 100% CPU usage

On VMware 12.5.1 on Windows 10, allocated 3GB of memory and 2CPUs, my load averages are:

11.77, 11.05, 8.89

while nothing is running. This is my laptop hardware.

I have just set the time with ntpdate and completed the welcome quest. I re-imported the .ova VM just to be sure that it wasn't me.

top lists 3 processes named java as the worst offenders. quest itself is up there with them.

Searching for "CPU" here also shows that others are having the same issue.

Please:

  1. Tell me that this a learning VM issue, and not the way that puppet usually runs.
  2. Let me know what I can do to make the CPU usage sane again.

The puppet project sadly goes on hold until this is resolved - it's killing my host machine with the load.

test for conditional statement task 2 incorrect?

I'm not getting any increments in my tasks completed due to this. From the test file, conditional_statements_spec.rb,

describe "Task 2:", host: :localhost do
it 'Add the sinatra_server parameter to the pasture config file template' do
file("#{MODULE_PATH}pasture/templates/pasture_config.yaml.epp")
.content
.should match /<%-\s+|.*?$sinatra_server\s+=\s+(['"])webrick\1,/m <-- THIS LINE
file("#{MODULE_PATH}pasture/templates/pasture_config.yaml.epp")
.content
.should match /:sinatra_settings:.*?:server:\s+<%=\s+$sinatra_server\s+%>/m
command("puppet epp validate #{MODULE_PATH}pasture/templates/pasture_config.yaml.epp")
.exit_status
.should be_zero
end
end

the test file appears to expect pasture/templates/pasture_config.yaml.epp to be:

<%- | $port, $default_character, $default_message, $sinatra_server = 'webrick', | -%>

when the tutorial instructions says to write the template down as:

<%- | $port, $default_character, $default_message, $sinatra_server, | -%>

I've inserted the 'webrick' line in order to increment the quest progress counter, and putting it back the way the tutorial says it should be, results in my progress counter getting reduced.

502 Bad Gateway after 44 minutes uptime

Browsing to https://192.168.32.128/ gives me:

502 Bad Gateway

nginx/1.8.1
root@learning:~ # systemctl --all | grep pe-
  session-c1.scope                                                                                               loaded    active     abandoned        Session c1 of user pe-activemq
  pe-activemq.service                                                                                            loaded    active     running          Puppet Enterprise ActiveMQ
  pe-console-services.service                                                                                    loaded    activating start-post start pe-console-services Service
  pe-nginx.service                                                                                               loaded    active     running          pe-nginx - Puppet Enterprise web server
  pe-orchestration-services.service                                                                              loaded    active     running          pe-orchestration-services Service
  pe-postgresql.service                                                                                          loaded    active     running          Puppet Enterprise PostgreSQL database server
  pe-puppetdb.service                                                                                            loaded    activating start-post start pe-puppetdb Service
  pe-puppetserver.service                                                                                        loaded    activating start-post start pe-puppetserver Service
root@learning:~ #

How long should I need to wait until everything has started?

[root@learning:~ # uptime
 21:59:54 up 44 min,  1 user,  load average: 16.25, 14.28, 12.13
root@learning:~ #

The readme.rtf says to run: restart_pe_services.sh, but I can't find it:

root@learning:~ # which restart_pe_services.sh
/usr/bin/which: no restart_pe_services.sh in (/opt/puppetlabs/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/puppetlabs/bin)
root@learning:~ #

Unable to import ova file

I am trying to import ova file.

I am seeing 0x80070057 Error.

I checked few things disk space,Ram,cpu.

Disk has free space around 100 GB.

Ram is 8 GB.

Tried for the whole day. Didn't see much in googling.

Please help on this. I am new to puppet.

Want to learn.

Last two tasks in quest package_file_service

The last two tasks in the quest guide do not register on the learning VM. Have done the steps twice just to make sure, and they did not mark as complete. Not a big deal, but wanted to point it out.

Examples in conditional_statements quest out of date

The conditional_statements quest makes several references to the Apache module, referencing specific lines of code. These lines have been changed since the quest was last updated, and the changes are a bit confusing as they make use of slightly different Puppet language features than what's highlighted.

I recommend changing the links to the Apache module on GitHub to permalinks which match the references in the quest document, rather than a link to the latest version.

Manifests and Classes typo?

On Task 2 the paragraph:

If you were going to apply this code to your production infrastructure, you would use the console's node classifier to classify any nodes that needed cowsay installed with the cowsay with your cowsay class. As you're working on a module, however, it's useful to apply a class directly. By convention, these test manifests are kept in an examples directory. (You may also sometimes see these manifests in the tests directory.)

I assume that "If you were going to apply this code to your production infrastructure, you would use the console's node classifier to classify any nodes that needed cowsay installed with the cowsay with your cowsay class."

should read something like

"If you were going to apply this code to your production infrastructure, you would use the console's node classifier to classify any nodes that needed cowsay installed with your cowsay class."

Control Repository / Code Manager configuration out of date

Lesson: http://learning.puppetlabs.vm/quests/control_repository.html

Task 15 directs the student to the Classification menu item under Configure, with a screenshot of where this item may be found.

It appears that recently (well, 2019.8) the menu structure has been changed, and the item that needs to be clicked (after some hunting since I'm unfamiliar with this) would appear to be Node Groups under Inventory

Tutorial screenshot:
image

Current (2019.8) menu structure:
image

Links to The Puppet Forge append the address to the VM's IP address

The Issue

On the page "The Forge" in the Puppet quest guide all links to The Forge appends The Forge's URL to the IP of the learning VM so in my case "http://192.168.1.21/en_us/quests/forge.puppet.com". This presents me with a 404.

Affected Browsers

This issue presented itself in both Google Chrome 69.0.3497.100 and Microsoft Edge 42.17134.1.0

Proposed Solution

Pre-pending the link with https:// makes the browser go to The Forge URL rather than appending it to the VM's IP.

Quest "control_repository" task 3 test differs from the document steps

Hello Puppet,

I'm going over the Puppet Learning VM version 6.5 and upon quest control_repository I found that the document and the test differ from each other. I wanted to confirm if this was intended or a mistake.

From the guide document.

Include the following line at the end of the file to ensure that both site and modules are included in the modulepath setting for this environment.

modulepath = site:modules:$basemodulepath

Code which has the testing.
https://github.com/puppetlabs/puppet-quest-guide/blob/master/tests/control_repository_spec.rb#L60

describe _("Task 3:"), host: :localhost do
  it 'has a working solution', :solution do
    command("yes | cp -f #{SOLUTION_PATH}/control_repository/3/environment.conf /root/control-repo/environment.conf")
      .exit_status
      .should eq 0
  end
  it _('Copy and edit the environment.conf file'), :validation do
    file("/root/control-repo/environment.conf")
      .content
      .should match /\.\/site:\.\/modules:\$basemodulepath/
  end
end

The end result is that the line you are asked to enter in the environment.conf file is not going to pass the testing for task 3.

If you add this to the file it will pass the testing.

./site:./modules:$basemodulepath

I would have made a PR for this but I'm not sure what is correct as I'm a newbie to Puppet.

Thanks,
Robert

Adding foss puppet 6 repo for bolt installation on master could result in unwanted agent upgrade

In the hello_bolt quest users are instructed to install bolt by adding the foss puppet 6 yum repo. As discovered with BOLT-1142 this can lead to an unwanted puppet-agent update if the user of the learning vm is connected to the internet and wants to yum update.

I think a simple solution might be to simply add exclude=puppet-agent to /etc/yum.conf on the learning.puppetlabs.vm.

This shows desired behavior with addition to /etc/yum.conf

root@learning: # yum update
Loaded plugins: fastestmirror, priorities
Repository 'local' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
local                                                    | 2.9 kB     00:00     
puppet6                                                  | 2.5 kB     00:00     
No packages marked for update
[/etc]

Without that addition a newer agent can be installed which would result in problems.

root@learning: # yum update
Loaded plugins: fastestmirror, priorities
Repository 'local' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
local                                                    | 2.9 kB     00:00     
puppet6                                                  | 2.5 kB     00:00     
Resolving Dependencies
--> Running transaction check
---> Package puppet-agent.x86_64 0:6.0.4-1.el7 will be updated
---> Package puppet-agent.x86_64 0:6.3.0-1.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch           Version              Repository       Size
================================================================================
Updating:
 puppet-agent         x86_64         6.3.0-1.el7          puppet6          22 M

Transaction Summary
================================================================================
Upgrade  1 Package

Total download size: 22 M
Is this ok [y/d/N]: 

Finally here is /etc/yum.conf showing where the setting is toggled off with a comment.

root@learning: # cat /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
# un-comment this to prevent unwanted puppet-agent update
#exclude=puppet-agent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.