Skip to content

Commit

Permalink
Merge pull request #188 from bitholla/testnet
Browse files Browse the repository at this point in the history
HollaEx CLI v2.0.10 Release
  • Loading branch information
kycfeel authored Mar 30, 2021
2 parents 606703f + 647eb6f commit 5cd3b8a
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
34 changes: 34 additions & 0 deletions hollaex
Original file line number Diff line number Diff line change
Expand Up @@ -1617,11 +1617,13 @@ elif [[ "$1" == "pull" ]]; then
--request GET \
https://$ENVIRONMENT_HOLLAEX_NETWORK_TARGET_SERVER/v2/exchange)


BITHOLLA_USER_EXCHANGE_LIST=$(curl -s -H "Content-Type: application/json" -H "Authorization: Bearer $BITHOLLA_ACCOUNT_TOKEN"\
--request GET \
https://$ENVIRONMENT_HOLLAEX_NETWORK_TARGET_SERVER/v2/exchange \
| jq '.')


if [[ ! "$BITHOLLA_USER_TOKEN_EXPIRY_CHECK" ]] || [[ ! "$BITHOLLA_USER_TOKEN_EXPIRY_CHECK" == "200" ]]; then

printf "\033[91mFailed to pull the exchange data from bitHolla.\033[39m\n\n"
Expand Down Expand Up @@ -3354,6 +3356,16 @@ elif [[ "$1" == "apply" ]]; then
kubectl delete -f $TEMPLATE_GENERATE_PATH/kubernetes/config/$ENVIRONMENT_EXCHANGE_NAME-ingress.yaml

fi

# DROP OLD INGRESS RULES IF IT EXISTS ON THE CLUSTER
if command kubectl get ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order -n $ENVIRONMENT_EXCHANGE_NAME > /dev/null; then

kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-admin
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-explorer
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-docs

fi

run_and_upgrade_hollaex_on_kubernetes;

Expand Down Expand Up @@ -3682,6 +3694,16 @@ elif [[ "$1" == "terminate" ]]; then

fi

# DROP OLD INGRESS RULES IF IT EXISTS ON THE CLUSTER
if command kubectl get ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order -n $ENVIRONMENT_EXCHANGE_NAME > /dev/null; then

kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-admin
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-explorer
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-docs

fi

echo "Running a final backup for the exchange database."
if ! command hollaex toolbox --backup --kube; then

Expand Down Expand Up @@ -5110,6 +5132,16 @@ elif [[ "$1" == "toolbox" ]]; then
echo "Deleting Ingress rules for the exchange..."
kubectl delete -f $TEMPLATE_GENERATE_PATH/kubernetes/config/$ENVIRONMENT_EXCHANGE_NAME-ingress.yaml

# DROP OLD INGRESS RULES IF IT EXISTS ON THE CLUSTER
if command kubectl get ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order -n $ENVIRONMENT_EXCHANGE_NAME > /dev/null; then

kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-order
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-admin
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-api-explorer
kubectl delete -n $ENVIRONMENT_EXCHANGE_NAME ingress/$ENVIRONMENT_EXCHANGE_NAME-ingress-docs

fi


if [[ "$ENVIRONMENT_KUBERNETES_RUN_POSTGRESQL_DB" ]]; then

Expand Down Expand Up @@ -6210,6 +6242,8 @@ elif [[ "$1" == "cloud" ]]; then

# # # END # # #

hollaex pull --skip

if [[ "$HOLLAEX_CLOUD_START" ]]; then

echo -e "\nSending a request to start the stopped exchange on the HollaCloud..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: postgres-backup-to-s3
image: bitholla/postgres-s3-backup-cronjob:psql12.4-awscli
image: bitholla/postgres-s3-backup-cronjob:psql12.6-awscli
env:
- name: AWS_BUCKET
value: {{.Values.awsBucket}}
Expand Down
3 changes: 1 addition & 2 deletions tools_generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2794,12 +2794,11 @@ function hollaex_pull_and_apply_exchange_data() {

#LOGO PATH ESCAPING
local ORIGINAL_CHARACTER_FOR_LOGO_IMAGE=$(echo $BITHOLLA_USER_EXCHANGE_LIST | jq -r ".data[$BITHOLLA_USER_EXCHANGE_ORDER].info.biz.LOGO_IMAGE";)
local HOLLAEX_CONFIGMAP_LOGO_IMAGE_OVERRIDE="${ORIGINAL_CHARACTER_FOR_LOGO_PATH//\//\\/}"
local HOLLAEX_CONFIGMAP_LOGO_IMAGE_OVERRIDE="${ORIGINAL_CHARACTER_FOR_LOGO_IMAGE//\//\\/}"

# Set the default HollaEx Server version as the maximum compatible version of the current release of CLI.
local ENVIRONMENT_DOCKER_IMAGE_VERSION_OVERRIDE="$(cat $HOLLAEX_CLI_INIT_PATH/server/package.json | jq -r '.version')"


# CONFIGMAP
sed -i.bak "s/ENVIRONMENT_EXCHANGE_NAME=.*/ENVIRONMENT_EXCHANGE_NAME=$ENVIRONMENT_EXCHANGE_NAME_OVERRIDE/" $CONFIGMAP_FILE_PATH

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.9
2.0.10

0 comments on commit 5cd3b8a

Please sign in to comment.