Skip to content

Commit 94a5cb7

Browse files
committed
Version 0.2.1
1 parent e94967f commit 94a5cb7

File tree

4 files changed

+48
-17
lines changed

4 files changed

+48
-17
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.2.1] - 2020-01-06
6+
### Fixed
7+
8+
- puppet-agent is installed to base images after networking has been
9+
configured.
10+
11+
- Partial fix for the selinux-policy-targeted package causing SELinux
12+
to block container operations.
13+
14+
515
## [0.2.0] - 2020-01-04
616
### Changed
717

README.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This module configures a Linux node running SystemD to host a fleet of
55
deployment is useful for applying load to Puppet infrastructure servers
66
during testing and development.
77

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.
1010

1111
The clones run inside `systemd-nspawn` containers that use OverlayFS to
1212
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
1515
filesystem. The use of SystemD containers also allows both the `puppet`
1616
and `pxp-agent` services to run, and run "as root" with full functionality.
1717

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-
2218

2319
## Setup
2420

@@ -52,21 +48,42 @@ by 150 MB to determine the number of clones to create.
5248

5349
### Interacting with Clones
5450

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:
5669

57-
#### Starting and Stopping Clones
70+
```
71+
machinectl list
72+
machinectl status clone1
73+
```
5874

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:
6276

63-
#### Logging into Running Clones
77+
```
78+
machinectl login clone1
79+
```
6480

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
6884
`machinectl login`.
6985

86+
7087
#### Editing Filesystems Used by Clones
7188

7289
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,
8097
the edits will not be visible to the clones.
8198

8299
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
84101
filesystems and allow for edits to be done safely. Starting the units will
85102
remount the overlays.
86103

manifests/service.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
# by a service unit. This can be corrected by applying some
1919
# configuration from the container-selinux package.
2020
#
21+
# FIXME: This is sufficient to allow clones to start, stop and
22+
# run, but selinux-policy-targeted still gets in the way
23+
# of `machinectl login` opening shells to clones.
24+
#
2125
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1391118
2226
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1760146
2327
ensure_packages(['container-selinux'])

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sharpie-clone_army",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"author": "Charlie Sharpsteen",
55
"summary": "Manage hordes of containers running puppet-agent for load generation during testing and development",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)