Skip to content

Commit

Permalink
updated keytab script
Browse files Browse the repository at this point in the history
  • Loading branch information
mathis-marcotte committed Jan 7, 2025
1 parent 5e5e611 commit 42cec45
Show file tree
Hide file tree
Showing 15 changed files with 119 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker-bits/4_CLI.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ RUN wget -q "${GIT_CRED_MANAGER_URL}" -O ./gcm.deb \
&& dpkg -i ./gcm.deb \
&& rm ./gcm.deb

COPY ktutil-keytab.sh /home/$NB_USER/.local/bin/ktutil-keytab
COPY ktutil-keytab.sh /usr/local/bin/ktutil-keytab
14 changes: 14 additions & 0 deletions output/docker-stacks-datascience-notebook/ktutil-keytab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ kubectl create secret generic kerberos-keytab -n $NS --from-file=./client.keytab

# apply the secret
kubectl apply -f ./ktutil_keytab.yaml


#get the notebook name
nb_name=${NB_PREFIX##*/}

# Prompt user for notebook restart
while true; do
read -p "In order to update the kerberos authentication, the notebook server needs to be restarted. Would you like to restart your notebook server?[Y/n]: " yn
case $yn in
[Yy]* ) echo "Your notebook server will now restart"; kubectl rollout restart statefulset $nb_name -n $NB_NAMESPACE; break;;
[Nn]* ) echo "Your notebook server will not be restarted"; exit;;
* ) echo "Only yes or no is an expected answer";;
esac
done
2 changes: 1 addition & 1 deletion output/jupyterlab-cpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ RUN wget -q "${GIT_CRED_MANAGER_URL}" -O ./gcm.deb \
&& dpkg -i ./gcm.deb \
&& rm ./gcm.deb

COPY ktutil-keytab.sh /home/$NB_USER/.local/bin/ktutil-keytab
COPY ktutil-keytab.sh /usr/local/bin/ktutil-keytab

###############################
### docker-bits/5_DB-Drivers.Dockerfile
Expand Down
14 changes: 14 additions & 0 deletions output/jupyterlab-cpu/ktutil-keytab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ kubectl create secret generic kerberos-keytab -n $NS --from-file=./client.keytab

# apply the secret
kubectl apply -f ./ktutil_keytab.yaml


#get the notebook name
nb_name=${NB_PREFIX##*/}

# Prompt user for notebook restart
while true; do
read -p "In order to update the kerberos authentication, the notebook server needs to be restarted. Would you like to restart your notebook server?[Y/n]: " yn
case $yn in
[Yy]* ) echo "Your notebook server will now restart"; kubectl rollout restart statefulset $nb_name -n $NB_NAMESPACE; break;;
[Nn]* ) echo "Your notebook server will not be restarted"; exit;;
* ) echo "Only yes or no is an expected answer";;
esac
done
2 changes: 1 addition & 1 deletion output/jupyterlab-pytorch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ RUN wget -q "${GIT_CRED_MANAGER_URL}" -O ./gcm.deb \
&& dpkg -i ./gcm.deb \
&& rm ./gcm.deb

COPY ktutil-keytab.sh /home/$NB_USER/.local/bin/ktutil-keytab
COPY ktutil-keytab.sh /usr/local/bin/ktutil-keytab

###############################
### docker-bits/5_DB-Drivers.Dockerfile
Expand Down
14 changes: 14 additions & 0 deletions output/jupyterlab-pytorch/ktutil-keytab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ kubectl create secret generic kerberos-keytab -n $NS --from-file=./client.keytab

# apply the secret
kubectl apply -f ./ktutil_keytab.yaml


#get the notebook name
nb_name=${NB_PREFIX##*/}

# Prompt user for notebook restart
while true; do
read -p "In order to update the kerberos authentication, the notebook server needs to be restarted. Would you like to restart your notebook server?[Y/n]: " yn
case $yn in
[Yy]* ) echo "Your notebook server will now restart"; kubectl rollout restart statefulset $nb_name -n $NB_NAMESPACE; break;;
[Nn]* ) echo "Your notebook server will not be restarted"; exit;;
* ) echo "Only yes or no is an expected answer";;
esac
done
2 changes: 1 addition & 1 deletion output/jupyterlab-tensorflow/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ RUN wget -q "${GIT_CRED_MANAGER_URL}" -O ./gcm.deb \
&& dpkg -i ./gcm.deb \
&& rm ./gcm.deb

COPY ktutil-keytab.sh /home/$NB_USER/.local/bin/ktutil-keytab
COPY ktutil-keytab.sh /usr/local/bin/ktutil-keytab

###############################
### docker-bits/5_DB-Drivers.Dockerfile
Expand Down
14 changes: 14 additions & 0 deletions output/jupyterlab-tensorflow/ktutil-keytab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ kubectl create secret generic kerberos-keytab -n $NS --from-file=./client.keytab

# apply the secret
kubectl apply -f ./ktutil_keytab.yaml


