Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tnsnames.ora clone script fix #738

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions output/docker-stacks-datascience-notebook/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ ! -d ~/aaw-contrib-jupyter-notebooks ]]; then
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break
echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO"
echo "Failed to clone the example notebooks. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
Expand Down Expand Up @@ -208,13 +208,18 @@ fi
# Runs on every startup because this output location is not persisted storage
# Implemented with a retry because it sometimes fails for some reason
echo "Retrieving Oracle tnsnames file"
GIT_ORACLE_SNIPPET="https://gitlab.k8s.cloud.statcan.ca/business-transformation/aaw/aaw-contrib-containers/snippets/515.git"
ORACLE_ADMIN_PATH="/opt/oracle/instantclient_23_5/network/admin"
RETRIES_NO=5
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
curl --url "https://gitlab.k8s.cloud.statcan.ca/api/v4/snippets/515/raw" -o /opt/oracle/instantclient_23_5/network/admin/tnsnames.ora && break
echo "Failed to get the tnsnames.ora file. Attempt $i of $RETRIES_NO"
test -z "$GIT_ORACLE_SNIPPET" || git clone "$GIT_ORACLE_SNIPPET" "${ORACLE_ADMIN_PATH}/515" \
&& mv "${ORACLE_ADMIN_PATH}/515/tnsnames.ora" "${ORACLE_ADMIN_PATH}" \
&& rm -rf "${ORACLE_ADMIN_PATH}/515" \
&& break
echo "Failed to clone the tnsnames.ora file. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to get the tnsnames.ora file after $RETRIES_NO retries"
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone the tnsnames.ora after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
done

Expand Down
13 changes: 9 additions & 4 deletions output/jupyterlab-cpu/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ ! -d ~/aaw-contrib-jupyter-notebooks ]]; then
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break
echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO"
echo "Failed to clone the example notebooks. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
Expand Down Expand Up @@ -208,13 +208,18 @@ fi
# Runs on every startup because this output location is not persisted storage
# Implemented with a retry because it sometimes fails for some reason
echo "Retrieving Oracle tnsnames file"
GIT_ORACLE_SNIPPET="https://gitlab.k8s.cloud.statcan.ca/business-transformation/aaw/aaw-contrib-containers/snippets/515.git"
ORACLE_ADMIN_PATH="/opt/oracle/instantclient_23_5/network/admin"
RETRIES_NO=5
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
curl --url "https://gitlab.k8s.cloud.statcan.ca/api/v4/snippets/515/raw" -o /opt/oracle/instantclient_23_5/network/admin/tnsnames.ora && break
echo "Failed to get the tnsnames.ora file. Attempt $i of $RETRIES_NO"
test -z "$GIT_ORACLE_SNIPPET" || git clone "$GIT_ORACLE_SNIPPET" "${ORACLE_ADMIN_PATH}/515" \
&& mv "${ORACLE_ADMIN_PATH}/515/tnsnames.ora" "${ORACLE_ADMIN_PATH}" \
&& rm -rf "${ORACLE_ADMIN_PATH}/515" \
&& break
echo "Failed to clone the tnsnames.ora file. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to get the tnsnames.ora file after $RETRIES_NO retries"
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone the tnsnames.ora after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
done

Expand Down
13 changes: 9 additions & 4 deletions output/jupyterlab-pytorch/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ ! -d ~/aaw-contrib-jupyter-notebooks ]]; then
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break
echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO"
echo "Failed to clone the example notebooks. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
Expand Down Expand Up @@ -208,13 +208,18 @@ fi
# Runs on every startup because this output location is not persisted storage
# Implemented with a retry because it sometimes fails for some reason
echo "Retrieving Oracle tnsnames file"
GIT_ORACLE_SNIPPET="https://gitlab.k8s.cloud.statcan.ca/business-transformation/aaw/aaw-contrib-containers/snippets/515.git"
ORACLE_ADMIN_PATH="/opt/oracle/instantclient_23_5/network/admin"
RETRIES_NO=5
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
curl --url "https://gitlab.k8s.cloud.statcan.ca/api/v4/snippets/515/raw" -o /opt/oracle/instantclient_23_5/network/admin/tnsnames.ora && break
echo "Failed to get the tnsnames.ora file. Attempt $i of $RETRIES_NO"
test -z "$GIT_ORACLE_SNIPPET" || git clone "$GIT_ORACLE_SNIPPET" "${ORACLE_ADMIN_PATH}/515" \
&& mv "${ORACLE_ADMIN_PATH}/515/tnsnames.ora" "${ORACLE_ADMIN_PATH}" \
&& rm -rf "${ORACLE_ADMIN_PATH}/515" \
&& break
echo "Failed to clone the tnsnames.ora file. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to get the tnsnames.ora file after $RETRIES_NO retries"
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone the tnsnames.ora after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
done

