Skip to content

Commit cbc8d35

Browse files
committed
Squashed commit of the entire messy fulcrum-demo branch
commit 97f3d0c Author: Anthony Thomas <[email protected]> Date: Tue Feb 18 16:00:16 2025 -0500 solr.xml needs to be in base dir, not home dir commit 3285392 Author: Anthony Thomas <[email protected]> Date: Tue Feb 18 15:26:39 2025 -0500 more java faffing about commit b7ac52c Author: Anthony Thomas <[email protected]> Date: Tue Feb 18 12:08:13 2025 -0500 adjust java sourcing/alternatives updating commit 9517bec Author: Anthony Thomas <[email protected]> Date: Wed Jan 29 13:25:35 2025 -0500 tell fulcrum role to use fulcrum solr profile commit 5ade3bd Author: Anthony Thomas <[email protected]> Date: Wed Jan 29 02:50:35 2025 -0500 make fulcrum solr profile currently fulcrum is the only thing using the solr profile but it still seems cleaner to bring it under the fulcrum subcategory if we are going to make it specifically for solr 6 commit ef3ddf8 Author: Anthony Thomas <[email protected]> Date: Thu Dec 5 17:51:17 2024 -0500 misunderstood java_home format commit 1e06705 Author: Anthony Thomas <[email protected]> Date: Thu Dec 5 17:42:46 2024 -0500 update jre bin location? commit 4e12b7f Author: Anthony Thomas <[email protected]> Date: Thu Dec 5 17:35:38 2024 -0500 if we are using java 11, we can use default solr profile at least i'm pretty sure about that... commit c4b8249 Author: Anthony Thomas <[email protected]> Date: Thu Dec 5 17:25:56 2024 -0500 switch UseParNewGC is no longer supported on jdk 11 commit 5e5c088 Author: Anthony Thomas <[email protected]> Date: Tue Dec 3 16:21:49 2024 -0500 rubocop commit bbba2a7 Author: Anthony Thomas <[email protected]> Date: Tue Dec 3 16:20:17 2024 -0500 pander to puppet-lint commit c8684cf Author: Anthony Thomas <[email protected]> Date: Tue Dec 3 16:14:59 2024 -0500 add -headless back to default jre commit d3e8808 Author: Anthony Thomas <[email protected]> Date: Tue Dec 3 16:12:39 2024 -0500 restore java_home line commit 11b0e52 Author: Anthony Thomas <[email protected]> Date: Tue Dec 3 16:10:11 2024 -0500 use odbc-mariadb for shibboleth don't remember why we ended up with the other package name... commit 9bdeaf4 Author: Anthony Thomas <[email protected]> Date: Tue Dec 3 16:04:22 2024 -0500 fix rubocop offenses commit 6807e66 Author: Anthony Thomas <[email protected]> Date: Tue Nov 26 12:37:22 2024 -0500 fix tests the fedora spec is doomed to failure bc it relies on a resource from the mysql profile. the fulcrum_standalone spec wasn't compiling because it needed extra mocks. commit 221b343 Author: Anthony Thomas <[email protected]> Date: Mon Nov 25 09:05:10 2024 -0500 more tests commit 1d471c6 Author: Anthony Thomas <[email protected]> Date: Thu Nov 21 00:53:10 2024 -0500 add fulcrum fedora spec it's not great! but it is there! commit cbc7450 Author: Anthony Thomas <[email protected]> Date: Thu Nov 21 00:34:07 2024 -0500 Tidy up fulcrum solr profile, & add spec commit 4efe047 Author: Anthony Thomas <[email protected]> Date: Tue Nov 12 11:16:09 2024 -0500 don't need to change openjdk -> temurin outside fulcrum since we are using temurin 11, openjdk-11 will install (8 will not) so there's no need to change the source for general solr and www_lib commit eebf009 Author: Anthony Thomas <[email protected]> Date: Wed Oct 9 16:27:03 2024 -0400 add fulcrum mysql root_password to fixture data commit 43efddc Author: Anthony Thomas <[email protected]> Date: Wed Oct 9 15:24:46 2024 -0400 fix solr tests commit 757f15f Author: Anthony Thomas <[email protected]> Date: Wed Oct 2 17:14:49 2024 -0400 pull standalone fulcrum perl into its own file commit 30c596e Author: Anthony Thomas <[email protected]> Date: Wed Oct 2 16:57:58 2024 -0400 remove merge conflict marker from .gitignore commit 6643285 Author: Anthony Thomas <[email protected]> Date: Thu Sep 19 20:20:56 2024 -0400 actual code change for prev commit specifying user separately from db name in fulcrum mysql commit bfaa58f Author: Anthony Thomas <[email protected]> Date: Thu Sep 19 20:16:33 2024 -0400 specify user for fulcrum mysql dbs commit 2888393 Author: Anthony Thomas <[email protected]> Date: Thu Aug 22 13:47:11 2024 -0400 tidy up fulcrum-demo mysql dbs and hosts commit 8e60545 Author: Anthony Thomas <[email protected]> Date: Tue Dec 19 10:01:17 2023 -0500 add JAVA_HOME to fedora.env commit 6939ce8 Author: Anthony Thomas <[email protected]> Date: Tue Dec 19 09:28:29 2023 -0500 ?? java alternative?? commit 29392fa Author: Anthony Thomas <[email protected]> Date: Mon Dec 18 15:32:49 2023 -0500 change /etc/environment to use solr's JAVA_HOME commit c03e51a Author: Anthony Thomas <[email protected]> Date: Fri Dec 15 10:49:14 2023 -0500 qualify chown commit c6b0243 Author: Anthony Thomas <[email protected]> Date: Fri Dec 15 10:44:58 2023 -0500 recursively chown /opt/fedora to fulcrum:fulcrum commit a1653cd Author: Anthony Thomas <[email protected]> Date: Mon Dec 11 10:44:55 2023 -0500 fulcrum::nginx profile mysteriously disappeared in the merge??? commit f86b7f5 Author: Anthony Thomas <[email protected]> Date: Fri Dec 8 00:34:34 2023 -0500 remove print debugging from symlinks commit cfae0f1 Author: Anthony Thomas <[email protected]> Date: Fri Dec 8 00:30:41 2023 -0500 try adding print debugging to symlinks commit 0041304 Author: Anthony Thomas <[email protected]> Date: Fri Dec 8 00:17:24 2023 -0500 change name of symlinks config to `config` commit 1f7dd45 Author: Anthony Thomas <[email protected]> Date: Fri Dec 8 00:12:36 2023 -0500 set up mounts and symlinks for fulcrum standalone commit 6bccdc6 Author: Anthony Thomas <[email protected]> Date: Wed Dec 6 11:17:08 2023 -0500 add capacity to handle symlinks to fulcrum::mounts commit 38cf1f6 Author: Anthony Thomas <[email protected]> Date: Thu Nov 30 18:26:10 2023 -0500 update Fedora version commit b0ceb42 Author: Anthony Thomas <[email protected]> Date: Fri Nov 10 02:07:43 2023 -0500 force symlinking of /opt/fedora/logs commit 44ef7bb Author: Anthony Thomas <[email protected]> Date: Fri Nov 10 02:03:24 2023 -0500 remove redundant ensure commit 91b96a9 Author: Anthony Thomas <[email protected]> Date: Fri Nov 10 01:57:23 2023 -0500 fulcrum user may not have permissions to run tomcat create commit d4e1a87 Author: Anthony Thomas <[email protected]> Date: Fri Oct 27 11:05:19 2023 -0400 put tomcat create command back commit 949825d Author: Anthony Thomas <[email protected]> Date: Fri Oct 27 11:01:41 2023 -0400 test for paradox commit 8152ee8 Author: Anthony Thomas <[email protected]> Date: Fri Oct 27 10:56:11 2023 -0400 qualify echo path commit 38bb751 Author: Anthony Thomas <[email protected]> Date: Fri Oct 27 10:55:57 2023 -0400 Revert "Revert "debugging tomcat"" This reverts commit 1194173. commit 56630b4 Author: Anthony Thomas <[email protected]> Date: Fri Oct 27 10:55:28 2023 -0400 Revert "debugging tomcat" This reverts commit 8796b4d. commit 359cd61 Author: Anthony Thomas <[email protected]> Date: Fri Oct 27 10:52:03 2023 -0400 debugging tomcat commit 5e233e7 Author: Anthony Thomas <[email protected]> Date: Wed Oct 25 16:36:29 2023 -0400 s/tomcat8/tomcat9 commit 0cdaf4e Author: Anthony Thomas <[email protected]> Date: Wed Oct 25 16:26:38 2023 -0400 require Service mysqld instead of nonexistent Mysql resource commit 3aac82d Author: Anthony Thomas <[email protected]> Date: Wed Oct 25 16:17:39 2023 -0400 Add fedora back in commit ade401e Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 17:19:17 2023 -0400 fedora profile is depending on mysql::db resources... deal w/ it later commit a5e4eff Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 17:15:49 2023 -0400 add fedora back in commit bbd8830 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 17:07:14 2023 -0400 shib? commit e44f1db Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 17:01:49 2023 -0400 remove duplicate decaration commit 2323de6 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 16:52:49 2023 -0400 add shib thing from apache profile? commit abebba8 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 16:49:46 2023 -0400 missed one commit 98c3a1c Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 16:45:11 2023 -0400 fix shib pkg names commit ae7a890 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 16:39:44 2023 -0400 add shib back? commit 369b7ea Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 16:31:21 2023 -0400 add the other three mysql dbs commit fc4578a Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 16:07:29 2023 -0400 tyop commit ffdf41b Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 15:45:59 2023 -0400 fix my iterable data commit f8b1f26 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 15:37:26 2023 -0400 exec name problems commit 74076e8 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 15:16:56 2023 -0400 try a lambda commit c60db9a Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 14:55:51 2023 -0400 try function syntax commit 4afc869 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 14:24:50 2023 -0400 experimental mysqldb function commit ee69306 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 13:21:38 2023 -0400 note about needing to install_db not sure how to do that with puppet idempotently! commit 88fe30f Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 11:33:45 2023 -0400 ensure /etc/mysql/conf.d commit af05206 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 11:27:38 2023 -0400 put mysql back commit c15d3e2 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 11:04:57 2023 -0400 temporarily comment out mysql again commit a5a0baa Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 10:56:29 2023 -0400 only need one my.cnf maybe commit faa2074 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 10:51:50 2023 -0400 we do need some kind of mysql.cnf? commit bddca11 Author: Anthony Thomas <[email protected]> Date: Fri Sep 29 10:36:22 2023 -0400 don't need to do anything to my.cnf probably commit 09c9b88 Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 12:54:05 2023 -0400 etc my.cnf source is a filepath commit edabeb0 Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 03:13:30 2023 -0400 fix my.cnf? commit 3e865ae Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 03:02:03 2023 -0400 require mariadb-server instead of mysql-server commit 9ef0dc6 Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 02:37:13 2023 -0400 mysql... commit 5d07ee1 Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 02:32:21 2023 -0400 add back in solr commit e8e57a0 Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 02:29:27 2023 -0400 take out shib stuff commit f18f1f8 Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 02:24:09 2023 -0400 add rest of apache stuff commit b2e9562 Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 02:14:22 2023 -0400 add in some apache stuff commit 29a444c Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 02:03:00 2023 -0400 add www lib perl commit ceca98c Author: Anthony Thomas <[email protected]> Date: Thu Sep 28 01:56:48 2023 -0400 add things back in to standalone role commit b98fc88 Author: Anthony Thomas <[email protected]> Date: Thu Sep 21 12:01:54 2023 -0400 update .ruby-version to 2.7 commit 1b4e6dd Author: Anthony Thomas <[email protected]> Date: Thu Sep 21 05:11:10 2023 -0400 strip fulcrum standalone role back down to minimum for re-creating commit 22507fe Author: Anthony Thomas <[email protected]> Date: Thu Sep 21 03:51:44 2023 -0400 still bashing at mysql commit 6b64bfd Author: Anthony Thomas <[email protected]> Date: Wed Sep 20 13:04:36 2023 -0400 does it need mysql-named packages instead of mariadb for some reason? commit 278c929 Author: Anthony Thomas <[email protected]> Date: Wed Sep 20 12:23:47 2023 -0400 finish setting up mysql service commit af59626 Author: Anthony Thomas <[email protected]> Date: Wed Sep 20 12:11:40 2023 -0400 simplify mysql setup commit 681d59f Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 12:08:45 2023 -0400 remove mysql securing command thingy commit 2cc4152 Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 12:04:58 2023 -0400 try adding back in mysql commit f69ddcf Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 12:01:53 2023 -0400 take out apache shib config; add back solr commit 1159506 Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 11:58:34 2023 -0400 odbc-mariadb => mariadb-unixodbc commit 5bde075 Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 11:52:50 2023 -0400 shibboleth? commit f3575c1 Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 11:49:03 2023 -0400 add apache fulcrum profile commit 8ac8706 Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 11:10:00 2023 -0400 update www_lib to use temurin jdk commit 15179d6 Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 11:08:19 2023 -0400 comment out most of the apache stuff commit ab19b08 Author: Anthony Thomas <[email protected]> Date: Mon Sep 18 11:07:26 2023 -0400 add .tool-versions to gitignore commit 2353578 Author: Anthony Thomas <[email protected]> Date: Thu Sep 14 12:36:36 2023 -0400 do i need to remove the nginx profile file as well? commit 653a2f4 Author: Anthony Thomas <[email protected]> Date: Thu Sep 14 12:21:36 2023 -0400 try pulling in some apache stuff from fulcrum_www_and_app commit 81a748b Author: Anthony Thomas <[email protected]> Date: Thu Sep 14 11:02:12 2023 -0400 add nginx back into the mix commit cea3da0 Author: Anthony Thomas <[email protected]> Date: Thu Sep 14 10:54:00 2023 -0400 also comment out solr commit 2c23a66 Author: Anthony Thomas <[email protected]> Date: Thu Sep 14 10:49:16 2023 -0400 also comment out shib commit e105f52 Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 13:48:00 2023 -0400 nginx is failing commit b3f30bc Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 09:48:50 2023 -0400 solr needs to use temurin jre commit 339829f Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 09:42:45 2023 -0400 add back everything in fulcrum::standalone except mysql and fedora commit 0727c09 Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 09:40:54 2023 -0400 add fulcrum::nginx back in commit 422b407 Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 09:37:02 2023 -0400 add fulcrum::logrotate back in commit 9ed36be Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 09:26:34 2023 -0400 add back in fulcrum hosts + app commit 05214dc Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 09:22:12 2023 -0400 adding back in fulcrum base commit 92b25e8 Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 09:05:44 2023 -0400 just remove all of the fulcrum reqs for now commit 37e4f5f Author: Anthony Thomas <[email protected]> Date: Wed Sep 13 08:51:53 2023 -0400 trying to get puppet to complete commit 45e4ba1 Author: Anthony Thomas <[email protected]> Date: Mon Sep 11 15:47:32 2023 -0400 there's already something aliasing mysql-client to mariadb-client commit 480a29b Author: Anthony Thomas <[email protected]> Date: Mon Sep 11 15:28:38 2023 -0400 simplify fulcrum profile commit b3961cf Author: Anthony Thomas <[email protected]> Date: Mon Sep 11 15:10:17 2023 -0400 try to secure mysql? commit 4e0bdcb Author: Anthony Thomas <[email protected]> Date: Tue Sep 5 17:00:49 2023 -0400 change mysql override_options to just options commit bda550b Author: Anthony Thomas <[email protected]> Date: Tue Sep 5 16:30:18 2023 -0400 change skip-ssl mysqld option to ssl-disable commit 56062a7 Author: Anthony Thomas <[email protected]> Date: Fri Sep 1 13:56:41 2023 -0400 undo solr java 11 env var commit f923566 Author: Anthony Thomas <[email protected]> Date: Fri Sep 1 13:51:32 2023 -0400 Update openjdk to adoptium/temurin, the maintained replacement commit f7dcf28 Author: Anthony Thomas <[email protected]> Date: Thu Aug 31 16:58:46 2023 -0400 Add JAVA_HOME to solr service env vars commit d3c8218 Author: Anthony Thomas <[email protected]> Date: Thu Aug 31 14:53:22 2023 -0400 try setting JAVA_HOME? commit c7e2b7a Author: Anthony Thomas <[email protected]> Date: Thu Aug 31 14:28:02 2023 -0400 ensure solr bin dir exists commit 04cee8b Author: Anthony Thomas <[email protected]> Date: Thu Aug 31 14:17:30 2023 -0400 ensure that the parent directory of the webroot also exists commit ed35b6d Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 13:29:19 2023 -0400 remove ssl-mode from demomysql commit 7649583 Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 13:25:58 2023 -0400 fix override options hash syntax commit 4f5c1fa Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 13:16:22 2023 -0400 use override_options for demomysql commit f09f601 Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 12:58:17 2023 -0400 set password for demomysql? commit 79b4dcc Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 12:46:20 2023 -0400 reference demomysql in demofedora commit 435bc00 Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 12:32:42 2023 -0400 try disabling ssl for mysql commit 733e4c7 Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 11:36:19 2023 -0400 fix demofedora name again? commit d8a8238 Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 11:30:57 2023 -0400 fix demo-fedora name commit fe13c69 Author: Anthony Thomas <[email protected]> Date: Fri Aug 25 11:23:04 2023 -0400 try updating jdk and tomcat adjust fulcrum solr filesystem permissions lint_fix fix $facts fix missing fulcrum standalone spec mocked nodes
1 parent e180486 commit cbc8d35

File tree

24 files changed

+348
-60
lines changed

24 files changed

+348
-60
lines changed

manifests/profile/fulcrum/app.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
String $private_address_template = '192.168.0.%s',
1010
String $image_magick_secret = 'secret',
1111
) {
12-
$jdk_version = lookup('nebula::jdk_version')
12+
# let's just try installing openjdk 11 headless
13+
# openjdk 8 isn't available and there is no temurin headless
14+
$jdk_version = '11'
1315

1416
class { 'nebula::profile::networking::private':
1517
address_template => $private_address_template

manifests/profile/fulcrum/fedora.pp

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,59 @@
88
String $fedora_username = 'fedora',
99
String $fedora_password = lookup('nebula::profile::fulcrum::mysql::fedora_password'),
1010
) {
11+
$jdk_version = lookup('nebula::jdk_version')
12+
# used in erb file
13+
$java_home = "/usr/lib/jvm/temurin-${jdk_version}-jre-amd64"
14+
15+
nebula::usergroup { 'fulcrum': }
16+
1117
ensure_packages([
12-
'tomcat8-user',
18+
'tomcat9-user',
19+
"temurin-${jdk_version}-jre",
1320
])
1421

1522
file { '/etc/sudoers.d/fedora':
1623
content => template('nebula/profile/fulcrum/sudoers-fedora.erb'),
1724
}
1825

19-
file {
20-
['/var/lib/fedora', '/var/log/fedora', '/opt/fedora', '/tmp/fedora']:
21-
ensure => directory,
22-
owner => 'fulcrum',
23-
group => 'fulcrum',
24-
;
25-
}
26-
2726
exec { 'create fedora tomcat':
28-
command => '/usr/bin/tomcat8-instance-create fedora',
27+
command => '/usr/bin/tomcat9-instance-create fedora',
2928
cwd => '/opt',
30-
user => 'fulcrum',
3129
creates => '/opt/fedora',
30+
user => 'fulcrum',
3231
require => [
33-
User['fulcrum'],
34-
Package['tomcat8-user'],
32+
Package['tomcat9-user'],
3533
],
3634
}
3735

36+
file {
37+
['/var/lib/fedora', '/var/log/fedora', '/opt/fedora', '/tmp/fedora']:
38+
ensure => directory,
39+
owner => 'fulcrum',
40+
group => 'fulcrum',
41+
require => Exec['create fedora tomcat'],
42+
;
43+
}
44+
45+
exec { 'chown -r /opt/fedora':
46+
command => '/usr/bin/chown -R fulcrum:fulcrum /opt/fedora',
47+
require => Exec['create fedora tomcat'],
48+
}
49+
3850
file { '/opt/fedora/logs':
3951
ensure => 'symlink',
4052
owner => 'fulcrum',
4153
group => 'fulcrum',
54+
force => true,
4255
target => '/var/log/fedora',
4356
require => Exec['create fedora tomcat'],
4457
}
4558

4659
archive { '/opt/fedora/webapps/fedora.war':
4760
ensure => present,
4861
extract => false,
49-
source => 'https://github.com/fcrepo/fcrepo/releases/download/fcrepo-4.7.4/fcrepo-webapp-4.7.4.war',
50-
checksum => '11e06c843f40cf2b9f26bda94ddfe6d85d69a591',
62+
source => 'https://github.com/fcrepo/fcrepo/releases/download/fcrepo-4.7.6/fcrepo-webapp-4.7.6.war',
63+
checksum => '5882d8a4dc8b3817374503dff2043be79d9bbd72',
5164
checksum_type => 'sha1',
5265
cleanup => false,
5366
user => 'fulcrum',
@@ -81,7 +94,7 @@
8194
File['/etc/systemd/system/fedora.service'],
8295
File['/var/lib/fedora'],
8396
Archive['/opt/fedora/webapps/fedora.war'],
84-
Mysql::Db['fedora'],
97+
Service['mysqld'],
8598
],
8699
}
87100
}

manifests/profile/fulcrum/hosts.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
class nebula::profile::fulcrum::hosts (
77
$fedora = '127.0.0.1',
88
$mysql = '127.0.0.1',
9+
$keycard = '127.0.0.1',
910
$redis = '127.0.0.1',
1011
$solr = '127.0.0.1',
1112
) {
@@ -17,6 +18,10 @@
1718
ip => $mysql,
1819
}
1920

21+
host { 'keycard':
22+
ip => $keycard,
23+
}
24+
2025
host { 'redis':
2126
ip => $redis,
2227
}

manifests/profile/fulcrum/mysql.pp

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,50 @@
77
class nebula::profile::fulcrum::mysql (
88
String $fedora_password,
99
String $fulcrum_password,
10-
String $checkpoint_password,
1110
String $shibd_password,
11+
String $root_password,
1212
) {
13-
include nebula::profile::mysql
13+
# Install and configure mysql server
14+
ensure_packages(['mariadb-common','mariadb-server', 'mariadb-client'])
1415

15-
mysql::db { 'fedora':
16-
user => 'fedora',
17-
password => $fedora_password,
18-
host => 'localhost',
16+
# at some point need to do equivalent to `mysql_install_db --user=mysql --ldata=/var/lib/mysql`
17+
18+
service { 'mysqld':
19+
ensure => running,
20+
enable => true,
21+
require => Package['mariadb-server'],
22+
}
23+
24+
file { '/etc/mysql/conf.d':
25+
ensure => 'directory'
1926
}
2027

21-
mysql::db { 'fulcrum':
22-
user => 'fulcrum',
23-
password => $fulcrum_password,
24-
host => 'localhost',
28+
file { '/etc/mysql/my.cnf':
29+
owner => 'mysql',
30+
group => 'mysql',
31+
content => template('nebula/mysql/my.cnf.erb'),
32+
notify => Service['mysqld'],
33+
require => Package['mariadb-server'],
2534
}
2635

27-
mysql::db { 'checkpoint':
28-
user => 'checkpoint',
29-
password => $checkpoint_password,
30-
host => 'localhost',
36+
exec { 'set-mysql-password':
37+
unless => "mysqladmin -uroot -p${root_password} status",
38+
path => ['/bin', '/usr/bin'],
39+
command => "mysqladmin -uroot password ${root_password}",
40+
require => Service['mysqld'],
3141
}
3242

33-
mysql::db { 'shibd':
34-
user => 'shibd',
35-
password => $shibd_password,
36-
host => 'localhost',
43+
$dbs = [['fedora', 'fedora', $fedora_password], ['fulcrum', 'fulcrum', $fulcrum_password],
44+
['checkpoint', 'fulcrum', $fulcrum_password], ['shibd', 'shibd', $shibd_password]]
45+
46+
$dbs.each |$db| {
47+
$name = $db[0]
48+
$user = $db[1]
49+
$password = $db[2]
50+
exec { "create-${name}-db":
51+
unless => "/usr/bin/mysql -u${user} -p${password} ${name}",
52+
command => "/usr/bin/mysql -uroot -p${root_password} -e \"create database ${name}; grant all on ${name}.* to ${user}@localhost identified by '${password}';\"",
53+
require => Service['mysqld'],
54+
}
3755
}
3856
}

manifests/profile/fulcrum/perl.pp

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# The perl profile is needed for monitor_pl to work, but it pulls in a
2+
# ton of stuff. We should probably allow for different haproxy http checks
3+
# for a service, and eliminate the perl/monitor_pl dependency here.
4+
5+
class nebula::profile::fulcrum::perl (
6+
Hash $hosts = {}
7+
) {
8+
include nebula::profile::www_lib::perl
9+
10+
create_resources('host',$hosts)
11+
12+
include nebula::profile::www_lib::apache::base
13+
include nebula::profile::www_lib::apache::fulcrum
14+
15+
cron {
16+
default:
17+
user => 'root',
18+
;
19+
20+
'purge apache access logs 1/2':
21+
hour => 1,
22+
minute => 7,
23+
command => '/usr/bin/find /var/log/apache2 -type f -mtime +14 -name "*log*" -exec /bin/rm {} \; > /dev/null 2>&1',
24+
;
25+
26+
'purge apache access logs 2/2':
27+
hour => 1,
28+
minute => 17,
29+
command => '/usr/bin/find /var/log/apache2 -type f -mtime +2 -name "*log*" ! -name "*log*gz" -exec /usr/bin/pigz {} \; > /dev/null 2>&1',
30+
require => Package['pigz'],
31+
;
32+
}
33+
34+
ensure_packages(['pigz'])
35+
}

manifests/profile/fulcrum/shibboleth.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
class nebula::profile::fulcrum::shibboleth {
88
ensure_packages([
99
'unixodbc',
10-
'shibboleth-sp2-common',
11-
'shibboleth-sp2-utils',
12-
'mariadb-unixodbc',
10+
'shibboleth-sp-common',
11+
'shibboleth-sp-utils',
12+
'odbc-mariadb',
1313
])
1414

1515
file { '/etc/odbcinst.ini':
@@ -52,7 +52,7 @@
5252
ensure => 'running',
5353
enable => true,
5454
hasrestart => true,
55-
require => [Package['shibboleth-sp2-utils'], Package['mariadb-unixodbc']]
55+
require => [Package['shibboleth-sp-utils'], Package['odbc-mariadb']]
5656
}
5757

5858
service { 'shibauthorizer.socket':

manifests/profile/fulcrum/solr.pp

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,74 @@
44

55
# nebula::profile::fulcrum::solr
66

7-
class nebula::profile::fulcrum::solr {
8-
class { 'nebula::profile::solr':
9-
base => '/var/lib/solr',
10-
home => '/var/lib/solr/data',
11-
logs => '/var/log/solr',
7+
class nebula::profile::fulcrum::solr (
8+
String $base = '/var/lib/solr',
9+
String $home = "${base}/home",
10+
String $logs = "${base}/logs",
11+
String $log4j_properties = "${base}/log4j.properties",
12+
String $solr_in_sh = "${base}/solr.in.sh",
13+
String $solr_xml = "${base}/solr.xml",
14+
String $jdk_version = '8',
15+
String $solr_home = '/var/lib/solr',
16+
String $java_home = "/usr/lib/jvm/temurin-${jdk_version}-jre-${$facts['os']['architecture']}",
17+
String $heap = '16G',
18+
String $timezone = 'America/Detroit',
19+
String $solr_bin = '/opt/solr/bin/solr',
20+
) {
21+
ensure_packages([
22+
"temurin-${jdk_version}-jre",
23+
'solr',
24+
'lsof',
25+
])
26+
27+
nebula::usergroup { 'solr': }
28+
29+
file {
30+
default:
31+
owner => 'solr',
32+
group => 'fulcrum',
33+
;
34+
[$base, $home, $logs]:
35+
ensure => 'directory',
36+
mode => '0775',
37+
;
38+
$log4j_properties:
39+
ensure => 'file',
40+
mode => '0644',
41+
content => template('nebula/profile/fulcrum/solr/log4j.properties.erb'),
42+
;
43+
$solr_in_sh:
44+
ensure => 'file',
45+
mode => '0644',
46+
content => template('nebula/profile/fulcrum/solr/solr.in.sh.erb'),
47+
;
48+
$solr_xml:
49+
ensure => 'file',
50+
mode => '0644',
51+
content => template('nebula/profile/fulcrum/solr/solr.xml.erb'),
52+
;
53+
}
54+
file { '/etc/systemd/system/solr.service':
55+
owner => 'root',
56+
group => 'root',
57+
content => template('nebula/profile/fulcrum/solr/solr.service.erb'),
58+
}
59+
service { 'solr':
60+
ensure => 'running',
61+
enable => true,
62+
require => [Package['solr'], File['/etc/systemd/system/solr.service']],
63+
}
64+
65+
class { 'nebula::profile::openjdk_java':
66+
jdk_packages => ["temurin-${jdk_version}-jre"],
67+
default_jdk => "temurin-${jdk_version}-jre",
68+
base_alternative => $java_home,
69+
java_alternative => "temurin-${jdk_version}-jre-amd64",
70+
}
71+
72+
file { '/etc/environment':
73+
content => inline_template("JAVA_HOME=${java_home}")
74+
;
1275
}
1376

1477
file {

manifests/profile/openjdk_java.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
) {
1313
ensure_packages($jdk_packages)
1414
exec { 'ensure default java':
15-
command => "/usr/sbin/update-java-alternatives -s ${java_alternative}",
15+
command => "/usr/sbin/update-java-alternatives --jre -s ${java_alternative}",
1616
unless => "/usr/bin/update-alternatives --query java | grep '^Value:.*${base_alternative}'",
1717
require => Package[$default_jdk]
1818
}

manifests/profile/solr.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
ensure_packages(["openjdk-${jdk_version}-jre-headless",'solr','lsof'])
2323

2424
# Note: Along with variables above these are used in erb files also.
25-
$java_home = "/usr/lib/jvm/java-${jdk_version}-openjdk-amd64/jre"
25+
$java_home = "/usr/lib/jvm/java-${jdk_version}-openjdk-amd64"
2626
$solr_bin = '/opt/solr/bin/solr'
2727

2828
nebula::usergroup { 'solr': }

manifests/profile/www_lib/dependencies.pp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@
1010
# include nebula::profile::www_lib::dependencies
1111
class nebula::profile::www_lib::dependencies {
1212
$jdk_version = lookup('nebula::jdk_version')
13+
if $jdk_version == '8' {
14+
$java_source = 'temurin'
15+
} else {
16+
$java_source = 'openjdk'
17+
}
1318

1419
ensure_packages (
1520
[
1621
'curl',
1722
'git',
1823
'emacs',
1924
'imagemagick',
20-
"openjdk-${jdk_version}-jre",
25+
"${java_source}-${jdk_version}-jre",
2126
]
2227
)
2328
}

manifests/role/fulcrum/standalone.pp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@
1111
include nebula::profile::ruby
1212
include nebula::profile::fulcrum::base
1313
include nebula::profile::fulcrum::hosts
14+
include nebula::profile::fulcrum::mounts
15+
include nebula::profile::fulcrum::symlinks
1416
include nebula::profile::fulcrum::app
15-
include nebula::profile::fulcrum::fedora
1617
include nebula::profile::fulcrum::logrotate
17-
include nebula::profile::fulcrum::mysql
1818
include nebula::profile::fulcrum::redis
19-
include nebula::profile::fulcrum::shibboleth
19+
include nebula::profile::fulcrum::perl
20+
2021
include nebula::profile::fulcrum::solr
22+
include nebula::profile::fulcrum::mysql
23+
24+
include nebula::profile::fulcrum::shibboleth
25+
include nebula::profile::fulcrum::fedora
2126
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# frozen_string_literal: true
2+
3+
require "spec_helper"
4+
5+
describe "nebula::profile::fulcrum::solr" do
6+
on_supported_os.each do |os, os_facts|
7+
context "on #{os}" do
8+
let(:facts) { os_facts }
9+
let(:hiera_config) { "spec/fixtures/hiera/fulcrum_config.yaml" }
10+
11+
it { is_expected.to compile }
12+
13+
it { is_expected.to contain_package("temurin-8-jre") }
14+
15+
it { is_expected.to contain_file("/etc/environment").with_content(%r{JAVA_HOME=/usr/lib/jvm/temurin-8-jre-amd64}) }
16+
end
17+
end
18+
end

0 commit comments

Comments
 (0)