#get the notebook name
nb_name=${NB_PREFIX##*/}

# Prompt user for notebook restart
while true; do
read -p "In order to update the kerberos authentication, the notebook server needs to be restarted. Would you like to restart your notebook server?[Y/n]: " yn
case $yn in
[Yy]* ) echo "Your notebook server will now restart"; kubectl rollout restart statefulset $nb_name -n $NB_NAMESPACE; break;;
[Nn]* ) echo "Your notebook server will not be restarted"; exit;;
* ) echo "Only yes or no is an expected answer";;
esac
done
2 changes: 1 addition & 1 deletion output/remote-desktop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ RUN wget -q "${GIT_CRED_MANAGER_URL}" -O ./gcm.deb \
&& dpkg -i ./gcm.deb \
&& rm ./gcm.deb

COPY ktutil-keytab.sh /home/$NB_USER/.local/bin/ktutil-keytab
COPY ktutil-keytab.sh /usr/local/bin/ktutil-keytab

###############################
### docker-bits/6_remote-desktop.Dockerfile
Expand Down
14 changes: 14 additions & 0 deletions output/remote-desktop/ktutil-keytab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ kubectl create secret generic kerberos-keytab -n $NS --from-file=./client.keytab

# apply the secret
kubectl apply -f ./ktutil_keytab.yaml


#get the notebook name
nb_name=${NB_PREFIX##*/}

# Prompt user for notebook restart
while true; do
read -p "In order to update the kerberos authentication, the notebook server needs to be restarted. Would you like to restart your notebook server?[Y/n]: " yn
case $yn in
[Yy]* ) echo "Your notebook server will now restart"; kubectl rollout restart statefulset $nb_name -n $NB_NAMESPACE; break;;
[Nn]* ) echo "Your notebook server will not be restarted"; exit;;
* ) echo "Only yes or no is an expected answer";;
esac
done
2 changes: 1 addition & 1 deletion output/rstudio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ RUN wget -q "${GIT_CRED_MANAGER_URL}" -O ./gcm.deb \
&& dpkg -i ./gcm.deb \
&& rm ./gcm.deb

COPY ktutil-keytab.sh /home/$NB_USER/.local/bin/ktutil-keytab
COPY ktutil-keytab.sh /usr/local/bin/ktutil-keytab

###############################
### docker-bits/5_DB-Drivers.Dockerfile
Expand Down
14 changes: 14 additions & 0 deletions output/rstudio/ktutil-keytab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ kubectl create secret generic kerberos-keytab -n $NS --from-file=./client.keytab

# apply the secret
kubectl apply -f ./ktutil_keytab.yaml


#get the notebook name
nb_name=${NB_PREFIX##*/}

# Prompt user for notebook restart
while true; do
read -p "In order to update the kerberos authentication, the notebook server needs to be restarted. Would you like to restart your notebook server?[Y/n]: " yn
case $yn in
[Yy]* ) echo "Your notebook server will now restart"; kubectl rollout restart statefulset $nb_name -n $NB_NAMESPACE; break;;
[Nn]* ) echo "Your notebook server will not be restarted"; exit;;
* ) echo "Only yes or no is an expected answer";;
esac
done
2 changes: 1 addition & 1 deletion output/sas/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ RUN wget -q "${GIT_CRED_MANAGER_URL}" -O ./gcm.deb \
&& dpkg -i ./gcm.deb \
&& rm ./gcm.deb

COPY ktutil-keytab.sh /home/$NB_USER/.local/bin/ktutil-keytab
COPY ktutil-keytab.sh /usr/local/bin/ktutil-keytab

###############################
### docker-bits/5_DB-Drivers.Dockerfile
Expand Down
14 changes: 14 additions & 0 deletions output/sas/ktutil-keytab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ kubectl create secret generic kerberos-keytab -n $NS --from-file=./client.keytab

# apply the secret
kubectl apply -f ./ktutil_keytab.yaml


#get the notebook name
nb_name=${NB_PREFIX##*/}

# Prompt user for notebook restart
while true; do
read -p "In order to update the kerberos authentication, the notebook server needs to be restarted. Would you like to restart your notebook server?[Y/n]: " yn
case $yn in
[Yy]* ) echo "Your notebook server will now restart"; kubectl rollout restart statefulset $nb_name -n $NB_NAMESPACE; break;;
[Nn]* ) echo "Your notebook server will not be restarted"; exit;;
* ) echo "Only yes or no is an expected answer";;
esac
done
14 changes: 14 additions & 0 deletions resources/common/ktutil-keytab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,17 @@ kubectl create secret generic kerberos-keytab -n $NS --from-file=./client.keytab

# apply the secret
kubectl apply -f ./ktutil_keytab.yaml


#get the notebook name
nb_name=${NB_PREFIX##*/}

# Prompt user for notebook restart
while true; do
read -p "In order to update the kerberos authentication, the notebook server needs to be restarted. Would you like to restart your notebook server?[Y/n]: " yn
case $yn in
[Yy]* ) echo "Your notebook server will now restart"; kubectl rollout restart statefulset $nb_name -n $NB_NAMESPACE; break;;
[Nn]* ) echo "Your notebook server will not be restarted"; exit;;
* ) echo "Only yes or no is an expected answer";;
esac
done

0 comments on commit 42cec45

Please sign in to comment.