Puppet Environments

0 votes
what are "environments" in puppet?
Jul 25, 2019 in Puppet by Karan
• 19,610 points
1,026 views

1 answer to this question.

0 votes

Environments are isolated groups of Puppet agent nodes. 

A Puppet master serves each environment with its own main manifest and module path.

 This lets you use different versions of the same modules for different groups of nodes, which is useful for testing changes to your Puppet code before implementing them on production machines.

Access environment name in manifests

If you want to share code across environments, use the $environment variable in your manifests.

To get the name of the current environment:

  1. Use the $environment variable, which is set by the master.

Environment scenarios

The main uses for environments fall into three categories: permanent test environments, temporary test environments, and divided infrastructure.

  • Permanent test environments

In a permanent test environment, there is a stable group of test nodes where all changes must succeed before they can be merged into the production code. 

The test nodes are a smaller version of the whole production infrastructure. They are either short-lived cloud instances or longer-lived virtual machines (VMs) in a private cloud. These nodes stay in the test environment for their whole lifespan.

  • Temporary test environments

In a temporary test environment, you can test a single change or group of changes by checking the changes out of version control into the $codedir/environments directory, where it is detected as a new environment. 

A temporary test environment can either have a descriptive name or use the commit ID from the version that it is based on. Temporary environments are good for testing individual changes, especially if you need to iterate quickly while developing them. When you’re done with a temporary environment, you can delete it. The nodes in a temporary environment are short-lived cloud instances or VMs, which are destroyed when the environment ends.

  • Divided infrastructure

If parts of your infrastructure are managed by different teams that do not need to coordinate their code, you can split them into environments.

answered Jul 25, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

+5 votes
2 answers

How To Deploy Windows Server Using Puppet?

Deploying windows server through Puppet is similar ...READ MORE

answered Mar 27, 2018 in Puppet by shubham
• 7,340 points
1,876 views
+1 vote
1 answer

Steps to trigger puppet agent from jenkins

Heyy @Hannah,  First, you need to create Jenkins slave, ...READ MORE

answered Dec 16, 2018 in Puppet by Kiyara
3,971 views
0 votes
1 answer

Ram requirements for puppet installation

4 GB would be less for proper ...READ MORE

answered Dec 19, 2018 in Puppet by Alan
780 views
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 votes
1 answer
0 votes
2 answers

Where do i find the puppet configuration file?

The puppet.conf file is always located at $confdir/puppet.conf. Although ...READ MORE

answered Aug 9, 2019 in Puppet by Sirajul
• 59,230 points
2,844 views
0 votes
1 answer

What is Puppet used for?

Puppet is one of the most widely ...READ MORE

answered Jul 24, 2019 in Puppet by Sirajul
• 59,230 points
785 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP