Skip to content

Commit 94de686

Browse files
committed
add dedicated debian repo profile
1 parent c2f4666 commit 94de686

9 files changed

Lines changed: 54 additions & 13 deletions

File tree

Vagrantfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,18 @@ Vagrant.configure("2") do |config|
123123
provider.vm.box_url = CENTOS_9_BOX_URL
124124
end
125125
end
126+
127+
config.vm.define "repo-deb" do |override|
128+
override.vm.hostname = "repo-deb"
129+
override.vm.box = "centos/stream9"
130+
131+
override.vm.provider "libvirt" do |libvirt, provider|
132+
libvirt.memory = "2048"
133+
libvirt.machine_virtual_size = 40
134+
provider.vm.box_url = CENTOS_9_BOX_URL
135+
end
136+
override.vm.provision "install freight", type: "shell", inline: <<-SHELL
137+
dnf install -y https://kojipkgs.fedoraproject.org//packages/freight/0.3.13/9.el9/noarch/freight-0.3.13-9.el9.noarch.rpm
138+
SHELL
139+
end
126140
end

puppet/data/vagrant.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ profiles::jenkins::node::swap_size_mb: 0
2222

2323
profiles::web::https: false
2424

25+
profiles::repo::deb::https: false
26+
2527
redmine::https: false

puppet/manifests/site.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@
4141
include profiles::base
4242
include profiles::web
4343
}
44+
45+
node /^repo-deb\d+\.[a-z]+\.theforeman\.org$/ {
46+
include profiles::base
47+
include profiles::repo::deb
48+
}

puppet/modules/freight/manifests/init.pp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
# @summary install freight
22
class freight {
3-
if $facts['os']['family'] == 'Debian' {
4-
apt::source { 'freight':
5-
location => 'http://build.openvpn.net/debian/freight_team',
6-
repos => 'main',
7-
key => {
8-
id => '30EBF4E73CCE63EEE124DD278E6DA8B4E158C569',
9-
source => 'https://swupdate.openvpn.net/repos/repo-public.gpg',
10-
},
11-
before => Package['freight'],
12-
}
13-
}
14-
153
package { 'freight':
164
ensure => 'installed',
175
}

puppet/modules/freight/manifests/user.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
owner => 'root',
7474
group => 'root',
7575
mode => '0644',
76-
content => epp("${module_name}/${vhost}-HEADER.html.epp", { 'stable' => $profiles::web::stable }),
76+
content => epp("${module_name}/${vhost}-HEADER.html.epp", { 'stable' => $web::vhost::deb::stable }),
7777
}
7878
file { "${webdir}/foreman.asc":
7979
ensure => link,
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# @summary A profile for the debian repo machines
2+
#
3+
# @param https
4+
# Whether to enable HTTPS. This is typically wanted but can only be enabled
5+
# in a 2 pass setup. First Apache needs to run for Letsencrypt to function.
6+
# Then Letsencrypt can be enabled. Also useful to turn off in test setups.
7+
class profiles::repo::deb (
8+
Boolean $https = true,
9+
String[1] $stable = '3.11',
10+
) {
11+
class { 'web':
12+
https => $https,
13+
}
14+
contain web
15+
16+
contain web::vhost::archivedeb
17+
18+
class { 'web::vhost::deb':
19+
stable => $stable,
20+
}
21+
contain web::vhost::deb
22+
23+
contain web::vhost::stagingdeb
24+
}

puppet/modules/profiles/manifests/web.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
contain web::vhost::archivedeb
2626

27+
class { 'web::vhost::deb':
28+
stable => $stable,
29+
}
2730
contain web::vhost::deb
2831

2932
class { 'web::vhost::debugs':

puppet/modules/web/manifests/vhost/deb.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# @summary Set up the deb vhost
22
# @api private
33
class web::vhost::deb (
4+
String[1] $stable,
45
String $user = 'freight',
56
Stdlib::Absolutepath $home = "/home/${user}",
67
) {

vagrant/manifests/default.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@
2525
node /^discourse.*/ {
2626
include profiles::discourse
2727
}
28+
29+
node /^repo-deb.*/ {
30+
include profiles::repo::deb
31+
}

0 commit comments

Comments
 (0)