Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
liu-puppet-modules
aes
Commits
163f26c0
Commit
163f26c0
authored
1 year ago
by
Filip Strömbäck
Browse files
Options
Downloads
Patches
Plain Diff
Updated the broker to use vcsrepo as well.
parent
ad96de01
No related branches found
No related tags found
2 merge requests
!50
Fix: Puppet Defining "data_provider": "hiera" in metadata.json is deprecated....
,
!40
Merge from devel. Commits related to RHEL9 upgrade and pdk cleanup.
Pipeline
#101955
passed
1 year ago
Stage: puppet
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
files/broker/on_update.sh
+0
-9
0 additions, 9 deletions
files/broker/on_update.sh
manifests/aes_sw.pp
+0
-13
0 additions, 13 deletions
manifests/aes_sw.pp
manifests/auth.pp
+2
-2
2 additions, 2 deletions
manifests/auth.pp
manifests/broker.pp
+22
-9
22 additions, 9 deletions
manifests/broker.pp
with
24 additions
and
33 deletions
files/broker/on_update.sh
+
0
−
9
View file @
163f26c0
#!/bin/bash
run_as_broker
=
$(
cat
<<
'
EOF
'
cd
# To make sure we have a decent GCC in our path.
source
/opt/rh/devtoolset-7/enable
...
...
@@ -17,12 +16,4 @@ cd
mkdir
-p
bin/
rm
-f
bin/broker
cp
src/broker/broker bin/
EOF
)
# Compile as "broker".
sudo
--user
broker
--group
broker
--set-home
--
bash
-c
"
$run_as_broker
"
# Then, we can restart the services.
systemctl restart aes_broker.service
This diff is collapsed.
Click to expand it.
manifests/aes_sw.pp
+
0
−
13
View file @
163f26c0
...
...
@@ -138,13 +138,6 @@ class aes::aes_sw {
enable
=>
true
,
}
# exec { 'script-repo-updated':
# command => "/opt/utils/update_repo.sh ${examadm_home}/scripts https://oauth2:iAyewr9Jq5E-tnsVrmbj@gitlab.liu.se/examadm/scripts.git master",
# cwd => $examadm_home,
# user => $examadm_user,
# group => $examadm_group,
# }
# Test to replace exec for repo update //thojo16
vcsrepo
{
"
${examadm_home}
/scripts"
:
ensure
=>
latest
,
...
...
@@ -153,12 +146,6 @@ class aes::aes_sw {
revision
=>
'master'
,
owner
=>
$examadm_user
,
group
=>
$examadm_group
,
notify
=>
Exec
[
'TriggeredByUpdates'
],
}
exec
{
'TriggeredByUpdates'
:
path
=>
'/bin/:/usr/bin/'
,
command
=>
"touch
${examadm_home}
/foo-vcsrepo"
,
refreshonly
=>
true
,
}
schedule
{
'everyday'
:
...
...
This diff is collapsed.
Click to expand it.
manifests/auth.pp
+
2
−
2
View file @
163f26c0
...
...
@@ -141,10 +141,10 @@ class aes::auth (
group
=>
$auth_group
,
cwd
=>
$auth_home
,
path
=>
'/bin:/usr/bin'
,
command
=>
"
${auth_home}
/on_update.sh"
,
environment
=>
[
"HOME=
${auth_home}
"
],
refreshonly
=>
true
,
command
=>
"
${auth_home}
/on_update.sh"
,
require
=>
File
[
"
${auth_home}
/on_update.sh"
],
refreshonly
=>
true
,
notify
=>
Service
[
$auth_service
],
}
...
...
This diff is collapsed.
Click to expand it.
manifests/broker.pp
+
22
−
9
View file @
163f26c0
# @summary
#
D
es
cribe what this class do!
#
M
es
sage broker for the communication module.
#
# Detailed summary info if suitable
# Sets up the message broker for the communication module in the
# new exam system.
#
#
class
aes::broker
{
...
...
@@ -93,14 +94,26 @@ class aes::broker {
source
=>
"puppet:///modules/
${module_name}
/broker/cert/
${server_type}
_password"
,
}
exec
{
'update-broker-repo'
:
command
=>
"/opt/utils/update_repo.sh
${broker_home}
/src https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git
${server_type}
"
,
environment
=>
[
"REPO_USER=
${broker_user}
"
,
"REPO_GROUP=
${broker_group}
"
,
"REPO_ON_UPDATE=
${broker_home}
/on_update.sh"
],
# This command will need to run "on_update" as root in order to restart the service.
user
=>
root
,
group
=>
root
,
vcsrepo
{
"
${broker_home}
/src"
:
ensure
=>
latest
,
provider
=>
git
,
source
=>
'https://oauth2:F-agHaRXCdyFy38q4c-N@gitlab.liu.se/upp-aes/communication.git'
,
revision
=>
$server_type
,
owner
=>
$broker_user
,
group
=>
$broker_group
,
notify
=>
'compile-broker-repo'
,
}
exec
{
'compile-broker-repo'
:
user
=>
$broker_user
,
group
=>
$broker_group
,
cwd
=>
$broker_home
,
require
=>
File
[
"
${broker_home}
/on_update.sh"
],
path
=>
'/bin:/usr/bin'
,
environment
=>
[
"HOME=
${auth_home}
"
],
command
=>
"
${auth_home}
/on_update.sh"
,
require
=>
File
[
"
${auth_home}
/on_update.sh"
],
refreshonly
=>
true
,
notify
=>
Service
[
$broker_service
],
}
service
{
$broker_service
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment