Skip to content

Commit

Permalink
Merge pull request #536 from SURFscz/add-acc-weblogin
Browse files Browse the repository at this point in the history
Add acc weblogin
  • Loading branch information
baszoetekouw authored Sep 3, 2024
2 parents 6a54a1b + 3cf7965 commit ee50ec9
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 13 deletions.
12 changes: 8 additions & 4 deletions environments/docker/group_vars/demo1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ demo_containers:
etherpad: sram-etherpad
wordpress: sram-wordpress
wordpress_cli: sram-wordpress-cli
weblogin: sram-weblogin
weblogin_acc: sram-weblogin-acc
weblogin_prd: sram-weblogin-prd
database: sram-db

demo_images:
Expand All @@ -28,10 +29,13 @@ demo_hosts:
ports:
etherpad: 9001
wordpress: 9002
weblogin: 2022
weblogin_acc: 2022
weblogin_prd: 1022

demo1_weblogin_url: https://sbs.scz-vm.net/pam-weblogin
demo1_weblogin_token: 1234abcd
demo1_weblogin_url_acc: https://sbs.scz-vm.net/pam-weblogin
demo1_weblogin_url_prd: https://sbs.scz-vm.net/pam-weblogin
demo1_weblogin_token_acc: 1234abcd
demo1_weblogin_token_prd: 1234abcd

# oidc:
# demo1:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 24 additions & 9 deletions roles/demo-weblogin/templates/weblogin-cleanup.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,35 @@ Type=oneshot
WorkingDirectory={{weblogin_basedir}}

# clean up
ExecStart=-/usr/bin/docker rm -f {{ demo_containers.weblogin }}
ExecStart=+/bin/rm -rf '{{weblogin_basedir}}/home'
ExecStart=+/bin/mkdir -p -m0755 '{{weblogin_basedir}}/home'
ExecStart=-/usr/bin/docker rm -f {{ demo_containers.weblogin_acc }}
ExecStart=-/usr/bin/docker rm -f {{ demo_containers.weblogin_prd }}
ExecStart=+/bin/rm -rf '{{weblogin_basedir}}/home_acc'
ExecStart=+/bin/rm -rf '{{weblogin_basedir}}/home_prd'
ExecStart=+/bin/mkdir -p -m0755 '{{weblogin_basedir}}/home_acc'
ExecStart=+/bin/mkdir -p -m0755 '{{weblogin_basedir}}/home_prd'

# start container
# start container acc
ExecStart=/usr/bin/docker run -d \
-p 0.0.0.0:{{ ports.weblogin }}:22 \
-e URL={{ demo1_weblogin_url }} \
-e TOKEN={{ demo1_weblogin_token }} \
-v {{ weblogin_basedir }}/home:/home:rw \
--name {{ demo_containers.weblogin }} \
-p 0.0.0.0:{{ ports.weblogin_acc }}:22 \
-e URL={{ demo1_weblogin_url_acc }} \
-e TOKEN={{ demo1_weblogin_token_acc }} \
-v {{ weblogin_basedir }}/home_acc:/home:rw \
--name {{ demo_containers.weblogin_acc }} \
--network {{ internal_network }} \
--restart always \
{{ demo_images.weblogin }}

# start container prd
ExecStart=/usr/bin/docker run -d \
-p 0.0.0.0:{{ ports.weblogin_prd }}:22 \
-e URL={{ demo1_weblogin_url_prd }} \
-e TOKEN={{ demo1_weblogin_token_prd }} \
-v {{ weblogin_basedir }}/home_prd:/home:rw \
--name {{ demo_containers.weblogin_prd }} \
--network {{ internal_network }} \
--restart always \
{{ demo_images.weblogin }}

SyslogIdentifier=weblogin-cleanup

[Install]
Expand Down

0 comments on commit ee50ec9

Please sign in to comment.