Expand Down
13 changes: 9 additions & 4 deletions output/jupyterlab-tensorflow/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ ! -d ~/aaw-contrib-jupyter-notebooks ]]; then
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break
echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO"
echo "Failed to clone the example notebooks. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
Expand Down Expand Up @@ -208,13 +208,18 @@ fi
# Runs on every startup because this output location is not persisted storage
# Implemented with a retry because it sometimes fails for some reason
echo "Retrieving Oracle tnsnames file"
GIT_ORACLE_SNIPPET="https://gitlab.k8s.cloud.statcan.ca/business-transformation/aaw/aaw-contrib-containers/snippets/515.git"
ORACLE_ADMIN_PATH="/opt/oracle/instantclient_23_5/network/admin"
RETRIES_NO=5
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
curl --url "https://gitlab.k8s.cloud.statcan.ca/api/v4/snippets/515/raw" -o /opt/oracle/instantclient_23_5/network/admin/tnsnames.ora && break
echo "Failed to get the tnsnames.ora file. Attempt $i of $RETRIES_NO"
test -z "$GIT_ORACLE_SNIPPET" || git clone "$GIT_ORACLE_SNIPPET" "${ORACLE_ADMIN_PATH}/515" \
&& mv "${ORACLE_ADMIN_PATH}/515/tnsnames.ora" "${ORACLE_ADMIN_PATH}" \
&& rm -rf "${ORACLE_ADMIN_PATH}/515" \
&& break
echo "Failed to clone the tnsnames.ora file. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to get the tnsnames.ora file after $RETRIES_NO retries"
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone the tnsnames.ora after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
done

Expand Down
13 changes: 9 additions & 4 deletions output/remote-desktop/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ ! -d ~/aaw-contrib-jupyter-notebooks ]]; then
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break
echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO"
echo "Failed to clone the example notebooks. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
Expand Down Expand Up @@ -208,13 +208,18 @@ fi
# Runs on every startup because this output location is not persisted storage
# Implemented with a retry because it sometimes fails for some reason
echo "Retrieving Oracle tnsnames file"
GIT_ORACLE_SNIPPET="https://gitlab.k8s.cloud.statcan.ca/business-transformation/aaw/aaw-contrib-containers/snippets/515.git"
ORACLE_ADMIN_PATH="/opt/oracle/instantclient_23_5/network/admin"
RETRIES_NO=5
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
curl --url "https://gitlab.k8s.cloud.statcan.ca/api/v4/snippets/515/raw" -o /opt/oracle/instantclient_23_5/network/admin/tnsnames.ora && break
echo "Failed to get the tnsnames.ora file. Attempt $i of $RETRIES_NO"
test -z "$GIT_ORACLE_SNIPPET" || git clone "$GIT_ORACLE_SNIPPET" "${ORACLE_ADMIN_PATH}/515" \
&& mv "${ORACLE_ADMIN_PATH}/515/tnsnames.ora" "${ORACLE_ADMIN_PATH}" \
&& rm -rf "${ORACLE_ADMIN_PATH}/515" \
&& break
echo "Failed to clone the tnsnames.ora file. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to get the tnsnames.ora file after $RETRIES_NO retries"
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone the tnsnames.ora after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
done

Expand Down
13 changes: 9 additions & 4 deletions output/rstudio/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ ! -d ~/aaw-contrib-jupyter-notebooks ]]; then
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break
echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO"
echo "Failed to clone the example notebooks. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
Expand Down Expand Up @@ -208,13 +208,18 @@ fi
# Runs on every startup because this output location is not persisted storage
# Implemented with a retry because it sometimes fails for some reason
echo "Retrieving Oracle tnsnames file"
GIT_ORACLE_SNIPPET="https://gitlab.k8s.cloud.statcan.ca/business-transformation/aaw/aaw-contrib-containers/snippets/515.git"
ORACLE_ADMIN_PATH="/opt/oracle/instantclient_23_5/network/admin"
RETRIES_NO=5
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
curl --url "https://gitlab.k8s.cloud.statcan.ca/api/v4/snippets/515/raw" -o /opt/oracle/instantclient_23_5/network/admin/tnsnames.ora && break
echo "Failed to get the tnsnames.ora file. Attempt $i of $RETRIES_NO"
test -z "$GIT_ORACLE_SNIPPET" || git clone "$GIT_ORACLE_SNIPPET" "${ORACLE_ADMIN_PATH}/515" \
&& mv "${ORACLE_ADMIN_PATH}/515/tnsnames.ora" "${ORACLE_ADMIN_PATH}" \
&& rm -rf "${ORACLE_ADMIN_PATH}/515" \
&& break
echo "Failed to clone the tnsnames.ora file. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to get the tnsnames.ora file after $RETRIES_NO retries"
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone the tnsnames.ora after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
done

