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
ef2c0c86
Commit
ef2c0c86
authored
4 years ago
by
Filip Strömbäck
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issues in the git-update script.
parent
e97bdfdf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
files/opendsa/on_update.sh
+8
-0
8 additions, 0 deletions
files/opendsa/on_update.sh
files/update_repo.sh
+1
-1
1 addition, 1 deletion
files/update_repo.sh
manifests/aes_broker.pp
+1
-1
1 addition, 1 deletion
manifests/aes_broker.pp
manifests/opendsa.pp
+17
-14
17 additions, 14 deletions
manifests/opendsa.pp
with
27 additions
and
16 deletions
files/opendsa/on_update.sh
+
8
−
0
View file @
ef2c0c86
...
...
@@ -8,7 +8,15 @@
update_pip_fn
=
$(
cat
<<
'
EOF
'
cd
python3 -m pip install --user -r OpenDSA/server/requirements.txt
# Initialize the DB if required.
if [[ ! -f OpenDSA/server/openDSA.db ]]
then
cd OpenDSA/server/
./main.py init_db
fi
EOF
)
# Run PIP as OpenDSA.
sudo
--user
opendsa
--group
opendsa
--set-home
--
bash
-c
"
$update_pip_fn
"
...
...
This diff is collapsed.
Click to expand it.
files/update_repo.sh
+
1
−
1
View file @
ef2c0c86
...
...
@@ -90,7 +90,7 @@ then
if
[[
!
-z
"
$REPO_ON_UPDATE
"
]]
then
# Run it if it is there.
$REPO_ON_UPDATE
eval
"
$REPO_ON_UPDATE
"
fi
exit
0
else
...
...
This diff is collapsed.
Click to expand it.
manifests/aes_broker.pp
+
1
−
1
View file @
ef2c0c86
...
...
@@ -22,7 +22,7 @@ class aes::aes_broker {
user
{
"
${broker_user}
"
:
ensure
=>
present
,
home
=>
"
${broker_
user
}
"
,
home
=>
"
${broker_
home
}
"
,
comment
=>
'Message broker for AES'
,
managehome
=>
false
,
membership
=>
inclusive
,
...
...
This diff is collapsed.
Click to expand it.
manifests/opendsa.pp
+
17
−
14
View file @
ef2c0c86
...
...
@@ -27,12 +27,20 @@ class aes::opendsa {
ensure
=>
present
,
owner
=>
root
,
group
=>
root
,
mode
=>
'0
6
00'
,
mode
=>
'0
7
00'
,
source
=>
"puppet:///modules/
${module_name}
/opendsa/on_update.sh"
,
}
file
{
"/etc/systemd/system/
${opendsa_service}
.service"
:
ensure
=>
present
,
owner
=>
root
,
group
=>
root
,
mode
=>
'0644'
,
source
=>
"puppet:///modules/
${module_name}
/opendsa/opendsa.service"
,
}
exec
{
'update-repo'
:
command
=>
"/opt/utils/update_repo.sh
${opendsa_home}
/OpenDSA https://oauth2:taNPRZid9Hv6jJtdW_T8@gitlab.liu.se
:
opendsa/OpenDSA.git exam"
,
command
=>
"/opt/utils/update_repo.sh
${opendsa_home}
/OpenDSA https://oauth2:taNPRZid9Hv6jJtdW_T8@gitlab.liu.se
/
opendsa/OpenDSA.git exam"
,
environment
=>
[
"REPO_USER=
${opendsa_user}
"
,
"REPO_GROUP=
${opendsa_group}
"
,
"REPO_ON_UPDATE=
${opendsa_home}
/on_update.sh"
],
# This command will need to run "on_update" as root in order to restart the service.
user
=>
root
,
...
...
@@ -48,20 +56,15 @@ class aes::opendsa {
source
=>
"puppet:///modules/
${module_name}
/opendsa/manage.sh"
,
}
exec
{
"
${opendsa_home}
/OpenDSA/server/main.py init_db"
:
cwd
=>
"
${opendsa_home}
/OpenDSA/server/"
,
creates
=>
"
${opendsa_home}
/OpenDSA/server/openDSA.db"
,
user
=>
"
${opendsa_user}
"
,
group
=>
"
${opendsa_group}
"
,
# Temporary!
file
{
'/opt/utils/update_repo.sh'
:
ensure
=>
file
,
mode
=>
'0755'
,
owner
=>
root
,
group
=>
root
,
content
=>
file
(
"
${module_name}
/update_repo.sh"
),
}
file
{
"/etc/systemd/system/
${opendsa_service}
.service"
:
ensure
=>
present
,
owner
=>
root
,
group
=>
root
,
mode
=>
'0644'
,
source
=>
"puppet:///modules/
${module_name}
/opendsa/opendsa.service"
,
}
# Do we need port 12000 open? NO
service
{
"
${opendsa_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