Commit 6396b7b8 authored by Michael Davis's avatar Michael Davis
Browse files

[migration] Moves gRPC test script to EOS pod

parent eba07433
......@@ -21,22 +21,6 @@ cat <<EOF > /etc/cta/cta-cli.conf
cta.endpoint ctafrontend:10955
EOF
EOS_HOSTNAME=ctaeos
EOS_AUTH_KEY=migration-test-token
cat <<EOF >/etc/cta/castor-migration.conf
castor.db_login oracle:castor/<password>@castor
castor.json true
castor.max_num_connections 1
castor.batch_size 100
castor.prefix /castor/cern.ch
eos.dry_run false
eos.prefix /eos/grpctest
eos.endpoint ${EOS_HOSTNAME}:50051
eos.token ${EOS_AUTH_KEY}
EOF
echo Migration tools configuration:
cat /etc/cta/castor-migration.conf
if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
# sleep forever but exit immediately when pod is deleted
exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
......
......@@ -214,7 +214,7 @@ fi
# Configure gRPC interface:
#
# 1. Map requests from the client to EOS virtual identities
CLIENT_IP=$(cat /etc/grpc_client_ip)
CLIENT_IP=127.0.0.1
echo CLIENT_IP is $CLIENT_IP
eos -r 0 0 vid add gateway ${CLIENT_IP} grpc
# 2. Add authorisation key
......@@ -288,6 +288,22 @@ fi
# configure preprod directory separately
/opt/run/bin/eos_configure_preprod.sh
# configuration for migration tools
cat <<EOF >/etc/cta/castor-migration.conf
castor.db_login oracle:castor/<password>@castor
castor.json true
castor.max_num_connections 1
castor.batch_size 100
castor.prefix /castor/cern.ch
eos.dry_run false
eos.prefix /eos/grpctest
eos.endpoint localhost:50051
eos.token ${EOS_AUTH_KEY}
EOF
echo Migration tools configuration:
cat /etc/cta/castor-migration.conf
touch /EOSOK
if [ "-${CI_CONTEXT}-" == '-nosystemd-' ]; then
......
......@@ -301,9 +301,6 @@ kubectl --namespace=${instance} exec kdc cat /root/eos-server.keytab | kubectl -
kubectl --namespace=${instance} exec ctacli -- kinit -kt /root/ctaadmin1.keytab ctaadmin1@TEST.CTA
kubectl --namespace=${instance} exec client -- kinit -kt /root/user1.keytab user1@TEST.CTA
# Let EOS MGM pod know the address of the client pod, to configure the gRPC gateway
kubectl --namespace=${instance} exec client -- hostname -i | kubectl --namespace=${instance} exec -i ctaeos -- bash -c "cat > /etc/grpc_client_ip"
## THE FILE IS MOVED THERE MUCH LATER AND OVERWRITES THIS
# THIS HAS TO BE IMPROVED (DEFINITELY) SO THAT WE CAN ASYNCHRONOUSLY UPDATE THE CONFIGURATION FILES...
# SYSTEMD IS THE WAY TO GO
......
#!/bin/sh
# Migration tools parameters
EOSINSTANCE=ctaeos
EOS_CMD="/usr/bin/eos root://${EOSINSTANCE}"
#EOSINSTANCE=ctaeos
#EOS_CMD="/usr/bin/eos root://${EOSINSTANCE}"
EOS_CMD=/usr/bin/eos
EOS_TEST_DIR_INJECT=/usr/bin/eos-test-dir-inject
CONFIG_FILE=/etc/cta/castor-migration.conf
TMPFILE=/tmp/eos-test-inject-sh.$$
......
......@@ -36,7 +36,7 @@ fi
echo
echo "Launching grpc_dir_inject.sh on client pod"
kubectl -n ${NAMESPACE} cp grpc_dir_inject.sh client:/root/grpc_dir_inject.sh
kubectl -n ${NAMESPACE} exec client -- bash /root/grpc_dir_inject.sh || exit 1
kubectl -n ${NAMESPACE} cp grpc_dir_inject.sh eoscta:/root/grpc_dir_inject.sh
kubectl -n ${NAMESPACE} exec eoscta -- bash /root/grpc_dir_inject.sh || exit 1
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment