@@ -5,8 +5,8 @@ This module configures a Linux node running SystemD to host a fleet of
5
5
deployment is useful for applying load to Puppet infrastructure servers
6
6
during testing and development.
7
7
8
- This module currently only supports PE. Support for Open Source Puppet
9
- may be added in a future release.
8
+ This module currently only supports PE running on RedHat 7. Support for
9
+ other operating systems and Open Source Puppet may be added in a future release.
10
10
11
11
The clones run inside ` systemd-nspawn ` containers that use OverlayFS to
12
12
share a common ` puppet-agent ` install with container-local modifications.
@@ -15,10 +15,6 @@ the fleet as a whole, or to individual agents by modifying files on the host
15
15
filesystem. The use of SystemD containers also allows both the ` puppet `
16
16
and ` pxp-agent ` services to run, and run "as root" with full functionality.
17
17
18
- Currently, RedHat 7 is the only supported operating system for the clones.
19
- This is expected to change as the module gains support for using ` debootstrap `
20
- and ` zypper ` to create base images from which the agents are cloned.
21
-
22
18
23
19
## Setup
24
20
@@ -52,21 +48,42 @@ by 150 MB to determine the number of clones to create.
52
48
53
49
### Interacting with Clones
54
50
55
- Clones run under ` systemd-nspawn ` and can be controlled with a variety of tools.
51
+ Individual clones can be controlled using the ` puppet-clone-army@<clone name> `
52
+ service template:
53
+
54
+ ```
55
+ systemctl start puppet-clone-army@clone1
56
+ systemctl stop puppet-clone-army@clone1
57
+ ```
58
+
59
+ The entire fleet of clones hosted by a particular node can be controlled
60
+ using the ` puppet-clone-army.target ` unit:
61
+
62
+ ```
63
+ systemctl start puppet-clone-army.target
64
+ systemctl stop puppet-clone-army.target
65
+ ```
66
+
67
+ ` machinectl ` can be used to list running clones, as well as gather the
68
+ status of services in an individual clone:
56
69
57
- #### Starting and Stopping Clones
70
+ ```
71
+ machinectl list
72
+ machinectl status clone1
73
+ ```
58
74
59
- Individual clones can be started and stopped using the ` puppet-clone-army@<clone name> `
60
- service unit. The entire fleet of clones hosted by a particular node can be
61
- started and stopped by the ` puppet-clone-army.target ` unit.
75
+ ` machinectl ` can also be used to open a shell on a clone:
62
76
63
- #### Logging into Running Clones
77
+ ```
78
+ machinectl login clone1
79
+ ```
64
80
65
- All running clones can viewd with ` machinectl list ` and ` machinectl login ` can
66
- be used to open a shell on a clone. The password for the ` root ` user is set to
67
- ` puppetlabs ` and typing ` Ctrl-] ` three times will close shells created by
81
+ The password for the ` root ` user is set to ` puppetlabs ` and typing ` Ctrl-] `
82
+ three times will close shells created by ` machinectl login ` . SELinux may
83
+ have to be set to permissive mode to prevent it from denying access to
68
84
` machinectl login ` .
69
85
86
+
70
87
#### Editing Filesystems Used by Clones
71
88
72
89
The module provisions a base OS image under ` /var/lib/puppet-clone-army/<base name> `
@@ -80,7 +97,7 @@ while clones are running as this is undefined behavior for OverlayFS. At best,
80
97
the edits will not be visible to the clones.
81
98
82
99
Stopping a clone by using ` puppet-clone-army@<clone name> ` , or all clones
83
- by using ` puppet-clone-army.target ` , will automatically umount the overlay
100
+ by using ` puppet-clone-army.target ` , will automatically unmount the overlay
84
101
filesystems and allow for edits to be done safely. Starting the units will
85
102
remount the overlays.
86
103
0 commit comments