Skip to content

Commit 908cbf6

Browse files
Avery Wangsheridancbio
authored andcommitted
add options for logging in for different accounts
1 parent c98def9 commit 908cbf6

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

import-scripts/backup-eks-dbs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ for db in ${DBS[@]}; do
2121
$(set -o pipefail && mysqldump --login-path=mysql_localhost --quick $db | gzip > $SQLDUMP_FULLPATH)
2222
if [ $? -eq 0 ]; then
2323
echo "Successfully dumped: '${SQLDUMP_FILENAME}'"
24-
. /data/portal-cron/git-repos/portal-configuration/eks-cluster/pipelines/authenticate_service_account.sh
24+
. /data/portal-cron/git-repos/portal-configuration/eks-cluster/pipelines/authenticate_service_account.sh eks
2525
aws s3 cp ${SQLDUMP_FULLPATH} s3://cbioportal-backups/${SQLDUMP_FILENAME} --profile saml
2626
if [ $? -ne 0 ]; then
2727
echo "ERROR: failed to cp '${SQLDUMP_FILENAME}' to S3"

import-scripts/clear_cbioportal_persistence_cache.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ fi
7777

7878
unset KUBECONFIG_ARG
7979
if [ "$cluster_id" == "$CLUSTER_ID_DIGITS" ] ; then
80-
/data/portal-cron/scripts/authenticate_service_account.sh
80+
/data/portal-cron/scripts/authenticate_service_account.sh eks
8181
else
8282
if ! [ -z $PUBLIC_CLUSTER_KUBECONFIG ] ; then
83+
/data/portal-cron/scripts/authenticate_service_account.sh public
8384
KUBECONFIG_ARG="--kubeconfig $PUBLIC_CLUSTER_KUBECONFIG"
8485
fi
8586
fi

import-scripts/delete_slow_to_terminate_pods.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ MY_FLOCK_FILEPATH="/data/portal-cron/cron-lock/delete_slow_to_terminate_pods.loc
183183
mv $temp_file $POD_TERMINATING_TIMESTAMP_FILE
184184
}
185185

186-
/data/portal-cron/scripts/authenticate_service_account.sh
186+
/data/portal-cron/scripts/authenticate_service_account.sh eks
187187
check_for_dependencies
188188
now=$(date +%s)
189189
make_work_dir_if_necessary

import-scripts/precache-portals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
def authenticate_service_account():
3232
try:
33-
subprocess.check_output(["/data/portal-cron/scripts/authenticate_service_account.sh"])
33+
subprocess.check_output(["/data/portal-cron/scripts/authenticate_service_account.sh public"])
3434
except:
3535
print "Attempt to authenticate to k8s cluster failed with non-zero exit status, exiting..."
3636
sys.exit(1)

0 commit comments

Comments
 (0)