Expand Down
13 changes: 9 additions & 4 deletions output/sas/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ ! -d ~/aaw-contrib-jupyter-notebooks ]]; then
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break
echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO"
echo "Failed to clone the example notebooks. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
Expand Down Expand Up @@ -208,13 +208,18 @@ fi
# Runs on every startup because this output location is not persisted storage
# Implemented with a retry because it sometimes fails for some reason
echo "Retrieving Oracle tnsnames file"
GIT_ORACLE_SNIPPET="https://gitlab.k8s.cloud.statcan.ca/business-transformation/aaw/aaw-contrib-containers/snippets/515.git"
ORACLE_ADMIN_PATH="/opt/oracle/instantclient_23_5/network/admin"
RETRIES_NO=5
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
curl --url "https://gitlab.k8s.cloud.statcan.ca/api/v4/snippets/515/raw" -o /opt/oracle/instantclient_23_5/network/admin/tnsnames.ora && break
echo "Failed to get the tnsnames.ora file. Attempt $i of $RETRIES_NO"
test -z "$GIT_ORACLE_SNIPPET" || git clone "$GIT_ORACLE_SNIPPET" "${ORACLE_ADMIN_PATH}/515" \
&& mv "${ORACLE_ADMIN_PATH}/515/tnsnames.ora" "${ORACLE_ADMIN_PATH}" \
&& rm -rf "${ORACLE_ADMIN_PATH}/515" \
&& break
echo "Failed to clone the tnsnames.ora file. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to get the tnsnames.ora file after $RETRIES_NO retries"
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone the tnsnames.ora after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
done

Expand Down
13 changes: 9 additions & 4 deletions resources/common/start-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [[ ! -d ~/aaw-contrib-jupyter-notebooks ]]; then
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
test -z "$GIT_EXAMPLE_NOTEBOOKS" || git clone "$GIT_EXAMPLE_NOTEBOOKS" && break
echo "Failed to cloned the example notebooks. Attempt $i of $RETRIES_NO"
echo "Failed to clone the example notebooks. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone example notebooks after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
Expand Down Expand Up @@ -208,13 +208,18 @@ fi
# Runs on every startup because this output location is not persisted storage
# Implemented with a retry because it sometimes fails for some reason
echo "Retrieving Oracle tnsnames file"
GIT_ORACLE_SNIPPET="https://gitlab.k8s.cloud.statcan.ca/business-transformation/aaw/aaw-contrib-containers/snippets/515.git"
ORACLE_ADMIN_PATH="/opt/oracle/instantclient_23_5/network/admin"
RETRIES_NO=5
RETRY_DELAY=3
for i in $(seq 1 $RETRIES_NO); do
curl --url "https://gitlab.k8s.cloud.statcan.ca/api/v4/snippets/515/raw" -o /opt/oracle/instantclient_23_5/network/admin/tnsnames.ora && break
echo "Failed to get the tnsnames.ora file. Attempt $i of $RETRIES_NO"
test -z "$GIT_ORACLE_SNIPPET" || git clone "$GIT_ORACLE_SNIPPET" "${ORACLE_ADMIN_PATH}/515" \
&& mv "${ORACLE_ADMIN_PATH}/515/tnsnames.ora" "${ORACLE_ADMIN_PATH}" \
&& rm -rf "${ORACLE_ADMIN_PATH}/515" \
&& break
echo "Failed to clone the tnsnames.ora file. Attempt $i of $RETRIES_NO"
#if it ran all the retries, exit
[[ $i -eq $RETRIES_NO ]] && echo "Failed to get the tnsnames.ora file after $RETRIES_NO retries"
[[ $i -eq $RETRIES_NO ]] && echo "Failed to clone the tnsnames.ora after $RETRIES_NO retries"
sleep ${RETRY_DELAY}
done

Expand Down
Loading