Skip to content

Commit f557faf

Browse files
authored
Switch to OpenVox (#70)
* Replace the agent and server packages with OpenVox * Drop `puppet` from descriptions and other strings where possible * Always run r10k to ensure that the environment has current content * Fix tests Fixes #69
1 parent 853d914 commit f557faf

28 files changed

+290
-182
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# basic-aio
2-
## Bootstrap a basic Puppet environment using AIO packages
2+
## Bootstrap a basic OpenVox environment
3+
4+
The production branch of this repo contains a Vagrantfile that will build an OpenVox
5+
server and agent with the following configured out of the box:
36

4-
The production branch of this repo contains a Vagrantfile that will build a Puppet
5-
server using the Puppet all-in-one packages with the following configured
6-
out of the box:
77
* [r10k](https://forge.puppet.com/puppet/r10k) (with this repo as its control repo)
88
* [Choria mcollective](http://choria.io/)
9-
* [PuppetDB](https://puppet.com/docs/puppetdb/)
9+
* [openvoxdb](https://puppet.com/docs/puppetdb/)
1010

1111
## Prerequisites
1212

@@ -21,8 +21,8 @@ The following environment variables are used to configure the Vagrant environmen
2121
| Environment variable | Default value | Description |
2222
| -------------------- | ------------- | ----------- |
2323
| `IP_SUBNET` | `192.168.32` | The internal IP subnet used by Vagrant |
24-
| `PUPPET_VERSION` | none (use the latest) | The Puppet agent version |
25-
| `PUPPET_RELEASE` | `8` | The Puppet major release version |
24+
| `OPENVOX_VERSION` | none (use the latest) | The OpenVox agent version |
25+
| `OPENVOX_RELEASE` | `8` | The OpenVox major release version |
2626
| `EL_RELEASE` | `9` | The EL release of the base box |
2727
| `EL_OS_NAME` | `centos` | The base box OS |
2828
| `BOX` | Depends on EL_OS_NAME | The base box name |

Vagrantfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
ENV['VAGRANT_EXPERIMENTAL'] = 'typed_triggers'
44

55
ip_subnet = ENV.fetch('IP_SUBNET', '192.168.32')
6-
puppet_version = ENV.fetch('PUPPET_VERSION', '')
7-
puppet_release = puppet_version.empty? ? ENV.fetch('PUPPET_RELEASE', '8') : puppet_version.split('.').first
6+
openvox_version = ENV.fetch('OPENVOX_VERSION', '')
7+
openvox_release = openvox_version.empty? ? ENV.fetch('OPENVOX_RELEASE', '8') : openvox_version.split('.').first
88
el_release = ENV.fetch('EL_RELEASE', '9')
99
el_os_name = ENV.fetch('EL_OS_NAME', 'centos')
1010
def select_box(el_os_name, el_release)
@@ -45,22 +45,22 @@ Vagrant.configure('2') do |config|
4545
config.vm.box = box
4646
config.ssh.forward_agent = true
4747

48-
config.vm.define 'puppet' do |puppetserver|
49-
puppetserver.vm.provider 'virtualbox' do |vb|
48+
config.vm.define 'puppet' do |server|
49+
server.vm.provider 'virtualbox' do |vb|
5050
vb.memory = '4096'
5151
vb.cpus = 2
5252
vb.name = 'puppet.vagrant'
5353
end
5454

55-
puppetserver.vm.provider 'libvirt' do |libvirt|
55+
server.vm.provider 'libvirt' do |libvirt|
5656
libvirt.memory = '4096'
5757
libvirt.cpus = 2
5858
libvirt.qemu_use_session = false
5959
end
6060

61-
puppetserver.vm.hostname = 'puppet.vagrant'
62-
puppetserver.vm.network 'private_network', ip: "#{ip_subnet}.5"
63-
puppetserver.vm.synced_folder '.', '/vagrant',
61+
server.vm.hostname = 'puppet.vagrant'
62+
server.vm.network 'private_network', ip: "#{ip_subnet}.5"
63+
server.vm.synced_folder '.', '/vagrant',
6464
type: 'rsync',
6565
rsync__exclude: ['spec/fixtures/modules/']
6666
end
@@ -89,8 +89,8 @@ Vagrant.configure('2') do |config|
8989
trigger.run = {
9090
inline: [
9191
'bolt plan run role -t all --run-as root',
92-
"puppet_release=#{puppet_release}",
93-
"puppet_version=#{puppet_version}",
92+
"openvox_release=#{openvox_release}",
93+
"openvox_version=#{openvox_version}",
9494
].concat(bolt_debug_options)
9595
.concat(stream ? ['--stream'] : [])
9696
.concat(native_ssh ? ['--native-ssh'] : [])

data/common.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ mcollective::site_policies:
99
facts: "*"
1010
classes: "*"
1111

12-
r10k::remote: "%{facts.role__puppetserver__r10k_remote}"
12+
r10k::remote: "%{facts.role__server__r10k_remote}"
1313

14-
profile::puppetserver::config::autosign:
14+
profile::server::config::autosign:
1515
- "*.%{facts.networking.domain}"
1616
- vagrant.mcollective
1717

1818
puppetdb::master::config::create_puppet_service_resource: false
1919
puppetdb::manage_firewall: false
2020
puppetdb::postgres_version: '17'
21+
puppetdb::puppetdb_package: 'openvoxdb'
22+
puppetdb::master::config::terminus_package: 'openvoxdb-termini'
2123

2224
choria::manage_package_repo: true
2325
choria::broker::network_broker: true

data/nodes/puppet.vagrant.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
classes:
3-
- role::puppetserver
3+
- role::server
44

55
mcollective::client: true

site/profile/REFERENCE.md

Lines changed: 81 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
* [`profile::agent`](#profile--agent): Configures the `puppet` service
1010
* [`profile::base`](#profile--base): Base OS customization
11-
* [`profile::puppetdb`](#profile--puppetdb): Configure puppetdb
12-
* [`profile::puppetserver`](#profile--puppetserver): Configure puppetserver
13-
* [`profile::puppetserver::config`](#profile--puppetserver--config): Configures the puppet server
14-
* [`profile::puppetserver::install`](#profile--puppetserver--install): Install puppetserver package
15-
* [`profile::puppetserver::service`](#profile--puppetserver--service): Configure puppetserver service
11+
* [`profile::db`](#profile--db): Configure db
12+
* [`profile::server`](#profile--server): Configure server
13+
* [`profile::server::config`](#profile--server--config): Configures the puppet server
14+
* [`profile::server::install`](#profile--server--install): Install server package
15+
* [`profile::server::service`](#profile--server--service): Configure server service
1616

1717
## Classes
1818

@@ -78,45 +78,45 @@ Data type: `Array`
7878

7979
A list of packages to manage
8080

81-
### <a name="profile--puppetdb"></a>`profile::puppetdb`
81+
### <a name="profile--db"></a>`profile::db`
8282

83-
Configure puppetdb
83+
Configure db
8484

8585
#### Examples
8686

8787
#####
8888

8989
```puppet
90-
include profile::puppetdb
90+
include profile::db
9191
```
9292

93-
### <a name="profile--puppetserver"></a>`profile::puppetserver`
93+
### <a name="profile--server"></a>`profile::server`
9494

95-
Configure puppetserver
95+
Configure server
9696

9797
#### Examples
9898

9999
#####
100100

101101
```puppet
102-
include profile::puppetserver
102+
include profile::server
103103
```
104104

105105
#### Parameters
106106

107-
The following parameters are available in the `profile::puppetserver` class:
107+
The following parameters are available in the `profile::server` class:
108108

109-
* [`manage_firewall`](#-profile--puppetserver--manage_firewall)
109+
* [`manage_firewall`](#-profile--server--manage_firewall)
110110

111-
##### <a name="-profile--puppetserver--manage_firewall"></a>`manage_firewall`
111+
##### <a name="-profile--server--manage_firewall"></a>`manage_firewall`
112112

113113
Data type: `Boolean`
114114

115-
Manage the puppetserver firewall configuration
115+
Manage the server firewall configuration
116116

117117
Default value: `true`
118118

119-
### <a name="profile--puppetserver--config"></a>`profile::puppetserver::config`
119+
### <a name="profile--server--config"></a>`profile::server::config`
120120

121121
Configures the puppet server
122122

@@ -125,42 +125,97 @@ Configures the puppet server
125125
#####
126126

127127
```puppet
128-
include profile::puppetserver::config
128+
include profile::server::config
129129
```
130130

131131
#### Parameters
132132

133-
The following parameters are available in the `profile::puppetserver::config` class:
133+
The following parameters are available in the `profile::server::config` class:
134134

135-
* [`autosign`](#-profile--puppetserver--config--autosign)
135+
* [`autosign`](#-profile--server--config--autosign)
136136

137-
##### <a name="-profile--puppetserver--config--autosign"></a>`autosign`
137+
##### <a name="-profile--server--config--autosign"></a>`autosign`
138138

139139
Data type: `Array[String]`
140140

141141
List of certnames or domain name globs
142142

143-
### <a name="profile--puppetserver--install"></a>`profile::puppetserver::install`
143+
### <a name="profile--server--install"></a>`profile::server::install`
144144

145-
Install puppetserver package
145+
Install server package
146146

147147
#### Examples
148148

149149
#####
150150

151151
```puppet
152-
include profile::puppetserver::install
152+
include profile::server::install
153153
```
154154

155-
### <a name="profile--puppetserver--service"></a>`profile::puppetserver::service`
155+
#### Parameters
156+
157+
The following parameters are available in the `profile::server::install` class:
158+
159+
* [`package`](#-profile--server--install--package)
160+
* [`package_ensure`](#-profile--server--install--package_ensure)
161+
162+
##### <a name="-profile--server--install--package"></a>`package`
163+
164+
Data type: `String[1]`
165+
166+
The name of the package to install
167+
168+
Default value: `'openvox-server'`
169+
170+
##### <a name="-profile--server--install--package_ensure"></a>`package_ensure`
156171

157-
Configure puppetserver service
172+
Data type: `String[1]`
173+
174+
The ensure value for the package
175+
176+
Default value: `'installed'`
177+
178+
### <a name="profile--server--service"></a>`profile::server::service`
179+
180+
Configure server service
158181

159182
#### Examples
160183

161184
#####
162185

163186
```puppet
164-
include profile::puppetserver::service
187+
include profile::server::service
165188
```
166189

190+
#### Parameters
191+
192+
The following parameters are available in the `profile::server::service` class:
193+
194+
* [`service_name`](#-profile--server--service--service_name)
195+
* [`service_ensure`](#-profile--server--service--service_ensure)
196+
* [`service_enable`](#-profile--server--service--service_enable)
197+
198+
##### <a name="-profile--server--service--service_name"></a>`service_name`
199+
200+
Data type: `String[1]`
201+
202+
The name of the service to manage
203+
204+
Default value: `'puppetserver'`
205+
206+
##### <a name="-profile--server--service--service_ensure"></a>`service_ensure`
207+
208+
Data type: `String[1]`
209+
210+
The ensure value for the service
211+
212+
Default value: `'running'`
213+
214+
##### <a name="-profile--server--service--service_enable"></a>`service_enable`
215+
216+
Data type: `Boolean`
217+
218+
Whether to enable the service at boot
219+
220+
Default value: `true`
221+

site/profile/data/common.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
profile::base::packages: []
33

4-
profile::puppetserver::install::package: puppetserver
5-
profile::puppetserver::config::autosign: []
4+
profile::server::config::autosign: []
65

76
profile::agent::service: puppet
87
profile::agent::service_ensure: running

site/profile/manifests/puppetdb.pp renamed to site/profile/manifests/db.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# @summary Configure puppetdb
1+
# @summary Configure db
22
#
33
# @example
4-
# include profile::puppetdb
5-
class profile::puppetdb {
4+
# include profile::db
5+
class profile::db {
66
include 'puppetdb'
77
include 'puppetdb::master::config'
88

site/profile/manifests/puppetserver.pp

Lines changed: 0 additions & 27 deletions
This file was deleted.

site/profile/manifests/puppetserver/install.pp

Lines changed: 0 additions & 9 deletions
This file was deleted.

site/profile/manifests/puppetserver/service.pp

Lines changed: 0 additions & 10 deletions
This file was deleted.

site/profile/manifests/server.pp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# @summary Configure server
2+
#
3+
# @param manage_firewall Manage the server firewall configuration
4+
#
5+
# @example
6+
# include profile::server
7+
class profile::server (
8+
Boolean $manage_firewall = true,
9+
) {
10+
if $manage_firewall {
11+
include 'firewalld'
12+
13+
firewalld_service { 'puppetmaster':
14+
ensure => present,
15+
zone => 'public',
16+
service => 'puppetmaster',
17+
}
18+
}
19+
20+
include 'profile::server::install'
21+
include 'profile::server::config'
22+
include 'profile::server::service'
23+
24+
Class['profile::server::install']
25+
-> Class['profile::server::config']
26+
~> Class['profile::server::service']
27+
}

site/profile/manifests/puppetserver/config.pp renamed to site/profile/manifests/server/config.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# @param autosign List of certnames or domain name globs
44
#
55
# @example
6-
# include profile::puppetserver::config
7-
class profile::puppetserver::config (
6+
# include profile::server::config
7+
class profile::server::config (
88
Array[String] $autosign,
99
) {
1010
file { '/etc/puppetlabs/puppet/autosign.conf':

0 commit comments

Comments
 (0)