Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
d94cf59f
Commit
d94cf59f
authored
Nov 17, 2017
by
Julien Leduc
Browse files
ctafrontend can now run with or without systemd...
If CI passes...
parent
74a26795
Changes
3
Hide whitespace changes
Inline
Side-by-side
continuousintegration/docker/ctafrontend/cc7/opt/run/bin/ctafrontend.sh
View file @
d94cf59f
...
...
@@ -39,10 +39,18 @@ echo OK
echo
"Generating core file in /var/log/cta directory so that those are available as artifacts"
echo
'/var/log/cta/core_%e.%p'
>
/proc/sys/kernel/core_pattern
echo
"Launching frontend"
runuser
--shell
=
'/bin/bash'
--session-command
=
'cd ~cta; xrootd -l /var/log/cta-frontend-xrootd.log -k fifo -n cta -c /etc/cta/cta-frontend-xrootd.conf -I v4'
cta
echo
"ctafrontend died"
echo
"analysing core file if any"
/opt/run/bin/ctafrontend_bt.sh
sleep
infinity
if
[
"-
${
CI_CONTEXT
}
-"
==
'-nosystemd-'
]
;
then
# systemd is not available
runuser
--shell
=
'/bin/bash'
--session-command
=
'cd ~cta; xrootd -l /var/log/cta-frontend-xrootd.log -k fifo -n cta -c /etc/cta/cta-frontend-xrootd.conf -I v4'
cta
echo
"ctafrontend died"
echo
"analysing core file if any"
/opt/run/bin/ctafrontend_bt.sh
sleep
infinity
else
# systemd is available
echo
"Launching frontend with systemd:"
systemctl start cta-frontend
echo
"Status is now:"
systemctl status cta-frontend
fi
continuousintegration/orchestration/pod-ctafrontend.yaml
View file @
d94cf59f
...
...
@@ -33,6 +33,8 @@ spec:
key
:
subdir
-
name
:
TERM
value
:
"
xterm"
-
name
:
CI_CONTEXT
value
:
"
nosystemd"
command
:
[
'
/opt/run/bin/ctafrontend.sh'
]
args
:
[
"
none"
]
volumeMounts
:
...
...
continuousintegration/orchestration/tests/prepare_tests.sh
View file @
d94cf59f
...
...
@@ -59,6 +59,9 @@ ctacliIP=`kubectl --namespace ${NAMESPACE} describe pod ctacli | grep IP | sed -
echo
"Preparing CTA configuration for tests"
kubectl
--namespace
${
NAMESPACE
}
exec
ctafrontend
--
cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf
--hostname
${
ctacliIP
}
-c
"docker cli"
# to allow client connecting to dual stack IPv6/IPv4 xrootd server
# otherwise only use IPv4 by adding '-I v4' to ExecStart line in /etc/systemd/system/cta-frontend.service
kubectl
--namespace
${
NAMESPACE
}
exec
ctafrontend
--
cta-catalogue-admin-host-create /etc/cta/cta-catalogue.conf
--hostname
[
::ffff:
${
ctacliIP
}
]
-c
"docker cli"
kubectl
--namespace
${
NAMESPACE
}
exec
ctafrontend
--
cta-catalogue-admin-user-create /etc/cta/cta-catalogue.conf
--username
ctaadmin1
-c
"docker cli"
kubectl
--namespace
${
NAMESPACE
}
exec
ctacli
--
cta-admin logicallibrary add
\
--name
${
LIBRARYNAME
}
\
...
...
@@ -131,6 +134,7 @@ echo "Adding super client capabilities"
clientIP
=
`
kubectl
--namespace
${
NAMESPACE
}
describe pod client |
grep
IP |
sed
-E
's/IP:[[:space:]]+//'
`
kubectl
--namespace
${
NAMESPACE
}
exec
ctacli
--
cta-admin adminhost add
--name
${
clientIP
}
--comment
"for the super client"
kubectl
--namespace
${
NAMESPACE
}
exec
ctacli
--
cta-admin adminhost add
--name
[
::ffff:
${
clientIP
}
]
--comment
"for the super client"
kubectl
--namespace
${
NAMESPACE
}
exec
ctacli
--
cta-admin admin add
--username
ctaadmin2
--comment
"ctaadmin2"
kubectl
--namespace
=
${
NAMESPACE
}
exec
kdc
cat
/root/ctaadmin2.keytab | kubectl
--namespace
=
${
NAMESPACE
}
exec
-i
client
--
bash
-c
"cat > /root/ctaadmin2.keytab; mkdir -p /tmp/ctaadmin2"
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment