Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Wiki Replica
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
TPA
Wiki Replica
Commits
c997b940
Verified
Commit
c997b940
authored
1 month ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
puppet: mention the `--environment` flag
Closes: tpo/tpa/puppet-hiera-enc#1
parent
166f3436
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#246159
passed with warnings
1 month ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
howto/puppet.md
+24
-7
24 additions, 7 deletions
howto/puppet.md
with
24 additions
and
7 deletions
howto/puppet.md
+
24
−
7
View file @
c997b940
...
...
@@ -141,13 +141,30 @@ affects a lot of machines.
During ordinary maintenance operations, it's appropriate to work directly on the
default
`main`
branch, which deploys to the
`production`
environment.
However, for changesets that are more complex, such as when deploying a new
service or adding a module (see below), it's recommended to start by working on
a feature branch which will deploy as a distinct
[
environment
](
#environments
)
on the puppet server. By assigning a node to the test environment via the
[
external node classifier
](
#external-node-classifier-enc
)
, a single node (or a
small set) can be made to apply test puppet code. Once the feature branch is
satisfying, it can be then simply merged to
`main`
and deleted.
However, for more complex changes, such as when deploying a new
service or adding a module (see below), it's recommended to start by
working on a feature branch which will deploy as a distinct
[
environment
](
#environments
)
on the Puppet server.
To quickly test a different environment used, you can switch the
environment used by the Puppet agent using the
`--environment`
flag. For example, this will switch a node from
`production`
to
`test`
:
puppet agent --test --environment test
A node or group of nodes can be switch to a different environment
using the
[
external node classifier
](
#external-node-classifier-enc
)
.
Once the feature branch is satisfactory, it can then be merged to
`main`
and deleted:
git merge test
git branch -d test
git push -d origin test
Branches are not deleted automatically after merge: make sure you
cleanup after yourself.
Because environments aren't totally isolated from each other and a compromised
node could choose to apply an environment other than
`production`
, care should
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment