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
6916cd15
Verified
Commit
6916cd15
authored
4 years ago
by
anarcat
Browse files
Options
Downloads
Patches
Plain Diff
docuiment issues with Hiera and roles, particularly with
team#40030
parent
cd81073b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
howto/puppet.md
+36
-14
36 additions, 14 deletions
howto/puppet.md
with
36 additions
and
14 deletions
howto/puppet.md
+
36
−
14
View file @
6916cd15
...
...
@@ -686,7 +686,7 @@ checkout are not writable by your user. It could also happen that the
repository itself (in
`/srv/puppet.torproject.org/git/tor-puppet`
)
could have permission issues.
This problem is described in
[
issue 29663
]
(
https://gitlab.torproject.org/tpo/tpa/team/-/issues/29663
)
and is due to someone
This problem is described in
[
issue 29663
]
[]
and is due to someone
not pushing properly before you. To fix the permissions, try:
sudo chown -R root:adm /etc/puppet
...
...
@@ -694,6 +694,8 @@ not pushing properly before you. To fix the permissions, try:
sudo chmod -R g+rw /etc/puppet
sudo chmod g-w /etc/puppet/secret
[
issue 29663
]:
https://gitlab.torproject.org/tpo/tpa/team/-/issues/29663
A similar recipe could be applied to the git repository, as
needed. Hopefully this will be resolved when we start deploying with a
role account instead.
...
...
@@ -734,13 +736,20 @@ the future if we rely more on it for deployments.
### Before it all starts
-
`puppet.tpo`
is currently being run on
`pauli.tpo`
-
This is where the tor-puppet git repository lives
-
The Puppet server is currently being run on
`pauli.torproject.org`
-
This is where the main git repository (
`tor-puppet`
) lives, in
`/srv/puppet.torproject.org/git/tor-puppet`
-
The repository has hooks to populate
`/etc/puppet`
with its contents, most
notably the modules directory.
-
All paths in this document are relative to the root of this
repository.
Note that this layout might change in the future with the introduction
of a role account (
[
issue 29663
][]
) and when/if the repository is made
public (which requires changing the layout, see
[
issue 29387
][]
).
[
issue 29387
]:
https://gitlab.torproject.org/tpo/tpa/team/-/issues/29387
### File layout
-
`3rdparty/modules`
include modules that are shared publicly and do
...
...
@@ -754,8 +763,14 @@ the future if we rely more on it for deployments.
-
`modules`
includes roles, profiles, and classes that make the bulk
of our configuration.
-
in there, the
`roles`
class (
`modules/roles/manifests/init.pp`
) maps
services to roles, using the
`$nodeinfo`
variable.
-
each node is assigned a "role" through Hiera, in
`hiera/nodes/$FQDN.yaml`
To be more accurate, Hiera assigns a Puppet class to each node,
although each node should have only one special purpose class, a
"role", see
[
issue 40030
][]
for progress on that transition.
[
issue 40030
]:
https://gitlab.torproject.org/tpo/tpa/team/-/issues/40030
-
The
`torproject_org`
module
(
`modules/torproject_org/manifests/init.pp`
) performs basic host
...
...
@@ -783,19 +798,25 @@ the future if we rely more on it for deployments.
the
`manifests/site.pp`
file, but this file is now mostly empty, in
favor of Hiera.
Note that the above is the current state of the file hierarchy. As part
of the transition to Hiera, a lot of the above architecture will
change in favor of the more standard
[
role/profile/module
][]
pattern. See
[
ticket #29387
][]
for an in-depth discussion.
Note that the above is the current state of the file hierarchy. As
part Hiera transition (
[
issue 30020
][]
), a lot of the above
architecture will change in favor of the more standard
[
role/profile/module
][]
pattern. See
[
ticket #29387
][]
for an in-depth
discussion.
[
role/profile/module
]:
https://puppet.com/docs/pe/2017.2/r_n_p_intro.html
[
ticket #29387
]:
https://bugs.torproject.org/29387
[
issue 30020
]:
https://bugs.torproject.org/30020
### Installed packages facts
### Custom facts
The
`modules/torproject_org/lib/facter/software.rb`
file defines our
custom facts, making it possible to get answer to questions like "Is
this host running
`apache2`
?" by simply looking at a puppet
variable.
`modules/torproject_org/lib/facter/software.rb`
defines our custom
facts, making it possible to get answer to questions like "Is this
host running
`apache2`
?" by simply looking at a puppet variable.
Those facts are deprecated and we should instead install packages
through Puppet instead of manually installing packages on hosts.
### Style guide
...
...
@@ -847,7 +868,8 @@ As a temporary exception to this rule, old modules can be included as
we transition from the
`has_role`
mechanism to Hiera, but eventually
those should be ported to shared modules from the Puppet forge, with
our glue built into a profile on top of the third-party module. The
role
`roles::monitoring`
follows that pattern correctly.
role
`roles::monitoring`
follows that pattern correctly. See
[
issue
40030
][]
for progress on that work.
#### Node configuration
...
...
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