From b075c9d2acc28df8633371f568a482d76d9e6d89 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 23 Jan 2024 19:56:12 +0900 Subject: [PATCH 001/115] cli deprecation branch --- nginx/Dockerfile | 8 + .../nginx => nginx}/conf.d/upstream.conf | 0 nginx/docker-compose.yaml | 32 + {server/tools/nginx => nginx}/mime.types | 0 {server/tools/nginx => nginx}/nginx.conf | 0 {server/tools/nginx => nginx}/proxy.conf | 0 {server/tools/nginx => nginx}/static/429.html | 2 +- ...r-compose.yaml => docker-compose-dev.yaml} | 0 server/tools/{Dockerfile.pm2 => Dockerfile} | 0 server/tools/docker-compose-web.yaml | 25 + server/tools/docker-compose.yaml | 148 +++++ server/tools/hollaex-kit.env | 49 ++ server/tools/hollaex-kit.env.local.dev | 88 +++ .../.helmignore | 21 + .../Chart.yaml | 4 + .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 16 + .../templates/deployment.yaml | 58 ++ .../values.yaml | 12 + .../bitholla-hollaex-postgres/.helmignore | 21 + .../bitholla-hollaex-postgres/Chart.yaml | 4 + .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 16 + .../templates/configmap.yaml | 611 ++++++++++++++++++ .../templates/deployment.yaml | 197 ++++++ .../templates/postgres-volume.yaml | 15 + .../templates/service.yaml | 27 + .../bitholla-hollaex-postgres/values.yaml | 37 ++ .../bitholla-hollaex-redis/.helmignore | 21 + .../bitholla-hollaex-redis/Chart.yaml | 4 + .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 16 + .../templates/deployment.yaml | 51 ++ .../templates/service.yaml | 26 + .../bitholla-hollaex-redis/values.yaml | 22 + .../bitholla-hollaex-server/.helmignore | 21 + .../bitholla-hollaex-server/Chart.yaml | 4 + .../templates/_helpers.tpl | 16 + .../templates/autoscaler.yaml | 26 + .../templates/deployment.yaml | 156 +++++ .../templates/job.yaml | 190 ++++++ .../templates/service.yaml | 27 + .../bitholla-hollaex-server/values.yaml | 57 ++ .../bitholla-hollaex-web/.helmignore | 21 + .../bitholla-hollaex-web/Chart.yaml | 4 + .../templates/_helpers.tpl | 16 + .../templates/autoscaler.yaml | 23 + .../templates/deployment.yaml | 74 +++ .../templates/service.yaml | 17 + .../bitholla-hollaex-web/values.yaml | 31 + .../hollaex-network-influxdb/.helmignore | 21 + .../hollaex-network-influxdb/Chart.yaml | 22 + .../hollaex-network-influxdb/OWNERS | 10 + .../hollaex-network-influxdb/README.md | 328 ++++++++++ .../files/backup-retention-script.sh | 66 ++ .../templates/NOTES.txt | 42 ++ .../templates/_helpers.tpl | 63 ++ .../templates/backup-cronjob.yaml | 150 +++++ .../templates/backup-pvc.yaml | 21 + .../templates/backup-retention-configmap.yaml | 11 + .../templates/backup-retention-cronjob.yaml | 75 +++ .../templates/configmap.yaml | 184 ++++++ .../templates/ingress.yaml | 25 + .../templates/init-config.yaml | 10 + .../templates/meta-configmap.yaml | 35 + .../templates/meta-service.yaml | 25 + .../templates/meta-statefulset.yaml | 132 ++++ .../templates/post-install-set-auth.yaml | 92 +++ .../templates/secret.yaml | 17 + .../templates/service.yaml | 53 ++ .../templates/serviceaccount.yaml | 12 + .../templates/statefulset.yaml | 180 ++++++ .../hollaex-network-influxdb/values.yaml | 349 ++++++++++ .../hollaex-network-mongodb/.helmignore | 21 + .../hollaex-network-mongodb/Chart.yaml | 4 + .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 16 + .../templates/deployment.yaml | 62 ++ .../templates/pvc.yaml | 15 + .../templates/service.yaml | 26 + .../hollaex-network-mongodb/values.yaml | 16 + .../hollaex-network-server/.helmignore | 21 + .../hollaex-network-server/Chart.yaml | 4 + .../templates/_helpers.tpl | 16 + .../templates/autoscaler.yaml | 26 + .../templates/cronjob.yaml | 86 +++ .../templates/deployment.yaml | 168 +++++ .../hollaex-network-server/templates/job.yaml | 190 ++++++ .../templates/service.yaml | 23 + .../hollaex-network-server/values.yaml | 46 ++ settings/configmap | 161 ----- settings/secret | 42 -- templates/local/nginx/mime.types | 48 -- templates/local/nginx/nginx.conf | 133 ---- templates/local/nginx/proxy.conf | 11 - .../local/nginx/static/404-nodomain.html | 12 - templates/local/nginx/static/404.html | 12 - templates/local/nginx/static/429.html | 9 - version | 2 +- web/tools/docker-compose-web.yaml | 25 + 100 files changed, 4902 insertions(+), 430 deletions(-) create mode 100644 nginx/Dockerfile rename {server/tools/nginx => nginx}/conf.d/upstream.conf (100%) create mode 100644 nginx/docker-compose.yaml rename {server/tools/nginx => nginx}/mime.types (100%) rename {server/tools/nginx => nginx}/nginx.conf (100%) rename {server/tools/nginx => nginx}/proxy.conf (100%) rename {server/tools/nginx => nginx}/static/429.html (63%) rename server/{docker-compose.yaml => docker-compose-dev.yaml} (100%) rename server/tools/{Dockerfile.pm2 => Dockerfile} (100%) create mode 100644 server/tools/docker-compose-web.yaml create mode 100644 server/tools/docker-compose.yaml create mode 100644 server/tools/hollaex-kit.env create mode 100644 server/tools/hollaex-kit.env.local.dev create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/.helmignore create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/Chart.yaml rename templates/kubernetes/.gitkeep => server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/NOTES.txt (100%) mode change 100644 => 100755 create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/_helpers.tpl create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/values.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/.helmignore create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/Chart.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/NOTES.txt create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/_helpers.tpl create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/configmap.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/deployment.yaml create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/postgres-volume.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/service.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/values.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/.helmignore create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/Chart.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/NOTES.txt create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/_helpers.tpl create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/deployment.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/service.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/values.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/.helmignore create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/_helpers.tpl create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/autoscaler.yaml create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/deployment.yaml create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/job.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/service.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/values.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-web/.helmignore create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-web/Chart.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/_helpers.tpl create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/autoscaler.yaml create mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/deployment.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/service.yaml create mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-web/values.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/.helmignore create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/Chart.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/OWNERS create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/README.md create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/files/backup-retention-script.sh create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/NOTES.txt create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/_helpers.tpl create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-cronjob.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-pvc.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-configmap.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-cronjob.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/configmap.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/ingress.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/init-config.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-configmap.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-service.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-statefulset.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/post-install-set-auth.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/secret.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/service.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/serviceaccount.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/statefulset.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/values.yaml create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/.helmignore create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/Chart.yaml create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/NOTES.txt create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/_helpers.tpl create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/deployment.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/pvc.yaml create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/service.yaml create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/values.yaml create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-server/.helmignore create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-server/Chart.yaml create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/_helpers.tpl create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/autoscaler.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/cronjob.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/deployment.yaml create mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/job.yaml create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/service.yaml create mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-server/values.yaml delete mode 100644 settings/configmap delete mode 100644 settings/secret delete mode 100644 templates/local/nginx/mime.types delete mode 100644 templates/local/nginx/nginx.conf delete mode 100644 templates/local/nginx/proxy.conf delete mode 100644 templates/local/nginx/static/404-nodomain.html delete mode 100644 templates/local/nginx/static/404.html delete mode 100644 templates/local/nginx/static/429.html create mode 100644 web/tools/docker-compose-web.yaml diff --git a/nginx/Dockerfile b/nginx/Dockerfile new file mode 100644 index 0000000000..b636a2f04d --- /dev/null +++ b/nginx/Dockerfile @@ -0,0 +1,8 @@ +FROM nginx:alpine +RUN apk add --no-cache certbot py-pip && \ + apk add --no-cache --virtual .build-deps build-base libffi-dev openssl-dev python3-dev && \ + pip install certbot-nginx && \ + apk del .build-deps +EXPOSE 80 +EXPOSE 443 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/server/tools/nginx/conf.d/upstream.conf b/nginx/conf.d/upstream.conf similarity index 100% rename from server/tools/nginx/conf.d/upstream.conf rename to nginx/conf.d/upstream.conf diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml new file mode 100644 index 0000000000..a959986e05 --- /dev/null +++ b/nginx/docker-compose.yaml @@ -0,0 +1,32 @@ +version: '3' +services: + + hollaex-nginx: + image: nginx-with-certbot + build: + context: . + dockerfile: Dockerfile + restart: unless-stopped + volumes: + - ./:/etc/nginx + - ./logs:/var/log/nginx + - ./static/:/usr/share/nginx/html + - ./letsencrypt:/etc/letsencrypt + ports: + - 80:80 + - 443:443 + environment: + - NGINX_PORT=80 + entrypoint: + - /bin/sh + - -c + - ip -4 route list match 0/0 | awk '{print $$3 " host.access"}' >> /etc/hosts && nginx -g "daemon off;" + networks: + - hollaex-network + +networks: + local_hollaex-network: + external: true + + + diff --git a/server/tools/nginx/mime.types b/nginx/mime.types similarity index 100% rename from server/tools/nginx/mime.types rename to nginx/mime.types diff --git a/server/tools/nginx/nginx.conf b/nginx/nginx.conf similarity index 100% rename from server/tools/nginx/nginx.conf rename to nginx/nginx.conf diff --git a/server/tools/nginx/proxy.conf b/nginx/proxy.conf similarity index 100% rename from server/tools/nginx/proxy.conf rename to nginx/proxy.conf diff --git a/server/tools/nginx/static/429.html b/nginx/static/429.html similarity index 63% rename from server/tools/nginx/static/429.html rename to nginx/static/429.html index 3b90326039..937b15e46b 100644 --- a/server/tools/nginx/static/429.html +++ b/nginx/static/429.html @@ -4,6 +4,6 @@

Too Many Requests

-

There is a limit of 1 requests per second. Try again soon.

+

Please chillex and try again soon.

diff --git a/server/docker-compose.yaml b/server/docker-compose-dev.yaml similarity index 100% rename from server/docker-compose.yaml rename to server/docker-compose-dev.yaml diff --git a/server/tools/Dockerfile.pm2 b/server/tools/Dockerfile similarity index 100% rename from server/tools/Dockerfile.pm2 rename to server/tools/Dockerfile diff --git a/server/tools/docker-compose-web.yaml b/server/tools/docker-compose-web.yaml new file mode 100644 index 0000000000..29a70ad3e2 --- /dev/null +++ b/server/tools/docker-compose-web.yaml @@ -0,0 +1,25 @@ +version: '3' +services: + hollaex-web: + image: bitholla/my-hollaex-web:hollaex-web-2.9.0-2311022010 + build: + context: /Users/kycfeel/Desktop/kit231101/web/ + dockerfile: /Users/kycfeel/Desktop/kit231101/web/docker/Dockerfile + restart: always + deploy: + resources: + limits: + cpus: "0.05" + memory: 128M + reservations: + cpus: "0.05" + memory: 128M + ports: + - 8080:80 + networks: + - local_hollaex-network + +networks: + local_hollaex-network: + external: true + diff --git a/server/tools/docker-compose.yaml b/server/tools/docker-compose.yaml new file mode 100644 index 0000000000..44fdc38c6b --- /dev/null +++ b/server/tools/docker-compose.yaml @@ -0,0 +1,148 @@ +version: '3' +services: + hollaex-redis: + image: redis:7.2.0-alpine + restart: unless-stopped + depends_on: + - hollaex-db + ports: + - 6379:6379 + env_file: + - hollaex.env.local + command : ["sh", "-c", "redis-server --requirepass $${REDIS_PASSWORD}"] + deploy: + resources: + limits: + cpus: "0.1" + memory: 100M + reservations: + cpus: "0.1" + memory: 100M + networks: + - hollaex-network + + hollaex-db: + image: postgres:14.9-alpine + restart: unless-stopped + volumes: + - hollaex_db_vol:/var/lib/postgresql/data + ports: + - 5432:5432 + env_file: + - hollaex.env.local + deploy: + resources: + limits: + cpus: "0.1" + memory: 100M + reservations: + cpus: "0.1" + memory: 100M + command : ["sh", "-c", "export POSTGRES_DB=$${DB_NAME} && export POSTGRES_USER=$${DB_USERNAME} && export POSTGRES_PASSWORD=$${DB_PASSWORD} && ln -sf /usr/local/bin/docker-entrypoint.sh ./docker-entrypoint.sh && ./docker-entrypoint.sh postgres"] + networks: + - hollaex-network + + hollaex-server-api: + image: hollaex/hollaex-kit:2.9.3 + restart: unless-stopped + env_file: + - hollaex.env.local + entrypoint: + - node + deploy: + resources: + limits: + cpus: "0.2" + memory: 1024M + reservations: + cpus: "0.05" + memory: 512M + + command: + - app.js + + ports: + - 10010:10010 + + networks: + - hollaex-network + depends_on: + - hollaex-redis + - hollaex-db + + hollaex-nginx: + image: bitholla/nginx-with-certbot:1.24.0 + restart: unless-stopped + volumes: + - ./nginx:/etc/nginx + - ./logs/nginx:/var/log/nginx + - ./nginx/static/:/usr/share/nginx/html + - ./letsencrypt:/etc/letsencrypt + ports: + - 80:80 + - 443:443 + environment: + - NGINX_PORT=80 + entrypoint: + - /bin/sh + - -c + - ip -4 route list match 0/0 | awk '{print $$3 " host.access"}' >> /etc/hosts && nginx -g "daemon off;" + depends_on: + - hollaex-server-api + networks: + - hollaex-network + + hollaex-server-stream: + image: hollaex/hollaex-kit:2.9.3 + restart: unless-stopped + env_file: + - hollaex.env.local + entrypoint: + - node + deploy: + resources: + limits: + cpus: "0.2" + memory: 512M + reservations: + cpus: "0.05" + memory: 256M + command: + - ws/index.js + ports: + - 10080:10080 + networks: + - hollaex-network + depends_on: + - hollaex-redis + - hollaex-db + + hollaex-server-plugins: + image: hollaex/hollaex-kit:2.9.3 + restart: unless-stopped + env_file: + - hollaex.env.local + entrypoint: + - node + deploy: + resources: + limits: + cpus: "0.2" + memory: 1200M + reservations: + cpus: "0.05" + memory: 700M + command: + - plugins/index.js + - 10011:10011 + networks: + - hollaex-network + depends_on: + - hollaex-redis + - hollaex-db + +networks: + hollaex-network: +volumes: + hollaex_db_vol: + diff --git a/server/tools/hollaex-kit.env b/server/tools/hollaex-kit.env new file mode 100644 index 0000000000..bc34a4a00a --- /dev/null +++ b/server/tools/hollaex-kit.env @@ -0,0 +1,49 @@ +DB_DIALECT=postgres + +ADMIN_EMAIL= +API_HOST=http://localhost/api +API_NAME=hollaex-kit +CURRENCIES=xht,usdt +DB_SSL=false +DEFAULT_THEME=dark +DOMAIN=http://localhost +EMAILS_TIMEZONE=UTC +KIT_VERSION= +KYC_EMAIL= +LOGO_IMAGE=https://bitholla.s3.ap-northeast-2.amazonaws.com/kit/LOGO_IMAGE_LIGHT +LOG_LEVEL=verbose +NETWORK=mainnet +NETWORK_URL=https://api.hollaex.network +NEW_USER_DEFAULT_LANGUAGE=en +NEW_USER_IS_ACTIVATED=true +NODE_ENV=production +PAIRS=xht-usdt +PORT=10010 +SENDER_EMAIL= +SEND_EMAIL_TO_SUPPORT=true +SMTP_PORT=587 +SMTP_SERVER= +SMTP_USER= +SUPERVISOR_EMAIL= +SUPPORT_EMAIL=support@bitholla.com +USER_LEVEL_NUMBER=4 +VALID_LANGUAGES=en +VAULT_NAME= +WEBSOCKET_PORT=10080 + +ACTIVATION_CODE= +API_KEY= +API_SECRET= +DB_HOST=hollaex-kit-db +DB_NAME=hollaex +DB_PASSWORD=my-secure-db-password +DB_PORT=5432 +DB_USERNAME=hollaex +PUBSUB_HOST=hollaex-kit-redis +PUBSUB_PASSWORD=my-secure-redis-password +PUBSUB_PORT=6379 +REDIS_HOST=hollaex-kit-redis +REDIS_PASSWORD=my-secure-redis-password +REDIS_PORT=6379 +SECRET=my-secure-secret +SMTP_PASSWORD= diff --git a/server/tools/hollaex-kit.env.local.dev b/server/tools/hollaex-kit.env.local.dev new file mode 100644 index 0000000000..7e570798f3 --- /dev/null +++ b/server/tools/hollaex-kit.env.local.dev @@ -0,0 +1,88 @@ +DEPLOYMENT_MODE=all + +API_HOST=localhost +API_NAME=hollaex-kit +DOMAIN=http://localhost:3000 +NETWORK=testnet + +ACTIVATION_CODE= + +NATIVE_CURRENCY= + +CURRENCIES=xht,usdt,btc,eth,bch,xrp +DEFAULT_THEME=dark +EMAILS_TIMEZONE=UTC +LOGO_IMAGE= +NEW_USER_DEFAULT_LANGUAGE=en +NEW_USER_IS_ACTIVATED=true +NODE_ENV=development +PAIRS=xht-usdt + +PORT=10010 +WEBSOCKET_PORT=10080 + +PUBSUB_HOST=hollaex-kit-redis +PUBSUB_PORT=6379 +PUBSUB_PASSWORD=bitholla +REDIS_HOST=hollaex-kit-redis +REDIS_PORT=6379 +REDIS_PASSWORD=bitholla + +SENDER_EMAIL=support@holla.tech + +SUPPORT_EMAIL=support@holla.tech +VALID_LANGUAGES=en + + +ADMIN_EMAIL=admin@hollaex.com +ADMIN_PASSWORD= + +ISSUER=bitholla +SECRET=secret +CAPTCHA_SECRET_KEY= +CAPTCHA_SITE_KEY= + +ADMIN_WHITELIST_IP= + +DB_HOST=hollaex-kit-db +DB_NAME=hollaex +DB_PASSWORD=root +DB_PORT=5432 +DB_USERNAME=admin +DB_DIALECT=postgres +DB_SSL=false + +FRESHDESK_HOST= +FRESHDESK_AUTH= +FRESHDESK_KEY= + +ZENDESK_HOST= +ZENDESK_KEY= + +ID_DOCS_BUCKET= +S3_ACCESSKEYID= +S3_SECRETACCESSKEY= +SES_ACCESSKEYID= +SES_REGION= +SES_SECRETACCESSKEY= +SNS_ACCESSKEYID= +SNS_REGION= +SNS_SECRETACCESSKEY= + +SMTP_SERVER= +SMTP_PORT= +SMTP_USER= +SMTP_PASSWORD= + +PLUGINS= + +SEND_EMAIL_TO_SUPPORT= +ALLOWED_DOMAINS= + +API_KEY= +API_SECRET= + +KIT_VERSION= + +MINIO_ROOT_USER=rootuser +MINIO_ROOT_PASSWORD=rootpass123 \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/.helmignore b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/Chart.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/Chart.yaml new file mode 100755 index 0000000000..8f8a530097 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for bitholla-hollaex-postgres-s3-backup-cronjob +name: bitholla-hollaex-postgres-s3-backup-cronjob +version: 0.1.0 diff --git a/templates/kubernetes/.gitkeep b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/NOTES.txt old mode 100644 new mode 100755 similarity index 100% rename from templates/kubernetes/.gitkeep rename to server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/NOTES.txt diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/_helpers.tpl new file mode 100755 index 0000000000..ca1a4a8fd2 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "bitholla-hollaex-postgres-s3-backup-cronjob.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bitholla-hollaex-postgres-s3-backup-cronjob.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml new file mode 100644 index 0000000000..cba9280acc --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml @@ -0,0 +1,58 @@ +apiVersion: batch/v1 +kind: CronJob +metadata: + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + schedule: {{.Values.cronRule}} + successfulJobsHistoryLimit: 3 + failedJobsHistoryLimit: 2 + jobTemplate: + spec: + template: + spec: + containers: + - name: postgres-backup-to-s3 + image: bitholla/postgres-s3-backup-cronjob:psql15-awscli + env: + - name: AWS_BUCKET + value: {{.Values.awsBucket}} + - name: TIMEZONE_SET + value: {{.Values.timeZone}} + - name: AWS_DEFAULT_REGION + value: {{.Values.awsRegion}} + - name: AWS_ACCESS_KEY_ID + value: {{.Values.awsAccessKey}} + - name: AWS_SECRET_ACCESS_KEY + value: {{.Values.awsSecretKey}} + - name: PGUSER + valueFrom: + secretKeyRef: + name: {{.Values.secretName}} + key: DB_USERNAME + - name: PGPASSWORD + valueFrom: + secretKeyRef: + name: {{.Values.secretName}} + key: DB_PASSWORD + - name: PGHOST + valueFrom: + secretKeyRef: + name: {{.Values.secretName}} + key: DB_HOST + - name: PGDATABASE + valueFrom: + secretKeyRef: + name: {{.Values.secretName}} + key: DB_NAME + + args: + - /bin/sh + - -c + {{- if eq .Values.pgdumpMode "pg_dumpall" }} + - export TZ=$TIMEZONE_SET && export TIMESTAMP="$(date +%y%m%d%H%M)" && pg_dumpall > {{.Release.Namespace}}-$TIMESTAMP.dump && echo successfullly dumped "{{.Release.Namespace}}-$TIMESTAMP, Now pushing it to S3." && ls -al && aws s3 cp {{.Release.Namespace}}-$TIMESTAMP.dump s3://$AWS_BUCKET/backup/{{.Release.Namespace}}-postgres/{{.Release.Namespace}}-$TIMESTAMP.dump + {{- else if eq .Values.pgdumpMode "pg_dump" }} + - export TZ=$TIMEZONE_SET && export TIMESTAMP="$(date +%y%m%d%H%M)" && pg_dump -Fc > {{.Release.Namespace}}-$TIMESTAMP.dump && echo successfullly dumped "{{.Release.Namespace}}-$TIMESTAMP, Now pushing it to S3." && ls -al && aws s3 cp {{.Release.Namespace}}-$TIMESTAMP.dump s3://$AWS_BUCKET/backup/{{.Release.Namespace}}-postgres/{{.Release.Namespace}}-$TIMESTAMP.dump + {{- end }} + restartPolicy: OnFailure + diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/values.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/values.yaml new file mode 100755 index 0000000000..d11adf5d76 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/values.yaml @@ -0,0 +1,12 @@ +secretName: + +cronRule: "0 1,13 * * *" + +timeZone: UTC + +pgdumpMode: pg_dump + +awsRegion: +awsBucket: +awsAccessKey: +awsSecretKey: \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/.helmignore b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/Chart.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/Chart.yaml new file mode 100755 index 0000000000..e029e08c0b --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for bitholla-hollaex-postgres +name: bitholla-hollaex-postgres +version: 0.1.0 diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/NOTES.txt new file mode 100755 index 0000000000..e69de29bb2 diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/_helpers.tpl new file mode 100755 index 0000000000..c8f7f8868f --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "bitholla-hollaex-postgres.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bitholla-hollaex-postgres.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/configmap.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/configmap.yaml new file mode 100644 index 0000000000..0efb1ebaae --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/configmap.yaml @@ -0,0 +1,611 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{.Release.Name}}-initdb-remove-local-nopasswd-access + namespace: {{.Release.Namespace}} + labels: + app: {{.Release.Name}} +data: + remove-local-nopasswd-access.sh: |- + #!/bin/bash + grep -v "host all all 127.0.0.1/32 trust" /var/lib/postgresql/data/pg_hba.conf > /var/lib/postgresql/data/pg_hpba.conf.temp && mv /var/lib/postgresql/data/pg_hpba.conf.temp /var/lib/postgresql/data/pg_hba.conf + grep -v "host all all ::1/128 trust" /var/lib/postgresql/data/pg_hba.conf > /var/lib/postgresql/data/pg_hpba.conf.temp && mv /var/lib/postgresql/data/pg_hpba.conf.temp /var/lib/postgresql/data/pg_hba.conf + +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{.Release.Name}}-conf + namespace: {{.Release.Namespace}} + labels: + app: {{.Release.Name}} +data: + postgresql.conf: |- + # ----------------------------- + # PostgreSQL configuration file + # ----------------------------- + # + # This file consists of lines of the form: + # + # name = value + # + # (The "=" is optional.) Whitespace may be used. Comments are introduced with + # "#" anywhere on a line. The complete list of parameter names and allowed + # values can be found in the PostgreSQL documentation. + # + # The commented-out settings shown in this file represent the default values. + # Re-commenting a setting is NOT sufficient to revert it to the default value; + # you need to reload the server. + # + # This file is read on server startup and when the server receives a SIGHUP + # signal. If you edit the file on a running system, you have to SIGHUP the + # server for the changes to take effect, or use "pg_ctl reload". Some + # parameters, which are marked below, require a server shutdown and restart to + # take effect. + # + # Any parameter can also be given as a command-line option to the server, e.g., + # "postgres -c log_connections=on". Some parameters can be changed at run time + # with the "SET" SQL command. + # + # Memory units: kB = kilobytes Time units: ms = milliseconds + # MB = megabytes s = seconds + # GB = gigabytes min = minutes + # TB = terabytes h = hours + # d = days + #------------------------------------------------------------------------------ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + # The default values of these variables are driven from the -D command-line + # option or PGDATA environment variable, represented here as ConfigDir. + #data_directory = 'ConfigDi' # use data in another directory + # (change requires restart) + #hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file + # (change requires restart) + #ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file + # (change requires restart) + # If external_pid_file is not explicitly set, no extra PID file is written. + #external_pid_file = '' # write an extra PID file + # (change requires restart) + #------------------------------------------------------------------------------ + # CONNECTIONS AND AUTHENTICATION + #------------------------------------------------------------------------------ + # - Connection Settings - + listen_addresses = '*' + # comma-separated list of addresses; + # defaults to 'localhost'; use '*' for all + # (change requires restart) + #port = 5432 # (change requires restart) + max_connections = 500 # (change requires restart) + #superuser_reserved_connections = 3 # (change requires restart) + #unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories + # (change requires restart) + #unix_socket_group = '' # (change requires restart) + #unix_socket_permissions = 0777 # begin with 0 to use octal notation + # (change requires restart) + #bonjour = off # advertise server via Bonjour + # (change requires restart) + #bonjour_name = '' # defaults to the computer name + # (change requires restart) + # - Security and Authentication - + #authentication_timeout = 1min # 1s-600s + #ssl = off # (change requires restart) + #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers + # (change requires restart) + #ssl_prefer_server_ciphers = on # (change requires restart) + #ssl_ecdh_curve = 'prime256v1' # (change requires restart) + #ssl_cert_file = 'server.crt' # (change requires restart) + #ssl_key_file = 'server.key' # (change requires restart) + #ssl_ca_file = '' # (change requires restart) + #ssl_crl_file = '' # (change requires restart) + #password_encryption = on + #db_user_namespace = off + #row_security = on + # GSSAPI using Kerberos + #krb_server_keyfile = '' + #krb_caseins_users = off + # - TCP Keepalives - + # see "man 7 tcp" for details + #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; + # 0 selects the system default + #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; + # 0 selects the system default + #tcp_keepalives_count = 0 # TCP_KEEPCNT; + # 0 selects the system default + #------------------------------------------------------------------------------ + # RESOURCE USAGE (except WAL) + #------------------------------------------------------------------------------ + # - Memory - + shared_buffers = 128MB # min 128kB + # (change requires restart) + #huge_pages = try # on, off, or try + # (change requires restart) + #temp_buffers = 8MB # min 800kB + #max_prepared_transactions = 0 # zero disables the feature + # (change requires restart) + # Caution: it is not advisable to set max_prepared_transactions nonzero unless + # you actively intend to use prepared transactions. + #work_mem = 4MB # min 64kB + #maintenance_work_mem = 64MB # min 1MB + #replacement_sort_tuples = 150000 # limits use of replacement selection sort + #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem + #max_stack_depth = 2MB # min 100kB + dynamic_shared_memory_type = posix # the default is the first option + # supported by the operating system: + # posix + # sysv + # windows + # mmap + # use none to disable dynamic shared memory + # (change requires restart) + # - Disk - + #temp_file_limit = -1 # limits per-process temp file space + # in kB, or -1 for no limit + # - Kernel Resource Usage - + #max_files_per_process = 1000 # min 25 + # (change requires restart) + #shared_preload_libraries = '' # (change requires restart) + # - Cost-Based Vacuum Delay - + #vacuum_cost_delay = 0 # 0-100 milliseconds + #vacuum_cost_page_hit = 1 # 0-10000 credits + #vacuum_cost_page_miss = 10 # 0-10000 credits + #vacuum_cost_page_dirty = 20 # 0-10000 credits + #vacuum_cost_limit = 200 # 1-10000 credits + # - Background Writer - + #bgwriter_delay = 200ms # 10-10000ms between rounds + #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round + #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round + #bgwriter_flush_after = 512kB # measured in pages, 0 disables + # - Asynchronous Behavior - + #effective_io_concurrency = 1 # 1-1000; 0 disables prefetching + #max_worker_processes = 8 # (change requires restart) + #max_parallel_workers_per_gather = 0 # taken from max_worker_processes + #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate + # (change requires restart) + #backend_flush_after = 0 # measured in pages, 0 disables + #------------------------------------------------------------------------------ + # WRITE AHEAD LOG + #------------------------------------------------------------------------------ + # - Settings - + #wal_level = minimal # minimal, replica, or logical + # (change requires restart) + #fsync = on # flush data to disk for crash safety + # (turning this off can cause + # unrecoverable data corruption) + #synchronous_commit = on # synchronization level; + # off, local, remote_write, remote_apply, or on + #wal_sync_method = fsync # the default is the first option + # supported by the operating system: + # open_datasync + # fdatasync (default on Linux) + # fsync + # fsync_writethrough + # open_sync + #full_page_writes = on # recover from partial page writes + #wal_compression = off # enable compression of full-page writes + #wal_log_hints = off # also do full page writes of non-critical updates + # (change requires restart) + #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers + # (change requires restart) + #wal_writer_delay = 200ms # 1-10000 milliseconds + #wal_writer_flush_after = 1MB # measured in pages, 0 disables + #commit_delay = 0 # range 0-100000, in microseconds + #commit_siblings = 5 # range 1-1000 + # - Checkpoints - + #checkpoint_timeout = 5min # range 30s-1d + #max_wal_size = 1GB + #min_wal_size = 80MB + #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 + #checkpoint_flush_after = 256kB # measured in pages, 0 disables + #checkpoint_warning = 30s # 0 disables + # - Archiving - + #archive_mode = off # enables archiving; off, on, or always + # (change requires restart) + #archive_command = '' # command to use to archive a logfile segment + # placeholders: %p = path of file to archive + # %f = file name only + # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' + #archive_timeout = 0 # force a logfile segment switch after this + # number of seconds; 0 disables + #------------------------------------------------------------------------------ + # REPLICATION + #------------------------------------------------------------------------------ + # - Sending Server(s) - + # Set these on the master and on any standby that will send replication data. + #max_wal_senders = 0 # max number of walsender processes + # (change requires restart) + #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables + #wal_sender_timeout = 60s # in milliseconds; 0 disables + #max_replication_slots = 0 # max number of replication slots + # (change requires restart) + #track_commit_timestamp = off # collect timestamp of transaction commit + # (change requires restart) + # - Master Server - + # These settings are ignored on a standby server. + #synchronous_standby_names = '' # standby servers that provide sync rep + # number of sync standbys and comma-separated list of application_name + # from standby(s); '*' = all + #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed + # - Standby Servers - + # These settings are ignored on a master server. + #hot_standby = off # "on" allows queries during recovery + # (change requires restart) + #max_standby_archive_delay = 30s # max delay before canceling queries + # when reading WAL from archive; + # -1 allows indefinite delay + #max_standby_streaming_delay = 30s # max delay before canceling queries + # when reading streaming WAL; + # -1 allows indefinite delay + #wal_receiver_status_interval = 10s # send replies at least this often + # 0 disables + #hot_standby_feedback = off # send info from standby to prevent + # query conflicts + #wal_receiver_timeout = 60s # time that receiver waits for + # communication from master + # in milliseconds; 0 disables + #wal_retrieve_retry_interval = 5s # time to wait before retrying to + # retrieve WAL after a failed attempt + #------------------------------------------------------------------------------ + # QUERY TUNING + #------------------------------------------------------------------------------ + # - Planner Method Configuration - + #enable_bitmapscan = on + #enable_hashagg = on + #enable_hashjoin = on + #enable_indexscan = on + #enable_indexonlyscan = on + #enable_material = on + #enable_mergejoin = on + #enable_nestloop = on + #enable_seqscan = on + #enable_sort = on + #enable_tidscan = on + # - Planner Cost Constants - + #seq_page_cost = 1.0 # measured on an arbitrary scale + #random_page_cost = 4.0 # same scale as above + #cpu_tuple_cost = 0.01 # same scale as above + #cpu_index_tuple_cost = 0.005 # same scale as above + #cpu_operator_cost = 0.0025 # same scale as above + #parallel_tuple_cost = 0.1 # same scale as above + #parallel_setup_cost = 1000.0 # same scale as above + #min_parallel_relation_size = 8MB + #effective_cache_size = 4GB + # - Genetic Query Optimizer - + #geqo = on + #geqo_threshold = 12 + #geqo_effort = 5 # range 1-10 + #geqo_pool_size = 0 # selects default based on effort + #geqo_generations = 0 # selects default based on effort + #geqo_selection_bias = 2.0 # range 1.5-2.0 + #geqo_seed = 0.0 # range 0.0-1.0 + # - Other Planner Options - + #default_statistics_target = 100 # range 1-10000 + #constraint_exclusion = partition # on, off, or partition + #cursor_tuple_fraction = 0.1 # range 0.0-1.0 + #from_collapse_limit = 8 + #join_collapse_limit = 8 # 1 disables collapsing of explicit + # JOIN clauses + #force_parallel_mode = off + #------------------------------------------------------------------------------ + # ERROR REPORTING AND LOGGING + #------------------------------------------------------------------------------ + # - Where to Log - + log_destination = 'stderr' # Valid values are combinations of + # stderr, csvlog, syslog, and eventlog, + # depending on platform. csvlog + # requires logging_collector to be on. + # This is used when logging to stderr: + logging_collector = on # Enable capturing of stderr and csvlog + # into log files. Required to be on for + # csvlogs. + # (change requires restart) + # These are only used if logging_collector is on: + log_directory = '/etc/postgres-logs' # directory where log files are written, + # can be absolute or relative to PGDATA + log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, + #log_filename = 'postgresql.log' # log file name pattern, + # can include strftime() escapes + log_file_mode = 0600 # creation mode for log files, + # begin with 0 to use octal notation + #log_truncate_on_rotation = off # If on, an existing log file with the + # same name as the new log file will be + # truncated rather than appended to. + # But such truncation only occurs on + # time-driven rotation, not on restarts + # or size-driven rotation. Default is + # off, meaning append to existing files + # in all cases. + log_rotation_age = 1d # Automatic rotation of logfiles will + # happen after that time. 0 disables. + #log_rotation_size = 10MB # Automatic rotation of logfiles will + # happen after that much log output. + # 0 disables. + # These are relevant when logging to syslog: + #syslog_facility = 'LOCAL0' + #syslog_ident = 'postgres' + #syslog_sequence_numbers = on + #syslog_split_messages = on + # This is only relevant when logging to eventlog (win32): + # (change requires restart) + #event_source = 'PostgreSQL' + # - When to Log - + #client_min_messages = notice # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # log + # notice + # warning + # error + log_min_messages = warning # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic + log_min_error_statement = error # values in order of decreasing detail: + # debug5 + # debug4 + # debug3 + # debug2 + # debug1 + # info + # notice + # warning + # error + # log + # fatal + # panic (effectively off) + log_min_duration_statement = 0 # -1 is disabled, 0 logs all statements + # and their durations, > 0 logs only + # statements running at least this number + # of milliseconds + # - What to Log - + #debug_print_parse = off + #debug_print_rewritten = off + #debug_print_plan = off + #debug_pretty_print = on + #log_checkpoints = off + #log_connections = on + #log_disconnections = on + #log_duration = on + #log_error_verbosity = default # terse, default, or verbose messages + #log_hostname = off + log_line_prefix = '%m [%p] %u@%d ' # special values: + #log_lock_waits = off # log lock waits >= deadlock_timeout + #log_statement = 'all' # none, ddl, mod, all + #log_replication_commands = off + #log_temp_files = -1 # log temporary files equal or larger + # than the specified size in kilobytes; + # -1 disables, 0 logs all temp files + log_timezone = 'UTC' + # - Process Title - + #cluster_name = '' # added to process titles if nonempty + # (change requires restart) + #update_process_title = on + #------------------------------------------------------------------------------ + # RUNTIME STATISTICS + #------------------------------------------------------------------------------ + # - Query/Index Statistics Collector - + #track_activities = on + #track_counts = on + #track_io_timing = off + #track_functions = none # none, pl, all + #track_activity_query_size = 1024 # (change requires restart) + #stats_temp_directory = 'pg_stat_tmp' + # - Statistics Monitoring - + #log_parser_stats = off + #log_planner_stats = off + #log_executor_stats = off + #log_statement_stats = off + #------------------------------------------------------------------------------ + # AUTOVACUUM PARAMETERS + #------------------------------------------------------------------------------ + #autovacuum = on # Enable autovacuum subprocess? 'on' + # requires track_counts to also be on. + #log_autovacuum_min_duration = 0 # -1 disables, 0 logs all actions and + # their durations, > 0 logs only + # actions running at least this number + # of milliseconds. + #autovacuum_max_workers = 3 # max number of autovacuum subprocesses + # (change requires restart) + #autovacuum_naptime = 1min # time between autovacuum runs + #autovacuum_vacuum_threshold = 50 # min number of row updates before + # vacuum + #autovacuum_analyze_threshold = 50 # min number of row updates before + # analyze + #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum + #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze + #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum + # (change requires restart) + #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age + # before forced vacuum + # (change requires restart) + #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for + # autovacuum, in milliseconds; + # -1 means use vacuum_cost_delay + #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for + # autovacuum, -1 means use + # vacuum_cost_limit + #------------------------------------------------------------------------------ + # CLIENT CONNECTION DEFAULTS + #------------------------------------------------------------------------------ + # - Statement Behavior - + #search_path = '"$user", public' # schema names + #default_tablespace = '' # a tablespace name, '' uses the default + #temp_tablespaces = '' # a list of tablespace names, '' uses + # only default tablespace + #check_function_bodies = on + #default_transaction_isolation = 'read committed' + #default_transaction_read_only = off + #default_transaction_deferrable = off + #session_replication_role = 'origin' + #statement_timeout = 0 # in milliseconds, 0 is disabled + #lock_timeout = 0 # in milliseconds, 0 is disabled + #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled + #vacuum_freeze_min_age = 50000000 + #vacuum_freeze_table_age = 150000000 + #vacuum_multixact_freeze_min_age = 5000000 + #vacuum_multixact_freeze_table_age = 150000000 + #bytea_output = 'hex' # hex, escape + #xmlbinary = 'base64' + #xmloption = 'content' + #gin_fuzzy_search_limit = 0 + #gin_pending_list_limit = 4MB + # - Locale and Formatting - + datestyle = 'iso, mdy' + #intervalstyle = 'postgres' + timezone = 'UTC' + #timezone_abbreviations = 'Default' # Select the set of available time zone + # abbreviations. Currently, there are + # Default + # Australia (historical usage) + # India + # You can create your own file in + # share/timezonesets/. + #extra_float_digits = 0 # min -15, max 3 + #client_encoding = sql_ascii # actually, defaults to database + # encoding + # These settings are initialized by initdb, but they can be changed. + lc_messages = 'en_US.utf8' # locale for system error message + # strings + lc_monetary = 'en_US.utf8' # locale for monetary formatting + lc_numeric = 'en_US.utf8' # locale for number formatting + lc_time = 'en_US.utf8' # locale for time formatting + # default configuration for text search + default_text_search_config = 'pg_catalog.english' + # - Other Defaults - + #dynamic_library_path = '$libdir' + #local_preload_libraries = '' + #session_preload_libraries = '' + #------------------------------------------------------------------------------ + # LOCK MANAGEMENT + #------------------------------------------------------------------------------ + #deadlock_timeout = 1s + #max_locks_per_transaction = 64 # min 10 + # (change requires restart) + #max_pred_locks_per_transaction = 64 # min 10 + # (change requires restart) + #------------------------------------------------------------------------------ + # VERSION/PLATFORM COMPATIBILITY + #------------------------------------------------------------------------------ + # - Previous PostgreSQL Versions - + #array_nulls = on + #backslash_quote = safe_encoding # on, off, or safe_encoding + #default_with_oids = off + #escape_string_warning = on + #lo_compat_privileges = off + #operator_precedence_warning = off + #quote_all_identifiers = off + #sql_inheritance = on + #standard_conforming_strings = on + #synchronize_seqscans = on + # - Other Platforms and Clients - + #transform_null_equals = off + #------------------------------------------------------------------------------ + # ERROR HANDLING + #------------------------------------------------------------------------------ + #exit_on_error = off # terminate session on any error? + #restart_after_crash = on # reinitialize after backend crash? + #------------------------------------------------------------------------------ + # CONFIG FILE INCLUDES + #------------------------------------------------------------------------------ + # These options allow settings to be loaded from files other than the + # default postgresql.conf. + #include_dir = 'conf.d' # include files ending in '.conf' from + # directory 'conf.d' + #include_if_exists = 'exists.conf' # include file only if it exists + #include = 'special.conf' # include file + #------------------------------------------------------------------------------ + # CUSTOMIZED OPTIONS + #------------------------------------------------------------------------------ + # Add settings for extensions here +{{- if .Values.filebeat }} +{{- if .Values.filebeat.create }} +--- + +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgres-filebeat-exporter-config + namespace: {{.Release.Namespace}} + labels: + app: {{.Release.Name}} +data: + filebeat.yml: |- + filebeat.config: + inputs: + # Mounted `filebeat-inputs` configmap: + path: ${path.config}/inputs.d/*.yml + # Reload inputs configs as they change: + reload.enabled: false + modules: + path: ${path.config}/modules.d/*.yml + # Reload module configs as they change: + reload.enabled: false + # To enable hints based autodiscover, remove `filebeat.config.inputs` configuration and uncomment this: + #filebeat.autodiscover: + # providers: + # - type: kubernetes + # hints.enabled: true + processors: + - add_cloud_metadata: + setup.kibana: + host: "http://${KIBANA_HOST}:5601" + output.elasticsearch: + hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}'] + +# --- +# apiVersion: v1 +# kind: ConfigMap +# metadata: +# name: postgres-filebeat-exporter-inputs +# namespace: {{.Release.Namespace}} +# labels: +# app: {{.Release.Name}} +# data: +# postgresql.yml: |- +# - input_type: log +# paths: +# - /usr/share/filebeat/logs/*.log +# document_type: postgres + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgres-filebeat-exporter-modules + namespace: {{.Release.Namespace}} + labels: + app: {{.Release.Name}} +data: + postgresql.yml: |- + - module: postgresql + log: + enabled: true + var.paths: ["/usr/share/filebeat/logs/*.log"] + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgres-log-rotater-cronjob + namespace: {{.Release.Namespace}} + labels: + app: {{.Release.Name}} +data: + root: |- + + 0 1 * * * targetdate=`date +%Y-%m-%d -d '3 days ago'` && rm /tmp/logs/postgresql-${targetdate}_*.log && echo Removed logs of ${targetdate} >> /tmp/cron.log + +{{- end }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/deployment.yaml new file mode 100755 index 0000000000..c47e1e3ef8 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/deployment.yaml @@ -0,0 +1,197 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{.Release.Name}} + name: {{.Release.Name}} + namespace: {{.Release.namespace}} +spec: + replicas: 1 + + strategy: + type: Recreate + + selector: + matchLabels: + app: {{.Release.Name}} + role: master + tier: backend + template: + metadata: + labels: + app: {{.Release.Name}} + role: master + tier: backend + spec: + volumes: + - name: {{.Release.Name}}-initdb-remove-local-nopasswd-access + configMap: + defaultMode: 0755 + name: {{.Release.Name}}-initdb-remove-local-nopasswd-access + - name: postgres-mount + persistentVolumeClaim: + claimName: {{.Values.pvc.name}} + - name: postgres-conf + configMap: + name: {{.Release.Name}}-conf + - name: shared-data + emptyDir: {} + {{- if .Values.filebeat }} + {{- if .Values.filebeat.create }} + + - name: filebeat-config + configMap: + defaultMode: 0600 + name: postgres-filebeat-exporter-config + - name: filebeat-modules + configMap: + defaultMode: 0600 + name: postgres-filebeat-exporter-modules + - name: filebeat-data + hostPath: + path: /var/lib/filebeat-data + type: DirectoryOrCreate + - name: cron-rules + configMap: + #defaultMode: 0600 + name: postgres-log-rotater-cronjob + + {{- end }} + {{- end }} + + imagePullSecrets: + - name: bitholla-registry-secret + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + resources: + limits: + memory: {{.Values.resources.limits.memory}} + cpu: {{.Values.resources.limits.cpu}} + requests: + memory: {{.Values.resources.requests.memory}} + cpu: {{.Values.resources.requests.cpu}} + env: + - name: POSTGRES_DB + valueFrom: + secretKeyRef: + name: {{.Values.secretName}} + key: DB_NAME + - name: POSTGRES_PASSWORD + valueFrom: + secretKeyRef: + name: {{.Values.secretName}} + key: DB_PASSWORD + - name: POSTGRES_USER + valueFrom: + secretKeyRef: + name: {{.Values.secretName}} + key: DB_USERNAME + imagePullPolicy: IfNotPresent + + {{- if .Values.filebeat }} + {{- if .Values.filebeat.create }} + + args: ["-c", "config_file=/etc/postgresql.conf"] + + securityContext: + runAsUser: 999 + + {{- end }} + {{- end }} + + ports: + - name: port + containerPort: 5432 + volumeMounts: + - name: postgres-mount + mountPath: /var/lib/postgresql/data + subPath: data + - name: postgres-conf + mountPath: /etc/postgresql.conf + subPath: postgresql.conf + - name: {{.Release.Name}}-initdb-remove-local-nopasswd-access + mountPath: /docker-entrypoint-initdb.d/remove-local-nopasswd-access.sh + subPath: remove-local-nopasswd-access.sh + - name: shared-data + mountPath: /etc/postgres-logs + + {{- if .Values.filebeat }} + {{- if .Values.filebeat.create }} + + - image: "{{ .Values.filebeat.image.repository }}:{{ .Values.filebeat.image.tag }}" + imagePullPolicy: "{{ .Values.filebeat.image.pullPolicy }}" + name: postgres-filebeat-exporter + dnsPolicy: ClusterFirstWithHostNet + args: [ + "-c", "/etc/filebeat.yml", + "-e", + ] + resources: + limits: + memory: {{.Values.resources.limits.memory}} + cpu: {{.Values.resources.limits.cpu}} + requests: + memory: {{.Values.resources.requests.memory}} + cpu: {{.Values.resources.requests.cpu}} + env: + - name: ELASTICSEARCH_HOST + value: "{{ .Values.filebeat.elasticsearch_host }}" + - name: ELASTICSEARCH_PORT + value: "{{ .Values.filebeat.elasticsearch_port }}" + - name: KIBANA_HOST + value: "{{ .Values.filebeat.kibana_host }}" + resources: + limits: + cpu: 1 + memory: 1Gi + requests: + cpu: 50m + memory: 100Mi + securityContext: + runAsUser: 0 + volumeMounts: + - name: filebeat-config + mountPath: /etc/filebeat.yml + readOnly: true + subPath: filebeat.yml + # - name: filebeat-inputs + # mountPath: /usr/share/filebeat/inputs.d + # readOnly: true + - name: filebeat-modules + mountPath: /usr/share/filebeat/modules.d + readOnly: true + - name: filebeat-data + mountPath: /usr/share/filebeat/data + - name: shared-data + mountPath: /usr/share/filebeat/logs + readOnly: true + + ## Log rotater + - image: "bitholla/devops-tools:alpine_coretuils-3.6" + #imagePullPolicy: "Always" + name: postgres-log-rotater + #dnsPolicy: ClusterFirstWithHostNet + command: ["/bin/sh", "-c"] #0 0 * * 0 + #args: ["-c", "touch /etc/cron.d/cron-rmlogs && echo '* * * * * root rm /tmp/logs/*' > /etc/cron.d/cron-rmlogs && chmod 0644 /etc/cron.d/cron-rmlogs && service cron start"] + args: + - echo "Container will daily remove logs from Postgres automatically."; + crond; + touch /tmp/cron.log; + tail -f /tmp/cron.log; + + securityContext: + runAsUser: 0 + volumeMounts: + - name: shared-data + mountPath: /tmp/logs + - name: cron-rules + mountPath: /etc/crontabs + {{- end }} + {{- end }} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/postgres-volume.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/postgres-volume.yaml new file mode 100644 index 0000000000..bd3dd06225 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/postgres-volume.yaml @@ -0,0 +1,15 @@ +{{- if .Values.pvc.create }} + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{.Values.pvc.name}} + namespace: {{.Release.namespace}} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{.Values.pvc.size}} + +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/service.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/service.yaml new file mode 100755 index 0000000000..e11ae6c0ad --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/service.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{.Release.Name}} + namespace: {{.Release.namespace}} + labels: + app: {{.Release.Name}} +spec: + {{if .Values.NodePort.enable }} + + type: NodePort + ports: + - port: 5432 + targetPort: 5432 + nodePort: {{.Values.nodePort}} + + {{ else }} + + type: ClusterIP + ports: + - port: 5432 + targetPort: 5432 + + {{ end }} + + selector: + app: {{.Release.Name}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/values.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/values.yaml new file mode 100755 index 0000000000..de530d0e95 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/values.yaml @@ -0,0 +1,37 @@ +# Default values for bitholla-hollaex-nginx. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +pvc: + create: false + size: 2Gi + name: hollaex-postgres-volume + +secretName: hollaex-secret + +NodePort: + enable: false + port: + +nodeSelector: {} + +imageRegistry: postgres +dockerTag: 10.9 + +resources: + limits: + cpu: "100m" + memory: "512Mi" + requests: + cpu: "10m" + memory: "50Mi" + +filebeat: + create: false + image: + repository: docker.elastic.co/beats/filebeat + tag: "6.5.4" + pullPolicy: IfNotPresent + kibana_host: es-kibana.elasticsearch + elasticsearch_host: es-elasticsearch-client.elasticsearch + elasticsearch_port: 9200 + \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/.helmignore b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/Chart.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/Chart.yaml new file mode 100755 index 0000000000..5659d0e071 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for bitholla-hollaex-redis +name: bitholla-hollaex-redis +version: 0.1.0 diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/NOTES.txt new file mode 100755 index 0000000000..e69de29bb2 diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/_helpers.tpl new file mode 100755 index 0000000000..043ba16132 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "bitholla-hollaex-redis.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bitholla-hollaex-redis.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/deployment.yaml new file mode 100755 index 0000000000..5617eacd3b --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/deployment.yaml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{.Release.Name}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: {{.Release.Name}} + role: master + tier: backend + template: + metadata: + labels: + app: {{.Release.Name}} + role: master + tier: backend + spec: + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + imagePullPolicy: IfNotPresent + ports: + - name: port + containerPort: 6379 + command: ["redis-server", "--requirepass", "$(REDIS_AUTH_PASSWORD)"] + env: + - name: REDIS_AUTH_PASSWORD + valueFrom: + secretKeyRef: + name: {{.Values.setAuth.secretName}} + key: REDIS_PASSWORD + + resources: + limits: + memory: {{.Values.resources.limits.memory}} + cpu: {{.Values.resources.limits.cpu}} + requests: + memory: {{.Values.resources.requests.memory}} + cpu: {{.Values.resources.requests.cpu}} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/service.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/service.yaml new file mode 100755 index 0000000000..3135d5f8c7 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/service.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} + labels: + app: {{.Release.Name}} +spec: + {{if .Values.NodePort.enable }} + + type: NodePort + ports: + - port: 6379 + targetPort: 6379 + nodePort: {{.Values.NodePort.port}} + + {{ else }} + + type: ClusterIP + ports: + - port: 6379 + targetPort: 6379 + + {{ end }} + selector: + app: {{.Release.Name}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/values.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/values.yaml new file mode 100755 index 0000000000..787d28a710 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/values.yaml @@ -0,0 +1,22 @@ +# Default values for bitholla-hollaex-nginx. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +NodePort: + enable: false + port: 30000 + +nodeSelector: {} + +imageRegistry: redis +dockerTag: 5.0.5-alpine + +setAuth: + secretName: hollaex-secret + +resources: + limits: + cpu: "100m" + memory: "512Mi" + requests: + cpu: "10m" + memory: "50Mi" \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/.helmignore b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml new file mode 100644 index 0000000000..c17c2c3e8e --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for HollaEx Kit +name: hollaex-kit +version: 2.9.2 \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/_helpers.tpl new file mode 100755 index 0000000000..7a6b694414 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "bitholla-hollaex-server.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bitholla-hollaex-server.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/autoscaler.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/autoscaler.yaml new file mode 100644 index 0000000000..d74fa93d44 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/autoscaler.yaml @@ -0,0 +1,26 @@ +{{- if .Values.autoScaling.hpa.enable }} + +{{- $minReplicas := .Values.stable.replicaCount | int }} +{{- $maxReplicas := add 1 $minReplicas }} + +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{.Release.Name}} + minReplicas: {{ $minReplicas }} + maxReplicas: {{ $maxReplicas }} + metrics: + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoScaling.hpa.memory.threshold }} + +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/deployment.yaml new file mode 100644 index 0000000000..022739d3b4 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/deployment.yaml @@ -0,0 +1,156 @@ +{{- if eq .Values.job.enable false }} + +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + revisionHistoryLimit: 3 + replicas: {{.Values.stable.replicaCount}} + +{{- if or (eq .Values.DEPLOYMENT_MODE "api") (eq .Values.DEPLOYMENT_MODE "stream") }} + + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + +{{- else }} + + strategy: + type: Recreate + +{{- end }} + +{{- if eq .Values.DEPLOYMENT_MODE "api" }} + minReadySeconds: 15 +{{- end }} + + selector: + matchLabels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + tier: backend + template: + metadata: + # annotations: + # seccomp.security.alpha.kubernetes.io/pod: "runtime/default" + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + tier: backend + spec: + + securityContext: + seccompProfile: + type: RuntimeDefault + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: role + operator: In + values: + - {{.Release.Namespace}} + topologyKey: "kubernetes.io/hostname" + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + imagePullPolicy: IfNotPresent + + securityContext: + allowPrivilegeEscalation: false + +{{- if eq .Values.DEPLOYMENT_MODE "api" }} + + command: ["/bin/bash"] + args: ["-c", "node app.js"] + +{{- else if eq .Values.DEPLOYMENT_MODE "stream" }} + + command: ["/bin/bash"] + args: ["-c", "node ws/index.js"] + +{{- else if eq .Values.DEPLOYMENT_MODE "plugins" }} + + command: ["/bin/bash"] + args: ["-c", "node plugins/index.js"] + +{{- end }} + + ports: + - name: websocket-port + containerPort: 10080 + - name: port + containerPort: 10010 + - name: plugins-port + containerPort: 10011 + + envFrom: + - configMapRef: + name: {{.Values.envName}} + - secretRef: + name: {{.Values.secretName}} + env: + - name: PAIR + value: {{.Values.PAIR}} + - name: ELASTIC_APM_SERVICE_NAME + value: {{.Release.Name}} + + resources: + limits: + memory: {{.Values.resources.limits.memory}} + cpu: {{.Values.resources.limits.cpu}} + requests: + memory: {{.Values.resources.requests.memory}} + cpu: {{.Values.resources.requests.cpu}} + +{{- if .Values.podRestart_webhook_url }} + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "export hostname=`hostname` && curl -X POST -H 'Content-type: application/json' --data '{\"attachments\": [ { \"color\": \"#A569BD\", \"title\": \"😵 Pod has been terminated!\", \"text\": \"Pod '\"${hostname}\"' just has been terminated.\" } ] }' {{.Values.podRestart_webhook_url}}"] +{{- end }} + +{{- if eq .Values.DEPLOYMENT_MODE "api" }} + readinessProbe: + exec: + command: + - curl + - http://localhost:10010/v2/health + initialDelaySeconds: 1 + periodSeconds: 15 +{{- end }} + +{{- if eq .Values.DEPLOYMENT_MODE "stream" }} + readinessProbe: + exec: + command: + - curl + - http://localhost:10080 + initialDelaySeconds: 1 + periodSeconds: 15 + +{{- end }} + +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/job.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/job.yaml new file mode 100644 index 0000000000..959e5e0b54 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/job.yaml @@ -0,0 +1,190 @@ +{{- if .Values.job.enable }} + +apiVersion: batch/v1 +kind: Job +metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + template: + spec: + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + command: ["/bin/bash", "-c"] + +{{- if eq .Values.job.mode "add_coin" }} + + args: + - node tools/dbs/addCoin.js; + +{{- else if eq .Values.job.mode "remove_coin" }} + + args: + - node tools/dbs/removeCoin.js; + +{{- else if eq .Values.job.mode "add_pair" }} + + args: + - node tools/dbs/addPair.js; + +{{- else if eq .Values.job.mode "remove_pair" }} + + args: + - node tools/dbs/removePair.js; + +{{- else if eq .Values.job.mode "set_activation_code" }} + + args: + - node tools/dbs/setActivationCode.js; + +{{- else if eq .Values.job.mode "check_constants" }} + + args: + - node tools/dbs/checkConstants.js; + +{{- else if eq .Values.job.mode "set_config" }} + + args: + - node tools/dbs/setConfig.js; + +{{- else if eq .Values.job.mode "set_security" }} + + args: + - node tools/dbs/setSecurity.js; + +{{- else if eq .Values.job.mode "hollaex_upgrade" }} + + args: + - sequelize db:migrate; + node tools/dbs/runTriggers.js; + node tools/dbs/checkConfig.js; + node tools/dbs/setKitVersion.js; + +{{- else if eq .Values.job.mode "changeEmail" }} + + args: + - node tools/dbs/changeEmail.js; + +{{- end }} + + imagePullPolicy: Always + + envFrom: + - configMapRef: + name: {{.Values.envName}} + - secretRef: + name: {{.Values.secretName}} + + env: + +{{- if eq .Values.job.mode "add_coin" }} + + - name: COIN_SYMBOL + value: {{.Values.job.env.coin_symbol}} + - name: COIN_FULLNAME + value: {{.Values.job.env.coin_fullname}} + - name: COIN_ALLOW_DEPOSIT + value: {{.Values.job.env.coin_allow_deposit | quote }} + - name: COIN_ALLOW_WITHDRAWAL + value: {{.Values.job.env.coin_allow_withdrawal | quote }} + - name: COIN_WITHDRAWAL_FEE + value: {{.Values.job.env.coin_withdrawal_fee | quote }} + - name: COIN_MIN + value: {{.Values.job.env.coin_min | quote }} + - name: COIN_MAX + value: {{.Values.job.env.coin_max | quote }} + - name: COIN_INCREMENT_UNIT + value: {{.Values.job.env.coin_increment_unit | quote }} + - name: COIN_DEPOSIT_LIMITS + value: {{.Values.job.env.coin_deposit_limits | quote}} + - name: COIN_WITHDRAWAL_LIMITS + value: {{.Values.job.env.coin_withdrawal_limits | quote }} + - name: COIN_ACTIVE + value: {{.Values.job.env.coin_active | quote }} + +{{- else if eq .Values.job.mode "remove_coin" }} + + - name: COIN_SYMBOL + value: {{.Values.job.env.coin_symbol}} + +{{- else if eq .Values.job.mode "add_pair" }} + + - name: PAIR_NAME + value: {{.Values.job.env.pair_name}} + - name: PAIR_BASE + value: {{.Values.job.env.pair_base}} + - name: PAIR_2 + value: {{.Values.job.env.pair_2}} + - name: TAKER_FEES + value: {{.Values.job.env.taker_fees | quote }} + - name: MAKER_FEES + value: {{.Values.job.env.maker_fees | quote }} + - name: MIN_SIZE + value: {{.Values.job.env.min_size | quote }} + - name: MAX_SIZE + value: {{.Values.job.env.max_size | quote }} + - name: MIN_PRICE + value: {{.Values.job.env.min_price | quote }} + - name: MAX_PRICE + value: {{.Values.job.env.max_price | quote }} + - name: INCREMENT_SIZE + value: {{.Values.job.env.increment_size | quote }} + - name: INCREMENT_PRICE + value: {{.Values.job.env.increment_price | quote }} + - name: PAIR_ACTIVE + value: {{.Values.job.env.pair_active | quote }} + +{{- else if eq .Values.job.mode "remove_pair" }} + + - name: PAIR_NAME + value: {{.Values.job.env.pair_name}} + +{{- else if eq .Values.job.mode "set_activation_code" }} + + - name: ACTIVATION_CODE + value: "{{.Values.job.env.activation_code}}" + +{{- else if eq .Values.job.mode "set_security" }} + + - name: ALLOWED_DOMAINS + value: "{{.Values.job.env.allowed_domains}}" + - name: ADMIN_WHITELIST_IP + value: "{{.Values.job.env.admin_whitelist_ip}}" + - name: CAPTCHA_SITE_KEY + value: "{{.Values.job.env.captcha_site_key}}" + - name: CAPTCHA_SECRET_KEY + value: "{{.Values.job.env.captcha_secret_key}}" + +{{- else if eq .Values.job.mode "changeEmail" }} + + - name: USER_ID + value: "{{.Values.job.env.targetUserID}}" + - name: EMAIL + value: "{{.Values.job.env.newUserEmail}}" + +{{- end }} + + resources: + limits: + memory: "500Mi" + requests: + memory: "100Mi" + cpu: "15m" + +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + restartPolicy: Never + backoffLimit: 0 +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/service.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/service.yaml new file mode 100755 index 0000000000..3294d6f54c --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/service.yaml @@ -0,0 +1,27 @@ +{{- if eq .Values.job.enable false }} + +kind: Service +apiVersion: v1 +metadata: + labels: + app: {{.Release.Name}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + type: ClusterIP + ports: + - name: port + port: 10010 + targetPort: 10010 + - name: websocket-port + port: 10080 + targetPort: 10080 + - name: plugins-port + port: 10011 + targetPort: 10011 + selector: + app: {{.Release.Name}} + +{{- end }} + + diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/values.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/values.yaml new file mode 100755 index 0000000000..7c0e0571b5 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/values.yaml @@ -0,0 +1,57 @@ +# Default values for bitholla-hollaex-nginx. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +imageRegistry: bitholla/hollaex-core +dockerTag: + +imagePullSecrets: + - name: docker-registry-secret + +envName: hollaex-env +secretName: hollaex-secret + +DEPLOYMENT_MODE: api +PAIR: + +stable: + replicaCount: 1 + +staging: + enable: false + replicaCount: 1 + dockerTag: + +nodeSelector: {} + +autoScaling: + hpa: + enable: false + memory: + threshold: 80 + +APM_URL: + +podRestart_webhook_url: + +resources: + limits: + cpu: "1000m" + memory: "1536Mi" + requests: + cpu: "10m" + memory: "256Mi" + +job: + enable: false + mode: #add_coin + #remove_coin + #add_pair + #remove_pair + #hollaex_upgrade + env: + coin_symbol: + pair_name: + + + + diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/.helmignore b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/Chart.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/Chart.yaml new file mode 100755 index 0000000000..65e266b4ea --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for bitholla-hollaex-web +name: bitholla-hollaex-web +version: 0.1.0 diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/_helpers.tpl new file mode 100755 index 0000000000..7a6b694414 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "bitholla-hollaex-server.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bitholla-hollaex-server.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/autoscaler.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/autoscaler.yaml new file mode 100644 index 0000000000..29811d84c1 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/autoscaler.yaml @@ -0,0 +1,23 @@ +{{- if .Values.autoScaling.hpa.enable }} + +apiVersion: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: {{.Release.Name}} + namespace: {{.Release.NameSpace}} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{.Release.Name}} + minReplicas: {{.Values.stable.replicaCount}} + maxReplicas: {{.Values.autoScaling.hpa.maxReplicas}} + metrics: + - type: Resource + resource: + name: memory + target: + type: AverageValue + averageValue: {{.Values.autoScaling.hpa.avgMemory}} + +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/deployment.yaml new file mode 100644 index 0000000000..100adaff1f --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/deployment.yaml @@ -0,0 +1,74 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + revisionHistoryLimit: 3 + replicas: {{.Values.stable.replicaCount}} + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + + minReadySeconds: 5 + + selector: + matchLabels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + tier: backend + template: + metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + tier: backend + spec: + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + imagePullPolicy: IfNotPresent + + ports: + - name: port + containerPort: 80 + + resources: + limits: + memory: {{.Values.resources.limits.memory}} + cpu: {{.Values.resources.limits.cpu}} + requests: + memory: {{.Values.resources.requests.memory}} + cpu: {{.Values.resources.requests.cpu}} + + +{{- if .Values.podRestart_webhook_url }} + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "export hostname=`hostname` && curl -X POST -H 'Content-type: application/json' --data '{\"attachments\": [ { \"color\": \"#A569BD\", \"title\": \"Pod has been terminated!\", \"text\": \"⚠️Pod '\"${hostname}\"' just has been terminated.⚠️\" } ] }' {{.Values.podRestart_webhook_url}}"] +{{- end }} + + readinessProbe: + exec: + command: + - curl + - http://localhost + initialDelaySeconds: 15 + periodSeconds: 15 + +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/service.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/service.yaml new file mode 100755 index 0000000000..5013a4e981 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/service.yaml @@ -0,0 +1,17 @@ +kind: Service +apiVersion: v1 +metadata: + labels: + app: {{.Release.Name}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + type: ClusterIP + ports: + - name: port + port: 80 + targetPort: 80 + selector: + app: {{.Release.Name}} + + diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/values.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/values.yaml new file mode 100755 index 0000000000..ca677d4fad --- /dev/null +++ b/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/values.yaml @@ -0,0 +1,31 @@ +# Default values for bitholla-hollaex-nginx. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +imageRegistry: bitholla/hollaex-web +dockerTag: + +imagePullSecrets: + - name: docker-registry-secret + +stable: + replicaCount: 1 + +nodeSelector: {} + +autoScaling: + hpa: + enable: false + maxReplicas: 4 + avgMemory: 500000000 + +podRestart_webhook_url: + +resources: + limits: + cpu: "100m" + memory: "100Mi" + requests: + cpu: "10m" + memory: "100Mi" + + diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/Chart.yaml new file mode 100644 index 0000000000..06fe5dbffb --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/Chart.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +appVersion: 1.8.0 +description: Scalable datastore for metrics, events, and real-time analytics. +home: https://www.influxdata.com/time-series-platform/influxdb/ +keywords: +- influxdb +- database +- timeseries +- influxdata +maintainers: +- email: rawkode@influxdata.com + name: rawkode +- email: giacomo@influxdata.com + name: gitirabassi +- email: urakiny@gmail.com + name: aisuko +- email: naseem@transit.app + name: naseemkullah +name: influxdb +sources: +- https://github.com/influxdata/influxdb +version: 4.8.9 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/OWNERS b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/OWNERS new file mode 100644 index 0000000000..926c046b9f --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/OWNERS @@ -0,0 +1,10 @@ +approvers: +- rawkode +- gitirabassi +- aisuko +- naseemkullah +reviewers: +- rawkode +- gitirabassi +- aisuko +- naseemkullah diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/README.md b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/README.md new file mode 100644 index 0000000000..d88db9c331 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/README.md @@ -0,0 +1,328 @@ +# InfluxDB Helm chart + +[InfluxDB](https://github.com/influxdata/influxdb) is an open source time series database with no external dependencies. It's useful for recording metrics, events, and performing analytics. + +The InfluxDB Helm chart uses the [Helm](https://helm.sh) package manager to bootstrap an InfluxDB StatefulSet and service on a [Kubernetes](http://kubernetes.io) cluster. + +> **Note:** ### If you're using the InfluxDB Enterprise Helm chart, check out [InfluxDB Enterprise Helm chart](#influxdb-enterprise-helm-chart). + +## Prerequisites + +- Helm v2 or later +- Kubernetes 1.4+ +- (Optional) PersistentVolume (PV) provisioner support in the underlying infrastructure + +## Install the chart + +1. Add the InfluxData Helm repository: + + ```bash + helm repo add influxdata https://helm.influxdata.com/ + ``` + +2. Run the following command, providing a name for your release: + + ```bash + helm upgrade --install my-release influxdata/influxdb + ``` + + > **Tip**: `--install` can be shortened to `-i`. + + This command deploys InfluxDB on the Kubernetes cluster using the default configuration. To find parameters you can configure during installation, see [Configure the chart](#configure-the-chart). + + > **Tip**: To view all Helm chart releases, run `helm list`. + +## Uninstall the chart + +To uninstall the `my-release` deployment, use the following command: + +```bash +helm uninstall my-release +``` + +This command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configure the chart + +The following table lists configurable parameters, their descriptions, and their default values stored in `values.yaml`. + +| Parameter | Description | Default | +|---|---|---| +| image.repository | Image repository url | influxdb | +| image.tag | Image tag | 1.8.0-alpine | +| image.pullPolicy | Image pull policy | IfNotPresent | +| image.pullSecrets | It will store the repository's credentials to pull image | nil | +| serviceAccount.create | It will create service account | true | +| serviceAccount.name | Service account name | "" | +| serviceAccount.annotations | Service account annotations | {} | +| livenessProbe | Health check for pod | {} | +| readinessProbe | Health check for pod | {} | +| startupProbe | Health check for pod | {} | +| service.type | Kubernetes service type | ClusterIP | +| service.loadBalancerIP | A user-specified IP address for service type LoadBalancer to use as External IP (if supported) | nil | +| service.externalIPs | A user-specified list of externalIPs to add to the service | nil | +| service.externalTrafficPolicy | A user specified external traffic policy | nil | +| persistence.enabled | Boolean to enable and disable persistance | true | +| persistence.existingClaim | An existing PersistentVolumeClaim, ignored if enterprise.enabled=true | nil | +| persistence.storageClass | If set to "-", storageClassName: "", which disables dynamic provisioning. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack | | +| persistence.annotations | Annotations for volumeClaimTemplates | nil | +| persistence.accessMode | Access mode for the volume | ReadWriteOnce | +| persistence.size | Storage size | 8Gi | +| podAnnotations | Annotations for pod | {} | +| podLabels | Labels for pod | {} | +| ingress.enabled | Boolean flag to enable or disable ingress | false | +| ingress.tls | Boolean to enable or disable tls for ingress. If enabled provide a secret in `ingress.secretName` containing TLS private key and certificate. | false | +| ingress.secretName | Kubernetes secret containing TLS private key and certificate. It is `only` required if `ingress.tls` is enabled. | nil | +| ingress.hostname | Hostname for the ingress | influxdb.foobar.com | +| annotations | ingress annotations | nil | +| schedulerName | Use an [alternate scheduler](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/), e.g. "stork". | nil | +| nodeSelector | Node labels for pod assignment | {} | +| affinity | [Affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) for pod assignment | {| +| tolerations | [Tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) for pod assignment | [] | +| securityContext | [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for pod | {} | +| env | environment variables for influxdb container | {} | +| volumes | `volumes` stanza(s) to be used in the main container | nil | +| mountPoints | `volumeMount` stanza(s) to be used in the main container | nil | +| extraContainers | Additional containers to be added to the pod | {} | +| config.reporting_disabled | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#reporting-disabled-false) | false | +| config.rpc | RPC address for backup and storage | {} | +| config.meta | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#meta) | {} | +| config.data | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#data) | {} | +| config.coordinator | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#coordinator) | {} | +| config.retention | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#retention) | {} | +| config.shard_precreation | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#shard-precreation) | {} | +| config.monitor | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#monitor) | {} | +| config.http | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#http) | {} | +| config.logging | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#logging) | {} | +| config.subscriber | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#subscriber) | {} | +| config.graphite | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#graphite) | {} | +| config.collectd | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#collectd) | {} | +| config.opentsdb | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#opentsdb) | {} | +| config.udp | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#udp) | {} | +| config.continous_queries | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#continuous-queries) | {} | +| config.tls | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#tls) | {} | +| initScripts.enabled | Boolean flag to enable and disable initscripts. If the container finds any files with the extensions .sh or .iql inside of the /docker-entrypoint-initdb.d folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order. | false | +| initScripts.scripts | Init scripts | {} | +| backup.enabled | Enable backups, if `true` must configure one of the storage providers | `false` | +| backup.gcs | Google Cloud Storage config | `nil` +| backup.azure | Azure Blob Storage config | `nil` +| backup.s3 | Amazon S3 (or compatible) config | `nil` +| backup.schedule | Schedule to run jobs in cron format | `0 0 * * *` | +| backup.startingDeadlineSeconds | Deadline in seconds for starting the job if it misses its scheduled time for any reason | `nil` | +| backup.annotations | Annotations for backup cronjob | {} | +| backup.podAnnotations | Annotations for backup cronjob pods | {} | +| backup.persistence.enabled | Boolean to enable and disable persistance | false | +| backup.persistence.storageClass | If set to "-", storageClassName: "", which disables dynamic provisioning. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack | | +| backup.persistence.annotations | Annotations for volumeClaimTemplates | nil | +| backup.persistence.accessMode | Access mode for the volume | ReadWriteOnce | +| backup.persistence.size | Storage size | 8Gi | +| backup.resources | Resources requests and limits for `backup` pods | `ephemeral-storage: 8Gi` | + +To configure the chart, do either of the following: + +- Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade --install`. For example: + + ```bash + helm upgrade --install my-release \ + --set persistence.enabled=true,persistence.size=200Gi \ + influxdata/influxdb + ``` + + This command enables persistence and changes the size of the requested data volume to 200GB. + +- Provide a YAML file that specifies the parameter values while installing the chart. For example, use the following command: + + ```bash + helm upgrade --install my-release -f values.yaml influxdata/influxdb + ``` + + > **Tip**: Use the default [values.yaml](values.yaml). + +For information about running InfluxDB in Docker, see the [full image documentation](https://hub.docker.com/_/influxdb/). + +### InfluxDB Enterprise Helm chart + +[InfluxDB Enterprise](https://www.influxdata.com/products/influxdb-enterprise/) includes features designed for production workloads, including high availability and horizontal scaling. InfluxDB Enterprise requires an InfluxDB Enterprise license. + +#### Configure the InfluxDB Enterprise chart + +To enable InfluxDB Enterprise, set the following keys and values in a values file provided to Helm. + +| Key | Description | Recommended value | +| --- | --- | --- | +| `livenessProbe.initalDelaySeconds` | Used to allow enough time to join meta nodes to a cluster | `3600` | +| `image.tag` | Set to a `data` image. See https://hub.docker.com/_/influxdb for details | `data` | +| `service.ClusterIP` | Use a headless service for StatefulSets | `"None"` | +| `env.name[_HOSTNAME]` | Used to provide a unique `name.service` for InfluxDB. See [values.yaml]() for an example | `valueFrom.fieldRef.fieldPath: metadata.name` | +| `enterprise.enabled` | Create StatefulSets for use with `influx-data` and `influx-meta` images | `true` | +| `enterprise.licensekey` | License for InfluxDB Enterprise | | +| `enterprise.clusterSize` | Replicas for `influx` StatefulSet | Dependent on license | +| `enterprise.meta.image.tag` | Set to an `meta` image. See https://hub.docker.com/_/influxdb for details | `meta` | +| `enterprise.meta.clusterSize` | Replicas for `influxdb-meta` StatefulSet. | `3` | +| `enterprise.meta.resources` | Resources requests and limits for meta `influxdb-meta` pods | See `values.yaml` | + +#### Join pods to InfluxDB Enterprise cluster + +Meta and data pods must be joined using the command `influxd-ctl` found on meta pods. +We recommend running `influxd-ctl` on one and only one meta pod and joining meta pods together before data pods. For each meta pod, run `influxd-ctl`. + +In the following examples, we use the pod names `influxdb-meta-0` and `influxdb-0` and the service name `influxdb`. + +For example, using the default settings, your script should look something like this: + +```shell script +kubectl exec influxdb-meta-0 influxd-ctl add-meta influxdb-meta-0.influxdb-meta:8091 +``` + +From the same meta pod, for each data pod, run `influxd-ctl`. With default settings, your script should look something like this: + +```shell script +kubectl exec influxdb-meta-0 influxd-ctl add-data influxdb-0.influxdb:8088 +``` + +When using `influxd-ctl`, use the appropriate DNS name for your pods, following the naming scheme of `pod.service`. + +## Persistence + +The [InfluxDB](https://hub.docker.com/_/influxdb/) image stores data in the `/var/lib/influxdb` directory in the container. + +If persistence is enabled, a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) associated with StatefulSet is provisioned. The volume is created using dynamic volume provisioning. In case of a disruption (for example, a node drain), Kubernetes ensures that the same volume is reattached to the Pod, preventing any data loss. However, when persistence is **not enabled**, InfluxDB data is stored in an empty directory, so if a Pod restarts, data is lost. + +## Start with authentication + +In `values.yaml`, change `.Values.config.http.auth-enabled` to `true`. + +> **Note:** To enforce authentication, InfluxDB requires an admin user to be set up. For details, see [Set up authentication](https://docs.influxdata.com/influxdb/v1.2/query_language/authentication_and_authorization/#set-up-authentication). + +To handle this set up during startup, enable a job in `values.yaml` by setting `.Values.setDefaultUser.enabled` to `true`. + +Make sure to uncomment or configure the job settings after enabling it. If a password is not set, a random password will be generated. + +Alternatively, if `.Values.setDefaultUser.user.existingSecret` is set the user and password are obtained from an existing Secret, the expected keys are `influxdb-user` and `influxdb-password`. Use this variable if you need to check in the `values.yaml` in a repository to avoid exposing your secrets. + +## Back up and restore + +Before proceeding, please read [Backing up and restoring in InfluxDB OSS](https://docs.influxdata.com/influxdb/v1.7/administration/backup_and_restore/). While the chart offers backups by means of the [`backup-cronjob`](./templates/backup-cronjob.yaml), restores do not fall under the chart's scope today but can be achieved by one-off kubernetes jobs. + +### Backups + +When enabled, the[`backup-cronjob`](./templates/backup-cronjob.yaml) runs on the configured schedule. One can create a job from the backup cronjob on demand as follows: + +```sh +kubectl create job --from=cronjobs/influxdb-backup influx-backup-$(date +%Y%m%d%H%M%S) +``` + +#### Backup Storage + +The backup process consists of an init-container that writes the backup to a +local volume, which is by default an `emptyDir`, shared to the runtime container +which uploads the backup to the configured object store. + +In order to avoid filling the node's disk space, it is recommended to set a sufficient +`ephemeral-storage` request or enable persistence, which allocates a PVC. + +Furthermore, if no object store provider is available, one can simply use the +PVC as the final storage destination when `persistence` is enabled. + +### Restores + +It is up to the end user to configure their own one-off restore jobs. Below is just an example, which assumes that the backups are stored in GCS and that all dbs in the backup already exist and should be restored. It is to be used as a reference only; configure the init-container and the command and of the `influxdb-restore` container as well as both containers' resources to suit your needs. + +```yaml +apiVersion: batch/v1 +kind: Job +metadata: + generateName: influxdb-restore- + namespace: monitoring +spec: + template: + spec: + volumes: + - name: backup + emptyDir: {} + serviceAccountName: influxdb + initContainers: + - name: init-gsutil-cp + image: google/cloud-sdk:alpine + command: + - /bin/sh + args: + - "-c" + - | + gsutil -m cp -r gs:///* /backup + volumeMounts: + - name: backup + mountPath: /backup + resources: + requests: + cpu: 1 + memory: 4Gi + limits: + cpu: 2 + memory: 8Gi + containers: + - name: influxdb-restore + image: influxdb:1.7-alpine + volumeMounts: + - name: backup + mountPath: /backup + command: + - /bin/sh + args: + - "-c" + - | + #!/bin/sh + INFLUXDB_HOST=influxdb.monitoring.svc + for db in $(influx -host $INFLUXDB_HOST -execute 'SHOW DATABASES' | tail -n +5); do + influxd restore -host $INFLUXDB_HOST:8088 -portable -db "$db" -newdb "$db"_bak /backup + done + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi + restartPolicy: OnFailure +``` + +At which point the data from the new `_bak` dbs would have to be side loaded into the original dbs. +Please see [InfluxDB documentation for more restore examples](https://docs.influxdata.com/influxdb/v1.7/administration/backup_and_restore/#restore-examples). + +## Mounting Extra Volumes + +Extra volumes can be mounted by providing the `volumes` and `mountPoints` keys, consistent +with the behavior of other charts provided by Influxdata. + +```yaml +volumes: +- name: ssl-cert-volume + secret: + secretName: secret-name +mountPoints: +- name: ssl-cert-volume + mountPath: /etc/ssl/certs/selfsigned/ + readOnly: true +``` + +## Upgrading + +### From < 1.0.0 To >= 1.0.0 + +Values `.Values.config.bind_address` and `.Values.exposeRpc` no longer exist. They have been replaced with `.Values.config.rpc.bind_address` and `.Values.config.rpc.enabled` respectively. Please adjust your values file accordingly. + +### From < 1.5.0 to >= 2.0.0 + +The Kubernetes API change to support 1.160 may not be backwards compatible and may require the chart to be uninstalled in order to upgrade. See [this issue](https://github.com/helm/helm/issues/6583) for some background. + +### From < 3.0.0 to >= 3.0.0 + +Since version 3.0.0 this chart uses a StatefulSet instead of a Deployment. As part of this update the existing persistent volume (and all data) is deleted and a new one is created. Make sure to backup and restore the data manually. + +### From < 4.0.0 to >= 4.0.0 + +Labels are changed in accordance with [Kubernetes recommended labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/\#labels). This change also removes the ability to configure clusterIP value to avoid `Error: UPGRADE FAILED: failed to replace object: Service "my-influxdb" is invalid: spec.clusterIP: Invalid value: "": field is immutable` type errors. For more information on this error and why it's important to avoid this error, please see [this Github issue](https://github.com/helm/helm/issues/6378#issuecomment-582764215). + +Due to the significance of the changes, we recommend uninstalling and reinstalling the chart (although the PVC shouldn't be deleted during this process, we highly recommended backing up your data beforehand). + +Check out our [Slack channel](https://www.influxdata.com/slack) for support and information. diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/files/backup-retention-script.sh b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/files/backup-retention-script.sh new file mode 100644 index 0000000000..913794a5dd --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/files/backup-retention-script.sh @@ -0,0 +1,66 @@ +#! /usr/bin/env bash + +set -e + +# This script wants these variable to be set. + +## S3_BUCKET <- The name of the bucket where the backups are stored +## S3_ENDPOINT <- The endpoint of the S3 service +## AWS_ACCESS_KEY_ID <- Access credentials +## AWS_SECRET_ACCESS_KEY <- Access credentials +## DAYS_TO_RETAIN <- The TTL for the backups === number of backups to keep. + +# Sanity check to avoid removing all backups. +[[ "$DAYS_TO_RETAIN" -lt 1 ]] && DAYS_TO_RETAIN=1 + +function get_records { + before_date="$1" + + aws s3api list-objects \ + --bucket ${S3_BUCKET} \ + --endpoint-url ${S3_ENDPOINT} \ + --query "Contents[?LastModified<='${before_date}'][].{Key: Key}" +} + +function remove_old_backups { + before_date=$(date --iso-8601=seconds -d "-${DAYS_TO_RETAIN} days") + now=$(date --iso-8601=seconds) + + del_records=$(get_records "${before_date}") + all_records=$(get_records "${now}") + + del_paths=() + all_paths=() + + function _jq { + echo ${row} | base64 --decode | jq -r ${1} + } + + for row in $(echo "${del_records}" | jq -r '.[] | @base64'); do + del_paths+=($(_jq '.Key')) + done + + for row in $(echo "${all_records}" | jq -r '.[] | @base64'); do + all_paths+=($(_jq '.Key')) + done + + # Number of backups left if all old backups are removed. + left=$((${#all_paths[@]} - ${#del_paths[@]})) + + # We ALWAYS keep N backups even if their TTL has expired! + if (( ${left} < ${DAYS_TO_RETAIN} )); then + num_to_delete=$((${#all_paths[@]} - ${DAYS_TO_RETAIN})) + else + num_to_delete=${#del_paths[@]} + fi + + for path in "${del_paths[@]::${num_to_delete}}"; do + aws s3 rm "s3://${S3_BUCKET}/${path}" \ + --endpoint-url "${S3_ENDPOINT}" + done +} + +# Installs jq. +yum install -y jq + +remove_old_backups diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/NOTES.txt new file mode 100644 index 0000000000..41ffa05acf --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/NOTES.txt @@ -0,0 +1,42 @@ +InfluxDB can be accessed via port {{ .Values.config.http.bind_address | default 8086 }} on the following DNS name from within your cluster: + + http://{{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.config.http.bind_address | default 8086 }} + +You can connect to the remote instance with the influx CLI. To forward the API port to localhost:8086, run the following: + + kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ include "influxdb.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8086:{{ .Values.config.http.bind_address | default 8086 }} + +You can also connect to the influx CLI from inside the container. To open a shell session in the InfluxDB pod, run the following: + + kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ include "influxdb.fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh + +To view the logs for the InfluxDB pod, run the following: + + kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ include "influxdb.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') + +{{- if .Values.setDefaultUser.enabled }} + +To retrieve the default user name: + +{{- if .Values.setDefaultUser.user.existingSecret }} + + echo $(kubectl get secret {{ .Values.setDefaultUser.user.existingSecret }} -o "jsonpath={.data['influxdb-user']}" --namespace {{ .Release.Namespace }} | base64 --decode) + +{{- else }} + + echo $(kubectl get secret {{ include "influxdb.fullname" . }}-auth -o "jsonpath={.data['influxdb-user']}" --namespace {{ .Release.Namespace }} | base64 --decode) + +{{- end }} + +To retrieve the default user password: + +{{- if .Values.setDefaultUser.user.existingSecret }} + + echo $(kubectl get secret {{ .Values.setDefaultUser.user.existingSecret }} -o "jsonpath={.data['influxdb-password']}" --namespace {{ .Release.Namespace }} | base64 --decode) + +{{- else }} + + echo $(kubectl get secret {{ include "influxdb.fullname" . }}-auth -o "jsonpath={.data['influxdb-password']}" --namespace {{ .Release.Namespace }} | base64 --decode) + +{{- end }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/_helpers.tpl new file mode 100644 index 0000000000..4866664e12 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "influxdb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "influxdb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "influxdb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "influxdb.labels" -}} +helm.sh/chart: {{ include "influxdb.chart" . }} +{{ include "influxdb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "influxdb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "influxdb.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "influxdb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "influxdb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-cronjob.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-cronjob.yaml new file mode 100644 index 0000000000..b43e736d3e --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-cronjob.yaml @@ -0,0 +1,150 @@ +{{- if .Values.backup.enabled }} +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: {{ include "influxdb.fullname" . }}-backup + labels: + {{- include "influxdb.labels" . | nindent 4 }} + app.kubernetes.io/component: backup + annotations: + {{- toYaml .Values.backup.annotations | nindent 4 }} +spec: + schedule: {{ .Values.backup.schedule | quote }} + startingDeadlineSeconds: {{ .Values.backup.startingDeadlineSeconds }} + concurrencyPolicy: Forbid + jobTemplate: + spec: + template: + metadata: + {{- if .Values.backup.podAnnotations }} + annotations: + {{ toYaml .Values.backup.podAnnotations | nindent 12 }} + {{- end }} + labels: + {{- include "influxdb.selectorLabels" . | nindent 12 }} + spec: + restartPolicy: OnFailure + volumes: + - name: backup + {{- if .Values.backup.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "influxdb.fullname" . }}-backup + {{- else }} + emptyDir: {} + {{- end }} + {{- if .Values.backup.gcs }} + {{- if .Values.backup.gcs.serviceAccountSecret }} + - name: google-cloud-key + secret: + secretName: {{ .Values.backup.gcs.serviceAccountSecret | quote }} + {{- end }} + {{- end }} + {{- if .Values.backup.s3 }} + {{- if .Values.backup.s3.credentialsSecret }} + - name: aws-credentials-secret + secret: + secretName: {{ .Values.backup.s3.credentialsSecret | quote }} + {{- end }} + {{- end }} + serviceAccountName: {{ include "influxdb.serviceAccountName" . }} + initContainers: + - name: influxdb-backup + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + volumeMounts: + - name: backup + mountPath: /backup + command: + - /bin/sh + args: + - '-c' + - | + influxd backup \ + -host {{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc:{{ .Values.config.rpc.bind_address | default 8088 }} \ + -portable /backup/"$(date +%Y%m%d%H%M%S)" + resources: + {{- toYaml .Values.backup.resources | nindent 14 }} + containers: + {{- if .Values.backup.gcs }} + - name: gsutil-cp + image: google/cloud-sdk:alpine + command: + - /bin/sh + args: + - '-c' + - | + if [ -n "$KEY_FILE" ]; then + gcloud auth activate-service-account --key-file $KEY_FILE + fi + gsutil -m cp -r /backup/* "$DST_URL" + volumeMounts: + - name: backup + mountPath: /backup + {{- if .Values.backup.gcs.serviceAccountSecretKey}} + - name: google-cloud-key + mountPath: /var/secrets/google/ + {{- end }} + env: + - name: DST_URL + value: {{ .Values.backup.gcs.destination}} + {{- if .Values.backup.gcs.serviceAccountSecretKey}} + - name: KEY_FILE + value: /var/secrets/google/{{ .Values.backup.gcs.serviceAccountSecretKey }} + {{- end }} + resources: + {{- toYaml .Values.backup.resources | nindent 14 }} + {{- end }} + {{- if .Values.backup.azure }} + - name: azure-cli + image: microsoft/azure-cli + command: + - /bin/sh + args: + - '-c' + - | + az storage container create --name "$DST_CONTAINER" + az storage blob upload-batch --destination "$DST_CONTAINER" --destination-path "$DST_PATH" --source "$SRC_URL" + volumeMounts: + - name: backup + mountPath: /backup + env: + - name: SRC_URL + value: /backup + - name: DST_CONTAINER + value: {{ .Values.backup.azure.destination_container }} + - name: DST_PATH + value: {{ .Values.backup.azure.destination_path }} + - name: AZURE_STORAGE_CONNECTION_STRING + valueFrom: + secretKeyRef: + name: {{ .Values.backup.azure.storageAccountSecret }} + key: connection-string + resources: + {{- toYaml .Values.backup.resources | nindent 14 }} + {{- end }} + {{- if .Values.backup.s3 }} + - name: aws-cli + image: amazon/aws-cli + command: + - /bin/sh + args: + - '-c' + - | + aws {{- if .Values.backup.s3.endpointUrl }} --endpoint-url={{ .Values.backup.s3.endpointUrl }} {{- end }} s3 cp --recursive "$SRC_URL" "$DST_URL" + volumeMounts: + - name: backup + mountPath: /backup + {{- if .Values.backup.s3.credentialsSecret}} + - name: aws-credentials-secret + mountPath: /var/secrets/aws/ + {{- end }} + env: + - name: AWS_CONFIG_FILE + value: /var/secrets/aws/credentials + - name: SRC_URL + value: /backup + - name: DST_URL + value: {{ .Values.backup.s3.destination }} + resources: + {{- toYaml .Values.backup.resources | nindent 14 }} + {{- end }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-pvc.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-pvc.yaml new file mode 100644 index 0000000000..ebf4ba1c06 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-pvc.yaml @@ -0,0 +1,21 @@ +{{- if and .Values.backup.enabled .Values.backup.persistence.enabled }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "influxdb.fullname" . }}-backup + labels: + {{- include "influxdb.labels" . | nindent 4 }} +spec: + accessModes: + - {{ .Values.backup.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.backup.persistence.size | quote }} +{{- if .Values.backup.persistence.storageClass }} +{{- if (eq "-" .Values.backup.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.backup.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-configmap.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-configmap.yaml new file mode 100644 index 0000000000..d158eb5433 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-configmap.yaml @@ -0,0 +1,11 @@ +{{- if .Values.backupRetention.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "influxdb.fullname" . }}-backup-retention + labels: + {{- include "influxdb.labels" . | nindent 4 }} +data: + backup-retention.sh: |- + {{- .Files.Get "files/backup-retention-script.sh" | nindent 4 }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-cronjob.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-cronjob.yaml new file mode 100644 index 0000000000..388c62d3ed --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-cronjob.yaml @@ -0,0 +1,75 @@ +{{- if .Values.backupRetention.enabled }} +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: {{ include "influxdb.fullname" . }}-backup-retention + labels: + {{- include "influxdb.labels" . | nindent 4 }} + app.kubernetes.io/component: backup-retention + annotations: + {{- toYaml .Values.backupRetention.annotations | nindent 4 }} +spec: + schedule: {{ .Values.backupRetention.schedule | quote }} + startingDeadlineSeconds: {{ .Values.backupRetention.startingDeadlineSeconds }} + concurrencyPolicy: Forbid + jobTemplate: + spec: + template: + metadata: + {{- if .Values.backupRetention.podAnnotations }} + annotations: + {{ toYaml .Values.backupRetention.podAnnotations | nindent 12 }} + {{- end }} + labels: + {{- include "influxdb.selectorLabels" . | nindent 12 }} + spec: + restartPolicy: OnFailure + volumes: + - name: scripts + configMap: + name: {{ include "influxdb.fullname" . }}-backup-retention + {{- if .Values.backupRetention.gcs }} + {{- if .Values.backupRetention.gcs.serviceAccountSecret }} + - name: google-cloud-key + secret: + secretName: {{ .Values.backupRetention.gcs.serviceAccountSecret | quote }} + {{- end }} + {{- end }} + {{- if .Values.backupRetention.s3 }} + {{- if .Values.backupRetention.s3.credentialsSecret }} + - name: aws-credentials-secret + secret: + secretName: {{ .Values.backupRetention.s3.credentialsSecret | quote }} + {{- end }} + {{- end }} + serviceAccountName: {{ include "influxdb.serviceAccountName" . }} + containers: + {{- if .Values.backupRetention.gcs }} + {{- end }} + {{- if .Values.backupRetention.azure }} + {{- end }} + {{- if .Values.backupRetention.s3 }} + - name: aws-cli + image: amazon/aws-cli + command: ['/bin/bash'] + args: ['/scripts/backup-retention.sh'] + volumeMounts: + - name: scripts + mountPath: /scripts + {{- if .Values.backupRetention.s3.credentialsSecret}} + - name: aws-credentials-secret + mountPath: /var/secrets/aws/ + {{- end }} + env: + - name: AWS_CONFIG_FILE + value: /var/secrets/aws/credentials + - name: DAYS_TO_RETAIN + value: {{ .Values.backupRetention.daysToRetain | quote }} + - name: S3_BUCKET + value: {{ .Values.backupRetention.s3.bucketName }} + - name: S3_ENDPOINT + value: {{ .Values.backupRetention.s3.endpointUrl }} + resources: + {{- toYaml .Values.backupRetention.resources | nindent 14 }} + {{- end }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/configmap.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/configmap.yaml new file mode 100644 index 0000000000..ec7677b22e --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/configmap.yaml @@ -0,0 +1,184 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "influxdb.fullname" . }} + labels: + {{- include "influxdb.labels" . | nindent 4 }} +data: + influxdb.conf: |+ + reporting-disabled = {{ .Values.config.reporting_disabled | default false }} + bind-address = ":{{ .Values.config.rpc.bind_address | default 8088 }}" + + [meta] + dir = "/var/lib/influxdb/meta" + {{- range $key, $value := index .Values.config.meta }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + {{- if .Values.enterprise.enabled }} + internal-shared-secret = "{{ sha256sum .Values.enterprise.meta.seed }}" + meta-auth-enabled = {{ .Values.config.meta.authEnabled }} + {{- end }} + + [data] + dir = "/var/lib/influxdb/data" + wal-dir = "/var/lib/influxdb/wal" + {{- range $key, $value := index .Values.config.data }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + [coordinator] + {{- range $key, $value := index .Values.config.coordinator }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + [retention] + {{- range $key, $value := index .Values.config.retention }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + [shard-precreation] + {{- range $key, $value := index .Values.config.shard_precreation }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + [monitor] + {{- range $key, $value := index .Values.config.monitor }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + [subscriber] + {{- range $key, $value := index .Values.config.subscriber }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + [http] + {{- range $key, $value := index .Values.config.http }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + # TODO: allow multiple graphite listeners + + [[graphite]] + {{- range $key, $value := index .Values.config.graphite }} + {{- if ne $key "templates"}} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + {{- end }} + {{- if .Values.config.graphite.templates }} + templates = [ + {{- range .Values.config.graphite.templates }} + {{ quote . }}, + {{- end }} + ] + {{- end }} + + # TODO: allow multiple collectd listeners with templates + + [[collectd]] + {{- range $key, $value := index .Values.config.collectd }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + # TODO: allow multiple opentsdb listeners with templates + + [[opentsdb]] + {{- range $key, $value := index .Values.config.opentsdb }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + # TODO: allow multiple udp listeners with templates + + [[udp]] + {{- range $key, $value := index .Values.config.udp }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + [continuous_queries] + {{- range $key, $value := index .Values.config.continuous_queries }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + [logging] + {{- range $key, $value := index .Values.config.logging }} + {{- $tp := typeOf $value }} + {{- if eq $tp "string" }} + {{ $key }} = {{ $value | quote }} + {{- else }} + {{ $key }} = {{ $value }} + {{- end }} + {{- end }} + + {{ if .Values.enterprise.enabled -}} + [enterprise] + license-key = {{ .Values.enterprise.licensekey | quote }} + + [hinted-handoff] + enabled = true + dir = "/var/lib/influxdb/hh" + {{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/ingress.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/ingress.yaml new file mode 100644 index 0000000000..a4291d26d6 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/ingress.yaml @@ -0,0 +1,25 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: {{ include "influxdb.fullname" . }} + labels: + {{- include "influxdb.labels" . | nindent 4 }} + annotations: +{{ toYaml .Values.ingress.annotations | indent 4 }} +spec: +{{- if .Values.ingress.tls }} + tls: + - hosts: + - {{ .Values.ingress.hostname | quote }} + secretName: {{ .Values.ingress.secretName }} +{{- end }} + rules: + - host: {{ .Values.ingress.hostname }} + http: + paths: + - path: {{ .Values.ingress.path }} + backend: + serviceName: {{ include "influxdb.fullname" . }} + servicePort: 8086 +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/init-config.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/init-config.yaml new file mode 100644 index 0000000000..5f60898526 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/init-config.yaml @@ -0,0 +1,10 @@ +{{- if .Values.initScripts.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "influxdb.fullname" . }}-init + labels: + {{- include "influxdb.labels" . | nindent 4 }} +data: +{{ toYaml .Values.initScripts.scripts | indent 2 }} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-configmap.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-configmap.yaml new file mode 100644 index 0000000000..8e312d1fa0 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-configmap.yaml @@ -0,0 +1,35 @@ +{{ if .Values.enterprise.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "influxdb.fullname" . }}-meta + labels: + {{- include "influxdb.labels" . | nindent 4 }} + app.kubernetes.io/component: meta +data: + influxdb-meta.conf: |+ + reporting-disabled = {{ .Values.config.reporting_disabled | default false }} + bind-address = ":{{ .Values.config.meta.bind_address | default 8091 }}" + + [enterprise] + license-key = {{ .Values.enterprise.licensekey | quote }} + + [meta] + dir = "/var/lib/influxdb/meta" + {{- range $key, $value := index .Values.config.meta }} + {{ $key }} = {{ $value }} + {{- end }} + {{- if .Values.enterprise.enabled }} + meta-auth-enabled = {{ .Values.config.meta.authEnabled }} + {{- end }} + + [logging] + {{- range $key, $value := index .Values.config.logging }} + {{ $key }} = {{ $value }} + {{- end }} + + [tls] + {{- range $key, $value := index .Values.config.tls }} + {{ $key }} = {{ $value }} + {{- end }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-service.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-service.yaml new file mode 100644 index 0000000000..78d18e5ebe --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-service.yaml @@ -0,0 +1,25 @@ +{{ if .Values.enterprise.enabled -}} +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} + name: {{ include "influxdb.fullname" . }}-meta + labels: + {{- include "influxdb.labels" . | nindent 4 }} + app.kubernets.io/component: meta +spec: + type: ClusterIP + clusterIP: None + # publishNotReadyAddresses is used for service discovery of meta and data nodes by querying the service's SRV record. + publishNotReadyAddresses: true + ports: + - name: meta + port: {{ .Values.config.meta.bind_address | default 8091 }} + targetPort: meta + selector: + {{- include "influxdb.selectorLabels" . | nindent 4 }} + app.kubernets.io/component: meta +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-statefulset.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-statefulset.yaml new file mode 100644 index 0000000000..16b35c4f12 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-statefulset.yaml @@ -0,0 +1,132 @@ +{{- if .Values.enterprise.enabled }} +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ include "influxdb.fullname" . }}-meta + labels: + {{- include "influxdb.labels" . | nindent 4 }} + app.kubernetes.io/component: meta +spec: + replicas: {{ .Values.enterprise.meta.clusterSize }} + selector: + matchLabels: + {{- include "influxdb.selectorLabels" . | nindent 6 }} + app.kubernetes.io/component: meta + serviceName: "{{ include "influxdb.fullname" . }}-meta" + template: + metadata: + labels: + {{- include "influxdb.selectorLabels" . | nindent 8 }} + app.kubernetes.io/component: meta + {{- if .Values.podAnnotations }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} + {{- end }} + spec: + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end}} + {{- end }} + serviceAccountName: {{ include "influxdb.serviceAccountName" . }} + containers: + - name: "{{ include "influxdb.fullname" . }}-meta" + image: "{{ .Values.image.repository }}:{{ .Values.enterprise.meta.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + resources: +{{ toYaml .Values.enterprise.meta.resources | indent 10 }} + ports: + - name: udp + containerPort: {{ .Values.config.udp.bind_address | default 8089 }} + - name: rpc + containerPort: {{ .Values.config.rpc.bind_address | default 8088 }} + - name: meta + containerPort: {{ .Values.config.meta.bind_address | default 8091 }} + {{- if .Values.env }} + env: +{{ toYaml .Values.env | indent 10 }} + # Values.env's HOSTNAME isn't fundamentally different from $HOSTNAME, but this way we get a distinguished name for InfluxDB at runtime. + - name: INFLUXDB_HOSTNAME + value: "$(_HOSTNAME).{{ include "influxdb.fullname" . }}-meta" + {{- end }} + livenessProbe: + httpGet: + path: {{ .Values.livenessProbe.path | default "/ping" }} + port: meta + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30 }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5 }} + readinessProbe: + httpGet: + path: {{ .Values.readinessProbe.path | default "/ping" }} + port: meta + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 5 }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 1 }} + {{- if .Values.startupProbe.enabled }} + startupProbe: + httpGet: + path: {{ .Values.startupProbe.path | default "/ping" }} + port: meta + failureThreshold: {{ .Values.startupProbe.failureThreshold | default 6 }} + periodSeconds: {{ .Values.startupProbe.periodSeconds | default 5 }} + {{- end }} + volumeMounts: + - name: {{ include "influxdb.fullname" . }}-meta + mountPath: /var/lib/influxdb + - name: config + mountPath: /etc/influxdb + {{- if .Values.initScripts.enabled }} + - name: init + mountPath: /docker-entrypoint-initdb.d + {{- end }} + volumes: + - name: config + configMap: + name: {{ include "influxdb.fullname" . }}-meta + {{- if .Values.initScripts.enabled }} + - name: init + configMap: + name: {{ include "influxdb.fullname" . }}-init + {{- end }} + {{- if (not .Values.persistence.enabled ) }} + - name: {{ include "influxdb.fullname" . }}-meta + emptyDir: {} + {{- end }} + {{- if .Values.schedulerName }} + schedulerName: "{{ .Values.schedulerName }}" + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} + {{- end }} + {{- if .Values.persistence.enabled }} + volumeClaimTemplates: + - metadata: + name: {{ include "influxdb.fullname" . }}-meta + annotations: + {{- range $key, $value := .Values.persistence.annotations }} + {{ $key }}: "{{ $value }}" + {{- end }} + spec: + accessModes: + - {{ .Values.persistence.accessMode | quote}} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} + {{- if .Values.persistence.storageClass }} + {{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" + {{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/post-install-set-auth.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/post-install-set-auth.yaml new file mode 100644 index 0000000000..22e2ca2eb1 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/post-install-set-auth.yaml @@ -0,0 +1,92 @@ +{{- if .Values.setDefaultUser.enabled -}} +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "influxdb.fullname" . }}-set-auth + labels: + {{- include "influxdb.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install + "helm.sh/hook-delete-policy": {{ .Values.setDefaultUser.hookDeletePolicy }} +spec: + activeDeadlineSeconds: {{ .Values.setDefaultUser.activeDeadlineSeconds }} + backoffLimit: {{ .Values.setDefaultUser.backoffLimit }} + template: + metadata: + labels: + {{- include "influxdb.selectorLabels" . | nindent 8 }} + spec: + containers: + - name: {{ include "influxdb.fullname" . }}-set-auth + image: "{{ .Values.setDefaultUser.image }}" + env: + - name: INFLUXDB_USER + valueFrom: + secretKeyRef: + {{- if .Values.setDefaultUser.user.existingSecret }} + name: {{ .Values.setDefaultUser.user.existingSecret -}} + {{ else }} + name: {{ include "influxdb.fullname" . }}-auth + {{- end }} + key: influxdb-user + - name: INFLUXDB_PASSWORD + valueFrom: + secretKeyRef: + {{- if .Values.setDefaultUser.user.existingSecret }} + name: {{ .Values.setDefaultUser.user.existingSecret -}} + {{ else }} + name: {{ include "influxdb.fullname" . }}-auth + {{- end }} + key: influxdb-password + args: + - "/bin/sh" + - "-c" + - | + curl -X POST http://{{ include "influxdb.fullname" . }}:{{ .Values.config.http.bind_address | default 8086 }}/query \ + --data-urlencode \ + "q=CREATE USER \"${INFLUXDB_USER}\" WITH PASSWORD '${INFLUXDB_PASSWORD}' {{ .Values.setDefaultUser.user.privileges }}" + restartPolicy: {{ .Values.setDefaultUser.restartPolicy }} + +{{- else if .Values.setCustomUser.enabled -}} + +apiVersion: batch/v1 +kind: Job +metadata: + name: {{ include "influxdb.fullname" . }}-set-auth + labels: + {{- include "influxdb.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": post-install + "helm.sh/hook-delete-policy": {{ .Values.setDefaultUser.hookDeletePolicy }} +spec: + activeDeadlineSeconds: {{ .Values.setDefaultUser.activeDeadlineSeconds }} + backoffLimit: {{ .Values.setDefaultUser.backoffLimit }} + template: + metadata: + labels: + {{- include "influxdb.selectorLabels" . | nindent 8 }} + spec: + containers: + - name: {{ include "influxdb.fullname" . }}-set-auth + image: "{{ .Values.setCustomUser.image }}" + env: + - name: INFLUXDB_USER + valueFrom: + secretKeyRef: + name: {{.Values.setCustomUser.secretName}} + key: INFLUX_USER + - name: INFLUXDB_PASSWORD + valueFrom: + secretKeyRef: + name: {{.Values.setCustomUser.secretName}} + key: INFLUX_PASSWORD + args: + - "/bin/sh" + - "-c" + - | + curl -X POST http://{{ include "influxdb.fullname" . }}:{{ .Values.config.http.bind_address | default 8086 }}/query \ + --data-urlencode \ + "q=CREATE USER \"${INFLUXDB_USER}\" WITH PASSWORD '${INFLUXDB_PASSWORD}' {{ .Values.setDefaultUser.user.privileges }}" + restartPolicy: {{ .Values.setDefaultUser.restartPolicy }} + +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/secret.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/secret.yaml new file mode 100644 index 0000000000..c6390f1eb9 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/secret.yaml @@ -0,0 +1,17 @@ +{{- if .Values.setDefaultUser.enabled -}} +{{- if not (.Values.setDefaultUser.user.existingSecret) -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "influxdb.fullname" . }}-auth + labels: + {{- include "influxdb.labels" . | nindent 4 }} +data: + {{- if .Values.setDefaultUser.user.password }} + influxdb-password: {{ .Values.setDefaultUser.user.password | b64enc | quote }} + {{- else }} + influxdb-password: {{ randAlphaNum 10 | b64enc | quote }} + {{- end }} + influxdb-user: {{ .Values.setDefaultUser.user.username | b64enc | quote }} +{{- end -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/service.yaml new file mode 100644 index 0000000000..c5121e5e14 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/service.yaml @@ -0,0 +1,53 @@ +apiVersion: v1 +kind: Service +metadata: +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} + name: {{ include "influxdb.fullname" . }} + labels: + {{- include "influxdb.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - name: api + port: {{ .Values.config.http.bind_address | default 8086 }} + targetPort: api + - name: rpc + port: {{ .Values.config.rpc.bind_address | default 8088 }} + targetPort: rpc + {{- if .Values.config.graphite.enabled }} + - name: graphite + port: {{ .Values.config.graphite.bind_address | default 2003 }} + targetPort: graphite + {{- end }} + {{- if .Values.config.collectd.enabled }} + - name: collectd + port: {{ .Values.config.collectd.bind_address | default 25826 }} + protocol: UDP + targetPort: collectd + {{- end }} + {{- if .Values.config.udp.enabled }} + - name: udp + port: {{ .Values.config.udp.bind_address | default 8089 }} + protocol: UDP + targetPort: udp + {{- end }} + {{- if .Values.config.opentsdb.enabled }} + - name: opentsdb + port: {{ .Values.config.opentsdb.bind_address | default 4242 }} + targetPort: opentsdb + {{- end }} + selector: + {{- include "influxdb.selectorLabels" . | nindent 4 }} +{{- if .Values.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} +{{- end }} +{{- if .Values.service.externalIPs }} + externalIPs: +{{ toYaml .Values.service.externalIPs | indent 4 }} +{{- end }} +{{- if .Values.service.externalTrafficPolicy }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/serviceaccount.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/serviceaccount.yaml new file mode 100644 index 0000000000..c496696559 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "influxdb.serviceAccountName" . }} + labels: + {{- include "influxdb.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/statefulset.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/statefulset.yaml new file mode 100644 index 0000000000..13eda03d39 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/statefulset.yaml @@ -0,0 +1,180 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ include "influxdb.fullname" . }} + labels: + {{- include "influxdb.labels" . | nindent 4 }} +spec: + {{- if .Values.enterprise.enabled }} + replicas: {{ .Values.enterprise.clusterSize }} + {{ else }} + replicas: 1 + {{- end}} + selector: + matchLabels: + {{- include "influxdb.selectorLabels" . | nindent 6 }} + serviceName: "{{ include "influxdb.fullname" . }}" + template: + metadata: + labels: + {{- include "influxdb.selectorLabels" . | nindent 8 }} + {{- if .Values.podAnnotations }} + annotations: +{{ toYaml .Values.podAnnotations | indent 8 }} + {{- end }} + spec: + {{- if .Values.schedulerName }} + schedulerName: "{{ .Values.schedulerName }}" + {{- end }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + {{- if .Values.tolerations }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} + {{- end }} + {{- if .Values.securityContext }} + securityContext: +{{ toYaml .Values.securityContext | indent 8 }} + {{- end }} + {{- if .Values.image.pullSecrets }} + imagePullSecrets: + {{- range .Values.image.pullSecrets }} + - name: {{ . }} + {{- end}} + {{- end }} + serviceAccountName: {{ include "influxdb.serviceAccountName" . }} + containers: + - name: {{ include "influxdb.fullname" . }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy | quote }} + resources: +{{ toYaml .Values.resources | indent 10 }} + ports: + - name: api + containerPort: {{ .Values.config.http.bind_address | default 8086 }} + {{- if .Values.config.graphite.enabled }} + - name: graphite + containerPort: {{ .Values.config.graphite.bind_address | default 2003 }} + {{- end }} + {{- if .Values.config.collectd.enabled }} + - name: collectd + containerPort: {{ .Values.config.collectd.bind_address | default 25826 }} + protocol: UDP + {{- end }} + {{- if .Values.config.udp.enabled }} + - name: udp + containerPort: {{ .Values.config.udp.bind_address | default 8089 }} + protocol: UDP + {{- end }} + {{- if .Values.config.opentsdb.enabled }} + - name: opentsdb + containerPort: {{ .Values.config.opentsdb.bind_address | default 4242 }} + {{- end }} + - name: rpc + containerPort: {{ .Values.config.rpc.bind_address | default 8088 }} + {{- if .Values.enterprise.enabled }} + - name: meta + containerPort: {{ .Values.config.meta.bind_address | default 8091 }} + {{- end }} + {{- if .Values.env }} + env: +{{ toYaml .Values.env | indent 10 }} + {{- if .Values.enterprise.enabled }} + - name: INFLUXDB_HOSTNAME # Values.env's HOSTNAME isn't fundamentally different from $HOSTNAME, but this way weg get a distinguished name at runtime. + value: "$(_HOSTNAME).{{ include "influxdb.fullname" . }}" + {{- end }} + {{- end }} + {{- if .Values.envFromSecret }} + envFrom: + - secretRef: + name: {{ .Values.envFromSecret }} + {{- end }} + livenessProbe: + httpGet: + path: {{ .Values.livenessProbe.path | default "/ping" }} + port: api + scheme: {{ .Values.livenessProbe.scheme | default "HTTP" }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30 }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5 }} + readinessProbe: + httpGet: + path: {{ .Values.readinessProbe.path | default "/ping" }} + port: api + scheme: {{ .Values.readinessProbe.scheme | default "HTTP" }} + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 5 }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 1 }} + {{- if .Values.startupProbe.enabled }} + startupProbe: + httpGet: + path: {{ .Values.startupProbe.path | default "/ping" }} + port: api + scheme: {{ .Values.startupProbe.scheme | default "HTTP" }} + failureThreshold: {{ .Values.startupProbe.failureThreshold | default 6 }} + periodSeconds: {{ .Values.startupProbe.periodSeconds | default 5 }} + {{- end }} + volumeMounts: + - name: {{ include "influxdb.fullname" . }}-data + mountPath: /var/lib/influxdb + - name: config + mountPath: /etc/influxdb + {{- if .Values.initScripts.enabled }} + - name: init + mountPath: /docker-entrypoint-initdb.d + {{- end }} + {{- if .Values.mountPoints }} +{{ toYaml .Values.mountPoints | indent 8 }} + {{- end }} + {{- if .Values.extraContainers }} +{{ toYaml .Values.extraContainers | indent 6}} + {{- end }} + volumes: + - name: config + configMap: + name: {{ include "influxdb.fullname" . }} + {{- if .Values.initScripts.enabled }} + - name: init + configMap: + name: {{ include "influxdb.fullname" . }}-init + {{- end }} + {{- if (not .Values.persistence.enabled ) }} + - name: {{ include "influxdb.fullname" . }}-data + emptyDir: {} + {{- end }} + # Cannot use existing claim in enterprise mode + {{- if and .Values.persistence.enabled .Values.persistence.existingClaim (not .Values.enterprise.enabled) }} + - name: {{ include "influxdb.fullname" . }}-data + persistentVolumeClaim: + claimName: {{ .Values.persistence.existingClaim }} + {{- end }} + {{- if .Values.volumes }} +{{ toYaml .Values.volumes | indent 6 }} + {{- end }} + # Must use volume claim template in enterprise mode + {{- if and .Values.persistence.enabled (or (not .Values.persistence.existingClaim) .Values.enterprise.enabled) }} + volumeClaimTemplates: + - metadata: + name: {{ include "influxdb.fullname" . }}-data + annotations: + {{- range $key, $value := .Values.persistence.annotations }} + {{ $key }}: "{{ $value }}" + {{- end }} + spec: + accessModes: + - {{ .Values.persistence.accessMode | quote}} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} + {{- if .Values.persistence.storageClass }} + {{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" + {{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" + {{- end }} + {{- end }} + {{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/values.yaml new file mode 100644 index 0000000000..63751f9c64 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/values.yaml @@ -0,0 +1,349 @@ +## influxdb image version +## ref: https://hub.docker.com/r/library/influxdb/tags/ +image: + repository: "influxdb" + tag: "1.8.4" + pullPolicy: Always + ## If specified, use these secrets to access the images + pullSecrets: {} + + +serviceAccount: + create: true + name: + annotations: {} + +## Customize liveness, readiness and startup probes +## ref: https://docs.influxdata.com/influxdb/v1.7/tools/api/#ping-http-endpoint +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ +## +livenessProbe: {} + # path: "/ping" + # initialDelaySeconds: 30 + # timeoutSeconds: 5 + # scheme: HTTP + +readinessProbe: {} + # path: "/ping" + # initialDelaySeconds: 5 + # timeoutSeconds: 1 + # scheme: HTTP + +securityContext: {} + # runAsUser: 999 + # runAsGroup: 999 + +startupProbe: + enabled: false + # path: "/ping" + # failureThreshold: 6 + # periodSeconds: 5 + # scheme: HTTP + +## Specify a service type +## NodePort is default +## ref: http://kubernetes.io/docs/user-guide/services/ +## +service: + ## Add annotations to service + # annotations: {} + type: ClusterIP + # externalIPs: [] + # externalTrafficPolicy: "" + +## Persist data to a persistent volume +## +persistence: + enabled: true + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + ## influxdb data Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: local-storage + annotations: + accessMode: ReadWriteOnce + size: 30Gi + +## Deploy InfluxDB Enterprise - License required +## ref: https://www.influxdata.com/products/influxdb-enterprise/ +enterprise: + enabled: false + licensekey: {} + clusterSize: 4 + meta: + image: + ## This image contains the enterprise meta node package for clustering. + ## It is meant to be used in conjunction with the influxdb:data package of the same version. + ## ref: https://hub.docker.com/_/influxdb + tag: meta + clusterSize: 3 + ## seed is hashed and used as `internal-shared-secret` for Meta service. + seed: dead-beef-cafe-bae + ## Configure resource requests and limits + ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ + resources: {} + # resources: + # requests: + # memory: 512Mi + # cpu: 2 + # limits: + # memory: 1Gi + # cpu: 4 + + +## Create custom user through Kubernetes job +## Uses a HollaEx secret as a data source +## +setCustomUser: + enabled: true + + image: curlimages/curl:latest + activeDeadline: 300 + restartPolicy: OnFailure + + secretName: hollaex-network-secret + +## Create default user through Kubernetes job +## Defaults indicated below +## + +setDefaultUser: + enabled: false + + ## Image of the container used for job + ## Default: appropriate/curl:latest + ## + image: curlimages/curl:latest + + ## Deadline for job so it does not retry forever. + ## Default: activeDeadline: 300 + ## + activeDeadline: 300 + + ## Specify the number of retries before considering job as failed. + ## https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#pod-backoff-failure-policy + ## + backoffLimit: 6 + + ## Hook delete policy for helm. + ## Default: hookDeletePolicy: hook-succeeded + ## + hookDeletePolicy: hook-succeeded + + ## Restart policy for job + ## Default: OnFailure + restartPolicy: OnFailure + + user: + + ## The user name + ## Default: "admin" + username: "admin" + + ## User password + ## single quotes must be escaped (\') + ## Default: (Randomly generated 10 characters of AlphaNum) + # password: + + ## The user name and password are obtained from an existing secret. The expected + ## keys are `influxdb-user` and `influxdb-password`. + ## If set, the username and password values above are ignored. + # existingSecret: influxdb-auth + + ## User privileges + ## Default: "WITH ALL PRIVILEGES" + privileges: "WITH ALL PRIVILEGES" + +## Configure resource requests and limits +## ref: http://kubernetes.io/docs/user-guide/compute-resources/ +resources: + requests: + memory: 2Gi + cpu: 0.1 + limits: + memory: 2Gi + cpu: 2 + +# Annotations to be added to InfluxDB pods +podAnnotations: {} + +# Labels to be added to InfluxDB pods +podLabels: {} + +ingress: + enabled: false + tls: false + # secretName: my-tls-cert # only needed if tls above is true + hostname: influxdb.foobar.com + annotations: {} + # kubernetes.io/ingress.class: "nginx" + # kubernetes.io/tls-acme: "true" + path: / + + +## Add custom volume and volumeMounts +# volumes: +# - name: ssl-cert-volume +# secret: +# secretName: secret-name +# mountPoints: +# - name: ssl-cert-volume +# mountPath: /etc/ssl/certs/selfsigned/ +# readOnly: true + +## Additional containers to be added to the pod. +extraContainers: {} +# - name: my-sidecar +# image: nginx:latest + +## Use an alternate scheduler, e.g. "stork". +## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ +## +# schedulerName: + +## Node labels for pod assignment +## Ref: https://kubernetes.io/docs/user-guide/node-selection/ +## +nodeSelector: {} + +## Affinity for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity +## +affinity: {} + +## Tolerations for pod assignment +## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ +## +tolerations: [] +# - key: "key" +# operator: "Equal|Exists" +# value: "value" +# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + +## The InfluxDB image uses several environment variables to automatically +## configure certain parts of the server. +## Ref: https://hub.docker.com/_/influxdb/ +env: {} + # - name: INFLUXDB_DB + # value: "demo" + +## The name of a secret in the same kubernetes namespace which contain values +## to be added to the environment. +## This can be used, for example, to set the INFLUXDB_HTTP_SHARED_SECRET +## environment variable. +envFromSecret: {} + +## InfluxDB configuration +## ref: https://docs.influxdata.com/influxdb/v1.7/administration/config +config: + reporting_disabled: false + rpc: {} + meta: {} + data: {} + coordinator: {} + retention: {} + shard_precreation: {} + monitor: {} + http: {max-body-size: 0} + logging: {} + subscriber: {} + graphite: {} + collectd: {} + opentsdb: {} + udp: {} + continuous_queries: {} + tls: {} + +# Allow executing custom init scripts +# +# If the container finds any files with the extensions .sh or .iql inside of the +# /docker-entrypoint-initdb.d folder, it will execute them. The order they are +# executed in is determined by the shell. This is usually alphabetical order. +initScripts: + enabled: false + scripts: + init.iql: |+ + CREATE DATABASE "telegraf" WITH DURATION 30d REPLICATION 1 NAME "rp_30d" + +backup: + enabled: false + ## By default emptyDir is used as a transitory volume before uploading to object store. + ## As such, ensure that a sufficient ephemeral storage request is set to prevent node disk filling completely. + resources: + requests: + # memory: 512Mi + # cpu: 2 + ephemeral-storage: "8Gi" + # limits: + # memory: 1Gi + # cpu: 4 + # ephemeral-storage: "16Gi" + ## If backup destination is PVC, or want to use intermediate PVC before uploading to object store. + persistence: + enabled: true + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + annotations: + accessMode: ReadWriteOnce + size: 20Gi + schedule: "0 0 * * *" + startingDeadlineSeconds: "" + annotations: {} + podAnnotations: {} + + ## Google Cloud Storage + # gcs: + # serviceAccountSecret: influxdb-backup-key + # serviceAccountSecretKey: key.json + # destination: gs://bucket/influxdb + + ## Azure + ## Secret is expected to have connection string stored in `connection-string` field + ## Existing container will be used or private one withing storage account will be created. + # azure: + # storageAccountSecret: influxdb-backup-azure-key + # destination_container: influxdb-container + # destination_path: "" + + ## Amazon S3 or compatible + ## Secret is expected to have AWS (or compatible) credentials stored in `credentials` field. + ## Please look at https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where + ## for the credentials format. + ## The bucket should already exist. + # s3: + # credentialsSecret: aws-credentials-secret + # destination: s3://bucket/path + # ## Optional. Specify if you're using an alternate S3 endpoint. + # # endpointUrl: "" + +backupRetention: + enabled: false + resources: + requests: + # memory: 512Mi + # cpu: 2 + # limits: + # memory: 1Gi + # cpu: 4 + schedule: "0 0 * * *" + startingDeadlineSeconds: + annotations: {} + podAnnotations: {} + daysToRetain: 7 + # s3: + # credentialsSecret: aws-credentials-secret + # bucketName: bucket + # ## Optional. Specify if you're using an alternate S3 endpoint. + # # endpointUrl: "" diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/Chart.yaml new file mode 100755 index 0000000000..75594c54df --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for bitholla-hollaex-mongodb +name: bitholla-hollaex-mongodb +version: 0.1.0 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/NOTES.txt new file mode 100755 index 0000000000..e69de29bb2 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/_helpers.tpl new file mode 100755 index 0000000000..043ba16132 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "bitholla-hollaex-redis.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bitholla-hollaex-redis.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/deployment.yaml new file mode 100755 index 0000000000..5c94a08362 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/deployment.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{.Release.Name}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: {{.Release.Name}} + tier: backend + template: + metadata: + labels: + app: {{.Release.Name}} + tier: backend + spec: + + volumes: + - name: mongo-mount + persistentVolumeClaim: + claimName: {{.Values.pvc.name}} + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: mongo:4.4.6-bionic + imagePullPolicy: IfNotPresent + ports: + - name: port + containerPort: 27017 + # command: ["redis-server", "--requirepass", "$(REDIS_AUTH_PASSWORD)"] + env: + - name: ME_CONFIG_MONGODB_ADMINPASSWORD + valueFrom: + secretKeyRef: + name: {{.Values.setAuth.secretName}} + key: MONGO_PASSWORD + - name: ME_CONFIG_MONGODB_ADMINUSERNAME + valueFrom: + secretKeyRef: + name: {{.Values.setAuth.secretName}} + key: MONGO_USERNAME + resources: + limits: + memory: "1024Mi" + cpu: "500m" + requests: + memory: "256Mi" + cpu: "100m" + volumeMounts: + - name: mongo-mount + mountPath: /data/db + subPath: db \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/pvc.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/pvc.yaml new file mode 100644 index 0000000000..bd3dd06225 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/pvc.yaml @@ -0,0 +1,15 @@ +{{- if .Values.pvc.create }} + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{.Values.pvc.name}} + namespace: {{.Release.namespace}} +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{.Values.pvc.size}} + +{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/service.yaml new file mode 100755 index 0000000000..b5d28e7ee1 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/service.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} + labels: + app: {{.Release.Name}} +spec: + {{if .Values.NodePort.enable }} + + type: NodePort + ports: + - port: 27017 + targetPort: 27017 + nodePort: {{.Values.NodePort.port}} + + {{ else }} + + type: ClusterIP + ports: + - port: 27017 + targetPort: 27017 + + {{ end }} + selector: + app: {{.Release.Name}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/values.yaml new file mode 100755 index 0000000000..340480f309 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/values.yaml @@ -0,0 +1,16 @@ +# Default values for bitholla-hollaex-nginx. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +NodePort: + enable: false + port: + +pvc: + create: true + size: 20Gi + name: mongo-volume + +nodeSelector: {} + +setAuth: + secretName: hollaex-network-secret \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-network-server/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/Chart.yaml new file mode 100755 index 0000000000..be4d12b80c --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for hollaex-network-server +name: hollaex-network-server +version: 0.1.0 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/_helpers.tpl new file mode 100755 index 0000000000..7a6b694414 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "bitholla-hollaex-server.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "bitholla-hollaex-server.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/autoscaler.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/autoscaler.yaml new file mode 100644 index 0000000000..00de381574 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/autoscaler.yaml @@ -0,0 +1,26 @@ +{{- if .Values.autoScaling.hpa.enable }} + +{{- $minReplicas := .Values.stable.replicaCount | int }} +{{- $maxReplicas := add 1 $minReplicas }} + +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{.Release.Name}} + minReplicas: {{ $minReplicas }} + maxReplicas: {{ $maxReplicas }} + metrics: + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.hpa.memory.threshold }} + +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/cronjob.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/cronjob.yaml new file mode 100644 index 0000000000..aedf9a63f6 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/cronjob.yaml @@ -0,0 +1,86 @@ +{{- if .Values.cronjob.enable }} + +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + schedule: "{{.Values.cronjob.schedule}}" + successfulJobsHistoryLimit: 3 + failedJobsHistoryLimit: 2 + concurrencyPolicy: Replace + jobTemplate: + spec: + template: + spec: + +{{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + +{{- if .Values.nodeSelector }} + nodeSelector: + {{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + command: ["/bin/bash", "-c"] + + {{- if eq .Values.cronjob.mode "checkExchangeStatus" }} + + args: + - node tools/crons/checkExchangeStatus.js; + + {{- else if eq .Values.cronjob.mode "redistribute" }} + + args: + - node tools/crons/redistribute.js; + + {{- else if eq .Values.cronjob.mode "userLevel" }} + + args: + - node tools/crons/userLevel.js; + + {{- else if eq .Values.cronjob.mode "checkcoreversion" }} + + args: + - node tools/crons/checkCoreVersion.js; + + {{- end }} + + imagePullPolicy: Always + + envFrom: + - configMapRef: + name: {{.Values.envName}} + - secretRef: + name: {{.Values.secretName}} + + env: + - name: DEPLOYMENT_MODE + value: {{.Values.DEPLOYMENT_MODE}} + - name: DB_SSL + value: "{{.Values.db_ssl}}" + - name: ELASTIC_APM_SERVICE_NAME + value: {{.Release.Name}} + - name: ELASTIC_APM_SERVER_URL + value: {{.Values.APM_URL}} + + resources: + limits: + memory: "300Mi" + cpu: "100m" + requests: + memory: "25Mi" + cpu: "15m" + + restartPolicy: OnFailure + +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/deployment.yaml new file mode 100644 index 0000000000..8591a32c7a --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/deployment.yaml @@ -0,0 +1,168 @@ +{{- if and (eq .Values.job.enable false) (eq .Values.cronjob.enable false) }} + +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + revisionHistoryLimit: 3 + replicas: {{.Values.stable.replicaCount}} + +{{- if or (eq .Values.DEPLOYMENT_MODE "api") (eq .Values.DEPLOYMENT_MODE "stream") }} + + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + +{{- else }} + + strategy: + type: Recreate + +{{- end }} + +{{- if eq .Values.DEPLOYMENT_MODE "api" }} + minReadySeconds: 15 +{{- end }} + + selector: + matchLabels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + tier: backend + template: + metadata: + annotations: + seccomp.security.alpha.kubernetes.io/pod: "runtime/default" + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + tier: backend + spec: + +{{- if and (ne .Values.DEPLOYMENT_MODE "api") (ne .Values.DEPLOYMENT_MODE "stream") }} +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} +{{- end }} + + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: role + operator: In + values: + - {{.Release.Namespace}} + topologyKey: "kubernetes.io/hostname" + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + imagePullPolicy: Always + securityContext: + allowPrivilegeEscalation: false + ports: + - name: websocket-port + containerPort: 10080 + - name: port + containerPort: 10010 + +{{- if eq .Values.DEPLOYMENT_MODE "api" }} + + command: ["/bin/bash"] + args: ["-c", "/app/api-binary"] + # args: ["-c", "node app.js"] + + +{{- else if eq .Values.DEPLOYMENT_MODE "stream" }} + + command: ["/bin/bash"] + args: ["-c", "/app/stream-binary"] + # args: ["-c", "node ws/index.js"] + +{{- else if eq .Values.DEPLOYMENT_MODE "job" }} + + command: ["/bin/bash"] + args: ["-c", "node tools/jobs/job.js"] + +{{- else if eq .Values.DEPLOYMENT_MODE "engine" }} + + command: ["/bin/bash"] + args: ["-c", "/app/engine-binary"] + # args: ["-c", "node queue/queue.js"] + +{{- end }} + + envFrom: + - configMapRef: + name: {{.Values.envName}} + - secretRef: + name: {{.Values.secretName}} + env: + - name: PAIR + value: {{.Values.PAIR}} + - name: DB_SSL + value: "{{.Values.db_ssl}}" + - name: ELASTIC_APM_SERVICE_NAME + value: {{.Release.Name}} + - name: CURRENCIES + valueFrom: + configMapKeyRef: + name: {{.Values.envCoinsName}} + key: CURRENCIES + - name: PAIRS + valueFrom: + configMapKeyRef: + name: {{.Values.envPairsName}} + key: PAIRS + + resources: + limits: +{{- if or (eq .Values.DEPLOYMENT_MODE "api") (eq .Values.DEPLOYMENT_MODE "ws") (eq .Values.DEPLOYMENT_MODE "job") }} + memory: "1536Mi" +{{- else }} + memory: "2048Mi" +{{- end }} + cpu: "1000m" + requests: +{{- if or (eq .Values.DEPLOYMENT_MODE "api") (eq .Values.DEPLOYMENT_MODE "ws") }} + memory: "1536Mi" +{{- else }} + memory: "512Mi" +{{- end }} + cpu: "10m" + +{{- if .Values.podRestart_webhook_url }} + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "export hostname=`hostname` && curl -X POST -H 'Content-type: application/json' --data '{\"attachments\": [ { \"color\": \"#A569BD\", \"title\": \"😵 Pod has been terminated!\", \"text\": \"Pod '\"${hostname}\"' just has been terminated.\" } ] }' {{.Values.podRestart_webhook_url}}"] +{{- end }} + +{{- if eq .Values.DEPLOYMENT_MODE "api" }} + readinessProbe: + exec: + command: + - curl + - http://localhost:10010/v2/health + initialDelaySeconds: 1 + periodSeconds: 15 +{{- end }} + +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/job.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/job.yaml new file mode 100644 index 0000000000..f195edfef1 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/job.yaml @@ -0,0 +1,190 @@ +{{- if .Values.job.enable }} + +apiVersion: batch/v1 +kind: Job +metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + template: + spec: + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + command: ["/bin/bash", "-c"] + +{{- if eq .Values.job.mode "add_coin" }} + + args: + - node tools/dbs/addCoin.js; + +{{- else if eq .Values.job.mode "remove_coin" }} + + args: + - node tools/dbs/removeCoin.js; + +{{- else if eq .Values.job.mode "add_pair" }} + + args: + - node tools/dbs/addPair.js; + +{{- else if eq .Values.job.mode "remove_pair" }} + + args: + - node tools/dbs/removePair.js; + +{{- else if eq .Values.job.mode "activate_coin" }} + + args: + - node tools/dbs/activateCoin.js; + + +{{- else if eq .Values.job.mode "activate_pair" }} + + args: + - node tools/dbs/activatePair.js; + +{{- else if eq .Values.job.mode "change_coin_owner" }} + + args: + - node tools/dbs/changeCoinOwner.js; + +{{- else if eq .Values.job.mode "change_pair_owner" }} + + args: + - node tools/dbs/changePairOwner.js; + +{{- else if eq .Values.job.mode "run_triggers" }} + + args: + - sequelize db:migrate; + node tools/dbs/runTriggers.js; + node tools/dbs/initializeInflux.js; + +{{- end }} + + envFrom: + - configMapRef: + name: {{.Values.envName}} + - secretRef: + name: {{.Values.secretName}} + + env: + +{{- if eq .Values.job.mode "add_coin" }} + + - name: COIN_CODE + value: "{{.Values.job.env.coin_code}}" + - name: COIN_FULLNAME + value: "{{.Values.job.env.coin_fullname}}" + - name: COIN_ALLOW_DEPOSIT + value: "{{.Values.job.env.coin_allow_deposit}}" + - name: COIN_ALLOW_WITHDRAWAL + value: "{{.Values.job.env.coin_allow_withdrawal}}" + - name: COIN_WITHDRAWAL_FEE + value: "{{.Values.job.env.coin_withdrawal_fee}}" + - name: COIN_MIN + value: "{{.Values.job.env.coin_min}}" + - name: COIN_MAX + value: "{{.Values.job.env.coin_max}}" + - name: COIN_INCREMENT_UNIT + value: "{{.Values.job.env.coin_increment_unit}}" + - name: COIN_ACTIVE + value: "{{.Values.job.env.coin_active}}" + +{{- else if eq .Values.job.mode "change_coin_owner" }} + + - name: COIN_CODE + value: {{.Values.job.env.coin_code}} + - name: COIN_OWNER_ID + value: "{{.Values.job.env.coin_owner_id}}" + +{{- else if eq .Values.job.mode "remove_coin" }} + + - name: COIN_CODE + value: {{.Values.job.env.coin_code}} + +{{- else if eq .Values.job.mode "activate_coin" }} + + - name: COIN_CODE + value: {{.Values.job.env.coin_code}} + +{{- else if eq .Values.job.mode "activate_pair" }} + + - name: PAIR_CODE + value: {{.Values.job.env.pair_code}} + +{{- else if eq .Values.job.mode "change_pair_owner" }} + + - name: PAIR_CODE + value: {{.Values.job.env.pair_code}} + - name: PAIR_OWNER_ID + value: "{{.Values.job.env.pair_owner_id}}" + +{{- else if eq .Values.job.mode "add_pair" }} + + - name: PAIR_CODE + value: "{{.Values.job.env.pair_code}}" + - name: PAIR_BASE + value: "{{.Values.job.env.pair_base}}" + - name: PAIR_2 + value: "{{.Values.job.env.pair_2}}" + - name: MIN_SIZE + value: "{{.Values.job.env.min_size}}" + - name: MAX_SIZE + value: "{{.Values.job.env.max_size}}" + - name: MIN_PRICE + value: "{{.Values.job.env.min_price}}" + - name: MAX_PRICE + value: "{{.Values.job.env.max_price}}" + - name: INCREMENT_SIZE + value: "{{.Values.job.env.increment_size}}" + - name: INCREMENT_PRICE + value: "{{.Values.job.env.increment_price}}" + - name: PAIR_ACTIVE + value: "{{.Values.job.env.pair_active}}" + +{{- else if eq .Values.job.mode "remove_pair" }} + + - name: PAIR_CODE + value: {{.Values.job.env.pair_code}} + +{{- end }} + + - name: CURRENCIES + valueFrom: + configMapKeyRef: + name: {{.Values.envCoinsName}} + key: CURRENCIES + + - name: PAIRS + valueFrom: + configMapKeyRef: + name: {{.Values.envPairsName}} + key: PAIRS + + resources: + limits: + memory: "300Mi" + cpu: "100m" + requests: + memory: "50Mi" + cpu: "15m" + +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + restartPolicy: Never + backoffLimit: 0 + +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/service.yaml new file mode 100755 index 0000000000..7e41867825 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/service.yaml @@ -0,0 +1,23 @@ +{{- if and (eq .Values.job.enable false) (eq .Values.cronjob.enable false) }} + +kind: Service +apiVersion: v1 +metadata: + labels: + app: {{.Release.Name}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + type: ClusterIP + ports: + - name: port + port: 10010 + targetPort: 10010 + - name: websocket-port + port: 10080 + targetPort: 10080 + + selector: + app: {{.Release.Name}} + +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/values.yaml new file mode 100755 index 0000000000..f97d2c3481 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-network-server/values.yaml @@ -0,0 +1,46 @@ +# Default values for bitholla-hollaex-nginx. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +imageRegistry: bitholla/hollaex-network +dockerTag: + +imagePullSecrets: + - name: docker-registry-secret + +envName: hollaex-network-env +secretName: hollaex-network-secret + +envCoinsName: hollaex-network-env-coins +envPairsName: hollaex-network-env-pairs + +DEPLOYMENT_MODE: all + +db_ssl: false + +stable: + replicaCount: 1 + +staging: + enable: false + replicaCount: 1 + dockerTag: + +nodeSelector: {} + +autoScaling: + hpa: + enable: false + memory: + threshold: 80 + +podRestart_webhook_url: + +job: + enable: false + env: + coin_code: + pair_code: + +cronjob: + enable: false + schedule: \ No newline at end of file diff --git a/settings/configmap b/settings/configmap deleted file mode 100644 index 543b58938d..0000000000 --- a/settings/configmap +++ /dev/null @@ -1,161 +0,0 @@ -########################################################################################## -#### All HollaEx CLI commands rely on ENVIRONMENT_EXCHANGE_NAME below. DO NOT MODIFY IT. #### -######################################################################################### - -ENVIRONMENT_EXCHANGE_NAME=hollaex - -################################ -#### GENERAL CONFIGURATIONS #### -################################ - -HOLLAEX_CONFIGMAP_API_NAME=my-hollaex-exchange -HOLLAEX_CONFIGMAP_DOMAIN=http://localhost - -HOLLAEX_CONFIGMAP_LOGO_IMAGE=https://bitholla.s3.ap-northeast-2.amazonaws.com/kit/LOGO_IMAGE_LIGHT - -ENVIRONMENT_WEB_DEFAULT_COUNTRY=KR -HOLLAEX_CONFIGMAP_EMAILS_TIMEZONE=UTC -HOLLAEX_CONFIGMAP_VALID_LANGUAGES=en -HOLLAEX_CONFIGMAP_NEW_USER_DEFAULT_LANGUAGE=en -ENVIRONMENT_WEB_DEFAULT_LANGUAGE=$HOLLAEX_CONFIGMAP_VALID_LANGUAGES -HOLLAEX_CONFIGMAP_DEFAULT_THEME=dark - -HOLLAEX_CONFIGMAP_CURRENCIES=xht,usdt -HOLLAEX_CONFIGMAP_PAIRS='xht-usdt' - -HOLLAEX_CONFIGMAP_API_HOST=http://localhost/api - -HOLLAEX_CONFIGMAP_USER_LEVEL_NUMBER=4 - -HOLLAEX_CONFIGMAP_ADMIN_EMAIL= -HOLLAEX_CONFIGMAP_KYC_EMAIL= -HOLLAEX_CONFIGMAP_SUPPORT_EMAIL=support@bitholla.com -HOLLAEX_CONFIGMAP_SUPERVISOR_EMAIL= -HOLLAEX_CONFIGMAP_SENDER_EMAIL= - -HOLLAEX_CONFIGMAP_NEW_USER_IS_ACTIVATED=true - -HOLLAEX_CONFIGMAP_SMTP_SERVER= -HOLLAEX_CONFIGMAP_SMTP_PORT=587 -HOLLAEX_CONFIGMAP_SMTP_USER= - -################################# -#### ADVANCED CONFIGURATIONS #### -################################# - -HOLLAEX_CONFIGMAP_NODE_ENV=production -HOLLAEX_CONFIGMAP_PORT=10010 -HOLLAEX_CONFIGMAP_WEBSOCKET_PORT=10080 - -HOLLAEX_CONFIGMAP_SEND_EMAIL_TO_SUPPORT=true - -HOLLAEX_CONFIGMAP_NETWORK=mainnet - -HOLLAEX_CONFIGMAP_NETWORK_URL= - -HOLLAEX_CONFIGMAP_VAULT_NAME= - -HOLLAEX_CONFIGMAP_DB_SSL=false - -HOLLAEX_CONFIGMAP_LOG_LEVEL=verbose - -HOLLAEX_CONFIGMAP_KIT_VERSION=$(cat version) - -ENVIRONMENT_EXCHANGE_RUN_MODE=api,stream,plugins - -ENVIRONMENT_DOCKER_COMPOSE_RUN_POSTGRESQL_DB=true -ENVIRONMENT_DOCKER_COMPOSE_RUN_REDIS=true - -ENVIRONMENT_KUBERNETES_RUN_POSTGRESQL_DB=true -ENVIRONMENT_KUBERNETES_POSTGRESQL_DB_VOLUMESIZE=4Gi - -ENVIRONMENT_KUBERNETES_RUN_REDIS=true - -ENVIRONMENT_KUBERNETES_POSTGRESQL_DB_NODESELECTOR="{}" -ENVIRONMENT_KUBERNETES_REDIS_NODESELECTOR="{}" -ENVIRONMENT_KUBERNETES_EXCHANGE_STATEFUL_NODESELECTOR="{}" -ENVIRONMENT_KUBERNETES_EXCHANGE_STATELESS_NODESELECTOR="{}" - -ENVIRONMENT_DOCKER_IMAGE_VERSION=2.2.0 - -ENVIRONMENT_DOCKER_IMAGE_POSTGRESQL_REGISTRY=postgres -ENVIRONMENT_DOCKER_IMAGE_POSTGRESQL_VERSION=14.9-alpine - -ENVIRONMENT_DOCKER_IMAGE_REDIS_REGISTRY=redis -ENVIRONMENT_DOCKER_IMAGE_REDIS_VERSION=7.2.0-alpine - -ENVIRONMENT_DOCKER_IMAGE_INFLUXDB_REGISTRY=influxdb -ENVIRONMENT_DOCKER_IMAGE_INFLUXDB_VERSION=1.8.3 - -ENVIRONMENT_DOCKER_IMAGE_LOCAL_NGINX_REGISTRY=bitholla/nginx-with-certbot -ENVIRONMENT_DOCKER_IMAGE_LOCAL_NGINX_VERSION=1.24.0 - -ENVIRONMENT_LOCAL_NGINX_HTTP_PORT=80 -ENVIRONMENT_LOCAL_NGINX_HTTPS_PORT=443 - -ENVIRONMENT_DOCKER_COMPOSE_GENERATE_ENV_ENABLE=true -ENVIRONMENT_DOCKER_COMPOSE_GENERATE_YAML_ENABLE=true -ENVIRONMENT_DOCKER_COMPOSE_GENERATE_NGINX_UPSTREAM=true - -ENVIRONMENT_KUBERNETES_GENERATE_CONFIGMAP_ENABLE=true -ENVIRONMENT_KUBERNETES_GENERATE_SECRET_ENABLE=true -ENVIRONMENT_KUBERNETES_GENERATE_INGRESS_ENABLE=true - -ENVIRONMENT_KUBERNETES_INGRESS_CERT_MANAGER_ISSUER= - -ENVIRONMENT_KUBERNETES_ALLOW_EXTERNAL_POSTGRESQL_DB_ACCESS=false -ENVIRONMENT_KUBERNETES_EXTERNAL_POSTGRESQL_DB_ACCESS_PORT=40000 - -ENVIRONMENT_KUBERNETES_ALLOW_EXTERNAL_REDIS_ACCESS=false -ENVIRONMENT_KUBERNETES_EXTERNAL_REDIS_ACCESS_PORT=40001 - -ENVIRONMENT_KUBERNETES_RESTART_NOTIFICATION_WEBHOOK_URL= - -ENVIRONMENT_USER_HOLLAEX_CORE_IMAGE_REGISTRY=bitholla/my-hollaex-server -ENVIRONMENT_USER_HOLLAEX_CORE_IMAGE_VERSION=$ENVIRONMENT_DOCKER_IMAGE_VERSION - -ENVIRONMENT_USER_HOLLAEX_WEB_IMAGE_REGISTRY=bitholla/my-hollaex-web -ENVIRONMENT_USER_HOLLAEX_WEB_IMAGE_VERSION=latest - -ENVIRONMENT_API_CPU_LIMITS=0.2 -ENVIRONMENT_API_MEMORY_LIMITS=1024Mi -ENVIRONMENT_API_CPU_REQUESTS=0.05 -ENVIRONMENT_API_MEMORY_REQUESTS=512Mi - -ENVIRONMENT_STREAM_CPU_LIMITS=0.2 -ENVIRONMENT_STREAM_MEMORY_LIMITS=512Mi -ENVIRONMENT_STREAM_CPU_REQUESTS=0.05 -ENVIRONMENT_STREAM_MEMORY_REQUESTS=256Mi - -ENVIRONMENT_PLUGINS_CPU_LIMITS=0.2 -ENVIRONMENT_PLUGINS_MEMORY_LIMITS=1200Mi -ENVIRONMENT_PLUGINS_CPU_REQUESTS=0.05 -ENVIRONMENT_PLUGINS_MEMORY_REQUESTS=700Mi - -ENVIRONMENT_POSTGRESQL_CPU_LIMITS=0.1 -ENVIRONMENT_POSTGRESQL_MEMORY_LIMITS=100Mi -ENVIRONMENT_POSTGRESQL_CPU_REQUESTS=0.1 -ENVIRONMENT_POSTGRESQL_MEMORY_REQUESTS=100Mi - -ENVIRONMENT_REDIS_CPU_LIMITS=0.1 -ENVIRONMENT_REDIS_MEMORY_LIMITS=100Mi -ENVIRONMENT_REDIS_CPU_REQUESTS=0.1 -ENVIRONMENT_REDIS_MEMORY_REQUESTS=100Mi - -ENVIRONMENT_WEB_CPU_LIMITS=0.05 -ENVIRONMENT_WEB_MEMORY_LIMITS=128Mi -ENVIRONMENT_WEB_CPU_REQUESTS=0.01 -ENVIRONMENT_WEB_MEMORY_REQUESTS=128Mi - -ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_RULE='0 1,13 * * *' -ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_REGION= -ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_BUCKET= -ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_TIMEZONE=UTC - -ENVIRONMENT_API_SERVER_REPLICAS=1 -ENVIRONMENT_STREAM_SERVER_REPLICAS=1 -ENVIRONMENT_WEB_SERVER_REPLICAS=1 - -ENVIRONMENT_KUBERNETES_API_HPA_ENABLE=false -ENVIRONMENT_KUBERNETES_STREAM_HPA_ENABLE=false -ENVIRONMENT_KUBERNETES_WEB_HPA_ENABLE=false diff --git a/settings/secret b/settings/secret deleted file mode 100644 index 87f220c5f1..0000000000 --- a/settings/secret +++ /dev/null @@ -1,42 +0,0 @@ -############################### -#### SECRET CONFIGURATIONS #### -############################### - -HOLLAEX_SECRET_ACTIVATION_CODE= - -######################################## -#### ADVANCED SECRET CONFIGURATIONS #### -######################################## - -HOLLAEX_SECRET_REDIS_HOST=$ENVIRONMENT_EXCHANGE_NAME-redis -HOLLAEX_SECRET_REDIS_PORT=6379 -HOLLAEX_SECRET_REDIS_PASSWORD= - -HOLLAEX_SECRET_PUBSUB_HOST=$ENVIRONMENT_EXCHANGE_NAME-redis -HOLLAEX_SECRET_PUBSUB_PORT=6379 -HOLLAEX_SECRET_PUBSUB_PASSWORD= - -HOLLAEX_SECRET_DB_NAME=hollaex -HOLLAEX_SECRET_DB_USERNAME=hollaex -HOLLAEX_SECRET_DB_PASSWORD= -HOLLAEX_SECRET_DB_HOST=$ENVIRONMENT_EXCHANGE_NAME-db -HOLLAEX_SECRET_DB_PORT=5432 - -ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_HOST=docker.io -ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_USERNAME= -ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_PASSWORD= -ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_EMAIL= - -ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_ACCESSKEY= -ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_SECRETKEY= - -HOLLAEX_SECRET_API_KEY= -HOLLAEX_SECRET_API_SECRET= - -HOLLAEX_SECRET_SMTP_PASSWORD= - -###################################################################### -#### AUTOMATICALLY GENERATED PASSWORDS GONNA BE STORED DOWN BELOW #### -###################################################################### - -HOLLAEX_SECRET_SECRET= \ No newline at end of file diff --git a/templates/local/nginx/mime.types b/templates/local/nginx/mime.types deleted file mode 100644 index 25ae94eb7a..0000000000 --- a/templates/local/nginx/mime.types +++ /dev/null @@ -1,48 +0,0 @@ -types { - text/html html htm shtml; - text/css css; - text/xml xml rss; - image/gif gif; - image/jpeg jpeg jpg; - application/x-javascript js; - text/plain txt; - text/x-component htc; - text/mathml mml; - image/png png; - image/x-icon ico; - image/x-jng jng; - image/vnd.wap.wbmp wbmp; - application/java-archive jar war ear; - application/mac-binhex40 hqx; - application/pdf pdf; - application/x-cocoa cco; - application/x-java-archive-diff jardiff; - application/x-java-jnlp-file jnlp; - application/x-makeself run; - application/x-perl pl pm; - application/x-pilot prc pdb; - application/x-rar-compressed rar; - application/x-redhat-package-manager rpm; - application/x-sea sea; - application/x-shockwave-flash swf; - application/x-stuffit sit; - application/x-tcl tcl tk; - application/x-x509-ca-cert der pem crt; - application/x-xpinstall xpi; - application/zip zip; - application/octet-stream deb; - application/octet-stream bin exe dll; - application/octet-stream dmg; - application/octet-stream eot; - application/octet-stream iso img; - application/octet-stream msi msp msm; - audio/mpeg mp3; - audio/x-realaudio ra; - video/mpeg mpeg mpg; - video/quicktime mov; - video/x-flv flv; - video/x-msvideo avi; - video/x-ms-wmv wmv; - video/x-ms-asf asx asf; - video/x-mng mng; -} diff --git a/templates/local/nginx/nginx.conf b/templates/local/nginx/nginx.conf deleted file mode 100644 index d11e876781..0000000000 --- a/templates/local/nginx/nginx.conf +++ /dev/null @@ -1,133 +0,0 @@ -worker_processes 4; - -error_log /var/log/nginx/error.log warn; -pid /var/log/nginx/nginx.pid; - -worker_rlimit_nofile 8192; - -events { - worker_connections 1024; -} - -http { - gzip on; - gzip_comp_level 6; - gzip_min_length 500; - gzip_buffers 16 8k; - gzip_proxied any; - gzip_vary on; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fo - - include /etc/nginx/mime.types; - include /etc/nginx/proxy.conf; - include /etc/nginx/conf.d/upstream*.conf; - include /etc/nginx/conf.d/web.conf*; - - default_type application/octet-stream; - log_format main '$remote_addr - $remote_user [$time_local] $status ' - '"$request" $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - limit_req_zone $remote_addr zone=api:1m rate=4r/s; - limit_req_zone $remote_addr zone=sms:1m rate=1r/m; - -server { - - listen 80 default_server; - server_name _; - - error_page 404 /404-nodomain.html; - location = /404-nodomain.html { - root /usr/share/nginx/html; - internal; - } - -} - -server { - listen 80; - server_name localhost; #Server domain - access_log /var/log/nginx/hollaex.access.log main; - - include /etc/nginx/conf.d/plugin*.conf; - - location /api-docs { - proxy_pass http://api; - } - - location /docs { - proxy_pass http://api; - } - - location / { - - proxy_pass http://api; #Root path - } - - location /api/v2 { - limit_req zone=api burst=10 nodelay; - limit_req_log_level info; - limit_req_status 429; - - rewrite /api/v2(/|$)(.*) /v2/$2 break; - - proxy_pass http://api; - } - - location /explorer { - proxy_pass http://api; - } - - location /stream { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - - proxy_pass http://socket; - } - - location /plugins { - proxy_pass http://plugins; - } - - location /plugins/sms/verify { - limit_req zone=sms burst=10 nodelay; - limit_req_log_level info; - limit_req_status 429; - - proxy_pass http://plugins; - - } - - location /api/plugins { - rewrite /api/plugins(/|$)(.*) /plugins/$2 break; - proxy_pass http://plugins; - } - - location /api/plugins/sms/verify { - limit_req zone=sms burst=10 nodelay; - limit_req_log_level info; - limit_req_status 429; - - rewrite /api/plugins/sms/verify(/|$)(.*) /plugins/sms/verify/$2 break; - - proxy_pass http://plugins; - - } - - error_page 404 /404.html; - location = /404.html { - root /usr/share/nginx/html; - internal; - } - - error_page 429 /429.html; - location = /429.html { - root /usr/share/nginx/html; - internal; - } - } - -} - - diff --git a/templates/local/nginx/proxy.conf b/templates/local/nginx/proxy.conf deleted file mode 100644 index a53a4dd9fd..0000000000 --- a/templates/local/nginx/proxy.conf +++ /dev/null @@ -1,11 +0,0 @@ -proxy_redirect off; -proxy_set_header Host $host; -proxy_set_header X-Real-IP $remote_addr; -proxy_set_header X-Real-Origin $http_origin; -proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -client_max_body_size 6m; -client_body_buffer_size 128k; -proxy_connect_timeout 90; -proxy_send_timeout 90; -proxy_read_timeout 90; -proxy_buffers 32 4k; diff --git a/templates/local/nginx/static/404-nodomain.html b/templates/local/nginx/static/404-nodomain.html deleted file mode 100644 index 9a1155ef2b..0000000000 --- a/templates/local/nginx/static/404-nodomain.html +++ /dev/null @@ -1,12 +0,0 @@ - - - 404 Not found - - -

404 There is nothing here!

-

If you are an exchange administrator, and facing this page after the initial setup, You probably missed to setup domain(s) for the exchange.

-

If you haven't bind domain(s) for the exchange yet, please run 'hollaex prod' command to do so.

-

Please visit docs.hollaex.com to see guides, forum.hollaex.com to get further help.

-

Regards, HollaEx Team.

- - diff --git a/templates/local/nginx/static/404.html b/templates/local/nginx/static/404.html deleted file mode 100644 index 0efd625d27..0000000000 --- a/templates/local/nginx/static/404.html +++ /dev/null @@ -1,12 +0,0 @@ - - - 404 Not found - - -

404 There is nothing here!

-

To view the API health, visit Health Page.

-

To view the API explorer, visit Explorer Page.

-

Please visit docs.hollaex.com to see guides, forum.hollaex.com to get further help.

-

Regards, HollaEx Team.

- - diff --git a/templates/local/nginx/static/429.html b/templates/local/nginx/static/429.html deleted file mode 100644 index 3b90326039..0000000000 --- a/templates/local/nginx/static/429.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Too Many Requests - - -

Too Many Requests

-

There is a limit of 1 requests per second. Try again soon.

- - diff --git a/version b/version index eafef0d4c5..b8b5b04237 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.9.3 \ No newline at end of file +2.9.3-cli-deprecatoion \ No newline at end of file diff --git a/web/tools/docker-compose-web.yaml b/web/tools/docker-compose-web.yaml new file mode 100644 index 0000000000..41d4a9c34f --- /dev/null +++ b/web/tools/docker-compose-web.yaml @@ -0,0 +1,25 @@ +version: '3' +services: + hollaex-web: + image: hollaex-web + build: + context: /Users/kycfeel/Desktop/kit231101/web/ + dockerfile: /Users/kycfeel/Desktop/kit231101/web/docker/Dockerfile + restart: always + deploy: + resources: + limits: + cpus: "0.05" + memory: 128M + reservations: + cpus: "0.05" + memory: 128M + ports: + - 8080:80 + networks: + - local_hollaex-network + +networks: + local_hollaex-network: + external: true + From 3c5950ea1b345859724ceada6dcc1078ced8d011 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 23 Jan 2024 21:16:55 +0900 Subject: [PATCH 002/115] file changes --- nginx/docker-compose.yaml | 4 +- server/{tools => }/docker-compose.yaml | 61 ++++++++----------- server/{tools => }/hollaex-kit.env | 6 +- server/tools/docker-compose-web.yaml | 25 -------- ...r-compose-web.yaml => docker-compose.yaml} | 8 +-- 5 files changed, 34 insertions(+), 70 deletions(-) rename server/{tools => }/docker-compose.yaml (71%) rename server/{tools => }/hollaex-kit.env (91%) delete mode 100644 server/tools/docker-compose-web.yaml rename web/{tools/docker-compose-web.yaml => docker-compose.yaml} (64%) diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml index a959986e05..e5bd9bc45b 100644 --- a/nginx/docker-compose.yaml +++ b/nginx/docker-compose.yaml @@ -22,10 +22,10 @@ services: - -c - ip -4 route list match 0/0 | awk '{print $$3 " host.access"}' >> /etc/hosts && nginx -g "daemon off;" networks: - - hollaex-network + - hollaex-kit networks: - local_hollaex-network: + local_hollaex-kit: external: true diff --git a/server/tools/docker-compose.yaml b/server/docker-compose.yaml similarity index 71% rename from server/tools/docker-compose.yaml rename to server/docker-compose.yaml index 44fdc38c6b..740b2f97cb 100644 --- a/server/tools/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -8,7 +8,7 @@ services: ports: - 6379:6379 env_file: - - hollaex.env.local + - hollaex-kit.env command : ["sh", "-c", "redis-server --requirepass $${REDIS_PASSWORD}"] deploy: resources: @@ -19,7 +19,7 @@ services: cpus: "0.1" memory: 100M networks: - - hollaex-network + - hollaex-kit hollaex-db: image: postgres:14.9-alpine @@ -29,7 +29,7 @@ services: ports: - 5432:5432 env_file: - - hollaex.env.local + - hollaex-kit.env deploy: resources: limits: @@ -40,13 +40,16 @@ services: memory: 100M command : ["sh", "-c", "export POSTGRES_DB=$${DB_NAME} && export POSTGRES_USER=$${DB_USERNAME} && export POSTGRES_PASSWORD=$${DB_PASSWORD} && ln -sf /usr/local/bin/docker-entrypoint.sh ./docker-entrypoint.sh && ./docker-entrypoint.sh postgres"] networks: - - hollaex-network + - hollaex-kit hollaex-server-api: - image: hollaex/hollaex-kit:2.9.3 + image: hollaex-kit + build: + context: . + dockerfile: tools/Dockerfile restart: unless-stopped env_file: - - hollaex.env.local + - hollaex-kit.env entrypoint: - node deploy: @@ -65,38 +68,19 @@ services: - 10010:10010 networks: - - hollaex-network + - hollaex-kit depends_on: - hollaex-redis - hollaex-db - hollaex-nginx: - image: bitholla/nginx-with-certbot:1.24.0 - restart: unless-stopped - volumes: - - ./nginx:/etc/nginx - - ./logs/nginx:/var/log/nginx - - ./nginx/static/:/usr/share/nginx/html - - ./letsencrypt:/etc/letsencrypt - ports: - - 80:80 - - 443:443 - environment: - - NGINX_PORT=80 - entrypoint: - - /bin/sh - - -c - - ip -4 route list match 0/0 | awk '{print $$3 " host.access"}' >> /etc/hosts && nginx -g "daemon off;" - depends_on: - - hollaex-server-api - networks: - - hollaex-network - hollaex-server-stream: - image: hollaex/hollaex-kit:2.9.3 + image: hollaex-kit + build: + context: . + dockerfile: tools/Dockerfile restart: unless-stopped env_file: - - hollaex.env.local + - hollaex-kit.env entrypoint: - node deploy: @@ -112,16 +96,20 @@ services: ports: - 10080:10080 networks: - - hollaex-network + - hollaex-kit depends_on: + - hollaex-server-api - hollaex-redis - hollaex-db hollaex-server-plugins: - image: hollaex/hollaex-kit:2.9.3 + image: hollaex-kit + build: + context: . + dockerfile: tools/Dockerfile restart: unless-stopped env_file: - - hollaex.env.local + - hollaex-kit.env entrypoint: - node deploy: @@ -136,13 +124,14 @@ services: - plugins/index.js - 10011:10011 networks: - - hollaex-network + - hollaex-kit depends_on: + - hollaex-server-api - hollaex-redis - hollaex-db networks: - hollaex-network: + hollaex-kit: volumes: hollaex_db_vol: diff --git a/server/tools/hollaex-kit.env b/server/hollaex-kit.env similarity index 91% rename from server/tools/hollaex-kit.env rename to server/hollaex-kit.env index bc34a4a00a..5f2b1115f2 100644 --- a/server/tools/hollaex-kit.env +++ b/server/hollaex-kit.env @@ -34,15 +34,15 @@ WEBSOCKET_PORT=10080 ACTIVATION_CODE= API_KEY= API_SECRET= -DB_HOST=hollaex-kit-db +DB_HOST=hollaex-db DB_NAME=hollaex DB_PASSWORD=my-secure-db-password DB_PORT=5432 DB_USERNAME=hollaex -PUBSUB_HOST=hollaex-kit-redis +PUBSUB_HOST=hollaex-redis PUBSUB_PASSWORD=my-secure-redis-password PUBSUB_PORT=6379 -REDIS_HOST=hollaex-kit-redis +REDIS_HOST=hollaex-redis REDIS_PASSWORD=my-secure-redis-password REDIS_PORT=6379 SECRET=my-secure-secret diff --git a/server/tools/docker-compose-web.yaml b/server/tools/docker-compose-web.yaml deleted file mode 100644 index 29a70ad3e2..0000000000 --- a/server/tools/docker-compose-web.yaml +++ /dev/null @@ -1,25 +0,0 @@ -version: '3' -services: - hollaex-web: - image: bitholla/my-hollaex-web:hollaex-web-2.9.0-2311022010 - build: - context: /Users/kycfeel/Desktop/kit231101/web/ - dockerfile: /Users/kycfeel/Desktop/kit231101/web/docker/Dockerfile - restart: always - deploy: - resources: - limits: - cpus: "0.05" - memory: 128M - reservations: - cpus: "0.05" - memory: 128M - ports: - - 8080:80 - networks: - - local_hollaex-network - -networks: - local_hollaex-network: - external: true - diff --git a/web/tools/docker-compose-web.yaml b/web/docker-compose.yaml similarity index 64% rename from web/tools/docker-compose-web.yaml rename to web/docker-compose.yaml index 41d4a9c34f..a3145dfb47 100644 --- a/web/tools/docker-compose-web.yaml +++ b/web/docker-compose.yaml @@ -3,8 +3,8 @@ services: hollaex-web: image: hollaex-web build: - context: /Users/kycfeel/Desktop/kit231101/web/ - dockerfile: /Users/kycfeel/Desktop/kit231101/web/docker/Dockerfile + context: . + dockerfile: docker/Dockerfile restart: always deploy: resources: @@ -17,9 +17,9 @@ services: ports: - 8080:80 networks: - - local_hollaex-network + - local_hollaex-kit networks: - local_hollaex-network: + local_hollaex-kit: external: true From d0aef39fd3688a9f5cb00a8fe4cc3cb20a084859 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 23 Jan 2024 21:18:15 +0900 Subject: [PATCH 003/115] nginx update --- nginx/conf.d/upstream.conf | 4 ++++ nginx/nginx.conf | 13 +++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/nginx/conf.d/upstream.conf b/nginx/conf.d/upstream.conf index a827cfd8a4..60d15d09f6 100644 --- a/nginx/conf.d/upstream.conf +++ b/nginx/conf.d/upstream.conf @@ -10,4 +10,8 @@ upstream plugins { server hollaex-kit-server:10011; + } + + upstream web { + server hollaex-web:8080; } \ No newline at end of file diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 5587e19b85..62c8795783 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -30,7 +30,7 @@ http { server { listen 80; - server_name hollaex; + server_name _; set $req_filtered $request; if ($req_filtered ~ (.*)key=[^&]*(.*)) { @@ -44,11 +44,8 @@ server { include /etc/nginx/conf.d/plugin*.conf; - location /explorer { - proxy_pass http://api; - } - location /v2 { + location /api { proxy_pass http://api; limit_req zone=api burst=10 nodelay; @@ -57,10 +54,6 @@ server { } - location /v2/admin { - proxy_pass http://api; - - } location /plugins { proxy_pass http://plugins; @@ -75,7 +68,7 @@ server { } location / { - proxy_pass http://api; + proxy_pass http://web; } error_page 429 /429.html; From 1c293e4730f467f9563b6d4dddd599da3fd01f59 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 28 Jan 2024 19:33:53 +0900 Subject: [PATCH 004/115] file update --- nginx/docker-compose.yaml | 4 ++-- server/{tools => }/hollaex-kit.env.local.dev | 0 server/{tools => }/hollaex-kit.env.local.example | 0 web/docker-compose.yaml | 16 +++++----------- 4 files changed, 7 insertions(+), 13 deletions(-) rename server/{tools => }/hollaex-kit.env.local.dev (100%) rename server/{tools => }/hollaex-kit.env.local.example (100%) diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml index e5bd9bc45b..59c6728c4a 100644 --- a/nginx/docker-compose.yaml +++ b/nginx/docker-compose.yaml @@ -22,10 +22,10 @@ services: - -c - ip -4 route list match 0/0 | awk '{print $$3 " host.access"}' >> /etc/hosts && nginx -g "daemon off;" networks: - - hollaex-kit + - server_hollaex-kit networks: - local_hollaex-kit: + server_hollaex-kit: external: true diff --git a/server/tools/hollaex-kit.env.local.dev b/server/hollaex-kit.env.local.dev similarity index 100% rename from server/tools/hollaex-kit.env.local.dev rename to server/hollaex-kit.env.local.dev diff --git a/server/tools/hollaex-kit.env.local.example b/server/hollaex-kit.env.local.example similarity index 100% rename from server/tools/hollaex-kit.env.local.example rename to server/hollaex-kit.env.local.example diff --git a/web/docker-compose.yaml b/web/docker-compose.yaml index a3145dfb47..9a4621574c 100644 --- a/web/docker-compose.yaml +++ b/web/docker-compose.yaml @@ -6,20 +6,14 @@ services: context: . dockerfile: docker/Dockerfile restart: always - deploy: - resources: - limits: - cpus: "0.05" - memory: 128M - reservations: - cpus: "0.05" - memory: 128M + env_file: + - .env ports: - 8080:80 networks: - - local_hollaex-kit - + - server_hollaex-kit + networks: - local_hollaex-kit: + server_hollaex-kit: external: true From f0317e5b9bdda7a303f1a9730944fa7af35693ae Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 30 Jan 2024 20:43:08 +0900 Subject: [PATCH 005/115] Update .dockerignore --- server/.dockerignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/.dockerignore b/server/.dockerignore index ae9c093e20..cec6890608 100644 --- a/server/.dockerignore +++ b/server/.dockerignore @@ -7,7 +7,7 @@ tools !tools/general/*.js !tools/nexe Dockerfile -docker-compose.yml +docker-compose* index.html package-lock.json logs @@ -15,3 +15,5 @@ coverage .nyc_output .*docker-compose.yaml .drone*.yml +hollaex-kit.env +hollaex-kit.env* From d54f3ea3e46ae05d2253b20c413410226227012b Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 31 Jan 2024 16:01:23 +0900 Subject: [PATCH 006/115] Nginx update --- nginx/conf.d/upstream.conf | 6 +++--- nginx/nginx.conf | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/nginx/conf.d/upstream.conf b/nginx/conf.d/upstream.conf index 60d15d09f6..fe22af3924 100644 --- a/nginx/conf.d/upstream.conf +++ b/nginx/conf.d/upstream.conf @@ -1,15 +1,15 @@ upstream api { - server hollaex-kit-server:10010; + server hollaex-server-api:10010; } upstream socket { ip_hash; - server hollaex-kit-server:10080; + server hollaex-server-stream:10080; } upstream plugins { - server hollaex-kit-server:10011; + server hollaex-server-plugins:10011; } upstream web { diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 62c8795783..816aa4e721 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -26,8 +26,7 @@ http { limit_req_zone $remote_addr zone=api:1m rate=4r/s; limit_req_zone $remote_addr zone=order:1m rate=5r/s; - #Server blockes will be automatically generated - +# SERVER BLOCK server { listen 80; server_name _; From 2307b648c4a644f1927175c242204535f70ece66 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 31 Jan 2024 19:22:29 +0900 Subject: [PATCH 007/115] nginx update --- nginx/conf.d/upstream.conf | 2 +- nginx/nginx.conf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nginx/conf.d/upstream.conf b/nginx/conf.d/upstream.conf index fe22af3924..802e66e8b6 100644 --- a/nginx/conf.d/upstream.conf +++ b/nginx/conf.d/upstream.conf @@ -13,5 +13,5 @@ } upstream web { - server hollaex-web:8080; + server hollaex-web:80; } \ No newline at end of file diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 816aa4e721..991fe24c7a 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -51,6 +51,8 @@ server { limit_req_log_level notice; limit_req_status 429; + rewrite /api(/|$)(.*) /$2 break; + } From 20a99e3ed2bae7d97359529f6b32088da6ad98be Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 31 Jan 2024 23:05:28 +0900 Subject: [PATCH 008/115] Update nginx.conf --- nginx/nginx.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 991fe24c7a..2bed36cbd1 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -56,8 +56,10 @@ server { } - location /plugins { + location /api/plugins { proxy_pass http://plugins; + + rewrite /api(/|$)(.*) /$2 break; } location /stream { From ef607a40050de20ca55aa75aabca3d375ddc5134 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 1 Feb 2024 23:04:01 +0900 Subject: [PATCH 009/115] Update .env --- web/.env | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/.env b/web/.env index bbe8ee441e..978cd042b2 100644 --- a/web/.env +++ b/web/.env @@ -3,6 +3,8 @@ NODE_ENV=production REACT_APP_PUBLIC_URL=https://yourdomain.com REACT_APP_SERVER_ENDPOINT=http://localhost +REACT_APP_STREAM_ENDPOINT=ws://localhost + REACT_APP_NETWORK=mainnet REACT_APP_EXCHANGE_NAME=testexchange @@ -15,7 +17,6 @@ REACT_APP_DEFAULT_COUNTRY= REACT_APP_LOGO_PATH=https://bitholla.s3.ap-northeast-2.amazonaws.com/kit/LOGO_IMAGE_LIGHT REACT_APP_LOGO_BLACK_PATH=https://bitholla.s3.ap-northeast-2.amazonaws.com/kit/LOGO_IMAGE_DARK -REACT_APP_EXCHANGE_NAME='TestExchange_' REACT_APP_PLUGIN_DEV_MODE= REACT_APP_PLUGIN= REACT_APP_LANG= From ae7570ee9da635f90faf7e36c569e915e2d50d51 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Mon, 5 Feb 2024 19:09:29 +0900 Subject: [PATCH 010/115] deployment files update --- nginx/conf.d/upstream.conf | 8 +- server/docker-compose.yaml | 14 +- server/hollaex-kit.env | 6 +- server/tools/kubernetes/env/configmap.yaml | 39 ++ server/tools/kubernetes/env/secret.yaml | 23 ++ .../templates/job.yaml | 190 ---------- .../bitholla-hollaex-server/values.yaml | 57 --- .../.helmignore | 0 .../Chart.yaml | 0 .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 0 .../templates/configmap.yaml | 0 .../templates/deployment.yaml | 0 .../templates/postgres-volume.yaml | 0 .../templates/service.yaml | 0 .../values.yaml | 4 +- .../.helmignore | 0 .../Chart.yaml | 0 .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 0 .../templates/deployment.yaml | 0 .../templates/service.yaml | 0 .../values.yaml | 4 +- .../.helmignore | 0 .../Chart.yaml | 0 .../templates/_helpers.tpl | 0 .../templates/autoscaler.yaml | 0 .../templates/deployment.yaml | 1 - .../templates/service.yaml | 0 .../helm-chart/hollaex-kit-server/values.yaml | 42 +++ .../.helmignore | 0 .../Chart.yaml | 0 .../templates/_helpers.tpl | 0 .../templates/autoscaler.yaml | 0 .../templates/deployment.yaml | 1 - .../templates/service.yaml | 0 .../values.yaml | 2 +- .../hollaex-network-influxdb/Chart.yaml | 22 -- .../hollaex-network-influxdb/OWNERS | 10 - .../hollaex-network-influxdb/README.md | 328 ---------------- .../files/backup-retention-script.sh | 66 ---- .../templates/NOTES.txt | 42 --- .../templates/_helpers.tpl | 63 ---- .../templates/backup-cronjob.yaml | 150 -------- .../templates/backup-pvc.yaml | 21 -- .../templates/backup-retention-configmap.yaml | 11 - .../templates/backup-retention-cronjob.yaml | 75 ---- .../templates/configmap.yaml | 184 --------- .../templates/ingress.yaml | 25 -- .../templates/init-config.yaml | 10 - .../templates/meta-configmap.yaml | 35 -- .../templates/meta-service.yaml | 25 -- .../templates/meta-statefulset.yaml | 132 ------- .../templates/post-install-set-auth.yaml | 92 ----- .../templates/secret.yaml | 17 - .../templates/service.yaml | 53 --- .../templates/serviceaccount.yaml | 12 - .../templates/statefulset.yaml | 180 --------- .../hollaex-network-influxdb/values.yaml | 349 ------------------ .../hollaex-network-mongodb/.helmignore | 21 -- .../hollaex-network-mongodb/Chart.yaml | 4 - .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 16 - .../templates/deployment.yaml | 62 ---- .../templates/pvc.yaml | 15 - .../templates/service.yaml | 26 -- .../hollaex-network-mongodb/values.yaml | 16 - .../hollaex-network-server/.helmignore | 21 -- .../hollaex-network-server/Chart.yaml | 4 - .../templates/autoscaler.yaml | 26 -- .../templates/cronjob.yaml | 86 ----- .../templates/deployment.yaml | 168 --------- .../hollaex-network-server/templates/job.yaml | 190 ---------- .../hollaex-network-server/values.yaml | 46 --- .../.helmignore | 0 .../Chart.yaml | 0 .../templates/NOTES.txt | 0 .../templates/_helpers.tpl | 0 .../templates/deployment.yaml | 0 .../values.yaml | 2 +- .../ingress/hollaex-kit-ingress.yaml | 187 ++++++++++ web/.env | 2 +- web/docker-compose.yaml | 4 +- .../helm-chart/hollaex-kit-web}/.helmignore | 0 .../helm-chart/hollaex-kit-web/Chart.yaml | 4 + .../hollaex-kit-web}/templates/_helpers.tpl | 0 .../hollaex-kit-web/templates/autoscaler.yaml | 23 ++ .../hollaex-kit-web/templates/deployment.yaml | 73 ++++ .../hollaex-kit-web}/templates/service.yaml | 12 +- .../helm-chart/hollaex-kit-web/values.yaml | 28 ++ 90 files changed, 445 insertions(+), 2884 deletions(-) create mode 100644 server/tools/kubernetes/env/configmap.yaml create mode 100644 server/tools/kubernetes/env/secret.yaml delete mode 100644 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/job.yaml delete mode 100755 server/tools/kubernetes/helm-chart/bitholla-hollaex-server/values.yaml rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres-s3-backup-cronjob => hollaex-kit-postgres}/.helmignore (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-postgres}/Chart.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres-s3-backup-cronjob => hollaex-kit-postgres}/templates/NOTES.txt (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-postgres}/templates/_helpers.tpl (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-postgres}/templates/configmap.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-postgres}/templates/deployment.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-postgres}/templates/postgres-volume.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-postgres}/templates/service.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-postgres}/values.yaml (92%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-redis}/.helmignore (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-redis => hollaex-kit-redis}/Chart.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres => hollaex-kit-redis}/templates/NOTES.txt (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-redis => hollaex-kit-redis}/templates/_helpers.tpl (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-redis => hollaex-kit-redis}/templates/deployment.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-redis => hollaex-kit-redis}/templates/service.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-redis => hollaex-kit-redis}/values.yaml (85%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-redis => hollaex-kit-server}/.helmignore (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-server => hollaex-kit-server}/Chart.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-server => hollaex-kit-server}/templates/_helpers.tpl (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-server => hollaex-kit-server}/templates/autoscaler.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-server => hollaex-kit-server}/templates/deployment.yaml (98%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-server => hollaex-kit-server}/templates/service.yaml (100%) create mode 100755 server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-server => hollaex-kit-web}/.helmignore (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-web => hollaex-kit-web}/Chart.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-web => hollaex-kit-web}/templates/_helpers.tpl (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-web => hollaex-kit-web}/templates/autoscaler.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-web => hollaex-kit-web}/templates/deployment.yaml (97%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-web => hollaex-kit-web}/templates/service.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-web => hollaex-kit-web}/values.yaml (96%) delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/Chart.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/OWNERS delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/README.md delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/files/backup-retention-script.sh delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/NOTES.txt delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/_helpers.tpl delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-cronjob.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-pvc.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-configmap.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-cronjob.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/configmap.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/ingress.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/init-config.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-configmap.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-service.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-statefulset.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/post-install-set-auth.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/secret.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/service.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/serviceaccount.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/statefulset.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-influxdb/values.yaml delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/.helmignore delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/Chart.yaml delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/NOTES.txt delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/_helpers.tpl delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/deployment.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/pvc.yaml delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/service.yaml delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-mongodb/values.yaml delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-server/.helmignore delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-server/Chart.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/autoscaler.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/cronjob.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/deployment.yaml delete mode 100644 server/tools/kubernetes/helm-chart/hollaex-network-server/templates/job.yaml delete mode 100755 server/tools/kubernetes/helm-chart/hollaex-network-server/values.yaml rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-web => postgres-s3-backup}/.helmignore (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres-s3-backup-cronjob => postgres-s3-backup}/Chart.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-redis => postgres-s3-backup}/templates/NOTES.txt (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres-s3-backup-cronjob => postgres-s3-backup}/templates/_helpers.tpl (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres-s3-backup-cronjob => postgres-s3-backup}/templates/deployment.yaml (100%) rename server/tools/kubernetes/helm-chart/{bitholla-hollaex-postgres-s3-backup-cronjob => postgres-s3-backup}/values.yaml (78%) create mode 100644 server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml rename {server/tools/kubernetes/helm-chart/hollaex-network-influxdb => web/tools/kubernetes/helm-chart/hollaex-kit-web}/.helmignore (100%) mode change 100644 => 100755 create mode 100755 web/tools/kubernetes/helm-chart/hollaex-kit-web/Chart.yaml rename {server/tools/kubernetes/helm-chart/hollaex-network-server => web/tools/kubernetes/helm-chart/hollaex-kit-web}/templates/_helpers.tpl (100%) create mode 100644 web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/autoscaler.yaml create mode 100644 web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/deployment.yaml rename {server/tools/kubernetes/helm-chart/hollaex-network-server => web/tools/kubernetes/helm-chart/hollaex-kit-web}/templates/service.yaml (54%) create mode 100755 web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml diff --git a/nginx/conf.d/upstream.conf b/nginx/conf.d/upstream.conf index 802e66e8b6..e0c1544c30 100644 --- a/nginx/conf.d/upstream.conf +++ b/nginx/conf.d/upstream.conf @@ -1,17 +1,17 @@ upstream api { - server hollaex-server-api:10010; + server hollaex-kit-server-api:10010; } upstream socket { ip_hash; - server hollaex-server-stream:10080; + server hollaex-kit-server-stream:10080; } upstream plugins { - server hollaex-server-plugins:10011; + server hollaex-kit-server-plugins:10011; } upstream web { - server hollaex-web:80; + server hollaex-kit-web:80; } \ No newline at end of file diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index 740b2f97cb..e211b6f441 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -1,6 +1,6 @@ version: '3' services: - hollaex-redis: + hollaex-kit-redis: image: redis:7.2.0-alpine restart: unless-stopped depends_on: @@ -21,7 +21,7 @@ services: networks: - hollaex-kit - hollaex-db: + hollaex-kit-db: image: postgres:14.9-alpine restart: unless-stopped volumes: @@ -42,7 +42,7 @@ services: networks: - hollaex-kit - hollaex-server-api: + hollaex-kit-server-api: image: hollaex-kit build: context: . @@ -73,7 +73,7 @@ services: - hollaex-redis - hollaex-db - hollaex-server-stream: + hollaex-kit-server-stream: image: hollaex-kit build: context: . @@ -98,11 +98,11 @@ services: networks: - hollaex-kit depends_on: - - hollaex-server-api + - hollaex-kit-server-api - hollaex-redis - hollaex-db - hollaex-server-plugins: + hollaex-kit-server-plugins: image: hollaex-kit build: context: . @@ -126,7 +126,7 @@ services: networks: - hollaex-kit depends_on: - - hollaex-server-api + - hollaex-kit-server-api - hollaex-redis - hollaex-db diff --git a/server/hollaex-kit.env b/server/hollaex-kit.env index 5f2b1115f2..bc34a4a00a 100644 --- a/server/hollaex-kit.env +++ b/server/hollaex-kit.env @@ -34,15 +34,15 @@ WEBSOCKET_PORT=10080 ACTIVATION_CODE= API_KEY= API_SECRET= -DB_HOST=hollaex-db +DB_HOST=hollaex-kit-db DB_NAME=hollaex DB_PASSWORD=my-secure-db-password DB_PORT=5432 DB_USERNAME=hollaex -PUBSUB_HOST=hollaex-redis +PUBSUB_HOST=hollaex-kit-redis PUBSUB_PASSWORD=my-secure-redis-password PUBSUB_PORT=6379 -REDIS_HOST=hollaex-redis +REDIS_HOST=hollaex-kit-redis REDIS_PASSWORD=my-secure-redis-password REDIS_PORT=6379 SECRET=my-secure-secret diff --git a/server/tools/kubernetes/env/configmap.yaml b/server/tools/kubernetes/env/configmap.yaml new file mode 100644 index 0000000000..48c4266210 --- /dev/null +++ b/server/tools/kubernetes/env/configmap.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: hollaex-kit-configmap + namespace: hollaex-kit +data: + DB_DIALECT: postgres + ADMIN_EMAIL: '' + ADMIN_NETWORK_ID: '' + ADMIN_PASSWORD: '' + API_HOST: 'https://hollaex-kit.hollaex.cloud/api' + API_NAME: 'hollaex-kit' + CURRENCIES: 'xht,usdt' + DB_SSL: 'false' + DEFAULT_THEME: 'dark' + DOMAIN: 'https://hollaex-kit.hollaex.cloud' + EMAILS_TIMEZONE: 'UTC' + KIT_VERSION: '' + KYC_EMAIL: '' + LOGO_IMAGE: 'https://bitholla.s3.ap-northeast-2.amazonaws.com/kit/LOGO_IMAGE_LIGHT' + LOG_LEVEL: 'verbose' + NETWORK: 'mainnet' + NETWORK_URL: 'https://api.hollaex.network' + NEW_USER_DEFAULT_LANGUAGE: 'en' + NEW_USER_IS_ACTIVATED: 'true' + NODE_ENV: 'production' + PAIRS: 'xht-usdt' + PORT: '10010' + SENDER_EMAIL: '' + SEND_EMAIL_TO_SUPPORT: 'true' + SMTP_PORT: '587' + SMTP_SERVER: '' + SMTP_USER: '' + SUPERVISOR_EMAIL: '' + SUPPORT_EMAIL: 'support@bitholla.com' + USER_LEVEL_NUMBER: '4' + VALID_LANGUAGES: 'en' + VAULT_NAME: '' + WEBSOCKET_PORT: '10080' diff --git a/server/tools/kubernetes/env/secret.yaml b/server/tools/kubernetes/env/secret.yaml new file mode 100644 index 0000000000..102e30b980 --- /dev/null +++ b/server/tools/kubernetes/env/secret.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Secret +metadata: + name: hollaex-kit-secret + namespace: hollaex-kit +type: Opaque +stringData: + ACTIVATION_CODE: '' + API_KEY: '' + API_SECRET: '' + DB_HOST: 'hollaex-kit-db' + DB_NAME: 'hollaex' + DB_PASSWORD: 'my-secure-db-password' + DB_PORT: '5432' + DB_USERNAME: 'hollaex' + PUBSUB_HOST: 'hollaex-kit-redis' + PUBSUB_PASSWORD: 'my-secure-redis-password' + PUBSUB_PORT: '6379' + REDIS_HOST: 'hollaex-kit-redis' + REDIS_PASSWORD: 'my-secure-redis-password' + REDIS_PORT: '6379' + SECRET: 'my-secure-secret' + SMTP_PASSWORD: '' diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/job.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/job.yaml deleted file mode 100644 index 959e5e0b54..0000000000 --- a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/job.yaml +++ /dev/null @@ -1,190 +0,0 @@ -{{- if .Values.job.enable }} - -apiVersion: batch/v1 -kind: Job -metadata: - labels: - app: {{.Release.Name}} - role: {{.Release.Namespace}} - name: {{.Release.Name}} - namespace: {{.Release.Namespace}} -spec: - template: - spec: - -{{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} -{{- end }} - - containers: - - name: {{.Release.Name}} - image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} - command: ["/bin/bash", "-c"] - -{{- if eq .Values.job.mode "add_coin" }} - - args: - - node tools/dbs/addCoin.js; - -{{- else if eq .Values.job.mode "remove_coin" }} - - args: - - node tools/dbs/removeCoin.js; - -{{- else if eq .Values.job.mode "add_pair" }} - - args: - - node tools/dbs/addPair.js; - -{{- else if eq .Values.job.mode "remove_pair" }} - - args: - - node tools/dbs/removePair.js; - -{{- else if eq .Values.job.mode "set_activation_code" }} - - args: - - node tools/dbs/setActivationCode.js; - -{{- else if eq .Values.job.mode "check_constants" }} - - args: - - node tools/dbs/checkConstants.js; - -{{- else if eq .Values.job.mode "set_config" }} - - args: - - node tools/dbs/setConfig.js; - -{{- else if eq .Values.job.mode "set_security" }} - - args: - - node tools/dbs/setSecurity.js; - -{{- else if eq .Values.job.mode "hollaex_upgrade" }} - - args: - - sequelize db:migrate; - node tools/dbs/runTriggers.js; - node tools/dbs/checkConfig.js; - node tools/dbs/setKitVersion.js; - -{{- else if eq .Values.job.mode "changeEmail" }} - - args: - - node tools/dbs/changeEmail.js; - -{{- end }} - - imagePullPolicy: Always - - envFrom: - - configMapRef: - name: {{.Values.envName}} - - secretRef: - name: {{.Values.secretName}} - - env: - -{{- if eq .Values.job.mode "add_coin" }} - - - name: COIN_SYMBOL - value: {{.Values.job.env.coin_symbol}} - - name: COIN_FULLNAME - value: {{.Values.job.env.coin_fullname}} - - name: COIN_ALLOW_DEPOSIT - value: {{.Values.job.env.coin_allow_deposit | quote }} - - name: COIN_ALLOW_WITHDRAWAL - value: {{.Values.job.env.coin_allow_withdrawal | quote }} - - name: COIN_WITHDRAWAL_FEE - value: {{.Values.job.env.coin_withdrawal_fee | quote }} - - name: COIN_MIN - value: {{.Values.job.env.coin_min | quote }} - - name: COIN_MAX - value: {{.Values.job.env.coin_max | quote }} - - name: COIN_INCREMENT_UNIT - value: {{.Values.job.env.coin_increment_unit | quote }} - - name: COIN_DEPOSIT_LIMITS - value: {{.Values.job.env.coin_deposit_limits | quote}} - - name: COIN_WITHDRAWAL_LIMITS - value: {{.Values.job.env.coin_withdrawal_limits | quote }} - - name: COIN_ACTIVE - value: {{.Values.job.env.coin_active | quote }} - -{{- else if eq .Values.job.mode "remove_coin" }} - - - name: COIN_SYMBOL - value: {{.Values.job.env.coin_symbol}} - -{{- else if eq .Values.job.mode "add_pair" }} - - - name: PAIR_NAME - value: {{.Values.job.env.pair_name}} - - name: PAIR_BASE - value: {{.Values.job.env.pair_base}} - - name: PAIR_2 - value: {{.Values.job.env.pair_2}} - - name: TAKER_FEES - value: {{.Values.job.env.taker_fees | quote }} - - name: MAKER_FEES - value: {{.Values.job.env.maker_fees | quote }} - - name: MIN_SIZE - value: {{.Values.job.env.min_size | quote }} - - name: MAX_SIZE - value: {{.Values.job.env.max_size | quote }} - - name: MIN_PRICE - value: {{.Values.job.env.min_price | quote }} - - name: MAX_PRICE - value: {{.Values.job.env.max_price | quote }} - - name: INCREMENT_SIZE - value: {{.Values.job.env.increment_size | quote }} - - name: INCREMENT_PRICE - value: {{.Values.job.env.increment_price | quote }} - - name: PAIR_ACTIVE - value: {{.Values.job.env.pair_active | quote }} - -{{- else if eq .Values.job.mode "remove_pair" }} - - - name: PAIR_NAME - value: {{.Values.job.env.pair_name}} - -{{- else if eq .Values.job.mode "set_activation_code" }} - - - name: ACTIVATION_CODE - value: "{{.Values.job.env.activation_code}}" - -{{- else if eq .Values.job.mode "set_security" }} - - - name: ALLOWED_DOMAINS - value: "{{.Values.job.env.allowed_domains}}" - - name: ADMIN_WHITELIST_IP - value: "{{.Values.job.env.admin_whitelist_ip}}" - - name: CAPTCHA_SITE_KEY - value: "{{.Values.job.env.captcha_site_key}}" - - name: CAPTCHA_SECRET_KEY - value: "{{.Values.job.env.captcha_secret_key}}" - -{{- else if eq .Values.job.mode "changeEmail" }} - - - name: USER_ID - value: "{{.Values.job.env.targetUserID}}" - - name: EMAIL - value: "{{.Values.job.env.newUserEmail}}" - -{{- end }} - - resources: - limits: - memory: "500Mi" - requests: - memory: "100Mi" - cpu: "15m" - -{{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} -{{- end }} - restartPolicy: Never - backoffLimit: 0 -{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/values.yaml b/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/values.yaml deleted file mode 100755 index 7c0e0571b5..0000000000 --- a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/values.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Default values for bitholla-hollaex-nginx. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -imageRegistry: bitholla/hollaex-core -dockerTag: - -imagePullSecrets: - - name: docker-registry-secret - -envName: hollaex-env -secretName: hollaex-secret - -DEPLOYMENT_MODE: api -PAIR: - -stable: - replicaCount: 1 - -staging: - enable: false - replicaCount: 1 - dockerTag: - -nodeSelector: {} - -autoScaling: - hpa: - enable: false - memory: - threshold: 80 - -APM_URL: - -podRestart_webhook_url: - -resources: - limits: - cpu: "1000m" - memory: "1536Mi" - requests: - cpu: "10m" - memory: "256Mi" - -job: - enable: false - mode: #add_coin - #remove_coin - #add_pair - #remove_pair - #hollaex_upgrade - env: - coin_symbol: - pair_name: - - - - diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/.helmignore similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/.helmignore rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/.helmignore diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/Chart.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/Chart.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/Chart.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/NOTES.txt similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/NOTES.txt rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/NOTES.txt diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/_helpers.tpl similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/_helpers.tpl rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/_helpers.tpl diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/configmap.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/configmap.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/configmap.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/configmap.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/deployment.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/deployment.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/deployment.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/postgres-volume.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/postgres-volume.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/postgres-volume.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/postgres-volume.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/service.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/service.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/templates/service.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml similarity index 92% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/values.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml index de530d0e95..a7151ee9e3 100755 --- a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml @@ -6,7 +6,7 @@ pvc: size: 2Gi name: hollaex-postgres-volume -secretName: hollaex-secret +secretName: hollaex-kit-secret NodePort: enable: false @@ -15,7 +15,7 @@ NodePort: nodeSelector: {} imageRegistry: postgres -dockerTag: 10.9 +dockerTag: 14.9-alpine resources: limits: diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-kit-redis/.helmignore similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/.helmignore rename to server/tools/kubernetes/helm-chart/hollaex-kit-redis/.helmignore diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-redis/Chart.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/Chart.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-redis/Chart.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/hollaex-kit-redis/templates/NOTES.txt similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres/templates/NOTES.txt rename to server/tools/kubernetes/helm-chart/hollaex-kit-redis/templates/NOTES.txt diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-kit-redis/templates/_helpers.tpl similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/_helpers.tpl rename to server/tools/kubernetes/helm-chart/hollaex-kit-redis/templates/_helpers.tpl diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-redis/templates/deployment.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/deployment.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-redis/templates/deployment.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-redis/templates/service.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/service.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-redis/templates/service.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-redis/values.yaml similarity index 85% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/values.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-redis/values.yaml index 787d28a710..d65a84e4db 100755 --- a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-redis/values.yaml @@ -8,10 +8,10 @@ NodePort: nodeSelector: {} imageRegistry: redis -dockerTag: 5.0.5-alpine +dockerTag: 7.2.0-alpine setAuth: - secretName: hollaex-secret + secretName: hollaex-kit-secret resources: limits: diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-kit-server/.helmignore similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/.helmignore rename to server/tools/kubernetes/helm-chart/hollaex-kit-server/.helmignore diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/Chart.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-server/Chart.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-server/Chart.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/_helpers.tpl similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/_helpers.tpl rename to server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/_helpers.tpl diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/autoscaler.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/autoscaler.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/autoscaler.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/autoscaler.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml similarity index 98% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/deployment.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml index 022739d3b4..dce32fde00 100644 --- a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/deployment.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml @@ -115,7 +115,6 @@ spec: resources: limits: memory: {{.Values.resources.limits.memory}} - cpu: {{.Values.resources.limits.cpu}} requests: memory: {{.Values.resources.requests.memory}} cpu: {{.Values.resources.requests.cpu}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/service.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-server/templates/service.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/service.yaml diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml new file mode 100755 index 0000000000..af0e63f294 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -0,0 +1,42 @@ +imageRegistry: bitholla/hollaex-kit +dockerTag: + +imagePullSecrets: + - name: docker-registry-secret + +envName: hollaex-kit-configmap +secretName: hollaex-kit-secret + +DEPLOYMENT_MODE: api +PAIR: + +stable: + replicaCount: 1 + +staging: + enable: false + replicaCount: 1 + dockerTag: + +nodeSelector: {} + +autoScaling: + hpa: + enable: false + memory: + threshold: 80 + +APM_URL: + +podRestart_webhook_url: + +resources: + limits: + memory: "1536Mi" + requests: + cpu: "100m" + memory: "512Mi" + + + + diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-server/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-kit-web/.helmignore similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-server/.helmignore rename to server/tools/kubernetes/helm-chart/hollaex-kit-web/.helmignore diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-web/Chart.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-web/Chart.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-web/Chart.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/_helpers.tpl similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/_helpers.tpl rename to server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/_helpers.tpl diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/autoscaler.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/autoscaler.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/autoscaler.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/autoscaler.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/deployment.yaml similarity index 97% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/deployment.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/deployment.yaml index 100adaff1f..be9a7eb9a1 100644 --- a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/deployment.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/deployment.yaml @@ -47,7 +47,6 @@ spec: resources: limits: memory: {{.Values.resources.limits.memory}} - cpu: {{.Values.resources.limits.cpu}} requests: memory: {{.Values.resources.requests.memory}} cpu: {{.Values.resources.requests.cpu}} diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/service.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-web/templates/service.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-web/templates/service.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml similarity index 96% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-web/values.yaml rename to server/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index ca677d4fad..7cc0c763e8 100755 --- a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -22,7 +22,7 @@ podRestart_webhook_url: resources: limits: - cpu: "100m" + memory: "100Mi" requests: cpu: "10m" diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/Chart.yaml deleted file mode 100644 index 06fe5dbffb..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/Chart.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v1 -appVersion: 1.8.0 -description: Scalable datastore for metrics, events, and real-time analytics. -home: https://www.influxdata.com/time-series-platform/influxdb/ -keywords: -- influxdb -- database -- timeseries -- influxdata -maintainers: -- email: rawkode@influxdata.com - name: rawkode -- email: giacomo@influxdata.com - name: gitirabassi -- email: urakiny@gmail.com - name: aisuko -- email: naseem@transit.app - name: naseemkullah -name: influxdb -sources: -- https://github.com/influxdata/influxdb -version: 4.8.9 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/OWNERS b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/OWNERS deleted file mode 100644 index 926c046b9f..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/OWNERS +++ /dev/null @@ -1,10 +0,0 @@ -approvers: -- rawkode -- gitirabassi -- aisuko -- naseemkullah -reviewers: -- rawkode -- gitirabassi -- aisuko -- naseemkullah diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/README.md b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/README.md deleted file mode 100644 index d88db9c331..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/README.md +++ /dev/null @@ -1,328 +0,0 @@ -# InfluxDB Helm chart - -[InfluxDB](https://github.com/influxdata/influxdb) is an open source time series database with no external dependencies. It's useful for recording metrics, events, and performing analytics. - -The InfluxDB Helm chart uses the [Helm](https://helm.sh) package manager to bootstrap an InfluxDB StatefulSet and service on a [Kubernetes](http://kubernetes.io) cluster. - -> **Note:** ### If you're using the InfluxDB Enterprise Helm chart, check out [InfluxDB Enterprise Helm chart](#influxdb-enterprise-helm-chart). - -## Prerequisites - -- Helm v2 or later -- Kubernetes 1.4+ -- (Optional) PersistentVolume (PV) provisioner support in the underlying infrastructure - -## Install the chart - -1. Add the InfluxData Helm repository: - - ```bash - helm repo add influxdata https://helm.influxdata.com/ - ``` - -2. Run the following command, providing a name for your release: - - ```bash - helm upgrade --install my-release influxdata/influxdb - ``` - - > **Tip**: `--install` can be shortened to `-i`. - - This command deploys InfluxDB on the Kubernetes cluster using the default configuration. To find parameters you can configure during installation, see [Configure the chart](#configure-the-chart). - - > **Tip**: To view all Helm chart releases, run `helm list`. - -## Uninstall the chart - -To uninstall the `my-release` deployment, use the following command: - -```bash -helm uninstall my-release -``` - -This command removes all the Kubernetes components associated with the chart and deletes the release. - -## Configure the chart - -The following table lists configurable parameters, their descriptions, and their default values stored in `values.yaml`. - -| Parameter | Description | Default | -|---|---|---| -| image.repository | Image repository url | influxdb | -| image.tag | Image tag | 1.8.0-alpine | -| image.pullPolicy | Image pull policy | IfNotPresent | -| image.pullSecrets | It will store the repository's credentials to pull image | nil | -| serviceAccount.create | It will create service account | true | -| serviceAccount.name | Service account name | "" | -| serviceAccount.annotations | Service account annotations | {} | -| livenessProbe | Health check for pod | {} | -| readinessProbe | Health check for pod | {} | -| startupProbe | Health check for pod | {} | -| service.type | Kubernetes service type | ClusterIP | -| service.loadBalancerIP | A user-specified IP address for service type LoadBalancer to use as External IP (if supported) | nil | -| service.externalIPs | A user-specified list of externalIPs to add to the service | nil | -| service.externalTrafficPolicy | A user specified external traffic policy | nil | -| persistence.enabled | Boolean to enable and disable persistance | true | -| persistence.existingClaim | An existing PersistentVolumeClaim, ignored if enterprise.enabled=true | nil | -| persistence.storageClass | If set to "-", storageClassName: "", which disables dynamic provisioning. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack | | -| persistence.annotations | Annotations for volumeClaimTemplates | nil | -| persistence.accessMode | Access mode for the volume | ReadWriteOnce | -| persistence.size | Storage size | 8Gi | -| podAnnotations | Annotations for pod | {} | -| podLabels | Labels for pod | {} | -| ingress.enabled | Boolean flag to enable or disable ingress | false | -| ingress.tls | Boolean to enable or disable tls for ingress. If enabled provide a secret in `ingress.secretName` containing TLS private key and certificate. | false | -| ingress.secretName | Kubernetes secret containing TLS private key and certificate. It is `only` required if `ingress.tls` is enabled. | nil | -| ingress.hostname | Hostname for the ingress | influxdb.foobar.com | -| annotations | ingress annotations | nil | -| schedulerName | Use an [alternate scheduler](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/), e.g. "stork". | nil | -| nodeSelector | Node labels for pod assignment | {} | -| affinity | [Affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) for pod assignment | {| -| tolerations | [Tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) for pod assignment | [] | -| securityContext | [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for pod | {} | -| env | environment variables for influxdb container | {} | -| volumes | `volumes` stanza(s) to be used in the main container | nil | -| mountPoints | `volumeMount` stanza(s) to be used in the main container | nil | -| extraContainers | Additional containers to be added to the pod | {} | -| config.reporting_disabled | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#reporting-disabled-false) | false | -| config.rpc | RPC address for backup and storage | {} | -| config.meta | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#meta) | {} | -| config.data | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#data) | {} | -| config.coordinator | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#coordinator) | {} | -| config.retention | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#retention) | {} | -| config.shard_precreation | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#shard-precreation) | {} | -| config.monitor | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#monitor) | {} | -| config.http | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#http) | {} | -| config.logging | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#logging) | {} | -| config.subscriber | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#subscriber) | {} | -| config.graphite | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#graphite) | {} | -| config.collectd | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#collectd) | {} | -| config.opentsdb | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#opentsdb) | {} | -| config.udp | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#udp) | {} | -| config.continous_queries | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#continuous-queries) | {} | -| config.tls | [Details](https://docs.influxdata.com/influxdb/v1.7/administration/config/#tls) | {} | -| initScripts.enabled | Boolean flag to enable and disable initscripts. If the container finds any files with the extensions .sh or .iql inside of the /docker-entrypoint-initdb.d folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order. | false | -| initScripts.scripts | Init scripts | {} | -| backup.enabled | Enable backups, if `true` must configure one of the storage providers | `false` | -| backup.gcs | Google Cloud Storage config | `nil` -| backup.azure | Azure Blob Storage config | `nil` -| backup.s3 | Amazon S3 (or compatible) config | `nil` -| backup.schedule | Schedule to run jobs in cron format | `0 0 * * *` | -| backup.startingDeadlineSeconds | Deadline in seconds for starting the job if it misses its scheduled time for any reason | `nil` | -| backup.annotations | Annotations for backup cronjob | {} | -| backup.podAnnotations | Annotations for backup cronjob pods | {} | -| backup.persistence.enabled | Boolean to enable and disable persistance | false | -| backup.persistence.storageClass | If set to "-", storageClassName: "", which disables dynamic provisioning. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack | | -| backup.persistence.annotations | Annotations for volumeClaimTemplates | nil | -| backup.persistence.accessMode | Access mode for the volume | ReadWriteOnce | -| backup.persistence.size | Storage size | 8Gi | -| backup.resources | Resources requests and limits for `backup` pods | `ephemeral-storage: 8Gi` | - -To configure the chart, do either of the following: - -- Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade --install`. For example: - - ```bash - helm upgrade --install my-release \ - --set persistence.enabled=true,persistence.size=200Gi \ - influxdata/influxdb - ``` - - This command enables persistence and changes the size of the requested data volume to 200GB. - -- Provide a YAML file that specifies the parameter values while installing the chart. For example, use the following command: - - ```bash - helm upgrade --install my-release -f values.yaml influxdata/influxdb - ``` - - > **Tip**: Use the default [values.yaml](values.yaml). - -For information about running InfluxDB in Docker, see the [full image documentation](https://hub.docker.com/_/influxdb/). - -### InfluxDB Enterprise Helm chart - -[InfluxDB Enterprise](https://www.influxdata.com/products/influxdb-enterprise/) includes features designed for production workloads, including high availability and horizontal scaling. InfluxDB Enterprise requires an InfluxDB Enterprise license. - -#### Configure the InfluxDB Enterprise chart - -To enable InfluxDB Enterprise, set the following keys and values in a values file provided to Helm. - -| Key | Description | Recommended value | -| --- | --- | --- | -| `livenessProbe.initalDelaySeconds` | Used to allow enough time to join meta nodes to a cluster | `3600` | -| `image.tag` | Set to a `data` image. See https://hub.docker.com/_/influxdb for details | `data` | -| `service.ClusterIP` | Use a headless service for StatefulSets | `"None"` | -| `env.name[_HOSTNAME]` | Used to provide a unique `name.service` for InfluxDB. See [values.yaml]() for an example | `valueFrom.fieldRef.fieldPath: metadata.name` | -| `enterprise.enabled` | Create StatefulSets for use with `influx-data` and `influx-meta` images | `true` | -| `enterprise.licensekey` | License for InfluxDB Enterprise | | -| `enterprise.clusterSize` | Replicas for `influx` StatefulSet | Dependent on license | -| `enterprise.meta.image.tag` | Set to an `meta` image. See https://hub.docker.com/_/influxdb for details | `meta` | -| `enterprise.meta.clusterSize` | Replicas for `influxdb-meta` StatefulSet. | `3` | -| `enterprise.meta.resources` | Resources requests and limits for meta `influxdb-meta` pods | See `values.yaml` | - -#### Join pods to InfluxDB Enterprise cluster - -Meta and data pods must be joined using the command `influxd-ctl` found on meta pods. -We recommend running `influxd-ctl` on one and only one meta pod and joining meta pods together before data pods. For each meta pod, run `influxd-ctl`. - -In the following examples, we use the pod names `influxdb-meta-0` and `influxdb-0` and the service name `influxdb`. - -For example, using the default settings, your script should look something like this: - -```shell script -kubectl exec influxdb-meta-0 influxd-ctl add-meta influxdb-meta-0.influxdb-meta:8091 -``` - -From the same meta pod, for each data pod, run `influxd-ctl`. With default settings, your script should look something like this: - -```shell script -kubectl exec influxdb-meta-0 influxd-ctl add-data influxdb-0.influxdb:8088 -``` - -When using `influxd-ctl`, use the appropriate DNS name for your pods, following the naming scheme of `pod.service`. - -## Persistence - -The [InfluxDB](https://hub.docker.com/_/influxdb/) image stores data in the `/var/lib/influxdb` directory in the container. - -If persistence is enabled, a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/) associated with StatefulSet is provisioned. The volume is created using dynamic volume provisioning. In case of a disruption (for example, a node drain), Kubernetes ensures that the same volume is reattached to the Pod, preventing any data loss. However, when persistence is **not enabled**, InfluxDB data is stored in an empty directory, so if a Pod restarts, data is lost. - -## Start with authentication - -In `values.yaml`, change `.Values.config.http.auth-enabled` to `true`. - -> **Note:** To enforce authentication, InfluxDB requires an admin user to be set up. For details, see [Set up authentication](https://docs.influxdata.com/influxdb/v1.2/query_language/authentication_and_authorization/#set-up-authentication). - -To handle this set up during startup, enable a job in `values.yaml` by setting `.Values.setDefaultUser.enabled` to `true`. - -Make sure to uncomment or configure the job settings after enabling it. If a password is not set, a random password will be generated. - -Alternatively, if `.Values.setDefaultUser.user.existingSecret` is set the user and password are obtained from an existing Secret, the expected keys are `influxdb-user` and `influxdb-password`. Use this variable if you need to check in the `values.yaml` in a repository to avoid exposing your secrets. - -## Back up and restore - -Before proceeding, please read [Backing up and restoring in InfluxDB OSS](https://docs.influxdata.com/influxdb/v1.7/administration/backup_and_restore/). While the chart offers backups by means of the [`backup-cronjob`](./templates/backup-cronjob.yaml), restores do not fall under the chart's scope today but can be achieved by one-off kubernetes jobs. - -### Backups - -When enabled, the[`backup-cronjob`](./templates/backup-cronjob.yaml) runs on the configured schedule. One can create a job from the backup cronjob on demand as follows: - -```sh -kubectl create job --from=cronjobs/influxdb-backup influx-backup-$(date +%Y%m%d%H%M%S) -``` - -#### Backup Storage - -The backup process consists of an init-container that writes the backup to a -local volume, which is by default an `emptyDir`, shared to the runtime container -which uploads the backup to the configured object store. - -In order to avoid filling the node's disk space, it is recommended to set a sufficient -`ephemeral-storage` request or enable persistence, which allocates a PVC. - -Furthermore, if no object store provider is available, one can simply use the -PVC as the final storage destination when `persistence` is enabled. - -### Restores - -It is up to the end user to configure their own one-off restore jobs. Below is just an example, which assumes that the backups are stored in GCS and that all dbs in the backup already exist and should be restored. It is to be used as a reference only; configure the init-container and the command and of the `influxdb-restore` container as well as both containers' resources to suit your needs. - -```yaml -apiVersion: batch/v1 -kind: Job -metadata: - generateName: influxdb-restore- - namespace: monitoring -spec: - template: - spec: - volumes: - - name: backup - emptyDir: {} - serviceAccountName: influxdb - initContainers: - - name: init-gsutil-cp - image: google/cloud-sdk:alpine - command: - - /bin/sh - args: - - "-c" - - | - gsutil -m cp -r gs:///* /backup - volumeMounts: - - name: backup - mountPath: /backup - resources: - requests: - cpu: 1 - memory: 4Gi - limits: - cpu: 2 - memory: 8Gi - containers: - - name: influxdb-restore - image: influxdb:1.7-alpine - volumeMounts: - - name: backup - mountPath: /backup - command: - - /bin/sh - args: - - "-c" - - | - #!/bin/sh - INFLUXDB_HOST=influxdb.monitoring.svc - for db in $(influx -host $INFLUXDB_HOST -execute 'SHOW DATABASES' | tail -n +5); do - influxd restore -host $INFLUXDB_HOST:8088 -portable -db "$db" -newdb "$db"_bak /backup - done - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - cpu: 500m - memory: 512Mi - restartPolicy: OnFailure -``` - -At which point the data from the new `_bak` dbs would have to be side loaded into the original dbs. -Please see [InfluxDB documentation for more restore examples](https://docs.influxdata.com/influxdb/v1.7/administration/backup_and_restore/#restore-examples). - -## Mounting Extra Volumes - -Extra volumes can be mounted by providing the `volumes` and `mountPoints` keys, consistent -with the behavior of other charts provided by Influxdata. - -```yaml -volumes: -- name: ssl-cert-volume - secret: - secretName: secret-name -mountPoints: -- name: ssl-cert-volume - mountPath: /etc/ssl/certs/selfsigned/ - readOnly: true -``` - -## Upgrading - -### From < 1.0.0 To >= 1.0.0 - -Values `.Values.config.bind_address` and `.Values.exposeRpc` no longer exist. They have been replaced with `.Values.config.rpc.bind_address` and `.Values.config.rpc.enabled` respectively. Please adjust your values file accordingly. - -### From < 1.5.0 to >= 2.0.0 - -The Kubernetes API change to support 1.160 may not be backwards compatible and may require the chart to be uninstalled in order to upgrade. See [this issue](https://github.com/helm/helm/issues/6583) for some background. - -### From < 3.0.0 to >= 3.0.0 - -Since version 3.0.0 this chart uses a StatefulSet instead of a Deployment. As part of this update the existing persistent volume (and all data) is deleted and a new one is created. Make sure to backup and restore the data manually. - -### From < 4.0.0 to >= 4.0.0 - -Labels are changed in accordance with [Kubernetes recommended labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/\#labels). This change also removes the ability to configure clusterIP value to avoid `Error: UPGRADE FAILED: failed to replace object: Service "my-influxdb" is invalid: spec.clusterIP: Invalid value: "": field is immutable` type errors. For more information on this error and why it's important to avoid this error, please see [this Github issue](https://github.com/helm/helm/issues/6378#issuecomment-582764215). - -Due to the significance of the changes, we recommend uninstalling and reinstalling the chart (although the PVC shouldn't be deleted during this process, we highly recommended backing up your data beforehand). - -Check out our [Slack channel](https://www.influxdata.com/slack) for support and information. diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/files/backup-retention-script.sh b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/files/backup-retention-script.sh deleted file mode 100644 index 913794a5dd..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/files/backup-retention-script.sh +++ /dev/null @@ -1,66 +0,0 @@ -#! /usr/bin/env bash - -set -e - -# This script wants these variable to be set. - -## S3_BUCKET <- The name of the bucket where the backups are stored -## S3_ENDPOINT <- The endpoint of the S3 service -## AWS_ACCESS_KEY_ID <- Access credentials -## AWS_SECRET_ACCESS_KEY <- Access credentials -## DAYS_TO_RETAIN <- The TTL for the backups === number of backups to keep. - -# Sanity check to avoid removing all backups. -[[ "$DAYS_TO_RETAIN" -lt 1 ]] && DAYS_TO_RETAIN=1 - -function get_records { - before_date="$1" - - aws s3api list-objects \ - --bucket ${S3_BUCKET} \ - --endpoint-url ${S3_ENDPOINT} \ - --query "Contents[?LastModified<='${before_date}'][].{Key: Key}" -} - -function remove_old_backups { - before_date=$(date --iso-8601=seconds -d "-${DAYS_TO_RETAIN} days") - now=$(date --iso-8601=seconds) - - del_records=$(get_records "${before_date}") - all_records=$(get_records "${now}") - - del_paths=() - all_paths=() - - function _jq { - echo ${row} | base64 --decode | jq -r ${1} - } - - for row in $(echo "${del_records}" | jq -r '.[] | @base64'); do - del_paths+=($(_jq '.Key')) - done - - for row in $(echo "${all_records}" | jq -r '.[] | @base64'); do - all_paths+=($(_jq '.Key')) - done - - # Number of backups left if all old backups are removed. - left=$((${#all_paths[@]} - ${#del_paths[@]})) - - # We ALWAYS keep N backups even if their TTL has expired! - if (( ${left} < ${DAYS_TO_RETAIN} )); then - num_to_delete=$((${#all_paths[@]} - ${DAYS_TO_RETAIN})) - else - num_to_delete=${#del_paths[@]} - fi - - for path in "${del_paths[@]::${num_to_delete}}"; do - aws s3 rm "s3://${S3_BUCKET}/${path}" \ - --endpoint-url "${S3_ENDPOINT}" - done -} - -# Installs jq. -yum install -y jq - -remove_old_backups diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/NOTES.txt deleted file mode 100644 index 41ffa05acf..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/NOTES.txt +++ /dev/null @@ -1,42 +0,0 @@ -InfluxDB can be accessed via port {{ .Values.config.http.bind_address | default 8086 }} on the following DNS name from within your cluster: - - http://{{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.config.http.bind_address | default 8086 }} - -You can connect to the remote instance with the influx CLI. To forward the API port to localhost:8086, run the following: - - kubectl port-forward --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ include "influxdb.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') 8086:{{ .Values.config.http.bind_address | default 8086 }} - -You can also connect to the influx CLI from inside the container. To open a shell session in the InfluxDB pod, run the following: - - kubectl exec -i -t --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ include "influxdb.fullname" . }} -o jsonpath='{.items[0].metadata.name}') /bin/sh - -To view the logs for the InfluxDB pod, run the following: - - kubectl logs -f --namespace {{ .Release.Namespace }} $(kubectl get pods --namespace {{ .Release.Namespace }} -l app={{ include "influxdb.fullname" . }} -o jsonpath='{ .items[0].metadata.name }') - -{{- if .Values.setDefaultUser.enabled }} - -To retrieve the default user name: - -{{- if .Values.setDefaultUser.user.existingSecret }} - - echo $(kubectl get secret {{ .Values.setDefaultUser.user.existingSecret }} -o "jsonpath={.data['influxdb-user']}" --namespace {{ .Release.Namespace }} | base64 --decode) - -{{- else }} - - echo $(kubectl get secret {{ include "influxdb.fullname" . }}-auth -o "jsonpath={.data['influxdb-user']}" --namespace {{ .Release.Namespace }} | base64 --decode) - -{{- end }} - -To retrieve the default user password: - -{{- if .Values.setDefaultUser.user.existingSecret }} - - echo $(kubectl get secret {{ .Values.setDefaultUser.user.existingSecret }} -o "jsonpath={.data['influxdb-password']}" --namespace {{ .Release.Namespace }} | base64 --decode) - -{{- else }} - - echo $(kubectl get secret {{ include "influxdb.fullname" . }}-auth -o "jsonpath={.data['influxdb-password']}" --namespace {{ .Release.Namespace }} | base64 --decode) - -{{- end }} -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/_helpers.tpl deleted file mode 100644 index 4866664e12..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "influxdb.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "influxdb.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "influxdb.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "influxdb.labels" -}} -helm.sh/chart: {{ include "influxdb.chart" . }} -{{ include "influxdb.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "influxdb.selectorLabels" -}} -app.kubernetes.io/name: {{ include "influxdb.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "influxdb.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "influxdb.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-cronjob.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-cronjob.yaml deleted file mode 100644 index b43e736d3e..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-cronjob.yaml +++ /dev/null @@ -1,150 +0,0 @@ -{{- if .Values.backup.enabled }} -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: {{ include "influxdb.fullname" . }}-backup - labels: - {{- include "influxdb.labels" . | nindent 4 }} - app.kubernetes.io/component: backup - annotations: - {{- toYaml .Values.backup.annotations | nindent 4 }} -spec: - schedule: {{ .Values.backup.schedule | quote }} - startingDeadlineSeconds: {{ .Values.backup.startingDeadlineSeconds }} - concurrencyPolicy: Forbid - jobTemplate: - spec: - template: - metadata: - {{- if .Values.backup.podAnnotations }} - annotations: - {{ toYaml .Values.backup.podAnnotations | nindent 12 }} - {{- end }} - labels: - {{- include "influxdb.selectorLabels" . | nindent 12 }} - spec: - restartPolicy: OnFailure - volumes: - - name: backup - {{- if .Values.backup.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ include "influxdb.fullname" . }}-backup - {{- else }} - emptyDir: {} - {{- end }} - {{- if .Values.backup.gcs }} - {{- if .Values.backup.gcs.serviceAccountSecret }} - - name: google-cloud-key - secret: - secretName: {{ .Values.backup.gcs.serviceAccountSecret | quote }} - {{- end }} - {{- end }} - {{- if .Values.backup.s3 }} - {{- if .Values.backup.s3.credentialsSecret }} - - name: aws-credentials-secret - secret: - secretName: {{ .Values.backup.s3.credentialsSecret | quote }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "influxdb.serviceAccountName" . }} - initContainers: - - name: influxdb-backup - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - volumeMounts: - - name: backup - mountPath: /backup - command: - - /bin/sh - args: - - '-c' - - | - influxd backup \ - -host {{ include "influxdb.fullname" . }}.{{ .Release.Namespace }}.svc:{{ .Values.config.rpc.bind_address | default 8088 }} \ - -portable /backup/"$(date +%Y%m%d%H%M%S)" - resources: - {{- toYaml .Values.backup.resources | nindent 14 }} - containers: - {{- if .Values.backup.gcs }} - - name: gsutil-cp - image: google/cloud-sdk:alpine - command: - - /bin/sh - args: - - '-c' - - | - if [ -n "$KEY_FILE" ]; then - gcloud auth activate-service-account --key-file $KEY_FILE - fi - gsutil -m cp -r /backup/* "$DST_URL" - volumeMounts: - - name: backup - mountPath: /backup - {{- if .Values.backup.gcs.serviceAccountSecretKey}} - - name: google-cloud-key - mountPath: /var/secrets/google/ - {{- end }} - env: - - name: DST_URL - value: {{ .Values.backup.gcs.destination}} - {{- if .Values.backup.gcs.serviceAccountSecretKey}} - - name: KEY_FILE - value: /var/secrets/google/{{ .Values.backup.gcs.serviceAccountSecretKey }} - {{- end }} - resources: - {{- toYaml .Values.backup.resources | nindent 14 }} - {{- end }} - {{- if .Values.backup.azure }} - - name: azure-cli - image: microsoft/azure-cli - command: - - /bin/sh - args: - - '-c' - - | - az storage container create --name "$DST_CONTAINER" - az storage blob upload-batch --destination "$DST_CONTAINER" --destination-path "$DST_PATH" --source "$SRC_URL" - volumeMounts: - - name: backup - mountPath: /backup - env: - - name: SRC_URL - value: /backup - - name: DST_CONTAINER - value: {{ .Values.backup.azure.destination_container }} - - name: DST_PATH - value: {{ .Values.backup.azure.destination_path }} - - name: AZURE_STORAGE_CONNECTION_STRING - valueFrom: - secretKeyRef: - name: {{ .Values.backup.azure.storageAccountSecret }} - key: connection-string - resources: - {{- toYaml .Values.backup.resources | nindent 14 }} - {{- end }} - {{- if .Values.backup.s3 }} - - name: aws-cli - image: amazon/aws-cli - command: - - /bin/sh - args: - - '-c' - - | - aws {{- if .Values.backup.s3.endpointUrl }} --endpoint-url={{ .Values.backup.s3.endpointUrl }} {{- end }} s3 cp --recursive "$SRC_URL" "$DST_URL" - volumeMounts: - - name: backup - mountPath: /backup - {{- if .Values.backup.s3.credentialsSecret}} - - name: aws-credentials-secret - mountPath: /var/secrets/aws/ - {{- end }} - env: - - name: AWS_CONFIG_FILE - value: /var/secrets/aws/credentials - - name: SRC_URL - value: /backup - - name: DST_URL - value: {{ .Values.backup.s3.destination }} - resources: - {{- toYaml .Values.backup.resources | nindent 14 }} - {{- end }} -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-pvc.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-pvc.yaml deleted file mode 100644 index ebf4ba1c06..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-pvc.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if and .Values.backup.enabled .Values.backup.persistence.enabled }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "influxdb.fullname" . }}-backup - labels: - {{- include "influxdb.labels" . | nindent 4 }} -spec: - accessModes: - - {{ .Values.backup.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.backup.persistence.size | quote }} -{{- if .Values.backup.persistence.storageClass }} -{{- if (eq "-" .Values.backup.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.backup.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-configmap.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-configmap.yaml deleted file mode 100644 index d158eb5433..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-configmap.yaml +++ /dev/null @@ -1,11 +0,0 @@ -{{- if .Values.backupRetention.enabled }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "influxdb.fullname" . }}-backup-retention - labels: - {{- include "influxdb.labels" . | nindent 4 }} -data: - backup-retention.sh: |- - {{- .Files.Get "files/backup-retention-script.sh" | nindent 4 }} -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-cronjob.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-cronjob.yaml deleted file mode 100644 index 388c62d3ed..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/backup-retention-cronjob.yaml +++ /dev/null @@ -1,75 +0,0 @@ -{{- if .Values.backupRetention.enabled }} -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: {{ include "influxdb.fullname" . }}-backup-retention - labels: - {{- include "influxdb.labels" . | nindent 4 }} - app.kubernetes.io/component: backup-retention - annotations: - {{- toYaml .Values.backupRetention.annotations | nindent 4 }} -spec: - schedule: {{ .Values.backupRetention.schedule | quote }} - startingDeadlineSeconds: {{ .Values.backupRetention.startingDeadlineSeconds }} - concurrencyPolicy: Forbid - jobTemplate: - spec: - template: - metadata: - {{- if .Values.backupRetention.podAnnotations }} - annotations: - {{ toYaml .Values.backupRetention.podAnnotations | nindent 12 }} - {{- end }} - labels: - {{- include "influxdb.selectorLabels" . | nindent 12 }} - spec: - restartPolicy: OnFailure - volumes: - - name: scripts - configMap: - name: {{ include "influxdb.fullname" . }}-backup-retention - {{- if .Values.backupRetention.gcs }} - {{- if .Values.backupRetention.gcs.serviceAccountSecret }} - - name: google-cloud-key - secret: - secretName: {{ .Values.backupRetention.gcs.serviceAccountSecret | quote }} - {{- end }} - {{- end }} - {{- if .Values.backupRetention.s3 }} - {{- if .Values.backupRetention.s3.credentialsSecret }} - - name: aws-credentials-secret - secret: - secretName: {{ .Values.backupRetention.s3.credentialsSecret | quote }} - {{- end }} - {{- end }} - serviceAccountName: {{ include "influxdb.serviceAccountName" . }} - containers: - {{- if .Values.backupRetention.gcs }} - {{- end }} - {{- if .Values.backupRetention.azure }} - {{- end }} - {{- if .Values.backupRetention.s3 }} - - name: aws-cli - image: amazon/aws-cli - command: ['/bin/bash'] - args: ['/scripts/backup-retention.sh'] - volumeMounts: - - name: scripts - mountPath: /scripts - {{- if .Values.backupRetention.s3.credentialsSecret}} - - name: aws-credentials-secret - mountPath: /var/secrets/aws/ - {{- end }} - env: - - name: AWS_CONFIG_FILE - value: /var/secrets/aws/credentials - - name: DAYS_TO_RETAIN - value: {{ .Values.backupRetention.daysToRetain | quote }} - - name: S3_BUCKET - value: {{ .Values.backupRetention.s3.bucketName }} - - name: S3_ENDPOINT - value: {{ .Values.backupRetention.s3.endpointUrl }} - resources: - {{- toYaml .Values.backupRetention.resources | nindent 14 }} - {{- end }} -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/configmap.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/configmap.yaml deleted file mode 100644 index ec7677b22e..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/configmap.yaml +++ /dev/null @@ -1,184 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "influxdb.fullname" . }} - labels: - {{- include "influxdb.labels" . | nindent 4 }} -data: - influxdb.conf: |+ - reporting-disabled = {{ .Values.config.reporting_disabled | default false }} - bind-address = ":{{ .Values.config.rpc.bind_address | default 8088 }}" - - [meta] - dir = "/var/lib/influxdb/meta" - {{- range $key, $value := index .Values.config.meta }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - {{- if .Values.enterprise.enabled }} - internal-shared-secret = "{{ sha256sum .Values.enterprise.meta.seed }}" - meta-auth-enabled = {{ .Values.config.meta.authEnabled }} - {{- end }} - - [data] - dir = "/var/lib/influxdb/data" - wal-dir = "/var/lib/influxdb/wal" - {{- range $key, $value := index .Values.config.data }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - [coordinator] - {{- range $key, $value := index .Values.config.coordinator }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - [retention] - {{- range $key, $value := index .Values.config.retention }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - [shard-precreation] - {{- range $key, $value := index .Values.config.shard_precreation }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - [monitor] - {{- range $key, $value := index .Values.config.monitor }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - [subscriber] - {{- range $key, $value := index .Values.config.subscriber }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - [http] - {{- range $key, $value := index .Values.config.http }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - # TODO: allow multiple graphite listeners - - [[graphite]] - {{- range $key, $value := index .Values.config.graphite }} - {{- if ne $key "templates"}} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - {{- end }} - {{- if .Values.config.graphite.templates }} - templates = [ - {{- range .Values.config.graphite.templates }} - {{ quote . }}, - {{- end }} - ] - {{- end }} - - # TODO: allow multiple collectd listeners with templates - - [[collectd]] - {{- range $key, $value := index .Values.config.collectd }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - # TODO: allow multiple opentsdb listeners with templates - - [[opentsdb]] - {{- range $key, $value := index .Values.config.opentsdb }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - # TODO: allow multiple udp listeners with templates - - [[udp]] - {{- range $key, $value := index .Values.config.udp }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - [continuous_queries] - {{- range $key, $value := index .Values.config.continuous_queries }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - [logging] - {{- range $key, $value := index .Values.config.logging }} - {{- $tp := typeOf $value }} - {{- if eq $tp "string" }} - {{ $key }} = {{ $value | quote }} - {{- else }} - {{ $key }} = {{ $value }} - {{- end }} - {{- end }} - - {{ if .Values.enterprise.enabled -}} - [enterprise] - license-key = {{ .Values.enterprise.licensekey | quote }} - - [hinted-handoff] - enabled = true - dir = "/var/lib/influxdb/hh" - {{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/ingress.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/ingress.yaml deleted file mode 100644 index a4291d26d6..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/ingress.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.ingress.enabled -}} -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: {{ include "influxdb.fullname" . }} - labels: - {{- include "influxdb.labels" . | nindent 4 }} - annotations: -{{ toYaml .Values.ingress.annotations | indent 4 }} -spec: -{{- if .Values.ingress.tls }} - tls: - - hosts: - - {{ .Values.ingress.hostname | quote }} - secretName: {{ .Values.ingress.secretName }} -{{- end }} - rules: - - host: {{ .Values.ingress.hostname }} - http: - paths: - - path: {{ .Values.ingress.path }} - backend: - serviceName: {{ include "influxdb.fullname" . }} - servicePort: 8086 -{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/init-config.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/init-config.yaml deleted file mode 100644 index 5f60898526..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/init-config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -{{- if .Values.initScripts.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "influxdb.fullname" . }}-init - labels: - {{- include "influxdb.labels" . | nindent 4 }} -data: -{{ toYaml .Values.initScripts.scripts | indent 2 }} -{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-configmap.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-configmap.yaml deleted file mode 100644 index 8e312d1fa0..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-configmap.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{{ if .Values.enterprise.enabled -}} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "influxdb.fullname" . }}-meta - labels: - {{- include "influxdb.labels" . | nindent 4 }} - app.kubernetes.io/component: meta -data: - influxdb-meta.conf: |+ - reporting-disabled = {{ .Values.config.reporting_disabled | default false }} - bind-address = ":{{ .Values.config.meta.bind_address | default 8091 }}" - - [enterprise] - license-key = {{ .Values.enterprise.licensekey | quote }} - - [meta] - dir = "/var/lib/influxdb/meta" - {{- range $key, $value := index .Values.config.meta }} - {{ $key }} = {{ $value }} - {{- end }} - {{- if .Values.enterprise.enabled }} - meta-auth-enabled = {{ .Values.config.meta.authEnabled }} - {{- end }} - - [logging] - {{- range $key, $value := index .Values.config.logging }} - {{ $key }} = {{ $value }} - {{- end }} - - [tls] - {{- range $key, $value := index .Values.config.tls }} - {{ $key }} = {{ $value }} - {{- end }} -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-service.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-service.yaml deleted file mode 100644 index 78d18e5ebe..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-service.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{ if .Values.enterprise.enabled -}} -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.service.annotations }} - annotations: -{{ toYaml .Values.service.annotations | indent 4 }} -{{- end }} - name: {{ include "influxdb.fullname" . }}-meta - labels: - {{- include "influxdb.labels" . | nindent 4 }} - app.kubernets.io/component: meta -spec: - type: ClusterIP - clusterIP: None - # publishNotReadyAddresses is used for service discovery of meta and data nodes by querying the service's SRV record. - publishNotReadyAddresses: true - ports: - - name: meta - port: {{ .Values.config.meta.bind_address | default 8091 }} - targetPort: meta - selector: - {{- include "influxdb.selectorLabels" . | nindent 4 }} - app.kubernets.io/component: meta -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-statefulset.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-statefulset.yaml deleted file mode 100644 index 16b35c4f12..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/meta-statefulset.yaml +++ /dev/null @@ -1,132 +0,0 @@ -{{- if .Values.enterprise.enabled }} -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "influxdb.fullname" . }}-meta - labels: - {{- include "influxdb.labels" . | nindent 4 }} - app.kubernetes.io/component: meta -spec: - replicas: {{ .Values.enterprise.meta.clusterSize }} - selector: - matchLabels: - {{- include "influxdb.selectorLabels" . | nindent 6 }} - app.kubernetes.io/component: meta - serviceName: "{{ include "influxdb.fullname" . }}-meta" - template: - metadata: - labels: - {{- include "influxdb.selectorLabels" . | nindent 8 }} - app.kubernetes.io/component: meta - {{- if .Values.podAnnotations }} - annotations: -{{ toYaml .Values.podAnnotations | indent 8 }} - {{- end }} - spec: - {{- if .Values.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.image.pullSecrets }} - - name: {{ . }} - {{- end}} - {{- end }} - serviceAccountName: {{ include "influxdb.serviceAccountName" . }} - containers: - - name: "{{ include "influxdb.fullname" . }}-meta" - image: "{{ .Values.image.repository }}:{{ .Values.enterprise.meta.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - resources: -{{ toYaml .Values.enterprise.meta.resources | indent 10 }} - ports: - - name: udp - containerPort: {{ .Values.config.udp.bind_address | default 8089 }} - - name: rpc - containerPort: {{ .Values.config.rpc.bind_address | default 8088 }} - - name: meta - containerPort: {{ .Values.config.meta.bind_address | default 8091 }} - {{- if .Values.env }} - env: -{{ toYaml .Values.env | indent 10 }} - # Values.env's HOSTNAME isn't fundamentally different from $HOSTNAME, but this way we get a distinguished name for InfluxDB at runtime. - - name: INFLUXDB_HOSTNAME - value: "$(_HOSTNAME).{{ include "influxdb.fullname" . }}-meta" - {{- end }} - livenessProbe: - httpGet: - path: {{ .Values.livenessProbe.path | default "/ping" }} - port: meta - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30 }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5 }} - readinessProbe: - httpGet: - path: {{ .Values.readinessProbe.path | default "/ping" }} - port: meta - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 5 }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 1 }} - {{- if .Values.startupProbe.enabled }} - startupProbe: - httpGet: - path: {{ .Values.startupProbe.path | default "/ping" }} - port: meta - failureThreshold: {{ .Values.startupProbe.failureThreshold | default 6 }} - periodSeconds: {{ .Values.startupProbe.periodSeconds | default 5 }} - {{- end }} - volumeMounts: - - name: {{ include "influxdb.fullname" . }}-meta - mountPath: /var/lib/influxdb - - name: config - mountPath: /etc/influxdb - {{- if .Values.initScripts.enabled }} - - name: init - mountPath: /docker-entrypoint-initdb.d - {{- end }} - volumes: - - name: config - configMap: - name: {{ include "influxdb.fullname" . }}-meta - {{- if .Values.initScripts.enabled }} - - name: init - configMap: - name: {{ include "influxdb.fullname" . }}-init - {{- end }} - {{- if (not .Values.persistence.enabled ) }} - - name: {{ include "influxdb.fullname" . }}-meta - emptyDir: {} - {{- end }} - {{- if .Values.schedulerName }} - schedulerName: "{{ .Values.schedulerName }}" - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} - {{- end -}} - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 8 }} - {{- end }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 8 }} - {{- end }} - {{- if .Values.persistence.enabled }} - volumeClaimTemplates: - - metadata: - name: {{ include "influxdb.fullname" . }}-meta - annotations: - {{- range $key, $value := .Values.persistence.annotations }} - {{ $key }}: "{{ $value }}" - {{- end }} - spec: - accessModes: - - {{ .Values.persistence.accessMode | quote}} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} - {{- if .Values.persistence.storageClass }} - {{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/post-install-set-auth.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/post-install-set-auth.yaml deleted file mode 100644 index 22e2ca2eb1..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/post-install-set-auth.yaml +++ /dev/null @@ -1,92 +0,0 @@ -{{- if .Values.setDefaultUser.enabled -}} -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "influxdb.fullname" . }}-set-auth - labels: - {{- include "influxdb.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": post-install - "helm.sh/hook-delete-policy": {{ .Values.setDefaultUser.hookDeletePolicy }} -spec: - activeDeadlineSeconds: {{ .Values.setDefaultUser.activeDeadlineSeconds }} - backoffLimit: {{ .Values.setDefaultUser.backoffLimit }} - template: - metadata: - labels: - {{- include "influxdb.selectorLabels" . | nindent 8 }} - spec: - containers: - - name: {{ include "influxdb.fullname" . }}-set-auth - image: "{{ .Values.setDefaultUser.image }}" - env: - - name: INFLUXDB_USER - valueFrom: - secretKeyRef: - {{- if .Values.setDefaultUser.user.existingSecret }} - name: {{ .Values.setDefaultUser.user.existingSecret -}} - {{ else }} - name: {{ include "influxdb.fullname" . }}-auth - {{- end }} - key: influxdb-user - - name: INFLUXDB_PASSWORD - valueFrom: - secretKeyRef: - {{- if .Values.setDefaultUser.user.existingSecret }} - name: {{ .Values.setDefaultUser.user.existingSecret -}} - {{ else }} - name: {{ include "influxdb.fullname" . }}-auth - {{- end }} - key: influxdb-password - args: - - "/bin/sh" - - "-c" - - | - curl -X POST http://{{ include "influxdb.fullname" . }}:{{ .Values.config.http.bind_address | default 8086 }}/query \ - --data-urlencode \ - "q=CREATE USER \"${INFLUXDB_USER}\" WITH PASSWORD '${INFLUXDB_PASSWORD}' {{ .Values.setDefaultUser.user.privileges }}" - restartPolicy: {{ .Values.setDefaultUser.restartPolicy }} - -{{- else if .Values.setCustomUser.enabled -}} - -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "influxdb.fullname" . }}-set-auth - labels: - {{- include "influxdb.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": post-install - "helm.sh/hook-delete-policy": {{ .Values.setDefaultUser.hookDeletePolicy }} -spec: - activeDeadlineSeconds: {{ .Values.setDefaultUser.activeDeadlineSeconds }} - backoffLimit: {{ .Values.setDefaultUser.backoffLimit }} - template: - metadata: - labels: - {{- include "influxdb.selectorLabels" . | nindent 8 }} - spec: - containers: - - name: {{ include "influxdb.fullname" . }}-set-auth - image: "{{ .Values.setCustomUser.image }}" - env: - - name: INFLUXDB_USER - valueFrom: - secretKeyRef: - name: {{.Values.setCustomUser.secretName}} - key: INFLUX_USER - - name: INFLUXDB_PASSWORD - valueFrom: - secretKeyRef: - name: {{.Values.setCustomUser.secretName}} - key: INFLUX_PASSWORD - args: - - "/bin/sh" - - "-c" - - | - curl -X POST http://{{ include "influxdb.fullname" . }}:{{ .Values.config.http.bind_address | default 8086 }}/query \ - --data-urlencode \ - "q=CREATE USER \"${INFLUXDB_USER}\" WITH PASSWORD '${INFLUXDB_PASSWORD}' {{ .Values.setDefaultUser.user.privileges }}" - restartPolicy: {{ .Values.setDefaultUser.restartPolicy }} - -{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/secret.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/secret.yaml deleted file mode 100644 index c6390f1eb9..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/secret.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.setDefaultUser.enabled -}} -{{- if not (.Values.setDefaultUser.user.existingSecret) -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "influxdb.fullname" . }}-auth - labels: - {{- include "influxdb.labels" . | nindent 4 }} -data: - {{- if .Values.setDefaultUser.user.password }} - influxdb-password: {{ .Values.setDefaultUser.user.password | b64enc | quote }} - {{- else }} - influxdb-password: {{ randAlphaNum 10 | b64enc | quote }} - {{- end }} - influxdb-user: {{ .Values.setDefaultUser.user.username | b64enc | quote }} -{{- end -}} -{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/service.yaml deleted file mode 100644 index c5121e5e14..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/service.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: -{{- if .Values.service.annotations }} - annotations: -{{ toYaml .Values.service.annotations | indent 4 }} -{{- end }} - name: {{ include "influxdb.fullname" . }} - labels: - {{- include "influxdb.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - name: api - port: {{ .Values.config.http.bind_address | default 8086 }} - targetPort: api - - name: rpc - port: {{ .Values.config.rpc.bind_address | default 8088 }} - targetPort: rpc - {{- if .Values.config.graphite.enabled }} - - name: graphite - port: {{ .Values.config.graphite.bind_address | default 2003 }} - targetPort: graphite - {{- end }} - {{- if .Values.config.collectd.enabled }} - - name: collectd - port: {{ .Values.config.collectd.bind_address | default 25826 }} - protocol: UDP - targetPort: collectd - {{- end }} - {{- if .Values.config.udp.enabled }} - - name: udp - port: {{ .Values.config.udp.bind_address | default 8089 }} - protocol: UDP - targetPort: udp - {{- end }} - {{- if .Values.config.opentsdb.enabled }} - - name: opentsdb - port: {{ .Values.config.opentsdb.bind_address | default 4242 }} - targetPort: opentsdb - {{- end }} - selector: - {{- include "influxdb.selectorLabels" . | nindent 4 }} -{{- if .Values.service.loadBalancerIP }} - loadBalancerIP: {{ .Values.service.loadBalancerIP }} -{{- end }} -{{- if .Values.service.externalIPs }} - externalIPs: -{{ toYaml .Values.service.externalIPs | indent 4 }} -{{- end }} -{{- if .Values.service.externalTrafficPolicy }} - externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/serviceaccount.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/serviceaccount.yaml deleted file mode 100644 index c496696559..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "influxdb.serviceAccountName" . }} - labels: - {{- include "influxdb.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/statefulset.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/statefulset.yaml deleted file mode 100644 index 13eda03d39..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/templates/statefulset.yaml +++ /dev/null @@ -1,180 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "influxdb.fullname" . }} - labels: - {{- include "influxdb.labels" . | nindent 4 }} -spec: - {{- if .Values.enterprise.enabled }} - replicas: {{ .Values.enterprise.clusterSize }} - {{ else }} - replicas: 1 - {{- end}} - selector: - matchLabels: - {{- include "influxdb.selectorLabels" . | nindent 6 }} - serviceName: "{{ include "influxdb.fullname" . }}" - template: - metadata: - labels: - {{- include "influxdb.selectorLabels" . | nindent 8 }} - {{- if .Values.podAnnotations }} - annotations: -{{ toYaml .Values.podAnnotations | indent 8 }} - {{- end }} - spec: - {{- if .Values.schedulerName }} - schedulerName: "{{ .Values.schedulerName }}" - {{- end }} - {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} - {{- end -}} - {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 8 }} - {{- end }} - {{- if .Values.tolerations }} - tolerations: -{{ toYaml .Values.tolerations | indent 8 }} - {{- end }} - {{- if .Values.securityContext }} - securityContext: -{{ toYaml .Values.securityContext | indent 8 }} - {{- end }} - {{- if .Values.image.pullSecrets }} - imagePullSecrets: - {{- range .Values.image.pullSecrets }} - - name: {{ . }} - {{- end}} - {{- end }} - serviceAccountName: {{ include "influxdb.serviceAccountName" . }} - containers: - - name: {{ include "influxdb.fullname" . }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy | quote }} - resources: -{{ toYaml .Values.resources | indent 10 }} - ports: - - name: api - containerPort: {{ .Values.config.http.bind_address | default 8086 }} - {{- if .Values.config.graphite.enabled }} - - name: graphite - containerPort: {{ .Values.config.graphite.bind_address | default 2003 }} - {{- end }} - {{- if .Values.config.collectd.enabled }} - - name: collectd - containerPort: {{ .Values.config.collectd.bind_address | default 25826 }} - protocol: UDP - {{- end }} - {{- if .Values.config.udp.enabled }} - - name: udp - containerPort: {{ .Values.config.udp.bind_address | default 8089 }} - protocol: UDP - {{- end }} - {{- if .Values.config.opentsdb.enabled }} - - name: opentsdb - containerPort: {{ .Values.config.opentsdb.bind_address | default 4242 }} - {{- end }} - - name: rpc - containerPort: {{ .Values.config.rpc.bind_address | default 8088 }} - {{- if .Values.enterprise.enabled }} - - name: meta - containerPort: {{ .Values.config.meta.bind_address | default 8091 }} - {{- end }} - {{- if .Values.env }} - env: -{{ toYaml .Values.env | indent 10 }} - {{- if .Values.enterprise.enabled }} - - name: INFLUXDB_HOSTNAME # Values.env's HOSTNAME isn't fundamentally different from $HOSTNAME, but this way weg get a distinguished name at runtime. - value: "$(_HOSTNAME).{{ include "influxdb.fullname" . }}" - {{- end }} - {{- end }} - {{- if .Values.envFromSecret }} - envFrom: - - secretRef: - name: {{ .Values.envFromSecret }} - {{- end }} - livenessProbe: - httpGet: - path: {{ .Values.livenessProbe.path | default "/ping" }} - port: api - scheme: {{ .Values.livenessProbe.scheme | default "HTTP" }} - initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30 }} - timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5 }} - readinessProbe: - httpGet: - path: {{ .Values.readinessProbe.path | default "/ping" }} - port: api - scheme: {{ .Values.readinessProbe.scheme | default "HTTP" }} - initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 5 }} - timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 1 }} - {{- if .Values.startupProbe.enabled }} - startupProbe: - httpGet: - path: {{ .Values.startupProbe.path | default "/ping" }} - port: api - scheme: {{ .Values.startupProbe.scheme | default "HTTP" }} - failureThreshold: {{ .Values.startupProbe.failureThreshold | default 6 }} - periodSeconds: {{ .Values.startupProbe.periodSeconds | default 5 }} - {{- end }} - volumeMounts: - - name: {{ include "influxdb.fullname" . }}-data - mountPath: /var/lib/influxdb - - name: config - mountPath: /etc/influxdb - {{- if .Values.initScripts.enabled }} - - name: init - mountPath: /docker-entrypoint-initdb.d - {{- end }} - {{- if .Values.mountPoints }} -{{ toYaml .Values.mountPoints | indent 8 }} - {{- end }} - {{- if .Values.extraContainers }} -{{ toYaml .Values.extraContainers | indent 6}} - {{- end }} - volumes: - - name: config - configMap: - name: {{ include "influxdb.fullname" . }} - {{- if .Values.initScripts.enabled }} - - name: init - configMap: - name: {{ include "influxdb.fullname" . }}-init - {{- end }} - {{- if (not .Values.persistence.enabled ) }} - - name: {{ include "influxdb.fullname" . }}-data - emptyDir: {} - {{- end }} - # Cannot use existing claim in enterprise mode - {{- if and .Values.persistence.enabled .Values.persistence.existingClaim (not .Values.enterprise.enabled) }} - - name: {{ include "influxdb.fullname" . }}-data - persistentVolumeClaim: - claimName: {{ .Values.persistence.existingClaim }} - {{- end }} - {{- if .Values.volumes }} -{{ toYaml .Values.volumes | indent 6 }} - {{- end }} - # Must use volume claim template in enterprise mode - {{- if and .Values.persistence.enabled (or (not .Values.persistence.existingClaim) .Values.enterprise.enabled) }} - volumeClaimTemplates: - - metadata: - name: {{ include "influxdb.fullname" . }}-data - annotations: - {{- range $key, $value := .Values.persistence.annotations }} - {{ $key }}: "{{ $value }}" - {{- end }} - spec: - accessModes: - - {{ .Values.persistence.accessMode | quote}} - resources: - requests: - storage: {{ .Values.persistence.size | quote }} - {{- if .Values.persistence.storageClass }} - {{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" - {{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" - {{- end }} - {{- end }} - {{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/values.yaml deleted file mode 100644 index 63751f9c64..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/values.yaml +++ /dev/null @@ -1,349 +0,0 @@ -## influxdb image version -## ref: https://hub.docker.com/r/library/influxdb/tags/ -image: - repository: "influxdb" - tag: "1.8.4" - pullPolicy: Always - ## If specified, use these secrets to access the images - pullSecrets: {} - - -serviceAccount: - create: true - name: - annotations: {} - -## Customize liveness, readiness and startup probes -## ref: https://docs.influxdata.com/influxdb/v1.7/tools/api/#ping-http-endpoint -## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ -## -livenessProbe: {} - # path: "/ping" - # initialDelaySeconds: 30 - # timeoutSeconds: 5 - # scheme: HTTP - -readinessProbe: {} - # path: "/ping" - # initialDelaySeconds: 5 - # timeoutSeconds: 1 - # scheme: HTTP - -securityContext: {} - # runAsUser: 999 - # runAsGroup: 999 - -startupProbe: - enabled: false - # path: "/ping" - # failureThreshold: 6 - # periodSeconds: 5 - # scheme: HTTP - -## Specify a service type -## NodePort is default -## ref: http://kubernetes.io/docs/user-guide/services/ -## -service: - ## Add annotations to service - # annotations: {} - type: ClusterIP - # externalIPs: [] - # externalTrafficPolicy: "" - -## Persist data to a persistent volume -## -persistence: - enabled: true - ## A manually managed Persistent Volume and Claim - ## Requires persistence.enabled: true - ## If defined, PVC must be created manually before volume will be bound - # existingClaim: - ## influxdb data Persistent Volume Storage Class - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: local-storage - annotations: - accessMode: ReadWriteOnce - size: 30Gi - -## Deploy InfluxDB Enterprise - License required -## ref: https://www.influxdata.com/products/influxdb-enterprise/ -enterprise: - enabled: false - licensekey: {} - clusterSize: 4 - meta: - image: - ## This image contains the enterprise meta node package for clustering. - ## It is meant to be used in conjunction with the influxdb:data package of the same version. - ## ref: https://hub.docker.com/_/influxdb - tag: meta - clusterSize: 3 - ## seed is hashed and used as `internal-shared-secret` for Meta service. - seed: dead-beef-cafe-bae - ## Configure resource requests and limits - ## ref: http://kubernetes.io/docs/user-guide/compute-resources/ - resources: {} - # resources: - # requests: - # memory: 512Mi - # cpu: 2 - # limits: - # memory: 1Gi - # cpu: 4 - - -## Create custom user through Kubernetes job -## Uses a HollaEx secret as a data source -## -setCustomUser: - enabled: true - - image: curlimages/curl:latest - activeDeadline: 300 - restartPolicy: OnFailure - - secretName: hollaex-network-secret - -## Create default user through Kubernetes job -## Defaults indicated below -## - -setDefaultUser: - enabled: false - - ## Image of the container used for job - ## Default: appropriate/curl:latest - ## - image: curlimages/curl:latest - - ## Deadline for job so it does not retry forever. - ## Default: activeDeadline: 300 - ## - activeDeadline: 300 - - ## Specify the number of retries before considering job as failed. - ## https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#pod-backoff-failure-policy - ## - backoffLimit: 6 - - ## Hook delete policy for helm. - ## Default: hookDeletePolicy: hook-succeeded - ## - hookDeletePolicy: hook-succeeded - - ## Restart policy for job - ## Default: OnFailure - restartPolicy: OnFailure - - user: - - ## The user name - ## Default: "admin" - username: "admin" - - ## User password - ## single quotes must be escaped (\') - ## Default: (Randomly generated 10 characters of AlphaNum) - # password: - - ## The user name and password are obtained from an existing secret. The expected - ## keys are `influxdb-user` and `influxdb-password`. - ## If set, the username and password values above are ignored. - # existingSecret: influxdb-auth - - ## User privileges - ## Default: "WITH ALL PRIVILEGES" - privileges: "WITH ALL PRIVILEGES" - -## Configure resource requests and limits -## ref: http://kubernetes.io/docs/user-guide/compute-resources/ -resources: - requests: - memory: 2Gi - cpu: 0.1 - limits: - memory: 2Gi - cpu: 2 - -# Annotations to be added to InfluxDB pods -podAnnotations: {} - -# Labels to be added to InfluxDB pods -podLabels: {} - -ingress: - enabled: false - tls: false - # secretName: my-tls-cert # only needed if tls above is true - hostname: influxdb.foobar.com - annotations: {} - # kubernetes.io/ingress.class: "nginx" - # kubernetes.io/tls-acme: "true" - path: / - - -## Add custom volume and volumeMounts -# volumes: -# - name: ssl-cert-volume -# secret: -# secretName: secret-name -# mountPoints: -# - name: ssl-cert-volume -# mountPath: /etc/ssl/certs/selfsigned/ -# readOnly: true - -## Additional containers to be added to the pod. -extraContainers: {} -# - name: my-sidecar -# image: nginx:latest - -## Use an alternate scheduler, e.g. "stork". -## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ -## -# schedulerName: - -## Node labels for pod assignment -## Ref: https://kubernetes.io/docs/user-guide/node-selection/ -## -nodeSelector: {} - -## Affinity for pod assignment -## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity -## -affinity: {} - -## Tolerations for pod assignment -## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ -## -tolerations: [] -# - key: "key" -# operator: "Equal|Exists" -# value: "value" -# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" - -## The InfluxDB image uses several environment variables to automatically -## configure certain parts of the server. -## Ref: https://hub.docker.com/_/influxdb/ -env: {} - # - name: INFLUXDB_DB - # value: "demo" - -## The name of a secret in the same kubernetes namespace which contain values -## to be added to the environment. -## This can be used, for example, to set the INFLUXDB_HTTP_SHARED_SECRET -## environment variable. -envFromSecret: {} - -## InfluxDB configuration -## ref: https://docs.influxdata.com/influxdb/v1.7/administration/config -config: - reporting_disabled: false - rpc: {} - meta: {} - data: {} - coordinator: {} - retention: {} - shard_precreation: {} - monitor: {} - http: {max-body-size: 0} - logging: {} - subscriber: {} - graphite: {} - collectd: {} - opentsdb: {} - udp: {} - continuous_queries: {} - tls: {} - -# Allow executing custom init scripts -# -# If the container finds any files with the extensions .sh or .iql inside of the -# /docker-entrypoint-initdb.d folder, it will execute them. The order they are -# executed in is determined by the shell. This is usually alphabetical order. -initScripts: - enabled: false - scripts: - init.iql: |+ - CREATE DATABASE "telegraf" WITH DURATION 30d REPLICATION 1 NAME "rp_30d" - -backup: - enabled: false - ## By default emptyDir is used as a transitory volume before uploading to object store. - ## As such, ensure that a sufficient ephemeral storage request is set to prevent node disk filling completely. - resources: - requests: - # memory: 512Mi - # cpu: 2 - ephemeral-storage: "8Gi" - # limits: - # memory: 1Gi - # cpu: 4 - # ephemeral-storage: "16Gi" - ## If backup destination is PVC, or want to use intermediate PVC before uploading to object store. - persistence: - enabled: true - ## If defined, storageClassName: - ## If set to "-", storageClassName: "", which disables dynamic provisioning - ## If undefined (the default) or set to null, no storageClassName spec is - ## set, choosing the default provisioner. (gp2 on AWS, standard on - ## GKE, AWS & OpenStack) - ## - # storageClass: "-" - annotations: - accessMode: ReadWriteOnce - size: 20Gi - schedule: "0 0 * * *" - startingDeadlineSeconds: "" - annotations: {} - podAnnotations: {} - - ## Google Cloud Storage - # gcs: - # serviceAccountSecret: influxdb-backup-key - # serviceAccountSecretKey: key.json - # destination: gs://bucket/influxdb - - ## Azure - ## Secret is expected to have connection string stored in `connection-string` field - ## Existing container will be used or private one withing storage account will be created. - # azure: - # storageAccountSecret: influxdb-backup-azure-key - # destination_container: influxdb-container - # destination_path: "" - - ## Amazon S3 or compatible - ## Secret is expected to have AWS (or compatible) credentials stored in `credentials` field. - ## Please look at https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-where - ## for the credentials format. - ## The bucket should already exist. - # s3: - # credentialsSecret: aws-credentials-secret - # destination: s3://bucket/path - # ## Optional. Specify if you're using an alternate S3 endpoint. - # # endpointUrl: "" - -backupRetention: - enabled: false - resources: - requests: - # memory: 512Mi - # cpu: 2 - # limits: - # memory: 1Gi - # cpu: 4 - schedule: "0 0 * * *" - startingDeadlineSeconds: - annotations: {} - podAnnotations: {} - daysToRetain: 7 - # s3: - # credentialsSecret: aws-credentials-secret - # bucketName: bucket - # ## Optional. Specify if you're using an alternate S3 endpoint. - # # endpointUrl: "" diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/.helmignore deleted file mode 100755 index f0c1319444..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/Chart.yaml deleted file mode 100755 index 75594c54df..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -description: A Helm chart for bitholla-hollaex-mongodb -name: bitholla-hollaex-mongodb -version: 0.1.0 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/NOTES.txt deleted file mode 100755 index e69de29bb2..0000000000 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/_helpers.tpl deleted file mode 100755 index 043ba16132..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/_helpers.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "bitholla-hollaex-redis.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "bitholla-hollaex-redis.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/deployment.yaml deleted file mode 100755 index 5c94a08362..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/deployment.yaml +++ /dev/null @@ -1,62 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: {{.Release.Name}} - name: {{.Release.Name}} - namespace: {{.Release.Namespace}} -spec: - replicas: 1 - strategy: - type: Recreate - selector: - matchLabels: - app: {{.Release.Name}} - tier: backend - template: - metadata: - labels: - app: {{.Release.Name}} - tier: backend - spec: - - volumes: - - name: mongo-mount - persistentVolumeClaim: - claimName: {{.Values.pvc.name}} - -{{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} -{{- end }} - - containers: - - name: {{.Release.Name}} - image: mongo:4.4.6-bionic - imagePullPolicy: IfNotPresent - ports: - - name: port - containerPort: 27017 - # command: ["redis-server", "--requirepass", "$(REDIS_AUTH_PASSWORD)"] - env: - - name: ME_CONFIG_MONGODB_ADMINPASSWORD - valueFrom: - secretKeyRef: - name: {{.Values.setAuth.secretName}} - key: MONGO_PASSWORD - - name: ME_CONFIG_MONGODB_ADMINUSERNAME - valueFrom: - secretKeyRef: - name: {{.Values.setAuth.secretName}} - key: MONGO_USERNAME - resources: - limits: - memory: "1024Mi" - cpu: "500m" - requests: - memory: "256Mi" - cpu: "100m" - volumeMounts: - - name: mongo-mount - mountPath: /data/db - subPath: db \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/pvc.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/pvc.yaml deleted file mode 100644 index bd3dd06225..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/pvc.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.pvc.create }} - -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: {{.Values.pvc.name}} - namespace: {{.Release.namespace}} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{.Values.pvc.size}} - -{{- end }} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/service.yaml deleted file mode 100755 index b5d28e7ee1..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/templates/service.yaml +++ /dev/null @@ -1,26 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{.Release.Name}} - namespace: {{.Release.Namespace}} - labels: - app: {{.Release.Name}} -spec: - {{if .Values.NodePort.enable }} - - type: NodePort - ports: - - port: 27017 - targetPort: 27017 - nodePort: {{.Values.NodePort.port}} - - {{ else }} - - type: ClusterIP - ports: - - port: 27017 - targetPort: 27017 - - {{ end }} - selector: - app: {{.Release.Name}} diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/values.yaml deleted file mode 100755 index 340480f309..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-mongodb/values.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Default values for bitholla-hollaex-nginx. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -NodePort: - enable: false - port: - -pvc: - create: true - size: 20Gi - name: mongo-volume - -nodeSelector: {} - -setAuth: - secretName: hollaex-network-secret \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/.helmignore b/server/tools/kubernetes/helm-chart/hollaex-network-server/.helmignore deleted file mode 100755 index f0c1319444..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-server/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/Chart.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/Chart.yaml deleted file mode 100755 index be4d12b80c..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-server/Chart.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -description: A Helm chart for hollaex-network-server -name: hollaex-network-server -version: 0.1.0 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/autoscaler.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/autoscaler.yaml deleted file mode 100644 index 00de381574..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/autoscaler.yaml +++ /dev/null @@ -1,26 +0,0 @@ -{{- if .Values.autoScaling.hpa.enable }} - -{{- $minReplicas := .Values.stable.replicaCount | int }} -{{- $maxReplicas := add 1 $minReplicas }} - -apiVersion: autoscaling/v2 -kind: HorizontalPodAutoscaler -metadata: - name: {{.Release.Name}} - namespace: {{.Release.Namespace}} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{.Release.Name}} - minReplicas: {{ $minReplicas }} - maxReplicas: {{ $maxReplicas }} - metrics: - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.hpa.memory.threshold }} - -{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/cronjob.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/cronjob.yaml deleted file mode 100644 index aedf9a63f6..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/cronjob.yaml +++ /dev/null @@ -1,86 +0,0 @@ -{{- if .Values.cronjob.enable }} - -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - labels: - app: {{.Release.Name}} - role: {{.Release.Namespace}} - name: {{.Release.Name}} - namespace: {{.Release.Namespace}} -spec: - schedule: "{{.Values.cronjob.schedule}}" - successfulJobsHistoryLimit: 3 - failedJobsHistoryLimit: 2 - concurrencyPolicy: Replace - jobTemplate: - spec: - template: - spec: - -{{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{ toYaml .Values.imagePullSecrets | indent 8 }} -{{- end }} - -{{- if .Values.nodeSelector }} - nodeSelector: - {{ toYaml .Values.nodeSelector | indent 8 }} -{{- end }} - - containers: - - name: {{.Release.Name}} - image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} - command: ["/bin/bash", "-c"] - - {{- if eq .Values.cronjob.mode "checkExchangeStatus" }} - - args: - - node tools/crons/checkExchangeStatus.js; - - {{- else if eq .Values.cronjob.mode "redistribute" }} - - args: - - node tools/crons/redistribute.js; - - {{- else if eq .Values.cronjob.mode "userLevel" }} - - args: - - node tools/crons/userLevel.js; - - {{- else if eq .Values.cronjob.mode "checkcoreversion" }} - - args: - - node tools/crons/checkCoreVersion.js; - - {{- end }} - - imagePullPolicy: Always - - envFrom: - - configMapRef: - name: {{.Values.envName}} - - secretRef: - name: {{.Values.secretName}} - - env: - - name: DEPLOYMENT_MODE - value: {{.Values.DEPLOYMENT_MODE}} - - name: DB_SSL - value: "{{.Values.db_ssl}}" - - name: ELASTIC_APM_SERVICE_NAME - value: {{.Release.Name}} - - name: ELASTIC_APM_SERVER_URL - value: {{.Values.APM_URL}} - - resources: - limits: - memory: "300Mi" - cpu: "100m" - requests: - memory: "25Mi" - cpu: "15m" - - restartPolicy: OnFailure - -{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/deployment.yaml deleted file mode 100644 index 8591a32c7a..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/deployment.yaml +++ /dev/null @@ -1,168 +0,0 @@ -{{- if and (eq .Values.job.enable false) (eq .Values.cronjob.enable false) }} - -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - app: {{.Release.Name}} - role: {{.Release.Namespace}} - name: {{.Release.Name}} - namespace: {{.Release.Namespace}} -spec: - revisionHistoryLimit: 3 - replicas: {{.Values.stable.replicaCount}} - -{{- if or (eq .Values.DEPLOYMENT_MODE "api") (eq .Values.DEPLOYMENT_MODE "stream") }} - - strategy: - type: RollingUpdate - rollingUpdate: - maxSurge: 1 - maxUnavailable: 0 - -{{- else }} - - strategy: - type: Recreate - -{{- end }} - -{{- if eq .Values.DEPLOYMENT_MODE "api" }} - minReadySeconds: 15 -{{- end }} - - selector: - matchLabels: - app: {{.Release.Name}} - role: {{.Release.Namespace}} - tier: backend - template: - metadata: - annotations: - seccomp.security.alpha.kubernetes.io/pod: "runtime/default" - labels: - app: {{.Release.Name}} - role: {{.Release.Namespace}} - tier: backend - spec: - -{{- if and (ne .Values.DEPLOYMENT_MODE "api") (ne .Values.DEPLOYMENT_MODE "stream") }} -{{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} -{{- end }} -{{- end }} - - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: role - operator: In - values: - - {{.Release.Namespace}} - topologyKey: "kubernetes.io/hostname" - - containers: - - name: {{.Release.Name}} - image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} - imagePullPolicy: Always - securityContext: - allowPrivilegeEscalation: false - ports: - - name: websocket-port - containerPort: 10080 - - name: port - containerPort: 10010 - -{{- if eq .Values.DEPLOYMENT_MODE "api" }} - - command: ["/bin/bash"] - args: ["-c", "/app/api-binary"] - # args: ["-c", "node app.js"] - - -{{- else if eq .Values.DEPLOYMENT_MODE "stream" }} - - command: ["/bin/bash"] - args: ["-c", "/app/stream-binary"] - # args: ["-c", "node ws/index.js"] - -{{- else if eq .Values.DEPLOYMENT_MODE "job" }} - - command: ["/bin/bash"] - args: ["-c", "node tools/jobs/job.js"] - -{{- else if eq .Values.DEPLOYMENT_MODE "engine" }} - - command: ["/bin/bash"] - args: ["-c", "/app/engine-binary"] - # args: ["-c", "node queue/queue.js"] - -{{- end }} - - envFrom: - - configMapRef: - name: {{.Values.envName}} - - secretRef: - name: {{.Values.secretName}} - env: - - name: PAIR - value: {{.Values.PAIR}} - - name: DB_SSL - value: "{{.Values.db_ssl}}" - - name: ELASTIC_APM_SERVICE_NAME - value: {{.Release.Name}} - - name: CURRENCIES - valueFrom: - configMapKeyRef: - name: {{.Values.envCoinsName}} - key: CURRENCIES - - name: PAIRS - valueFrom: - configMapKeyRef: - name: {{.Values.envPairsName}} - key: PAIRS - - resources: - limits: -{{- if or (eq .Values.DEPLOYMENT_MODE "api") (eq .Values.DEPLOYMENT_MODE "ws") (eq .Values.DEPLOYMENT_MODE "job") }} - memory: "1536Mi" -{{- else }} - memory: "2048Mi" -{{- end }} - cpu: "1000m" - requests: -{{- if or (eq .Values.DEPLOYMENT_MODE "api") (eq .Values.DEPLOYMENT_MODE "ws") }} - memory: "1536Mi" -{{- else }} - memory: "512Mi" -{{- end }} - cpu: "10m" - -{{- if .Values.podRestart_webhook_url }} - lifecycle: - preStop: - exec: - command: ["/bin/sh", "-c", "export hostname=`hostname` && curl -X POST -H 'Content-type: application/json' --data '{\"attachments\": [ { \"color\": \"#A569BD\", \"title\": \"😵 Pod has been terminated!\", \"text\": \"Pod '\"${hostname}\"' just has been terminated.\" } ] }' {{.Values.podRestart_webhook_url}}"] -{{- end }} - -{{- if eq .Values.DEPLOYMENT_MODE "api" }} - readinessProbe: - exec: - command: - - curl - - http://localhost:10010/v2/health - initialDelaySeconds: 1 - periodSeconds: 15 -{{- end }} - -{{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} -{{- end }} - -{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/job.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/job.yaml deleted file mode 100644 index f195edfef1..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/job.yaml +++ /dev/null @@ -1,190 +0,0 @@ -{{- if .Values.job.enable }} - -apiVersion: batch/v1 -kind: Job -metadata: - labels: - app: {{.Release.Name}} - role: {{.Release.Namespace}} - name: {{.Release.Name}} - namespace: {{.Release.Namespace}} -spec: - template: - spec: - -{{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 8 }} -{{- end }} - - containers: - - name: {{.Release.Name}} - image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} - command: ["/bin/bash", "-c"] - -{{- if eq .Values.job.mode "add_coin" }} - - args: - - node tools/dbs/addCoin.js; - -{{- else if eq .Values.job.mode "remove_coin" }} - - args: - - node tools/dbs/removeCoin.js; - -{{- else if eq .Values.job.mode "add_pair" }} - - args: - - node tools/dbs/addPair.js; - -{{- else if eq .Values.job.mode "remove_pair" }} - - args: - - node tools/dbs/removePair.js; - -{{- else if eq .Values.job.mode "activate_coin" }} - - args: - - node tools/dbs/activateCoin.js; - - -{{- else if eq .Values.job.mode "activate_pair" }} - - args: - - node tools/dbs/activatePair.js; - -{{- else if eq .Values.job.mode "change_coin_owner" }} - - args: - - node tools/dbs/changeCoinOwner.js; - -{{- else if eq .Values.job.mode "change_pair_owner" }} - - args: - - node tools/dbs/changePairOwner.js; - -{{- else if eq .Values.job.mode "run_triggers" }} - - args: - - sequelize db:migrate; - node tools/dbs/runTriggers.js; - node tools/dbs/initializeInflux.js; - -{{- end }} - - envFrom: - - configMapRef: - name: {{.Values.envName}} - - secretRef: - name: {{.Values.secretName}} - - env: - -{{- if eq .Values.job.mode "add_coin" }} - - - name: COIN_CODE - value: "{{.Values.job.env.coin_code}}" - - name: COIN_FULLNAME - value: "{{.Values.job.env.coin_fullname}}" - - name: COIN_ALLOW_DEPOSIT - value: "{{.Values.job.env.coin_allow_deposit}}" - - name: COIN_ALLOW_WITHDRAWAL - value: "{{.Values.job.env.coin_allow_withdrawal}}" - - name: COIN_WITHDRAWAL_FEE - value: "{{.Values.job.env.coin_withdrawal_fee}}" - - name: COIN_MIN - value: "{{.Values.job.env.coin_min}}" - - name: COIN_MAX - value: "{{.Values.job.env.coin_max}}" - - name: COIN_INCREMENT_UNIT - value: "{{.Values.job.env.coin_increment_unit}}" - - name: COIN_ACTIVE - value: "{{.Values.job.env.coin_active}}" - -{{- else if eq .Values.job.mode "change_coin_owner" }} - - - name: COIN_CODE - value: {{.Values.job.env.coin_code}} - - name: COIN_OWNER_ID - value: "{{.Values.job.env.coin_owner_id}}" - -{{- else if eq .Values.job.mode "remove_coin" }} - - - name: COIN_CODE - value: {{.Values.job.env.coin_code}} - -{{- else if eq .Values.job.mode "activate_coin" }} - - - name: COIN_CODE - value: {{.Values.job.env.coin_code}} - -{{- else if eq .Values.job.mode "activate_pair" }} - - - name: PAIR_CODE - value: {{.Values.job.env.pair_code}} - -{{- else if eq .Values.job.mode "change_pair_owner" }} - - - name: PAIR_CODE - value: {{.Values.job.env.pair_code}} - - name: PAIR_OWNER_ID - value: "{{.Values.job.env.pair_owner_id}}" - -{{- else if eq .Values.job.mode "add_pair" }} - - - name: PAIR_CODE - value: "{{.Values.job.env.pair_code}}" - - name: PAIR_BASE - value: "{{.Values.job.env.pair_base}}" - - name: PAIR_2 - value: "{{.Values.job.env.pair_2}}" - - name: MIN_SIZE - value: "{{.Values.job.env.min_size}}" - - name: MAX_SIZE - value: "{{.Values.job.env.max_size}}" - - name: MIN_PRICE - value: "{{.Values.job.env.min_price}}" - - name: MAX_PRICE - value: "{{.Values.job.env.max_price}}" - - name: INCREMENT_SIZE - value: "{{.Values.job.env.increment_size}}" - - name: INCREMENT_PRICE - value: "{{.Values.job.env.increment_price}}" - - name: PAIR_ACTIVE - value: "{{.Values.job.env.pair_active}}" - -{{- else if eq .Values.job.mode "remove_pair" }} - - - name: PAIR_CODE - value: {{.Values.job.env.pair_code}} - -{{- end }} - - - name: CURRENCIES - valueFrom: - configMapKeyRef: - name: {{.Values.envCoinsName}} - key: CURRENCIES - - - name: PAIRS - valueFrom: - configMapKeyRef: - name: {{.Values.envPairsName}} - key: PAIRS - - resources: - limits: - memory: "300Mi" - cpu: "100m" - requests: - memory: "50Mi" - cpu: "15m" - -{{- if .Values.imagePullSecrets }} - imagePullSecrets: -{{ toYaml .Values.imagePullSecrets | indent 8 }} -{{- end }} - restartPolicy: Never - backoffLimit: 0 - -{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-network-server/values.yaml deleted file mode 100755 index f97d2c3481..0000000000 --- a/server/tools/kubernetes/helm-chart/hollaex-network-server/values.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# Default values for bitholla-hollaex-nginx. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. -imageRegistry: bitholla/hollaex-network -dockerTag: - -imagePullSecrets: - - name: docker-registry-secret - -envName: hollaex-network-env -secretName: hollaex-network-secret - -envCoinsName: hollaex-network-env-coins -envPairsName: hollaex-network-env-pairs - -DEPLOYMENT_MODE: all - -db_ssl: false - -stable: - replicaCount: 1 - -staging: - enable: false - replicaCount: 1 - dockerTag: - -nodeSelector: {} - -autoScaling: - hpa: - enable: false - memory: - threshold: 80 - -podRestart_webhook_url: - -job: - enable: false - env: - coin_code: - pair_code: - -cronjob: - enable: false - schedule: \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-web/.helmignore b/server/tools/kubernetes/helm-chart/postgres-s3-backup/.helmignore similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-web/.helmignore rename to server/tools/kubernetes/helm-chart/postgres-s3-backup/.helmignore diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/Chart.yaml b/server/tools/kubernetes/helm-chart/postgres-s3-backup/Chart.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/Chart.yaml rename to server/tools/kubernetes/helm-chart/postgres-s3-backup/Chart.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/NOTES.txt b/server/tools/kubernetes/helm-chart/postgres-s3-backup/templates/NOTES.txt similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-redis/templates/NOTES.txt rename to server/tools/kubernetes/helm-chart/postgres-s3-backup/templates/NOTES.txt diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/_helpers.tpl b/server/tools/kubernetes/helm-chart/postgres-s3-backup/templates/_helpers.tpl similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/_helpers.tpl rename to server/tools/kubernetes/helm-chart/postgres-s3-backup/templates/_helpers.tpl diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/postgres-s3-backup/templates/deployment.yaml similarity index 100% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/templates/deployment.yaml rename to server/tools/kubernetes/helm-chart/postgres-s3-backup/templates/deployment.yaml diff --git a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/values.yaml b/server/tools/kubernetes/helm-chart/postgres-s3-backup/values.yaml similarity index 78% rename from server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/values.yaml rename to server/tools/kubernetes/helm-chart/postgres-s3-backup/values.yaml index d11adf5d76..9e82cd7715 100755 --- a/server/tools/kubernetes/helm-chart/bitholla-hollaex-postgres-s3-backup-cronjob/values.yaml +++ b/server/tools/kubernetes/helm-chart/postgres-s3-backup/values.yaml @@ -1,4 +1,4 @@ -secretName: +secretName: hollaex-kit-secret cronRule: "0 1,13 * * *" diff --git a/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml b/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml new file mode 100644 index 0000000000..aa186ca00d --- /dev/null +++ b/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml @@ -0,0 +1,187 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hollaex-kit-ingress-web + namespace: hollaex-kit + annotations: + kubernetes.io/ingress.class: "nginx" + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: "6m" + + +spec: + rules: + - host: yourdomain.com + http: + paths: + - pathType: Prefix + path: / + backend: + service: + name: hollaex-kit-web + port: + number: 80 + + tls: + - secretName: hollaex-kit-tls-cert + hosts: + - yourdomain.com +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hollaex-kit-ingress-api + namespace: hollaex-kit + annotations: + kubernetes.io/ingress.class: "nginx" + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: "6m" + nginx.ingress.kubernetes.io/rewrite-target: /$2 + + +spec: + rules: + - host: yourdomain.com + http: + paths: + - pathType: Prefix + path: /api(/|$)(.*) + backend: + service: + name: hollaex-kit-server-api + port: + number: 10010 + + tls: + - secretName: hollaex-kit-tls-cert + hosts: + - yourdomain.com +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hollaex-kit-ingress-api-admin + namespace: hollaex-kit + annotations: + kubernetes.io/ingress.class: "nginx" + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: "6m" + nginx.ingress.kubernetes.io/rewrite-target: /v2/admin/$2 + + +spec: + rules: + - host: yourdomain.com + http: + paths: + - pathType: Prefix + path: /api/v2/admin(/|$)(.*) + backend: + service: + name: hollaex-kit-server-api + port: + number: 10010 + + tls: + - secretName: hollaex-kit-tls-cert + hosts: + - yourdomain.com +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hollaex-kit-ingress-plugins + namespace: hollaex-kit + annotations: + kubernetes.io/ingress.class: "nginx" + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: "6m" + nginx.ingress.kubernetes.io/rewrite-target: /plugins/$2 + + +spec: + rules: + - host: yourdomain.com + http: + paths: + - pathType: Prefix + path: /api/plugins(/|$)(.*) + backend: + service: + name: hollaex-kit-server-plugins + port: + number: 10011 + + + tls: + - secretName: hollaex-kit-tls-cert + hosts: + - yourdomain.com +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hollaex-kit-ingress-plugins-sms-verify + namespace: hollaex-kit + annotations: + kubernetes.io/ingress.class: "nginx" + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: "6m" + nginx.ingress.kubernetes.io/rewrite-target: /plugins/sms/verify/$2 + + + +spec: + rules: + - host: yourdomain.com + http: + paths: + - pathType: Prefix + path: /api/plugins/sms/verify(/|$)(.*) + backend: + service: + name: hollaex-kit-server-plugins + port: + number: 10011 + + + tls: + - secretName: hollaex-kit-tls-cert + hosts: + - yourdomain.com +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hollaex-kit-ingress-stream + namespace: hollaex-kit + annotations: + kubernetes.io/ingress.class: "nginx" + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: "6m" + nginx.ingress.kubernetes.io/upstream-hash-by: "$binary_remote_addr" + +spec: + rules: + - host: yourdomain.com + http: + paths: + - pathType: Prefix + path: /stream + backend: + service: + name: hollaex-kit-server-stream + port: + number: 10080 + + + tls: + - secretName: hollaex-kit-tls-cert + hosts: + - yourdomain.com diff --git a/web/.env b/web/.env index 978cd042b2..03a93c8277 100644 --- a/web/.env +++ b/web/.env @@ -3,7 +3,7 @@ NODE_ENV=production REACT_APP_PUBLIC_URL=https://yourdomain.com REACT_APP_SERVER_ENDPOINT=http://localhost -REACT_APP_STREAM_ENDPOINT=ws://localhost +REACT_APP_STREAM_ENDPOINT=ws://localhost/stream REACT_APP_NETWORK=mainnet diff --git a/web/docker-compose.yaml b/web/docker-compose.yaml index 9a4621574c..51f4d33626 100644 --- a/web/docker-compose.yaml +++ b/web/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3' services: - hollaex-web: - image: hollaex-web + hollaex-kit-web: + image: hollaex-kit-web build: context: . dockerfile: docker/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-influxdb/.helmignore b/web/tools/kubernetes/helm-chart/hollaex-kit-web/.helmignore old mode 100644 new mode 100755 similarity index 100% rename from server/tools/kubernetes/helm-chart/hollaex-network-influxdb/.helmignore rename to web/tools/kubernetes/helm-chart/hollaex-kit-web/.helmignore diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/Chart.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/Chart.yaml new file mode 100755 index 0000000000..65e266b4ea --- /dev/null +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: A Helm chart for bitholla-hollaex-web +name: bitholla-hollaex-web +version: 0.1.0 diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/_helpers.tpl b/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/_helpers.tpl similarity index 100% rename from server/tools/kubernetes/helm-chart/hollaex-network-server/templates/_helpers.tpl rename to web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/_helpers.tpl diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/autoscaler.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/autoscaler.yaml new file mode 100644 index 0000000000..29811d84c1 --- /dev/null +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/autoscaler.yaml @@ -0,0 +1,23 @@ +{{- if .Values.autoScaling.hpa.enable }} + +apiVersion: autoscaling/v2beta2 +kind: HorizontalPodAutoscaler +metadata: + name: {{.Release.Name}} + namespace: {{.Release.NameSpace}} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{.Release.Name}} + minReplicas: {{.Values.stable.replicaCount}} + maxReplicas: {{.Values.autoScaling.hpa.maxReplicas}} + metrics: + - type: Resource + resource: + name: memory + target: + type: AverageValue + averageValue: {{.Values.autoScaling.hpa.avgMemory}} + +{{- end }} \ No newline at end of file diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/deployment.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/deployment.yaml new file mode 100644 index 0000000000..be9a7eb9a1 --- /dev/null +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/deployment.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + revisionHistoryLimit: 3 + replicas: {{.Values.stable.replicaCount}} + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 1 + maxUnavailable: 0 + + minReadySeconds: 5 + + selector: + matchLabels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + tier: backend + template: + metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + tier: backend + spec: + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + imagePullPolicy: IfNotPresent + + ports: + - name: port + containerPort: 80 + + resources: + limits: + memory: {{.Values.resources.limits.memory}} + requests: + memory: {{.Values.resources.requests.memory}} + cpu: {{.Values.resources.requests.cpu}} + + +{{- if .Values.podRestart_webhook_url }} + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "export hostname=`hostname` && curl -X POST -H 'Content-type: application/json' --data '{\"attachments\": [ { \"color\": \"#A569BD\", \"title\": \"Pod has been terminated!\", \"text\": \"⚠️Pod '\"${hostname}\"' just has been terminated.⚠️\" } ] }' {{.Values.podRestart_webhook_url}}"] +{{- end }} + + readinessProbe: + exec: + command: + - curl + - http://localhost + initialDelaySeconds: 15 + periodSeconds: 15 + +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/service.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/service.yaml similarity index 54% rename from server/tools/kubernetes/helm-chart/hollaex-network-server/templates/service.yaml rename to web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/service.yaml index 7e41867825..5013a4e981 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-network-server/templates/service.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/templates/service.yaml @@ -1,5 +1,3 @@ -{{- if and (eq .Values.job.enable false) (eq .Values.cronjob.enable false) }} - kind: Service apiVersion: v1 metadata: @@ -11,13 +9,9 @@ spec: type: ClusterIP ports: - name: port - port: 10010 - targetPort: 10010 - - name: websocket-port - port: 10080 - targetPort: 10080 - + port: 80 + targetPort: 80 selector: app: {{.Release.Name}} -{{- end }} \ No newline at end of file + diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml new file mode 100755 index 0000000000..2a948b62c0 --- /dev/null +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -0,0 +1,28 @@ +imageRegistry: bitholla/hollaex-web +dockerTag: + +imagePullSecrets: + - name: docker-registry-secret + +stable: + replicaCount: 1 + +nodeSelector: {} + +autoScaling: + hpa: + enable: false + maxReplicas: 4 + avgMemory: 500000000 + +podRestart_webhook_url: + +resources: + limits: + + memory: "100Mi" + requests: + cpu: "10m" + memory: "100Mi" + + From 3bf974ff8b9be4a6e207c1adcee1b4e3b99f5ca3 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 6 Feb 2024 20:25:13 +0900 Subject: [PATCH 011/115] Update Dockerfile --- web/docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/docker/Dockerfile b/web/docker/Dockerfile index 6cd2a65eb2..60010daa9a 100644 --- a/web/docker/Dockerfile +++ b/web/docker/Dockerfile @@ -7,7 +7,8 @@ COPY package.json /app/package.json RUN npm install -g node-gyp && \ npm install --loglevel=error COPY . /app -RUN npm run build +RUN export REACT_APP_LAST_BUILD=$(date +"%Y-%m-%dT%H-%M-%S") && \ + npm run build FROM nginx:1.24.0-alpine RUN apk add --update \ From ec6cfa7688e5e699108118b732efba66745ad15d Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 7 Feb 2024 18:44:02 +0900 Subject: [PATCH 012/115] job enabled to false --- server/tools/kubernetes/env/configmap.yaml | 4 ++-- .../helm-chart/hollaex-kit-server/templates/deployment.yaml | 3 --- .../helm-chart/hollaex-kit-server/templates/service.yaml | 3 +-- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 4 ++++ 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/server/tools/kubernetes/env/configmap.yaml b/server/tools/kubernetes/env/configmap.yaml index 48c4266210..3f4fcc0a70 100644 --- a/server/tools/kubernetes/env/configmap.yaml +++ b/server/tools/kubernetes/env/configmap.yaml @@ -8,12 +8,12 @@ data: ADMIN_EMAIL: '' ADMIN_NETWORK_ID: '' ADMIN_PASSWORD: '' - API_HOST: 'https://hollaex-kit.hollaex.cloud/api' + API_HOST: 'http://localhost/api' API_NAME: 'hollaex-kit' CURRENCIES: 'xht,usdt' DB_SSL: 'false' DEFAULT_THEME: 'dark' - DOMAIN: 'https://hollaex-kit.hollaex.cloud' + DOMAIN: 'http://localhost' EMAILS_TIMEZONE: 'UTC' KIT_VERSION: '' KYC_EMAIL: '' diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml index dce32fde00..6e43748c7a 100644 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml @@ -1,4 +1,3 @@ -{{- if eq .Values.job.enable false }} apiVersion: apps/v1 kind: Deployment @@ -151,5 +150,3 @@ spec: imagePullSecrets: {{ toYaml .Values.imagePullSecrets | indent 8 }} {{- end }} - -{{- end }} \ No newline at end of file diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/service.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/service.yaml index 3294d6f54c..9670089ab4 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/service.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/service.yaml @@ -1,4 +1,3 @@ -{{- if eq .Values.job.enable false }} kind: Service apiVersion: v1 @@ -22,6 +21,6 @@ spec: selector: app: {{.Release.Name}} -{{- end }} + diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index af0e63f294..8ea568030f 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -30,6 +30,10 @@ APM_URL: podRestart_webhook_url: + +job: + enable: false + resources: limits: memory: "1536Mi" From 439ba639ec2c48ebb57b65aa74eb8b4a8a3440fc Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 7 Feb 2024 18:45:23 +0900 Subject: [PATCH 013/115] Update values.yaml --- .../kubernetes/helm-chart/hollaex-kit-postgres/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml index a7151ee9e3..bab2b082ad 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml @@ -2,8 +2,8 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. pvc: - create: false - size: 2Gi + create: true + size: 3Gi name: hollaex-postgres-volume secretName: hollaex-kit-secret From f0a2a1ccb5b8882d4d8c6c4a4ef4c504bd1ff9ec Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 7 Feb 2024 19:13:10 +0900 Subject: [PATCH 014/115] build timestamp fix for the web --- web/.env | 2 +- web/docker/Dockerfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/.env b/web/.env index 03a93c8277..ddfd2670c9 100644 --- a/web/.env +++ b/web/.env @@ -21,4 +21,4 @@ REACT_APP_PLUGIN_DEV_MODE= REACT_APP_PLUGIN= REACT_APP_LANG= -REACT_APP_LAST_BUILD= +# REACT_APP_LAST_BUILD= diff --git a/web/docker/Dockerfile b/web/docker/Dockerfile index 60010daa9a..1343c1f3e6 100644 --- a/web/docker/Dockerfile +++ b/web/docker/Dockerfile @@ -8,7 +8,8 @@ RUN npm install -g node-gyp && \ npm install --loglevel=error COPY . /app RUN export REACT_APP_LAST_BUILD=$(date +"%Y-%m-%dT%H-%M-%S") && \ - npm run build + npm run build && \ + echo $REACT_APP_LAST_BUILD > /app/build/react-app-last-build.txt FROM nginx:1.24.0-alpine RUN apk add --update \ From a493a0a65a86f8c8d5cd2c5ee74cc42d27fddf34 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 7 Feb 2024 20:09:03 +0900 Subject: [PATCH 015/115] Update .env --- web/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/.env b/web/.env index ddfd2670c9..78a05eb9c2 100644 --- a/web/.env +++ b/web/.env @@ -1,7 +1,7 @@ NODE_ENV=production -REACT_APP_PUBLIC_URL=https://yourdomain.com +REACT_APP_PUBLIC_URL=http://yourdomain.com REACT_APP_SERVER_ENDPOINT=http://localhost REACT_APP_STREAM_ENDPOINT=ws://localhost/stream From 22915dfdc8a207b6f3f3f4cc52f12bcb2a1ebb74 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 7 Feb 2024 20:14:47 +0900 Subject: [PATCH 016/115] Dockerfile changes --- Dockerfile | 31 ------------------------------ Dockerfile.arm64v8 | 31 ------------------------------ server/tools/Dockerfile | 42 ++++++++++++++++++----------------------- 3 files changed, 18 insertions(+), 86 deletions(-) delete mode 100644 Dockerfile delete mode 100644 Dockerfile.arm64v8 diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index f705f3bd91..0000000000 --- a/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM node:18.15.0-buster-slim - -RUN apt-get update && \ - apt-get install -y curl openssl ca-certificates git python build-essential && \ - rm -rf /var/lib/apt/lists/* && \ - npm install --unsafe-perm=true pm2@5.2.0 sequelize-cli@6.5.1 mocha -g --loglevel=error - -ENV NODE_ENV=production - -COPY ./server /app - -WORKDIR /app - -# Changing the default image user to 'appuser' -RUN groupadd -g 999 appuser && \ - useradd -r -u 999 -g appuser appuser && \ - mkdir /home/appuser && \ - chown -R appuser /home/appuser && \ - chown -R appuser /app - -USER appuser - -RUN npm install --loglevel=error && \ - pm2 update && \ - cd /app/mail && npm install --loglevel=error - -EXPOSE 10010 - -EXPOSE 10080 - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 deleted file mode 100644 index 8cc4ef532d..0000000000 --- a/Dockerfile.arm64v8 +++ /dev/null @@ -1,31 +0,0 @@ -FROM arm64v8/node:18.15.0-buster-slim - -RUN apt-get update && \ - apt-get install -y curl openssl ca-certificates git python build-essential && \ - rm -rf /var/lib/apt/lists/* && \ - npm install --unsafe-perm=true pm2@5.2.0 sequelize-cli@6.5.1 mocha -g --loglevel=error - -ENV NODE_ENV=production - -COPY ./server /app - -WORKDIR /app - -# Changing the default image user to 'appuser' -RUN groupadd -g 999 appuser && \ - useradd -r -u 999 -g appuser appuser && \ - mkdir /home/appuser && \ - chown -R appuser /home/appuser && \ - chown -R appuser /app - -USER appuser - -RUN npm install --loglevel=error && \ - pm2 update && \ - cd /app/mail && npm install --loglevel=error - -EXPOSE 10010 - -EXPOSE 10080 - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/server/tools/Dockerfile b/server/tools/Dockerfile index b4158ceeaa..b4350929d0 100644 --- a/server/tools/Dockerfile +++ b/server/tools/Dockerfile @@ -1,37 +1,31 @@ -### Multi-Stage Build Dockerfile - -### Build section -FROM node:18.15.0-buster-slim as build +FROM node:18.15.0-buster-slim -RUN apt-get update && apt-get install -y --no-install-recommends git python3 build-essential && rm -rf /var/lib/apt/lists/* +RUN apt-get update && \ + apt-get install -y curl openssl ca-certificates git python build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + npm install --unsafe-perm=true pm2@5.2.0 sequelize-cli@6.5.1 mocha -g --loglevel=error -## DISTRIBUTION MODE ENV NODE_ENV=production -RUN mkdir -p /app/logs - -COPY package.json /app/package.json - COPY . /app WORKDIR /app -RUN npm install - -FROM node:18.15.0-buster-slim - -COPY --from=build /app /app +# Changing the default image user to 'appuser' +RUN groupadd -g 999 appuser && \ + useradd -r -u 999 -g appuser appuser && \ + mkdir /home/appuser && \ + chown -R appuser /home/appuser && \ + chown -R appuser /app -RUN apt-get update && apt-get install -y --no-install-recommends git iproute2 python3 build-essential && rm -rf /var/lib/apt/lists/* +USER appuser -RUN npm install pm2@5.2.0 sequelize-cli@6.5.1 mocha@10.0.0 -g +RUN npm install --loglevel=error && \ + pm2 update && \ + cd /app/mail && npm install --loglevel=error -## DISTRIBUTION MODE -ENV NODE_ENV=production +EXPOSE 10010 -# SERVER PORT -EXPOSE 10010 10080 10011 - -WORKDIR /app +EXPOSE 10080 -ENTRYPOINT ["/app/entrypoint.sh"] +ENTRYPOINT ["/entrypoint.sh"] From ba68fe20e986c755fae73d7a7436162107321382 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 7 Feb 2024 20:16:12 +0900 Subject: [PATCH 017/115] Revert "Dockerfile changes" This reverts commit 22915dfdc8a207b6f3f3f4cc52f12bcb2a1ebb74. --- Dockerfile | 31 ++++++++++++++++++++++++++++++ Dockerfile.arm64v8 | 31 ++++++++++++++++++++++++++++++ server/tools/Dockerfile | 42 +++++++++++++++++++++++------------------ 3 files changed, 86 insertions(+), 18 deletions(-) create mode 100644 Dockerfile create mode 100644 Dockerfile.arm64v8 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..f705f3bd91 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM node:18.15.0-buster-slim + +RUN apt-get update && \ + apt-get install -y curl openssl ca-certificates git python build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + npm install --unsafe-perm=true pm2@5.2.0 sequelize-cli@6.5.1 mocha -g --loglevel=error + +ENV NODE_ENV=production + +COPY ./server /app + +WORKDIR /app + +# Changing the default image user to 'appuser' +RUN groupadd -g 999 appuser && \ + useradd -r -u 999 -g appuser appuser && \ + mkdir /home/appuser && \ + chown -R appuser /home/appuser && \ + chown -R appuser /app + +USER appuser + +RUN npm install --loglevel=error && \ + pm2 update && \ + cd /app/mail && npm install --loglevel=error + +EXPOSE 10010 + +EXPOSE 10080 + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/Dockerfile.arm64v8 b/Dockerfile.arm64v8 new file mode 100644 index 0000000000..8cc4ef532d --- /dev/null +++ b/Dockerfile.arm64v8 @@ -0,0 +1,31 @@ +FROM arm64v8/node:18.15.0-buster-slim + +RUN apt-get update && \ + apt-get install -y curl openssl ca-certificates git python build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + npm install --unsafe-perm=true pm2@5.2.0 sequelize-cli@6.5.1 mocha -g --loglevel=error + +ENV NODE_ENV=production + +COPY ./server /app + +WORKDIR /app + +# Changing the default image user to 'appuser' +RUN groupadd -g 999 appuser && \ + useradd -r -u 999 -g appuser appuser && \ + mkdir /home/appuser && \ + chown -R appuser /home/appuser && \ + chown -R appuser /app + +USER appuser + +RUN npm install --loglevel=error && \ + pm2 update && \ + cd /app/mail && npm install --loglevel=error + +EXPOSE 10010 + +EXPOSE 10080 + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/server/tools/Dockerfile b/server/tools/Dockerfile index b4350929d0..b4158ceeaa 100644 --- a/server/tools/Dockerfile +++ b/server/tools/Dockerfile @@ -1,31 +1,37 @@ -FROM node:18.15.0-buster-slim +### Multi-Stage Build Dockerfile + +### Build section +FROM node:18.15.0-buster-slim as build -RUN apt-get update && \ - apt-get install -y curl openssl ca-certificates git python build-essential && \ - rm -rf /var/lib/apt/lists/* && \ - npm install --unsafe-perm=true pm2@5.2.0 sequelize-cli@6.5.1 mocha -g --loglevel=error +RUN apt-get update && apt-get install -y --no-install-recommends git python3 build-essential && rm -rf /var/lib/apt/lists/* +## DISTRIBUTION MODE ENV NODE_ENV=production +RUN mkdir -p /app/logs + +COPY package.json /app/package.json + COPY . /app WORKDIR /app -# Changing the default image user to 'appuser' -RUN groupadd -g 999 appuser && \ - useradd -r -u 999 -g appuser appuser && \ - mkdir /home/appuser && \ - chown -R appuser /home/appuser && \ - chown -R appuser /app +RUN npm install + +FROM node:18.15.0-buster-slim + +COPY --from=build /app /app -USER appuser +RUN apt-get update && apt-get install -y --no-install-recommends git iproute2 python3 build-essential && rm -rf /var/lib/apt/lists/* -RUN npm install --loglevel=error && \ - pm2 update && \ - cd /app/mail && npm install --loglevel=error +RUN npm install pm2@5.2.0 sequelize-cli@6.5.1 mocha@10.0.0 -g -EXPOSE 10010 +## DISTRIBUTION MODE +ENV NODE_ENV=production -EXPOSE 10080 +# SERVER PORT +EXPOSE 10010 10080 10011 + +WORKDIR /app -ENTRYPOINT ["/entrypoint.sh"] +ENTRYPOINT ["/app/entrypoint.sh"] From 700a6280b0a51db37cf634b80e49bc4d82677c83 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 7 Feb 2024 20:17:08 +0900 Subject: [PATCH 018/115] Update Dockerfile --- server/tools/Dockerfile | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/server/tools/Dockerfile b/server/tools/Dockerfile index b4158ceeaa..3158aa6e6e 100644 --- a/server/tools/Dockerfile +++ b/server/tools/Dockerfile @@ -1,37 +1,29 @@ -### Multi-Stage Build Dockerfile - -### Build section -FROM node:18.15.0-buster-slim as build +FROM node:18.15.0-buster-slim -RUN apt-get update && apt-get install -y --no-install-recommends git python3 build-essential && rm -rf /var/lib/apt/lists/* +RUN apt-get update && \ + apt-get install -y curl openssl ca-certificates git python build-essential && \ + rm -rf /var/lib/apt/lists/* && \ + npm install --unsafe-perm=true pm2@5.2.0 sequelize-cli@6.5.1 mocha -g --loglevel=error -## DISTRIBUTION MODE ENV NODE_ENV=production -RUN mkdir -p /app/logs - -COPY package.json /app/package.json - COPY . /app WORKDIR /app -RUN npm install - -FROM node:18.15.0-buster-slim +# Changing the default image user to 'appuser' +RUN groupadd -g 999 appuser && \ + useradd -r -u 999 -g appuser appuser && \ + mkdir /home/appuser && \ + chown -R appuser /home/appuser && \ + chown -R appuser /app -COPY --from=build /app /app +USER appuser -RUN apt-get update && apt-get install -y --no-install-recommends git iproute2 python3 build-essential && rm -rf /var/lib/apt/lists/* +RUN npm install --loglevel=error && \ + pm2 update && \ + cd /app/mail && npm install --loglevel=error -RUN npm install pm2@5.2.0 sequelize-cli@6.5.1 mocha@10.0.0 -g - -## DISTRIBUTION MODE -ENV NODE_ENV=production - -# SERVER PORT EXPOSE 10010 10080 10011 -WORKDIR /app - -ENTRYPOINT ["/app/entrypoint.sh"] +ENTRYPOINT ["/entrypoint.sh"] From 6bab2a06e634c17c61591c56b86abc3916f915f9 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 8 Feb 2024 19:09:52 +0900 Subject: [PATCH 019/115] Update .env --- web/.env | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/.env b/web/.env index 78a05eb9c2..400b58da3e 100644 --- a/web/.env +++ b/web/.env @@ -2,12 +2,12 @@ NODE_ENV=production REACT_APP_PUBLIC_URL=http://yourdomain.com -REACT_APP_SERVER_ENDPOINT=http://localhost +REACT_APP_SERVER_ENDPOINT=http://localhost/api REACT_APP_STREAM_ENDPOINT=ws://localhost/stream REACT_APP_NETWORK=mainnet -REACT_APP_EXCHANGE_NAME=testexchange +REACT_APP_EXCHANGE_NAME=hollaex-kit REACT_APP_CAPTCHA_SITE_KEY= @@ -19,6 +19,4 @@ REACT_APP_LOGO_BLACK_PATH=https://bitholla.s3.ap-northeast-2.amazonaws.com/kit/L REACT_APP_PLUGIN_DEV_MODE= REACT_APP_PLUGIN= -REACT_APP_LANG= - -# REACT_APP_LAST_BUILD= +REACT_APP_LANG= \ No newline at end of file From 1c6de1846bc4970b317b9b4ca1991237df5a976d Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 9 Feb 2024 17:39:47 +0900 Subject: [PATCH 020/115] brought back the old folders --- templates/kubernetes/.gitkeep | 0 templates/local/nginx/mime.types | 48 +++++++ templates/local/nginx/nginx.conf | 133 ++++++++++++++++++ templates/local/nginx/proxy.conf | 11 ++ .../local/nginx/static/404-nodomain.html | 12 ++ templates/local/nginx/static/404.html | 12 ++ templates/local/nginx/static/429.html | 9 ++ 7 files changed, 225 insertions(+) create mode 100644 templates/kubernetes/.gitkeep create mode 100644 templates/local/nginx/mime.types create mode 100644 templates/local/nginx/nginx.conf create mode 100644 templates/local/nginx/proxy.conf create mode 100644 templates/local/nginx/static/404-nodomain.html create mode 100644 templates/local/nginx/static/404.html create mode 100644 templates/local/nginx/static/429.html diff --git a/templates/kubernetes/.gitkeep b/templates/kubernetes/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/templates/local/nginx/mime.types b/templates/local/nginx/mime.types new file mode 100644 index 0000000000..25ae94eb7a --- /dev/null +++ b/templates/local/nginx/mime.types @@ -0,0 +1,48 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml rss; + image/gif gif; + image/jpeg jpeg jpg; + application/x-javascript js; + text/plain txt; + text/x-component htc; + text/mathml mml; + image/png png; + image/x-icon ico; + image/x-jng jng; + image/vnd.wap.wbmp wbmp; + application/java-archive jar war ear; + application/mac-binhex40 hqx; + application/pdf pdf; + application/x-cocoa cco; + application/x-java-archive-diff jardiff; + application/x-java-jnlp-file jnlp; + application/x-makeself run; + application/x-perl pl pm; + application/x-pilot prc pdb; + application/x-rar-compressed rar; + application/x-redhat-package-manager rpm; + application/x-sea sea; + application/x-shockwave-flash swf; + application/x-stuffit sit; + application/x-tcl tcl tk; + application/x-x509-ca-cert der pem crt; + application/x-xpinstall xpi; + application/zip zip; + application/octet-stream deb; + application/octet-stream bin exe dll; + application/octet-stream dmg; + application/octet-stream eot; + application/octet-stream iso img; + application/octet-stream msi msp msm; + audio/mpeg mp3; + audio/x-realaudio ra; + video/mpeg mpeg mpg; + video/quicktime mov; + video/x-flv flv; + video/x-msvideo avi; + video/x-ms-wmv wmv; + video/x-ms-asf asx asf; + video/x-mng mng; +} diff --git a/templates/local/nginx/nginx.conf b/templates/local/nginx/nginx.conf new file mode 100644 index 0000000000..d11e876781 --- /dev/null +++ b/templates/local/nginx/nginx.conf @@ -0,0 +1,133 @@ +worker_processes 4; + +error_log /var/log/nginx/error.log warn; +pid /var/log/nginx/nginx.pid; + +worker_rlimit_nofile 8192; + +events { + worker_connections 1024; +} + +http { + gzip on; + gzip_comp_level 6; + gzip_min_length 500; + gzip_buffers 16 8k; + gzip_proxied any; + gzip_vary on; + gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fo + + include /etc/nginx/mime.types; + include /etc/nginx/proxy.conf; + include /etc/nginx/conf.d/upstream*.conf; + include /etc/nginx/conf.d/web.conf*; + + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] $status ' + '"$request" $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + limit_req_zone $remote_addr zone=api:1m rate=4r/s; + limit_req_zone $remote_addr zone=sms:1m rate=1r/m; + +server { + + listen 80 default_server; + server_name _; + + error_page 404 /404-nodomain.html; + location = /404-nodomain.html { + root /usr/share/nginx/html; + internal; + } + +} + +server { + listen 80; + server_name localhost; #Server domain + access_log /var/log/nginx/hollaex.access.log main; + + include /etc/nginx/conf.d/plugin*.conf; + + location /api-docs { + proxy_pass http://api; + } + + location /docs { + proxy_pass http://api; + } + + location / { + + proxy_pass http://api; #Root path + } + + location /api/v2 { + limit_req zone=api burst=10 nodelay; + limit_req_log_level info; + limit_req_status 429; + + rewrite /api/v2(/|$)(.*) /v2/$2 break; + + proxy_pass http://api; + } + + location /explorer { + proxy_pass http://api; + } + + location /stream { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass http://socket; + } + + location /plugins { + proxy_pass http://plugins; + } + + location /plugins/sms/verify { + limit_req zone=sms burst=10 nodelay; + limit_req_log_level info; + limit_req_status 429; + + proxy_pass http://plugins; + + } + + location /api/plugins { + rewrite /api/plugins(/|$)(.*) /plugins/$2 break; + proxy_pass http://plugins; + } + + location /api/plugins/sms/verify { + limit_req zone=sms burst=10 nodelay; + limit_req_log_level info; + limit_req_status 429; + + rewrite /api/plugins/sms/verify(/|$)(.*) /plugins/sms/verify/$2 break; + + proxy_pass http://plugins; + + } + + error_page 404 /404.html; + location = /404.html { + root /usr/share/nginx/html; + internal; + } + + error_page 429 /429.html; + location = /429.html { + root /usr/share/nginx/html; + internal; + } + } + +} + + diff --git a/templates/local/nginx/proxy.conf b/templates/local/nginx/proxy.conf new file mode 100644 index 0000000000..a53a4dd9fd --- /dev/null +++ b/templates/local/nginx/proxy.conf @@ -0,0 +1,11 @@ +proxy_redirect off; +proxy_set_header Host $host; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Real-Origin $http_origin; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +client_max_body_size 6m; +client_body_buffer_size 128k; +proxy_connect_timeout 90; +proxy_send_timeout 90; +proxy_read_timeout 90; +proxy_buffers 32 4k; diff --git a/templates/local/nginx/static/404-nodomain.html b/templates/local/nginx/static/404-nodomain.html new file mode 100644 index 0000000000..9a1155ef2b --- /dev/null +++ b/templates/local/nginx/static/404-nodomain.html @@ -0,0 +1,12 @@ + + + 404 Not found + + +

404 There is nothing here!

+

If you are an exchange administrator, and facing this page after the initial setup, You probably missed to setup domain(s) for the exchange.

+

If you haven't bind domain(s) for the exchange yet, please run 'hollaex prod' command to do so.

+

Please visit docs.hollaex.com to see guides, forum.hollaex.com to get further help.

+

Regards, HollaEx Team.

+ + diff --git a/templates/local/nginx/static/404.html b/templates/local/nginx/static/404.html new file mode 100644 index 0000000000..0efd625d27 --- /dev/null +++ b/templates/local/nginx/static/404.html @@ -0,0 +1,12 @@ + + + 404 Not found + + +

404 There is nothing here!

+

To view the API health, visit Health Page.

+

To view the API explorer, visit Explorer Page.

+

Please visit docs.hollaex.com to see guides, forum.hollaex.com to get further help.

+

Regards, HollaEx Team.

+ + diff --git a/templates/local/nginx/static/429.html b/templates/local/nginx/static/429.html new file mode 100644 index 0000000000..3b90326039 --- /dev/null +++ b/templates/local/nginx/static/429.html @@ -0,0 +1,9 @@ + + + Too Many Requests + + +

Too Many Requests

+

There is a limit of 1 requests per second. Try again soon.

+ + From 28c5af8b636a01e5204789e31a720f6ed0ebd74d Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 9 Feb 2024 17:40:35 +0900 Subject: [PATCH 021/115] brought back the settings files --- .gitignore | 5 +- settings/configmap | 161 +++++++++++++++++++++++++++++++++++++++++++++ settings/secret | 42 ++++++++++++ 3 files changed, 204 insertions(+), 4 deletions(-) create mode 100644 settings/configmap create mode 100644 settings/secret diff --git a/.gitignore b/.gitignore index 9fdc282cfe..fd1540df11 100644 --- a/.gitignore +++ b/.gitignore @@ -64,7 +64,4 @@ templates/kubernetes/config/* .DS_Store .token -backups - -settings -settings/* \ No newline at end of file +backups \ No newline at end of file diff --git a/settings/configmap b/settings/configmap new file mode 100644 index 0000000000..543b58938d --- /dev/null +++ b/settings/configmap @@ -0,0 +1,161 @@ +########################################################################################## +#### All HollaEx CLI commands rely on ENVIRONMENT_EXCHANGE_NAME below. DO NOT MODIFY IT. #### +######################################################################################### + +ENVIRONMENT_EXCHANGE_NAME=hollaex + +################################ +#### GENERAL CONFIGURATIONS #### +################################ + +HOLLAEX_CONFIGMAP_API_NAME=my-hollaex-exchange +HOLLAEX_CONFIGMAP_DOMAIN=http://localhost + +HOLLAEX_CONFIGMAP_LOGO_IMAGE=https://bitholla.s3.ap-northeast-2.amazonaws.com/kit/LOGO_IMAGE_LIGHT + +ENVIRONMENT_WEB_DEFAULT_COUNTRY=KR +HOLLAEX_CONFIGMAP_EMAILS_TIMEZONE=UTC +HOLLAEX_CONFIGMAP_VALID_LANGUAGES=en +HOLLAEX_CONFIGMAP_NEW_USER_DEFAULT_LANGUAGE=en +ENVIRONMENT_WEB_DEFAULT_LANGUAGE=$HOLLAEX_CONFIGMAP_VALID_LANGUAGES +HOLLAEX_CONFIGMAP_DEFAULT_THEME=dark + +HOLLAEX_CONFIGMAP_CURRENCIES=xht,usdt +HOLLAEX_CONFIGMAP_PAIRS='xht-usdt' + +HOLLAEX_CONFIGMAP_API_HOST=http://localhost/api + +HOLLAEX_CONFIGMAP_USER_LEVEL_NUMBER=4 + +HOLLAEX_CONFIGMAP_ADMIN_EMAIL= +HOLLAEX_CONFIGMAP_KYC_EMAIL= +HOLLAEX_CONFIGMAP_SUPPORT_EMAIL=support@bitholla.com +HOLLAEX_CONFIGMAP_SUPERVISOR_EMAIL= +HOLLAEX_CONFIGMAP_SENDER_EMAIL= + +HOLLAEX_CONFIGMAP_NEW_USER_IS_ACTIVATED=true + +HOLLAEX_CONFIGMAP_SMTP_SERVER= +HOLLAEX_CONFIGMAP_SMTP_PORT=587 +HOLLAEX_CONFIGMAP_SMTP_USER= + +################################# +#### ADVANCED CONFIGURATIONS #### +################################# + +HOLLAEX_CONFIGMAP_NODE_ENV=production +HOLLAEX_CONFIGMAP_PORT=10010 +HOLLAEX_CONFIGMAP_WEBSOCKET_PORT=10080 + +HOLLAEX_CONFIGMAP_SEND_EMAIL_TO_SUPPORT=true + +HOLLAEX_CONFIGMAP_NETWORK=mainnet + +HOLLAEX_CONFIGMAP_NETWORK_URL= + +HOLLAEX_CONFIGMAP_VAULT_NAME= + +HOLLAEX_CONFIGMAP_DB_SSL=false + +HOLLAEX_CONFIGMAP_LOG_LEVEL=verbose + +HOLLAEX_CONFIGMAP_KIT_VERSION=$(cat version) + +ENVIRONMENT_EXCHANGE_RUN_MODE=api,stream,plugins + +ENVIRONMENT_DOCKER_COMPOSE_RUN_POSTGRESQL_DB=true +ENVIRONMENT_DOCKER_COMPOSE_RUN_REDIS=true + +ENVIRONMENT_KUBERNETES_RUN_POSTGRESQL_DB=true +ENVIRONMENT_KUBERNETES_POSTGRESQL_DB_VOLUMESIZE=4Gi + +ENVIRONMENT_KUBERNETES_RUN_REDIS=true + +ENVIRONMENT_KUBERNETES_POSTGRESQL_DB_NODESELECTOR="{}" +ENVIRONMENT_KUBERNETES_REDIS_NODESELECTOR="{}" +ENVIRONMENT_KUBERNETES_EXCHANGE_STATEFUL_NODESELECTOR="{}" +ENVIRONMENT_KUBERNETES_EXCHANGE_STATELESS_NODESELECTOR="{}" + +ENVIRONMENT_DOCKER_IMAGE_VERSION=2.2.0 + +ENVIRONMENT_DOCKER_IMAGE_POSTGRESQL_REGISTRY=postgres +ENVIRONMENT_DOCKER_IMAGE_POSTGRESQL_VERSION=14.9-alpine + +ENVIRONMENT_DOCKER_IMAGE_REDIS_REGISTRY=redis +ENVIRONMENT_DOCKER_IMAGE_REDIS_VERSION=7.2.0-alpine + +ENVIRONMENT_DOCKER_IMAGE_INFLUXDB_REGISTRY=influxdb +ENVIRONMENT_DOCKER_IMAGE_INFLUXDB_VERSION=1.8.3 + +ENVIRONMENT_DOCKER_IMAGE_LOCAL_NGINX_REGISTRY=bitholla/nginx-with-certbot +ENVIRONMENT_DOCKER_IMAGE_LOCAL_NGINX_VERSION=1.24.0 + +ENVIRONMENT_LOCAL_NGINX_HTTP_PORT=80 +ENVIRONMENT_LOCAL_NGINX_HTTPS_PORT=443 + +ENVIRONMENT_DOCKER_COMPOSE_GENERATE_ENV_ENABLE=true +ENVIRONMENT_DOCKER_COMPOSE_GENERATE_YAML_ENABLE=true +ENVIRONMENT_DOCKER_COMPOSE_GENERATE_NGINX_UPSTREAM=true + +ENVIRONMENT_KUBERNETES_GENERATE_CONFIGMAP_ENABLE=true +ENVIRONMENT_KUBERNETES_GENERATE_SECRET_ENABLE=true +ENVIRONMENT_KUBERNETES_GENERATE_INGRESS_ENABLE=true + +ENVIRONMENT_KUBERNETES_INGRESS_CERT_MANAGER_ISSUER= + +ENVIRONMENT_KUBERNETES_ALLOW_EXTERNAL_POSTGRESQL_DB_ACCESS=false +ENVIRONMENT_KUBERNETES_EXTERNAL_POSTGRESQL_DB_ACCESS_PORT=40000 + +ENVIRONMENT_KUBERNETES_ALLOW_EXTERNAL_REDIS_ACCESS=false +ENVIRONMENT_KUBERNETES_EXTERNAL_REDIS_ACCESS_PORT=40001 + +ENVIRONMENT_KUBERNETES_RESTART_NOTIFICATION_WEBHOOK_URL= + +ENVIRONMENT_USER_HOLLAEX_CORE_IMAGE_REGISTRY=bitholla/my-hollaex-server +ENVIRONMENT_USER_HOLLAEX_CORE_IMAGE_VERSION=$ENVIRONMENT_DOCKER_IMAGE_VERSION + +ENVIRONMENT_USER_HOLLAEX_WEB_IMAGE_REGISTRY=bitholla/my-hollaex-web +ENVIRONMENT_USER_HOLLAEX_WEB_IMAGE_VERSION=latest + +ENVIRONMENT_API_CPU_LIMITS=0.2 +ENVIRONMENT_API_MEMORY_LIMITS=1024Mi +ENVIRONMENT_API_CPU_REQUESTS=0.05 +ENVIRONMENT_API_MEMORY_REQUESTS=512Mi + +ENVIRONMENT_STREAM_CPU_LIMITS=0.2 +ENVIRONMENT_STREAM_MEMORY_LIMITS=512Mi +ENVIRONMENT_STREAM_CPU_REQUESTS=0.05 +ENVIRONMENT_STREAM_MEMORY_REQUESTS=256Mi + +ENVIRONMENT_PLUGINS_CPU_LIMITS=0.2 +ENVIRONMENT_PLUGINS_MEMORY_LIMITS=1200Mi +ENVIRONMENT_PLUGINS_CPU_REQUESTS=0.05 +ENVIRONMENT_PLUGINS_MEMORY_REQUESTS=700Mi + +ENVIRONMENT_POSTGRESQL_CPU_LIMITS=0.1 +ENVIRONMENT_POSTGRESQL_MEMORY_LIMITS=100Mi +ENVIRONMENT_POSTGRESQL_CPU_REQUESTS=0.1 +ENVIRONMENT_POSTGRESQL_MEMORY_REQUESTS=100Mi + +ENVIRONMENT_REDIS_CPU_LIMITS=0.1 +ENVIRONMENT_REDIS_MEMORY_LIMITS=100Mi +ENVIRONMENT_REDIS_CPU_REQUESTS=0.1 +ENVIRONMENT_REDIS_MEMORY_REQUESTS=100Mi + +ENVIRONMENT_WEB_CPU_LIMITS=0.05 +ENVIRONMENT_WEB_MEMORY_LIMITS=128Mi +ENVIRONMENT_WEB_CPU_REQUESTS=0.01 +ENVIRONMENT_WEB_MEMORY_REQUESTS=128Mi + +ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_RULE='0 1,13 * * *' +ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_REGION= +ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_BUCKET= +ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_TIMEZONE=UTC + +ENVIRONMENT_API_SERVER_REPLICAS=1 +ENVIRONMENT_STREAM_SERVER_REPLICAS=1 +ENVIRONMENT_WEB_SERVER_REPLICAS=1 + +ENVIRONMENT_KUBERNETES_API_HPA_ENABLE=false +ENVIRONMENT_KUBERNETES_STREAM_HPA_ENABLE=false +ENVIRONMENT_KUBERNETES_WEB_HPA_ENABLE=false diff --git a/settings/secret b/settings/secret new file mode 100644 index 0000000000..87f220c5f1 --- /dev/null +++ b/settings/secret @@ -0,0 +1,42 @@ +############################### +#### SECRET CONFIGURATIONS #### +############################### + +HOLLAEX_SECRET_ACTIVATION_CODE= + +######################################## +#### ADVANCED SECRET CONFIGURATIONS #### +######################################## + +HOLLAEX_SECRET_REDIS_HOST=$ENVIRONMENT_EXCHANGE_NAME-redis +HOLLAEX_SECRET_REDIS_PORT=6379 +HOLLAEX_SECRET_REDIS_PASSWORD= + +HOLLAEX_SECRET_PUBSUB_HOST=$ENVIRONMENT_EXCHANGE_NAME-redis +HOLLAEX_SECRET_PUBSUB_PORT=6379 +HOLLAEX_SECRET_PUBSUB_PASSWORD= + +HOLLAEX_SECRET_DB_NAME=hollaex +HOLLAEX_SECRET_DB_USERNAME=hollaex +HOLLAEX_SECRET_DB_PASSWORD= +HOLLAEX_SECRET_DB_HOST=$ENVIRONMENT_EXCHANGE_NAME-db +HOLLAEX_SECRET_DB_PORT=5432 + +ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_HOST=docker.io +ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_USERNAME= +ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_PASSWORD= +ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_EMAIL= + +ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_ACCESSKEY= +ENVIRONMENT_KUBERNETES_S3_BACKUP_CRONJOB_SECRETKEY= + +HOLLAEX_SECRET_API_KEY= +HOLLAEX_SECRET_API_SECRET= + +HOLLAEX_SECRET_SMTP_PASSWORD= + +###################################################################### +#### AUTOMATICALLY GENERATED PASSWORDS GONNA BE STORED DOWN BELOW #### +###################################################################### + +HOLLAEX_SECRET_SECRET= \ No newline at end of file From 3d66128dcb01fbbbc75de07af24ef5bee537c546 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 11 Feb 2024 20:51:44 +0900 Subject: [PATCH 022/115] Update docker-compose.yaml --- server/docker-compose.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index e211b6f441..c9b0b9a011 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -4,7 +4,7 @@ services: image: redis:7.2.0-alpine restart: unless-stopped depends_on: - - hollaex-db + - hollaex-kit-db ports: - 6379:6379 env_file: @@ -70,8 +70,8 @@ services: networks: - hollaex-kit depends_on: - - hollaex-redis - - hollaex-db + - hollaex-kit-redis + - hollaex-kit-db hollaex-kit-server-stream: image: hollaex-kit @@ -99,8 +99,8 @@ services: - hollaex-kit depends_on: - hollaex-kit-server-api - - hollaex-redis - - hollaex-db + - hollaex-kit-redis + - hollaex-kit-db hollaex-kit-server-plugins: image: hollaex-kit @@ -127,8 +127,8 @@ services: - hollaex-kit depends_on: - hollaex-kit-server-api - - hollaex-redis - - hollaex-db + - hollaex-kit-redis + - hollaex-kit-db networks: hollaex-kit: From 5a56ff78a568c057b544a37fcb3e099f7c5b0888 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 11 Feb 2024 21:17:33 +0900 Subject: [PATCH 023/115] Update Dockerfile --- nginx/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/Dockerfile b/nginx/Dockerfile index b636a2f04d..d937f3c2d0 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:alpine +FROM nginx:1.25.3-alpine3.18 RUN apk add --no-cache certbot py-pip && \ apk add --no-cache --virtual .build-deps build-base libffi-dev openssl-dev python3-dev && \ pip install certbot-nginx && \ From 3c1f419dc0a93241f9220c8050099b3057a0d3b2 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 11 Feb 2024 22:47:52 +0900 Subject: [PATCH 024/115] ingress update --- .../ingress/hollaex-kit-ingress.yaml | 30 ------------------- .../ingress/hollaex-kit-ingress.yaml | 29 ++++++++++++++++++ 2 files changed, 29 insertions(+), 30 deletions(-) create mode 100644 web/tools/kubernetes/ingress/hollaex-kit-ingress.yaml diff --git a/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml b/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml index aa186ca00d..755de44ccd 100644 --- a/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml +++ b/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml @@ -1,35 +1,5 @@ apiVersion: networking.k8s.io/v1 kind: Ingress -metadata: - name: hollaex-kit-ingress-web - namespace: hollaex-kit - annotations: - kubernetes.io/ingress.class: "nginx" - kubernetes.io/tls-acme: "true" - cert-manager.io/cluster-issuer: letsencrypt-prod - nginx.ingress.kubernetes.io/proxy-body-size: "6m" - - -spec: - rules: - - host: yourdomain.com - http: - paths: - - pathType: Prefix - path: / - backend: - service: - name: hollaex-kit-web - port: - number: 80 - - tls: - - secretName: hollaex-kit-tls-cert - hosts: - - yourdomain.com ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress metadata: name: hollaex-kit-ingress-api namespace: hollaex-kit diff --git a/web/tools/kubernetes/ingress/hollaex-kit-ingress.yaml b/web/tools/kubernetes/ingress/hollaex-kit-ingress.yaml new file mode 100644 index 0000000000..159d958dd9 --- /dev/null +++ b/web/tools/kubernetes/ingress/hollaex-kit-ingress.yaml @@ -0,0 +1,29 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: hollaex-kit-ingress-web + namespace: hollaex-kit + annotations: + kubernetes.io/ingress.class: "nginx" + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: "6m" + + +spec: + rules: + - host: yourdomain.com + http: + paths: + - pathType: Prefix + path: / + backend: + service: + name: hollaex-kit-web + port: + number: 80 + + tls: + - secretName: hollaex-kit-tls-cert + hosts: + - yourdomain.com \ No newline at end of file From 8b54ee31e6ceeaf0bd464959d11d49b31a6e0d48 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 11 Feb 2024 23:40:38 +0900 Subject: [PATCH 025/115] Update .env --- web/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/.env b/web/.env index 400b58da3e..48e7b2bb48 100644 --- a/web/.env +++ b/web/.env @@ -7,7 +7,7 @@ REACT_APP_STREAM_ENDPOINT=ws://localhost/stream REACT_APP_NETWORK=mainnet -REACT_APP_EXCHANGE_NAME=hollaex-kit +REACT_APP_EXCHANGE_NAME="hollaex-kit" REACT_APP_CAPTCHA_SITE_KEY= From d56aae01fe6977272080f7b449a23546a0d66c5b Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 18 Feb 2024 17:00:03 +0900 Subject: [PATCH 026/115] Update docker-compose-dev.yaml --- server/docker-compose-dev.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/docker-compose-dev.yaml b/server/docker-compose-dev.yaml index 34ebdd98f1..33b312ae7d 100644 --- a/server/docker-compose-dev.yaml +++ b/server/docker-compose-dev.yaml @@ -30,7 +30,7 @@ services: - 10013:10013 build: context: . - dockerfile: ./tools/Dockerfile.pm2 + dockerfile: ./tools/Dockerfile env_file: - ./tools/hollaex-kit.env.local entrypoint: From 318ce7756e1cda78ec948917c38a73234926e887 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sun, 18 Feb 2024 17:11:52 +0900 Subject: [PATCH 027/115] HollaEx Network Testnet Build - 2.9.5-cli-deprecation-d56aae0 --- server/docker-compose.yaml | 51 ++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index c9b0b9a011..33b9f21701 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -9,7 +9,7 @@ services: - 6379:6379 env_file: - hollaex-kit.env - command : ["sh", "-c", "redis-server --requirepass $${REDIS_PASSWORD}"] + command: ["sh", "-c", "redis-server --requirepass $${REDIS_PASSWORD}"] deploy: resources: limits: @@ -20,7 +20,6 @@ services: memory: 100M networks: - hollaex-kit - hollaex-kit-db: image: postgres:14.9-alpine restart: unless-stopped @@ -38,12 +37,11 @@ services: reservations: cpus: "0.1" memory: 100M - command : ["sh", "-c", "export POSTGRES_DB=$${DB_NAME} && export POSTGRES_USER=$${DB_USERNAME} && export POSTGRES_PASSWORD=$${DB_PASSWORD} && ln -sf /usr/local/bin/docker-entrypoint.sh ./docker-entrypoint.sh && ./docker-entrypoint.sh postgres"] + command: ["sh", "-c", "export POSTGRES_DB=$${DB_NAME} && export POSTGRES_USER=$${DB_USERNAME} && export POSTGRES_PASSWORD=$${DB_PASSWORD} && ln -sf /usr/local/bin/docker-entrypoint.sh ./docker-entrypoint.sh && ./docker-entrypoint.sh postgres"] networks: - hollaex-kit - hollaex-kit-server-api: - image: hollaex-kit + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d56aae0 build: context: . dockerfile: tools/Dockerfile @@ -55,26 +53,22 @@ services: deploy: resources: limits: - cpus: "0.2" - memory: 1024M + cpus: "0.2" + memory: 1024M reservations: - cpus: "0.05" - memory: 512M - + cpus: "0.05" + memory: 512M command: - - app.js - + - app.js ports: - - 10010:10010 - + - 10010:10010 networks: - hollaex-kit depends_on: - hollaex-kit-redis - hollaex-kit-db - hollaex-kit-server-stream: - image: hollaex-kit + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d56aae0 build: context: . dockerfile: tools/Dockerfile @@ -86,13 +80,13 @@ services: deploy: resources: limits: - cpus: "0.2" - memory: 512M + cpus: "0.2" + memory: 512M reservations: - cpus: "0.05" - memory: 256M + cpus: "0.05" + memory: 256M command: - - ws/index.js + - ws/index.js ports: - 10080:10080 networks: @@ -101,9 +95,8 @@ services: - hollaex-kit-server-api - hollaex-kit-redis - hollaex-kit-db - hollaex-kit-server-plugins: - image: hollaex-kit + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d56aae0 build: context: . dockerfile: tools/Dockerfile @@ -115,13 +108,13 @@ services: deploy: resources: limits: - cpus: "0.2" - memory: 1200M + cpus: "0.2" + memory: 1200M reservations: - cpus: "0.05" - memory: 700M + cpus: "0.05" + memory: 700M command: - - plugins/index.js + - plugins/index.js - 10011:10011 networks: - hollaex-kit @@ -129,9 +122,7 @@ services: - hollaex-kit-server-api - hollaex-kit-redis - hollaex-kit-db - networks: hollaex-kit: volumes: hollaex_db_vol: - From 08555c41a8a0a736f68f9b81dd049e53b362b3eb Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 20 Feb 2024 23:57:23 +0900 Subject: [PATCH 028/115] Update Dockerfile --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f705f3bd91..1ade76db15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,6 @@ RUN npm install --loglevel=error && \ pm2 update && \ cd /app/mail && npm install --loglevel=error -EXPOSE 10010 - -EXPOSE 10080 +EXPOSE 10010 10080 10011 ENTRYPOINT ["/entrypoint.sh"] From 4a46a382bfbf1d33f1915711025f219f77e97210 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 23 Feb 2024 19:58:29 +0900 Subject: [PATCH 029/115] increased api rate limit - 14 bursts --- nginx/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 2bed36cbd1..0aa498eaa9 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -47,7 +47,7 @@ server { location /api { proxy_pass http://api; - limit_req zone=api burst=10 nodelay; + limit_req zone=api burst=14 nodelay; limit_req_log_level notice; limit_req_status 429; From 6535184bd16a37627349762496ead64ed44f99cd Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 27 Feb 2024 19:57:39 +0900 Subject: [PATCH 030/115] Update .dockerignore --- .dockerignore | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 0b4af7b428..ca30ad138c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,4 +3,20 @@ settings web .drone.yml install.sh -uninstall.sh \ No newline at end of file +uninstall.sh + +server/tools +!server/tools/dbs/*.js +!server/tools/general/*.js +!server/tools/nexe +Dockerfile +server/docker-compose* +server/index.html +server/package-lock.json +server/logs +server/coverage +server/.nyc_output +server/.*docker-compose.yaml +server/.drone*.yml +server/hollaex-kit.env +server/hollaex-kit.env* \ No newline at end of file From e557364d5f7c9b017e60970f6cd6f1825d30f594 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 28 Feb 2024 19:56:17 +0900 Subject: [PATCH 031/115] HollaEx Network Testnet Build - 2.9.5-cli-deprecation-6535184 --- server/docker-compose.yaml | 6 +++--- .../helm-chart/hollaex-kit-server/values.yaml | 20 ++----------------- 2 files changed, 5 insertions(+), 21 deletions(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index 33b9f21701..819bdb7204 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -41,7 +41,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d56aae0 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-6535184 build: context: . dockerfile: tools/Dockerfile @@ -68,7 +68,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d56aae0 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-6535184 build: context: . dockerfile: tools/Dockerfile @@ -96,7 +96,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d56aae0 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-6535184 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 8ea568030f..8d6fa32bba 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,46 +1,30 @@ imageRegistry: bitholla/hollaex-kit -dockerTag: - +dockerTag: 2.9.5-cli-deprecation-6535184 imagePullSecrets: - name: docker-registry-secret - envName: hollaex-kit-configmap secretName: hollaex-kit-secret - DEPLOYMENT_MODE: api PAIR: - stable: replicaCount: 1 - staging: enable: false replicaCount: 1 dockerTag: - nodeSelector: {} - autoScaling: hpa: - enable: false + enable: false memory: threshold: 80 - APM_URL: - podRestart_webhook_url: - - job: enable: false - resources: limits: memory: "1536Mi" requests: cpu: "100m" memory: "512Mi" - - - - From ff1799040cc7375b4df58fb80086518e383d0c80 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 28 Feb 2024 20:25:41 +0900 Subject: [PATCH 032/115] HollaEx Network Testnet Build - 2.9.5-cli-deprecation-e557364 --- server/docker-compose.yaml | 6 +++--- .../helm-chart/hollaex-kit-server/values.yaml | 2 +- .../helm-chart/hollaex-kit-web/values.yaml | 15 +++------------ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index 819bdb7204..c398d0e3b5 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -41,7 +41,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-6535184 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-e557364 build: context: . dockerfile: tools/Dockerfile @@ -68,7 +68,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-6535184 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-e557364 build: context: . dockerfile: tools/Dockerfile @@ -96,7 +96,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-6535184 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-e557364 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 8d6fa32bba..eb3e662d4e 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-kit -dockerTag: 2.9.5-cli-deprecation-6535184 +dockerTag: 2.9.5-cli-deprecation-e557364 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 2a948b62c0..50142f17be 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,28 +1,19 @@ imageRegistry: bitholla/hollaex-web -dockerTag: - +dockerTag: 2.9.5-cli-deprecation-e557364-web imagePullSecrets: - name: docker-registry-secret - stable: replicaCount: 1 - nodeSelector: {} - autoScaling: hpa: - enable: false + enable: false maxReplicas: 4 avgMemory: 500000000 - podRestart_webhook_url: - resources: limits: - memory: "100Mi" requests: cpu: "10m" - memory: "100Mi" - - + memory: "100Mi" From 4986072a59859c031941454c52811c97fad710a8 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 28 Feb 2024 20:34:25 +0900 Subject: [PATCH 033/115] HollaEx Network Testnet Build - 2.9.5-cli-deprecation-ff17990 --- server/docker-compose.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index c398d0e3b5..a349a8036a 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -41,7 +41,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-e557364 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-ff17990 build: context: . dockerfile: tools/Dockerfile @@ -68,7 +68,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-e557364 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-ff17990 build: context: . dockerfile: tools/Dockerfile @@ -96,7 +96,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-e557364 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-ff17990 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index eb3e662d4e..c519952186 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-kit -dockerTag: 2.9.5-cli-deprecation-e557364 +dockerTag: 2.9.5-cli-deprecation-ff17990 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 50142f17be..df54fcc301 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ -imageRegistry: bitholla/hollaex-web -dockerTag: 2.9.5-cli-deprecation-e557364-web +imageRegistry: bitholla/hollaex-core-kit-testnet +dockerTag: 2.9.5-cli-deprecation-ff17990-web imagePullSecrets: - name: docker-registry-secret stable: From 6a9869f8bb63cf5ef507f1923f8253fe2a8ffe67 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 28 Feb 2024 21:19:59 +0900 Subject: [PATCH 034/115] image registry update --- .../tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 8ea568030f..5eec3c969b 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,4 +1,4 @@ -imageRegistry: bitholla/hollaex-kit +imageRegistry: hollaex/hollaex-kit dockerTag: imagePullSecrets: diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 2a948b62c0..d5157f50e4 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,4 +1,4 @@ -imageRegistry: bitholla/hollaex-web +imageRegistry: hollaex/hollaex-web dockerTag: imagePullSecrets: From 3d5edd7bdb691ed67cd6c46d11913102bfcedc64 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 28 Feb 2024 21:21:35 +0900 Subject: [PATCH 035/115] HollaEx Network Testnet Build - 2.9.5-cli-deprecation-d1db408 --- server/docker-compose.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 3 +-- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index a349a8036a..ff9c2ff967 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -41,7 +41,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-ff17990 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 build: context: . dockerfile: tools/Dockerfile @@ -68,7 +68,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-ff17990 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 build: context: . dockerfile: tools/Dockerfile @@ -96,7 +96,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-ff17990 + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index af1eaee9c4..801caff5b5 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,6 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: - +dockerTag: 2.9.5-cli-deprecation-d1db408 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index e245fe4efc..8044f15616 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,6 +1,5 @@ -imageRegistry: hollaex/hollaex-web -dockerTag: - +imageRegistry: bitholla/hollaex-core-kit-testnet +dockerTag: 2.9.5-cli-deprecation-d1db408-web imagePullSecrets: - name: docker-registry-secret stable: From 4ee1fda85db13b88cbaa914358f51bd6f8aed822 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Thu, 7 Mar 2024 19:30:25 +0900 Subject: [PATCH 036/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-c80740e --- server/docker-compose.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index ff9c2ff967..39c57e0138 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -41,7 +41,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c80740e build: context: . dockerfile: tools/Dockerfile @@ -68,7 +68,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c80740e build: context: . dockerfile: tools/Dockerfile @@ -96,7 +96,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c80740e build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 801caff5b5..d81e8337f7 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.9.5-cli-deprecation-d1db408 +dockerTag: 2.10.0-cli-deprecation-c80740e imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 8044f15616..dfaff2f896 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.9.5-cli-deprecation-d1db408-web +dockerTag: 2.10.0-cli-deprecation-c80740e-web imagePullSecrets: - name: docker-registry-secret stable: From c89796959a9b9ccb59231d530aed87b9134a8fb5 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 9 Mar 2024 21:05:52 +0900 Subject: [PATCH 037/115] dev mode compatibility update --- nginx/docker-compose.yaml | 2 +- server/docker-compose-dev.yaml | 81 --------- server/docker-compose-prod.yaml | 129 ++++++++++++++ server/docker-compose.yaml | 164 +++++++----------- server/hollaex-kit.env.local.dev | 88 ---------- .../{ => tools}/hollaex-kit.env.local.example | 1 + server/tools/nginx-dev/conf.d/upstream.conf | 17 ++ server/tools/nginx-dev/mime.types | 48 +++++ server/tools/nginx-dev/nginx.conf | 83 +++++++++ server/tools/nginx-dev/proxy.conf | 11 ++ server/tools/nginx-dev/static/429.html | 9 + 11 files changed, 358 insertions(+), 275 deletions(-) delete mode 100644 server/docker-compose-dev.yaml create mode 100644 server/docker-compose-prod.yaml delete mode 100644 server/hollaex-kit.env.local.dev rename server/{ => tools}/hollaex-kit.env.local.example (97%) create mode 100644 server/tools/nginx-dev/conf.d/upstream.conf create mode 100644 server/tools/nginx-dev/mime.types create mode 100644 server/tools/nginx-dev/nginx.conf create mode 100644 server/tools/nginx-dev/proxy.conf create mode 100644 server/tools/nginx-dev/static/429.html diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml index 59c6728c4a..837cd2e6f9 100644 --- a/nginx/docker-compose.yaml +++ b/nginx/docker-compose.yaml @@ -1,7 +1,7 @@ version: '3' services: - hollaex-nginx: + hollaex-kit-prod-nginx: image: nginx-with-certbot build: context: . diff --git a/server/docker-compose-dev.yaml b/server/docker-compose-dev.yaml deleted file mode 100644 index 33b312ae7d..0000000000 --- a/server/docker-compose-dev.yaml +++ /dev/null @@ -1,81 +0,0 @@ -version: '3' -services: - hollaex-kit-redis: - image: redis:7.2.0-alpine - depends_on: - - hollaex-kit-db - networks: - - hollaex-kit-network - ports: - - 6379:6379 - environment: - - REDIS_PASSWORD=bitholla - command : ["sh", "-c", "redis-server --requirepass $${REDIS_PASSWORD}"] - hollaex-kit-db: - image: postgres:14.9 - ports: - - 5432:5432 - environment: - - POSTGRES_DB=hollaex - - POSTGRES_USER=admin - - POSTGRES_PASSWORD=root - networks: - - hollaex-kit-network - hollaex-kit-server: - image: hollaex-kit-server - ports: - - 10010:10010 - - 10011:10011 - - 10012:10012 - - 10013:10013 - build: - context: . - dockerfile: ./tools/Dockerfile - env_file: - - ./tools/hollaex-kit.env.local - entrypoint: - - /bin/sh - - -c - - ip -4 route list match 0/0 | awk '{print $$3 " host.docker.internal"}' >> /etc/hosts && cat /etc/hosts && pm2-runtime start ecosystem.config.js --env development; - volumes: - - ./api:/app/api - - ./config:/app/config - - ./db:/app/db - - ./plugins:/app/plugins - - ./mail:/app/mail - - ./ws:/app/ws - - ./app.js:/app/app.js - - ./ecosystem.config.js:/app/ecosystem.config.js - - ./constants.js:/app/constants.js - - ./messages.js:/app/messages.js - - ./logs:/app/logs - - ./test:/app/test - - ./tools:/app/tools - - ./utils:/app/utils - - /app/utils/hollaex-network-lib/node_modules - - /app/utils/hollaex-tools-lib/node_modules - - ./init.js:/app/init.js - - ../plugins/src/plugins:/app/dev-plugins - depends_on: - - hollaex-kit-db - - hollaex-kit-redis - networks: - - hollaex-kit-network - hollaex-kit-nginx: - image: nginx:1.15.8-alpine - volumes: - - ./tools/nginx:/etc/nginx - - ./tools/nginx/conf.d:/etc/nginx/conf.d - - ./tools/nginx/logs:/var/log - - ./tools/nginx/static:/usr/share/nginx/html - ports: - - 80:80 - environment: - - NGINX_PORT=80 - depends_on: - - hollaex-kit-server - networks: - - hollaex-kit-network - -networks: - hollaex-kit-network: \ No newline at end of file diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml new file mode 100644 index 0000000000..782cad2b95 --- /dev/null +++ b/server/docker-compose-prod.yaml @@ -0,0 +1,129 @@ +# Prod HollaEx Kit Docker-Copmose +version: '3' +services: + hollaex-kit-prod-redis: + image: redis:7.2.0-alpine + restart: unless-stopped + depends_on: + - hollaex-kit-db + ports: + - 6379:6379 + env_file: + - hollaex-kit.env + command: ["sh", "-c", "redis-server --requirepass $${REDIS_PASSWORD}"] + deploy: + resources: + limits: + cpus: "0.1" + memory: 100M + reservations: + cpus: "0.1" + memory: 100M + networks: + - hollaex-kit + hollaex-kit-prod-db: + image: postgres:14.9-alpine + restart: unless-stopped + volumes: + - hollaex_db_vol:/var/lib/postgresql/data + ports: + - 5432:5432 + env_file: + - hollaex-kit.env + deploy: + resources: + limits: + cpus: "0.1" + memory: 100M + reservations: + cpus: "0.1" + memory: 100M + command: ["sh", "-c", "export POSTGRES_DB=$${DB_NAME} && export POSTGRES_USER=$${DB_USERNAME} && export POSTGRES_PASSWORD=$${DB_PASSWORD} && ln -sf /usr/local/bin/docker-entrypoint.sh ./docker-entrypoint.sh && ./docker-entrypoint.sh postgres"] + networks: + - hollaex-kit + hollaex-kit-server-api: + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + build: + context: . + dockerfile: tools/Dockerfile + restart: unless-stopped + env_file: + - hollaex-kit.env + entrypoint: + - node + deploy: + resources: + limits: + cpus: "0.2" + memory: 1024M + reservations: + cpus: "0.05" + memory: 512M + command: + - app.js + ports: + - 10010:10010 + networks: + - hollaex-kit + depends_on: + - hollaex-kit-redis + - hollaex-kit-db + hollaex-kit-server-stream: + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + build: + context: . + dockerfile: tools/Dockerfile + restart: unless-stopped + env_file: + - hollaex-kit.env + entrypoint: + - node + deploy: + resources: + limits: + cpus: "0.2" + memory: 512M + reservations: + cpus: "0.05" + memory: 256M + command: + - ws/index.js + ports: + - 10080:10080 + networks: + - hollaex-kit + depends_on: + - hollaex-kit-server-api + - hollaex-kit-redis + - hollaex-kit-db + hollaex-kit-server-plugins: + image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + build: + context: . + dockerfile: tools/Dockerfile + restart: unless-stopped + env_file: + - hollaex-kit.env + entrypoint: + - node + deploy: + resources: + limits: + cpus: "0.2" + memory: 1200M + reservations: + cpus: "0.05" + memory: 700M + command: + - plugins/index.js + - 10011:10011 + networks: + - hollaex-kit + depends_on: + - hollaex-kit-server-api + - hollaex-kit-redis + - hollaex-kit-db +networks: + hollaex-kit: +volumes: + hollaex_db_vol: diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index ff9c2ff967..f55563bfe1 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -1,128 +1,82 @@ +# Dev mode HollaEx Kit Docker-Copmose version: '3' services: hollaex-kit-redis: image: redis:7.2.0-alpine - restart: unless-stopped depends_on: - hollaex-kit-db + networks: + - hollaex-kit-network ports: - 6379:6379 - env_file: - - hollaex-kit.env - command: ["sh", "-c", "redis-server --requirepass $${REDIS_PASSWORD}"] - deploy: - resources: - limits: - cpus: "0.1" - memory: 100M - reservations: - cpus: "0.1" - memory: 100M - networks: - - hollaex-kit + environment: + - REDIS_PASSWORD=bitholla + command : ["sh", "-c", "redis-server --requirepass $${REDIS_PASSWORD}"] hollaex-kit-db: - image: postgres:14.9-alpine - restart: unless-stopped - volumes: - - hollaex_db_vol:/var/lib/postgresql/data + image: postgres:14.9 ports: - 5432:5432 - env_file: - - hollaex-kit.env - deploy: - resources: - limits: - cpus: "0.1" - memory: 100M - reservations: - cpus: "0.1" - memory: 100M - command: ["sh", "-c", "export POSTGRES_DB=$${DB_NAME} && export POSTGRES_USER=$${DB_USERNAME} && export POSTGRES_PASSWORD=$${DB_PASSWORD} && ln -sf /usr/local/bin/docker-entrypoint.sh ./docker-entrypoint.sh && ./docker-entrypoint.sh postgres"] + environment: + - POSTGRES_DB=hollaex + - POSTGRES_USER=admin + - POSTGRES_PASSWORD=root networks: - - hollaex-kit - hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 - build: - context: . - dockerfile: tools/Dockerfile - restart: unless-stopped - env_file: - - hollaex-kit.env - entrypoint: - - node - deploy: - resources: - limits: - cpus: "0.2" - memory: 1024M - reservations: - cpus: "0.05" - memory: 512M - command: - - app.js + - hollaex-kit-network + hollaex-kit-server: + image: hollaex-kit-server ports: - 10010:10010 - networks: - - hollaex-kit - depends_on: - - hollaex-kit-redis - - hollaex-kit-db - hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + - 10011:10011 + - 10012:10012 + - 10013:10013 build: context: . - dockerfile: tools/Dockerfile - restart: unless-stopped + dockerfile: ./tools/Dockerfile env_file: - - hollaex-kit.env + - ./tools/hollaex-kit.env.local entrypoint: - - node - deploy: - resources: - limits: - cpus: "0.2" - memory: 512M - reservations: - cpus: "0.05" - memory: 256M - command: - - ws/index.js - ports: - - 10080:10080 - networks: - - hollaex-kit + - /bin/sh + - -c + - ip -4 route list match 0/0 | awk '{print $$3 " host.docker.internal"}' >> /etc/hosts && cat /etc/hosts && pm2-runtime start ecosystem.config.js --env development; + volumes: + - ./api:/app/api + - ./config:/app/config + - ./db:/app/db + - ./plugins:/app/plugins + - ./mail:/app/mail + - ./ws:/app/ws + - ./app.js:/app/app.js + - ./ecosystem.config.js:/app/ecosystem.config.js + - ./constants.js:/app/constants.js + - ./messages.js:/app/messages.js + - ./logs:/app/logs + - ./test:/app/test + - ./tools:/app/tools + - ./utils:/app/utils + - /app/utils/hollaex-network-lib/node_modules + - /app/utils/hollaex-tools-lib/node_modules + - ./init.js:/app/init.js + - ../plugins/src/plugins:/app/dev-plugins depends_on: - - hollaex-kit-server-api - - hollaex-kit-redis - hollaex-kit-db - hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 - build: - context: . - dockerfile: tools/Dockerfile - restart: unless-stopped - env_file: - - hollaex-kit.env - entrypoint: - - node - deploy: - resources: - limits: - cpus: "0.2" - memory: 1200M - reservations: - cpus: "0.05" - memory: 700M - command: - - plugins/index.js - - 10011:10011 + - hollaex-kit-redis networks: - - hollaex-kit + - hollaex-kit-network + hollaex-kit-nginx: + image: nginx:1.15.8-alpine + volumes: + - ./tools/nginx-dev:/etc/nginx + - ./tools/ngin-devx/conf.d:/etc/nginx/conf.d + - ./tools/nginx-dev/logs:/var/log + - ./tools/nginx-dev/static:/usr/share/nginx/html + ports: + - 80:80 + environment: + - NGINX_PORT=80 depends_on: - - hollaex-kit-server-api - - hollaex-kit-redis - - hollaex-kit-db + - hollaex-kit-server + networks: + - hollaex-kit-network + networks: - hollaex-kit: -volumes: - hollaex_db_vol: + hollaex-kit-network: \ No newline at end of file diff --git a/server/hollaex-kit.env.local.dev b/server/hollaex-kit.env.local.dev deleted file mode 100644 index 7e570798f3..0000000000 --- a/server/hollaex-kit.env.local.dev +++ /dev/null @@ -1,88 +0,0 @@ -DEPLOYMENT_MODE=all - -API_HOST=localhost -API_NAME=hollaex-kit -DOMAIN=http://localhost:3000 -NETWORK=testnet - -ACTIVATION_CODE= - -NATIVE_CURRENCY= - -CURRENCIES=xht,usdt,btc,eth,bch,xrp -DEFAULT_THEME=dark -EMAILS_TIMEZONE=UTC -LOGO_IMAGE= -NEW_USER_DEFAULT_LANGUAGE=en -NEW_USER_IS_ACTIVATED=true -NODE_ENV=development -PAIRS=xht-usdt - -PORT=10010 -WEBSOCKET_PORT=10080 - -PUBSUB_HOST=hollaex-kit-redis -PUBSUB_PORT=6379 -PUBSUB_PASSWORD=bitholla -REDIS_HOST=hollaex-kit-redis -REDIS_PORT=6379 -REDIS_PASSWORD=bitholla - -SENDER_EMAIL=support@holla.tech - -SUPPORT_EMAIL=support@holla.tech -VALID_LANGUAGES=en - - -ADMIN_EMAIL=admin@hollaex.com -ADMIN_PASSWORD= - -ISSUER=bitholla -SECRET=secret -CAPTCHA_SECRET_KEY= -CAPTCHA_SITE_KEY= - -ADMIN_WHITELIST_IP= - -DB_HOST=hollaex-kit-db -DB_NAME=hollaex -DB_PASSWORD=root -DB_PORT=5432 -DB_USERNAME=admin -DB_DIALECT=postgres -DB_SSL=false - -FRESHDESK_HOST= -FRESHDESK_AUTH= -FRESHDESK_KEY= - -ZENDESK_HOST= -ZENDESK_KEY= - -ID_DOCS_BUCKET= -S3_ACCESSKEYID= -S3_SECRETACCESSKEY= -SES_ACCESSKEYID= -SES_REGION= -SES_SECRETACCESSKEY= -SNS_ACCESSKEYID= -SNS_REGION= -SNS_SECRETACCESSKEY= - -SMTP_SERVER= -SMTP_PORT= -SMTP_USER= -SMTP_PASSWORD= - -PLUGINS= - -SEND_EMAIL_TO_SUPPORT= -ALLOWED_DOMAINS= - -API_KEY= -API_SECRET= - -KIT_VERSION= - -MINIO_ROOT_USER=rootuser -MINIO_ROOT_PASSWORD=rootpass123 \ No newline at end of file diff --git a/server/hollaex-kit.env.local.example b/server/tools/hollaex-kit.env.local.example similarity index 97% rename from server/hollaex-kit.env.local.example rename to server/tools/hollaex-kit.env.local.example index 608e25b8fb..d8247fd58f 100644 --- a/server/hollaex-kit.env.local.example +++ b/server/tools/hollaex-kit.env.local.example @@ -1,3 +1,4 @@ +# Dev Mode HollaEx Kit Env DEPLOYMENT_MODE=all API_HOST=localhost diff --git a/server/tools/nginx-dev/conf.d/upstream.conf b/server/tools/nginx-dev/conf.d/upstream.conf new file mode 100644 index 0000000000..e0c1544c30 --- /dev/null +++ b/server/tools/nginx-dev/conf.d/upstream.conf @@ -0,0 +1,17 @@ + + upstream api { + server hollaex-kit-server-api:10010; + } + + upstream socket { + ip_hash; + server hollaex-kit-server-stream:10080; + } + + upstream plugins { + server hollaex-kit-server-plugins:10011; + } + + upstream web { + server hollaex-kit-web:80; + } \ No newline at end of file diff --git a/server/tools/nginx-dev/mime.types b/server/tools/nginx-dev/mime.types new file mode 100644 index 0000000000..25ae94eb7a --- /dev/null +++ b/server/tools/nginx-dev/mime.types @@ -0,0 +1,48 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml rss; + image/gif gif; + image/jpeg jpeg jpg; + application/x-javascript js; + text/plain txt; + text/x-component htc; + text/mathml mml; + image/png png; + image/x-icon ico; + image/x-jng jng; + image/vnd.wap.wbmp wbmp; + application/java-archive jar war ear; + application/mac-binhex40 hqx; + application/pdf pdf; + application/x-cocoa cco; + application/x-java-archive-diff jardiff; + application/x-java-jnlp-file jnlp; + application/x-makeself run; + application/x-perl pl pm; + application/x-pilot prc pdb; + application/x-rar-compressed rar; + application/x-redhat-package-manager rpm; + application/x-sea sea; + application/x-shockwave-flash swf; + application/x-stuffit sit; + application/x-tcl tcl tk; + application/x-x509-ca-cert der pem crt; + application/x-xpinstall xpi; + application/zip zip; + application/octet-stream deb; + application/octet-stream bin exe dll; + application/octet-stream dmg; + application/octet-stream eot; + application/octet-stream iso img; + application/octet-stream msi msp msm; + audio/mpeg mp3; + audio/x-realaudio ra; + video/mpeg mpeg mpg; + video/quicktime mov; + video/x-flv flv; + video/x-msvideo avi; + video/x-ms-wmv wmv; + video/x-ms-asf asx asf; + video/x-mng mng; +} diff --git a/server/tools/nginx-dev/nginx.conf b/server/tools/nginx-dev/nginx.conf new file mode 100644 index 0000000000..0aa498eaa9 --- /dev/null +++ b/server/tools/nginx-dev/nginx.conf @@ -0,0 +1,83 @@ +worker_processes 4; + +error_log /var/log/error.log warn; +pid /var/log/nginx.pid; + +worker_rlimit_nofile 8192; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + include /etc/nginx/proxy.conf; + include /etc/nginx/conf.d/upstream.conf; + + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] $status ' + '"$request" $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + log_format filter '$remote_addr - $remote_user [$time_local] $status ' + '"$req_filtered" $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + limit_req_zone $remote_addr zone=api:1m rate=4r/s; + limit_req_zone $remote_addr zone=order:1m rate=5r/s; + +# SERVER BLOCK +server { + listen 80; + server_name _; + + set $req_filtered $request; + if ($req_filtered ~ (.*)key=[^&]*(.*)) { + set $req_filtered $1key=****$2; + } + if ($req_filtered ~ (.*)secret=[^&]*(.*)) { + set $req_filtered $1secret=****$2; + } + + access_log /var/log/hollaex.access.log filter; + + include /etc/nginx/conf.d/plugin*.conf; + + + location /api { + proxy_pass http://api; + + limit_req zone=api burst=14 nodelay; + limit_req_log_level notice; + limit_req_status 429; + + rewrite /api(/|$)(.*) /$2 break; + + } + + + location /api/plugins { + proxy_pass http://plugins; + + rewrite /api(/|$)(.*) /$2 break; + } + + location /stream { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass http://socket; + } + + location / { + proxy_pass http://web; + } + + error_page 429 /429.html; + location = /429.html { + root /usr/share/nginx/html; + internal; + } + } + } diff --git a/server/tools/nginx-dev/proxy.conf b/server/tools/nginx-dev/proxy.conf new file mode 100644 index 0000000000..a53a4dd9fd --- /dev/null +++ b/server/tools/nginx-dev/proxy.conf @@ -0,0 +1,11 @@ +proxy_redirect off; +proxy_set_header Host $host; +proxy_set_header X-Real-IP $remote_addr; +proxy_set_header X-Real-Origin $http_origin; +proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +client_max_body_size 6m; +client_body_buffer_size 128k; +proxy_connect_timeout 90; +proxy_send_timeout 90; +proxy_read_timeout 90; +proxy_buffers 32 4k; diff --git a/server/tools/nginx-dev/static/429.html b/server/tools/nginx-dev/static/429.html new file mode 100644 index 0000000000..937b15e46b --- /dev/null +++ b/server/tools/nginx-dev/static/429.html @@ -0,0 +1,9 @@ + + + Too Many Requests + + +

Too Many Requests

+

Please chillex and try again soon.

+ + From 5b05bfa54b761d74d8007aea93c3dda56c550747 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 9 Mar 2024 21:14:30 +0900 Subject: [PATCH 038/115] Update docker-compose.yaml --- server/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index f55563bfe1..af773feee0 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -66,7 +66,7 @@ services: image: nginx:1.15.8-alpine volumes: - ./tools/nginx-dev:/etc/nginx - - ./tools/ngin-devx/conf.d:/etc/nginx/conf.d + - ./tools/ngin-dev/conf.d:/etc/nginx/conf.d - ./tools/nginx-dev/logs:/var/log - ./tools/nginx-dev/static:/usr/share/nginx/html ports: From 0e14778dc61565dd4de006579a6ec3ff8d4f2225 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Mon, 11 Mar 2024 19:09:16 +0900 Subject: [PATCH 039/115] Update docker-compose.yaml --- server/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index af773feee0..9f47a014e8 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -37,7 +37,7 @@ services: entrypoint: - /bin/sh - -c - - ip -4 route list match 0/0 | awk '{print $$3 " host.docker.internal"}' >> /etc/hosts && cat /etc/hosts && pm2-runtime start ecosystem.config.js --env development; + - pm2-runtime start ecosystem.config.js --env development; volumes: - ./api:/app/api - ./config:/app/config From 0b2202cf33d60e4aefabaeddae7fbe4131101b4b Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Mon, 11 Mar 2024 21:22:50 +0900 Subject: [PATCH 040/115] deployment files update --- .gitignore | 1 + server/docker-compose-prod.yaml | 14 +++++++------- server/docker-compose.yaml | 5 +++-- server/tools/nginx-dev/conf.d/upstream.conf | 10 +++------- server/tools/nginx-dev/nginx.conf | 4 +--- 5 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.gitignore b/.gitignore index fd1540df11..cb5b398375 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ build # surge web/CNAME server/tools/hollaex-kit.env.local +server/tools/nginx-dev/logs/* # misc web/.DS_Store diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 782cad2b95..a9a702234a 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -5,7 +5,7 @@ services: image: redis:7.2.0-alpine restart: unless-stopped depends_on: - - hollaex-kit-db + - hollaex-kit-prod-db ports: - 6379:6379 env_file: @@ -66,8 +66,8 @@ services: networks: - hollaex-kit depends_on: - - hollaex-kit-redis - - hollaex-kit-db + - hollaex-kit-prod-redis + - hollaex-kit-prod-db hollaex-kit-server-stream: image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 build: @@ -94,8 +94,8 @@ services: - hollaex-kit depends_on: - hollaex-kit-server-api - - hollaex-kit-redis - - hollaex-kit-db + - hollaex-kit-prod-redis + - hollaex-kit-prod-db hollaex-kit-server-plugins: image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 build: @@ -121,8 +121,8 @@ services: - hollaex-kit depends_on: - hollaex-kit-server-api - - hollaex-kit-redis - - hollaex-kit-db + - hollaex-kit-prod-redis + - hollaex-kit-prod-db networks: hollaex-kit: volumes: diff --git a/server/docker-compose.yaml b/server/docker-compose.yaml index 9f47a014e8..4329aa4325 100644 --- a/server/docker-compose.yaml +++ b/server/docker-compose.yaml @@ -51,7 +51,8 @@ services: - ./messages.js:/app/messages.js - ./logs:/app/logs - ./test:/app/test - - ./tools:/app/tools + - ./tools/dbs:/app/tools/dbs + - ./tools/general:/app/tools/general - ./utils:/app/utils - /app/utils/hollaex-network-lib/node_modules - /app/utils/hollaex-tools-lib/node_modules @@ -66,7 +67,7 @@ services: image: nginx:1.15.8-alpine volumes: - ./tools/nginx-dev:/etc/nginx - - ./tools/ngin-dev/conf.d:/etc/nginx/conf.d + - ./tools/nginx-dev/conf.d:/etc/nginx/conf.d - ./tools/nginx-dev/logs:/var/log - ./tools/nginx-dev/static:/usr/share/nginx/html ports: diff --git a/server/tools/nginx-dev/conf.d/upstream.conf b/server/tools/nginx-dev/conf.d/upstream.conf index e0c1544c30..a827cfd8a4 100644 --- a/server/tools/nginx-dev/conf.d/upstream.conf +++ b/server/tools/nginx-dev/conf.d/upstream.conf @@ -1,17 +1,13 @@ upstream api { - server hollaex-kit-server-api:10010; + server hollaex-kit-server:10010; } upstream socket { ip_hash; - server hollaex-kit-server-stream:10080; + server hollaex-kit-server:10080; } upstream plugins { - server hollaex-kit-server-plugins:10011; - } - - upstream web { - server hollaex-kit-web:80; + server hollaex-kit-server:10011; } \ No newline at end of file diff --git a/server/tools/nginx-dev/nginx.conf b/server/tools/nginx-dev/nginx.conf index 0aa498eaa9..ea66c628c3 100644 --- a/server/tools/nginx-dev/nginx.conf +++ b/server/tools/nginx-dev/nginx.conf @@ -70,9 +70,7 @@ server { proxy_pass http://socket; } - location / { - proxy_pass http://web; - } + error_page 429 /429.html; location = /429.html { From bb8d1fb7a75bc5ce2cb3d8e9c6991ed374d3ccd3 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 13 Mar 2024 22:16:53 +0900 Subject: [PATCH 041/115] env update --- .gitignore | 1 + server/hollaex-kit.env | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index cb5b398375..7bef90e650 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ build web/CNAME server/tools/hollaex-kit.env.local server/tools/nginx-dev/logs/* +nginx/logs/* # misc web/.DS_Store diff --git a/server/hollaex-kit.env b/server/hollaex-kit.env index bc34a4a00a..314eeca4f6 100644 --- a/server/hollaex-kit.env +++ b/server/hollaex-kit.env @@ -34,15 +34,16 @@ WEBSOCKET_PORT=10080 ACTIVATION_CODE= API_KEY= API_SECRET= -DB_HOST=hollaex-kit-db + +DB_HOST=hollaex-kit-prod-db DB_NAME=hollaex DB_PASSWORD=my-secure-db-password DB_PORT=5432 DB_USERNAME=hollaex -PUBSUB_HOST=hollaex-kit-redis +PUBSUB_HOST=hollaex-kit-prod-redis PUBSUB_PASSWORD=my-secure-redis-password PUBSUB_PORT=6379 -REDIS_HOST=hollaex-kit-redis +REDIS_HOST=hollaex-kit-prod-redis REDIS_PASSWORD=my-secure-redis-password REDIS_PORT=6379 SECRET=my-secure-secret From 49fd0e5783abab0a36967715d567826389ad6231 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 13 Mar 2024 22:21:57 +0900 Subject: [PATCH 042/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-bb8d1fb --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index a9a702234a..3900bc284c 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-bb8d1fb build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-bb8d1fb build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.9.5-cli-deprecation-d1db408 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-bb8d1fb build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index d81e8337f7..e63153f837 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-c80740e +dockerTag: 2.10.0-cli-deprecation-bb8d1fb imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index dfaff2f896..3decf3b0bc 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-c80740e-web +dockerTag: 2.10.0-cli-deprecation-bb8d1fb-web imagePullSecrets: - name: docker-registry-secret stable: From 646a69695e7fbf24650c58fa3f0e1d3259ba9533 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 13 Mar 2024 22:48:16 +0900 Subject: [PATCH 043/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-51f37e8 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 3900bc284c..c43fc8350b 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-bb8d1fb + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-51f37e8 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-bb8d1fb + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-51f37e8 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-bb8d1fb + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-51f37e8 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index e63153f837..12d66902da 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-bb8d1fb +dockerTag: 2.10.0-cli-deprecation-51f37e8 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 3decf3b0bc..23c3eda795 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-bb8d1fb-web +dockerTag: 2.10.0-cli-deprecation-51f37e8-web imagePullSecrets: - name: docker-registry-secret stable: From a83f4b9e271071127b9952720ba7fe164c3ec52c Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 13 Mar 2024 23:18:25 +0900 Subject: [PATCH 044/115] Update nginx.conf --- server/tools/nginx-dev/nginx.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/server/tools/nginx-dev/nginx.conf b/server/tools/nginx-dev/nginx.conf index ea66c628c3..72017cb9d0 100644 --- a/server/tools/nginx-dev/nginx.conf +++ b/server/tools/nginx-dev/nginx.conf @@ -69,6 +69,28 @@ server { proxy_pass http://socket; } + + location /v2 { + proxy_pass http://api; + + limit_req zone=api burst=14 nodelay; + limit_req_log_level notice; + limit_req_status 429; + + rewrite /api(/|$)(.*) /$2 break; + + } + + location /plugins { + proxy_pass http://plugins; + + limit_req zone=api burst=14 nodelay; + limit_req_log_level notice; + limit_req_status 429; + + rewrite /api(/|$)(.*) /$2 break; + + } From 9b9461cc91c8bbbc499a6cd38126096448ed1f30 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 13 Mar 2024 23:20:00 +0900 Subject: [PATCH 045/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-399ad2f --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index c43fc8350b..5b6c022338 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-51f37e8 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-399ad2f build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-51f37e8 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-399ad2f build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-51f37e8 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-399ad2f build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 12d66902da..f0385b7714 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-51f37e8 +dockerTag: 2.10.0-cli-deprecation-399ad2f imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 23c3eda795..cd2ac37efb 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-51f37e8-web +dockerTag: 2.10.0-cli-deprecation-399ad2f-web imagePullSecrets: - name: docker-registry-secret stable: From 9d47d47808e38b217a893add6902dcfcd38f1d75 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 26 Apr 2024 18:17:32 +0900 Subject: [PATCH 046/115] Update deployment.yaml --- .../helm-chart/hollaex-kit-server/templates/deployment.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml index 6e43748c7a..99df801a52 100644 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/deployment.yaml @@ -5,6 +5,7 @@ metadata: labels: app: {{.Release.Name}} role: {{.Release.Namespace}} + deployment_mode: {{.Values.DEPLOYMENT_MODE}} name: {{.Release.Name}} namespace: {{.Release.Namespace}} spec: @@ -42,6 +43,7 @@ spec: labels: app: {{.Release.Name}} role: {{.Release.Namespace}} + deployment_mode: {{.Values.DEPLOYMENT_MODE}} tier: backend spec: From ce876b89f9630d8e25d63717ffff70d11569b072 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Fri, 26 Apr 2024 18:21:18 +0900 Subject: [PATCH 047/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-9d47d47 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 5b6c022338..005133fbd8 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-399ad2f + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9d47d47 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-399ad2f + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9d47d47 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-399ad2f + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9d47d47 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index f0385b7714..707962bebf 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-399ad2f +dockerTag: 2.10.0-cli-deprecation-9d47d47 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index cd2ac37efb..c7c0aeae42 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-399ad2f-web +dockerTag: 2.10.0-cli-deprecation-9d47d47-web imagePullSecrets: - name: docker-registry-secret stable: From 49a2a3bccb6670181bf7defb4b91e4cf012c5f16 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 27 Apr 2024 18:53:33 +0900 Subject: [PATCH 048/115] ISSUER setup based on the API_NAME --- server/hollaex-kit.env | 1 + settings/configmap | 2 ++ 2 files changed, 3 insertions(+) diff --git a/server/hollaex-kit.env b/server/hollaex-kit.env index 314eeca4f6..7ba81707d3 100644 --- a/server/hollaex-kit.env +++ b/server/hollaex-kit.env @@ -3,6 +3,7 @@ DB_DIALECT=postgres ADMIN_EMAIL= API_HOST=http://localhost/api API_NAME=hollaex-kit +ISSUER=$API_NAME CURRENCIES=xht,usdt DB_SSL=false DEFAULT_THEME=dark diff --git a/settings/configmap b/settings/configmap index 543b58938d..83050ee66e 100644 --- a/settings/configmap +++ b/settings/configmap @@ -159,3 +159,5 @@ ENVIRONMENT_WEB_SERVER_REPLICAS=1 ENVIRONMENT_KUBERNETES_API_HPA_ENABLE=false ENVIRONMENT_KUBERNETES_STREAM_HPA_ENABLE=false ENVIRONMENT_KUBERNETES_WEB_HPA_ENABLE=false + +HOLLAEX_CONFIGMAP_ISSUER=$ENVIRONMENT_EXCHANGE_NAME \ No newline at end of file From cbf91701c505c122768e652429cb9a4b1280b96c Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sat, 27 Apr 2024 18:54:36 +0900 Subject: [PATCH 049/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-49a2a3b --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 005133fbd8..f91b209a06 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9d47d47 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-49a2a3b build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9d47d47 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-49a2a3b build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9d47d47 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-49a2a3b build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 707962bebf..77710259c5 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-9d47d47 +dockerTag: 2.10.0-cli-deprecation-49a2a3b imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index c7c0aeae42..8df7da463f 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-9d47d47-web +dockerTag: 2.10.0-cli-deprecation-49a2a3b-web imagePullSecrets: - name: docker-registry-secret stable: From a64772d89a3209e04a1e89de7058d41f6f25b94f Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 14 May 2024 22:06:10 +0900 Subject: [PATCH 050/115] kit update --- nginx/conf.d/upstream-web.conf | 4 + nginx/nginx.conf | 4 +- .../hollaex-kit-server/templates/job.yaml | 190 ++++++++++++++++++ settings/configmap | 2 +- settings/secret | 7 +- 5 files changed, 200 insertions(+), 7 deletions(-) create mode 100644 nginx/conf.d/upstream-web.conf create mode 100644 server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/job.yaml diff --git a/nginx/conf.d/upstream-web.conf b/nginx/conf.d/upstream-web.conf new file mode 100644 index 0000000000..bb4ba79614 --- /dev/null +++ b/nginx/conf.d/upstream-web.conf @@ -0,0 +1,4 @@ + + upstream web { + server hollaex-kit-web:80; + } \ No newline at end of file diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 0aa498eaa9..bbb140a7d2 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -12,7 +12,7 @@ events { http { include /etc/nginx/mime.types; include /etc/nginx/proxy.conf; - include /etc/nginx/conf.d/upstream.conf; + include /etc/nginx/conf.d/upstream*.conf; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $status ' @@ -29,7 +29,7 @@ http { # SERVER BLOCK server { listen 80; - server_name _; + server_name _; #Server domain set $req_filtered $request; if ($req_filtered ~ (.*)key=[^&]*(.*)) { diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/job.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/job.yaml new file mode 100644 index 0000000000..959e5e0b54 --- /dev/null +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/job.yaml @@ -0,0 +1,190 @@ +{{- if .Values.job.enable }} + +apiVersion: batch/v1 +kind: Job +metadata: + labels: + app: {{.Release.Name}} + role: {{.Release.Namespace}} + name: {{.Release.Name}} + namespace: {{.Release.Namespace}} +spec: + template: + spec: + +{{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} +{{- end }} + + containers: + - name: {{.Release.Name}} + image: {{.Values.imageRegistry}}:{{.Values.dockerTag}} + command: ["/bin/bash", "-c"] + +{{- if eq .Values.job.mode "add_coin" }} + + args: + - node tools/dbs/addCoin.js; + +{{- else if eq .Values.job.mode "remove_coin" }} + + args: + - node tools/dbs/removeCoin.js; + +{{- else if eq .Values.job.mode "add_pair" }} + + args: + - node tools/dbs/addPair.js; + +{{- else if eq .Values.job.mode "remove_pair" }} + + args: + - node tools/dbs/removePair.js; + +{{- else if eq .Values.job.mode "set_activation_code" }} + + args: + - node tools/dbs/setActivationCode.js; + +{{- else if eq .Values.job.mode "check_constants" }} + + args: + - node tools/dbs/checkConstants.js; + +{{- else if eq .Values.job.mode "set_config" }} + + args: + - node tools/dbs/setConfig.js; + +{{- else if eq .Values.job.mode "set_security" }} + + args: + - node tools/dbs/setSecurity.js; + +{{- else if eq .Values.job.mode "hollaex_upgrade" }} + + args: + - sequelize db:migrate; + node tools/dbs/runTriggers.js; + node tools/dbs/checkConfig.js; + node tools/dbs/setKitVersion.js; + +{{- else if eq .Values.job.mode "changeEmail" }} + + args: + - node tools/dbs/changeEmail.js; + +{{- end }} + + imagePullPolicy: Always + + envFrom: + - configMapRef: + name: {{.Values.envName}} + - secretRef: + name: {{.Values.secretName}} + + env: + +{{- if eq .Values.job.mode "add_coin" }} + + - name: COIN_SYMBOL + value: {{.Values.job.env.coin_symbol}} + - name: COIN_FULLNAME + value: {{.Values.job.env.coin_fullname}} + - name: COIN_ALLOW_DEPOSIT + value: {{.Values.job.env.coin_allow_deposit | quote }} + - name: COIN_ALLOW_WITHDRAWAL + value: {{.Values.job.env.coin_allow_withdrawal | quote }} + - name: COIN_WITHDRAWAL_FEE + value: {{.Values.job.env.coin_withdrawal_fee | quote }} + - name: COIN_MIN + value: {{.Values.job.env.coin_min | quote }} + - name: COIN_MAX + value: {{.Values.job.env.coin_max | quote }} + - name: COIN_INCREMENT_UNIT + value: {{.Values.job.env.coin_increment_unit | quote }} + - name: COIN_DEPOSIT_LIMITS + value: {{.Values.job.env.coin_deposit_limits | quote}} + - name: COIN_WITHDRAWAL_LIMITS + value: {{.Values.job.env.coin_withdrawal_limits | quote }} + - name: COIN_ACTIVE + value: {{.Values.job.env.coin_active | quote }} + +{{- else if eq .Values.job.mode "remove_coin" }} + + - name: COIN_SYMBOL + value: {{.Values.job.env.coin_symbol}} + +{{- else if eq .Values.job.mode "add_pair" }} + + - name: PAIR_NAME + value: {{.Values.job.env.pair_name}} + - name: PAIR_BASE + value: {{.Values.job.env.pair_base}} + - name: PAIR_2 + value: {{.Values.job.env.pair_2}} + - name: TAKER_FEES + value: {{.Values.job.env.taker_fees | quote }} + - name: MAKER_FEES + value: {{.Values.job.env.maker_fees | quote }} + - name: MIN_SIZE + value: {{.Values.job.env.min_size | quote }} + - name: MAX_SIZE + value: {{.Values.job.env.max_size | quote }} + - name: MIN_PRICE + value: {{.Values.job.env.min_price | quote }} + - name: MAX_PRICE + value: {{.Values.job.env.max_price | quote }} + - name: INCREMENT_SIZE + value: {{.Values.job.env.increment_size | quote }} + - name: INCREMENT_PRICE + value: {{.Values.job.env.increment_price | quote }} + - name: PAIR_ACTIVE + value: {{.Values.job.env.pair_active | quote }} + +{{- else if eq .Values.job.mode "remove_pair" }} + + - name: PAIR_NAME + value: {{.Values.job.env.pair_name}} + +{{- else if eq .Values.job.mode "set_activation_code" }} + + - name: ACTIVATION_CODE + value: "{{.Values.job.env.activation_code}}" + +{{- else if eq .Values.job.mode "set_security" }} + + - name: ALLOWED_DOMAINS + value: "{{.Values.job.env.allowed_domains}}" + - name: ADMIN_WHITELIST_IP + value: "{{.Values.job.env.admin_whitelist_ip}}" + - name: CAPTCHA_SITE_KEY + value: "{{.Values.job.env.captcha_site_key}}" + - name: CAPTCHA_SECRET_KEY + value: "{{.Values.job.env.captcha_secret_key}}" + +{{- else if eq .Values.job.mode "changeEmail" }} + + - name: USER_ID + value: "{{.Values.job.env.targetUserID}}" + - name: EMAIL + value: "{{.Values.job.env.newUserEmail}}" + +{{- end }} + + resources: + limits: + memory: "500Mi" + requests: + memory: "100Mi" + cpu: "15m" + +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + restartPolicy: Never + backoffLimit: 0 +{{- end }} \ No newline at end of file diff --git a/settings/configmap b/settings/configmap index 83050ee66e..12fda4d941 100644 --- a/settings/configmap +++ b/settings/configmap @@ -76,7 +76,7 @@ ENVIRONMENT_KUBERNETES_REDIS_NODESELECTOR="{}" ENVIRONMENT_KUBERNETES_EXCHANGE_STATEFUL_NODESELECTOR="{}" ENVIRONMENT_KUBERNETES_EXCHANGE_STATELESS_NODESELECTOR="{}" -ENVIRONMENT_DOCKER_IMAGE_VERSION=2.2.0 +ENVIRONMENT_DOCKER_IMAGE_VERSION=2.10.2 ENVIRONMENT_DOCKER_IMAGE_POSTGRESQL_REGISTRY=postgres ENVIRONMENT_DOCKER_IMAGE_POSTGRESQL_VERSION=14.9-alpine diff --git a/settings/secret b/settings/secret index 87f220c5f1..169070c2ed 100644 --- a/settings/secret +++ b/settings/secret @@ -8,18 +8,18 @@ HOLLAEX_SECRET_ACTIVATION_CODE= #### ADVANCED SECRET CONFIGURATIONS #### ######################################## -HOLLAEX_SECRET_REDIS_HOST=$ENVIRONMENT_EXCHANGE_NAME-redis +HOLLAEX_SECRET_REDIS_HOST=$ENVIRONMENT_EXCHANGE_NAME-prod-redis HOLLAEX_SECRET_REDIS_PORT=6379 HOLLAEX_SECRET_REDIS_PASSWORD= -HOLLAEX_SECRET_PUBSUB_HOST=$ENVIRONMENT_EXCHANGE_NAME-redis +HOLLAEX_SECRET_PUBSUB_HOST=$ENVIRONMENT_EXCHANGE_NAME-prod-redis HOLLAEX_SECRET_PUBSUB_PORT=6379 HOLLAEX_SECRET_PUBSUB_PASSWORD= HOLLAEX_SECRET_DB_NAME=hollaex HOLLAEX_SECRET_DB_USERNAME=hollaex HOLLAEX_SECRET_DB_PASSWORD= -HOLLAEX_SECRET_DB_HOST=$ENVIRONMENT_EXCHANGE_NAME-db +HOLLAEX_SECRET_DB_HOST=$ENVIRONMENT_EXCHANGE_NAME-prod-db HOLLAEX_SECRET_DB_PORT=5432 ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_HOST=docker.io @@ -39,4 +39,3 @@ HOLLAEX_SECRET_SMTP_PASSWORD= #### AUTOMATICALLY GENERATED PASSWORDS GONNA BE STORED DOWN BELOW #### ###################################################################### -HOLLAEX_SECRET_SECRET= \ No newline at end of file From 083d7eb3db2514c109eb4565d401d1a02274e038 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Tue, 14 May 2024 22:10:01 +0900 Subject: [PATCH 051/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-a64772d --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index f91b209a06..c75abf0e2d 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-49a2a3b + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a64772d build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-49a2a3b + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a64772d build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-49a2a3b + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a64772d build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 77710259c5..781bae0fa5 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-49a2a3b +dockerTag: 2.10.0-cli-deprecation-a64772d imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 8df7da463f..c2f15b2078 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-49a2a3b-web +dockerTag: 2.10.0-cli-deprecation-a64772d-web imagePullSecrets: - name: docker-registry-secret stable: From 6386c194bc8f20f6f76b5ba1b078f21673fb7ec9 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 15 May 2024 14:36:08 +0900 Subject: [PATCH 052/115] Update install.sh --- install.sh | 94 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 70 insertions(+), 24 deletions(-) diff --git a/install.sh b/install.sh index b96ea71a80..2b3f89e200 100644 --- a/install.sh +++ b/install.sh @@ -1,18 +1,20 @@ #!/bin/bash +export ARCH=$(echo uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/s390x/s390x/) + # Dependencies installer for Debian (Ubuntu) based Linux. -if command apt-get -v > /dev/null 2>&1; then +if command apt -v > /dev/null 2>&1; then if ! command curl --version > /dev/null 2>&1; then printf "\n\033[93mHollaEx CLI requires CURL to operate. Installing it now...\033[39m\n" echo "Updating APT list" - sudo apt-get update + sudo apt update IS_APT_UPDATED=true echo "Installing Docker" - if command sudo apt-get install -y curl; then + if command sudo apt install -y curl; then printf "\n\033[92mCURL has been successfully installed!\033[39m\n" echo "Info: $(curl --version)" @@ -20,7 +22,7 @@ if command apt-get -v > /dev/null 2>&1; then else printf "\n\033[91mFailed to install CURL.\033[39m\n" - echo "Please review the logs and try to manually install it. - 'sudo apt-get install -y curl'." + echo "Please review the logs and try to manually install it. - 'sudo apt install -y curl'." exit 1; fi @@ -32,11 +34,11 @@ if command apt-get -v > /dev/null 2>&1; then printf "\n\033[93mHollaEx CLI requires Docker to operate. Installing it now...\033[39m\n" echo "Updating APT list" - sudo apt-get update + sudo apt update IS_APT_UPDATED=true echo "Installing Docker" - if command sudo apt-get install -y docker.io; then + if command sudo apt install -y docker.io; then printf "\n\033[92mDocker has been successfully installed!\033[39m\n" echo "Info: $(docker -v)" @@ -51,33 +53,33 @@ if command apt-get -v > /dev/null 2>&1; then else printf "\n\033[91mFailed to install Docker.\033[39m\n" - echo "Please review the logs and try to manually install it. - 'sudo apt-get install -y docker.io'." + echo "Please review the logs and try to manually install it. - 'sudo apt install -y docker.io'." exit 1; fi fi - if ! command docker-compose -v > /dev/null 2>&1; then + if ! command docker compose version > /dev/null 2>&1; then - printf "\n\033[93mHollaEx CLI requires Docker-Compose to operate. Installing it now...\033[39m\n" + printf "\n\033[93mHollaEx CLI requires Docker-Compose v2 to operate. Installing it now...\033[39m\n" if [[ ! $IS_APT_UPDATED ]]; then echo "Updating APT list" - sudo apt-get update + sudo apt update fi - if command sudo apt-get install -y docker-compose; then + if command sudo apt install -y docker-compose-v2; then - printf "\n\033[92mDocker-Compose has been successfully installed!\033[39m\n" + printf "\n\033[92mDocker-Compose v2 has been successfully installed!\033[39m\n" - echo "Info: $(docker-compose -v)" + echo "Info: $(docker compose version)" else - printf "\n\033[91mFailed to install Docker-Compose.\033[39m\n" - echo "Please review the logs and try to manually install it. - 'sudo apt-get install -y docker-compose'." + printf "\n\033[91mFailed to install Docker-Compose v2.\033[39m\n" + echo "Please review the logs and try to manually install it. - 'sudo apt install -y docker-compose'." exit 1; fi @@ -91,10 +93,10 @@ if command apt-get -v > /dev/null 2>&1; then if [[ ! $IS_APT_UPDATED ]]; then echo "Updating APT list" - sudo apt-get update + sudo apt update fi - if command sudo apt-get install -y jq; then + if command sudo apt install -y jq; then printf "\n\033[92mjq has been successfully installed!\033[39m\n" @@ -103,7 +105,34 @@ if command apt-get -v > /dev/null 2>&1; then else printf "\n\033[91mFailed to install jq.\033[39m\n" - echo "Please review the logs and try to manually install it. - 'sudo apt-get install -y jq'." + echo "Please review the logs and try to manually install it. - 'sudo apt install -y jq'." + + fi + + fi + + if ! command yq --version > /dev/null 2>&1; then + + printf "\n\033[93mHollaEx CLI requires yq to operate. Installing it now...\033[39m\n" + + if [[ ! $IS_APT_UPDATED ]]; then + + echo "Updating APT list" + sudo apt update + fi + + if command sudo curl -L https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_$(uname -s)_$ARCH -o /usr/local/bin/yq; then + + chmod +x /usr/local/bin/yq + + printf "\n\033[92myq has been successfully installed!\033[39m\n" + + echo "Info: $(yq --version)" + + else + + printf "\n\033[91mFailed to install jq.\033[39m\n" + echo "Please review the logs and try to manually install it. - 'sudo apt install -y jq'." fi @@ -116,10 +145,10 @@ if command apt-get -v > /dev/null 2>&1; then if [[ ! $IS_APT_UPDATED ]]; then echo "Updating APT list" - sudo apt-get update + sudo apt update fi - if command sudo apt-get install -y dnsutils; then + if command sudo apt install -y dnsutils; then printf "\n\033[92mnslookup(dnsutils) has been successfully installed!\033[39m\n" @@ -129,7 +158,7 @@ if command apt-get -v > /dev/null 2>&1; then else printf "\n\033[91mFailed to install nslookup.\033[39m\n" - echo "Please review the logs and try to manually install it. - 'sudo apt-get install -y dnsutils'." + echo "Please review the logs and try to manually install it. - 'sudo apt install -y dnsutils'." fi @@ -142,11 +171,11 @@ if command apt-get -v > /dev/null 2>&1; then if [[ ! $IS_APT_UPDATED ]]; then echo "Updating APT list" - sudo apt-get update + sudo apt update fi echo "Installing Docker" - if command sudo apt-get install -y postgresql-client; then + if command sudo apt install -y postgresql-client; then printf "\n\033[92mPSQL Client has been successfully installed!\033[39m\n" echo "Info: $(psql --version)" @@ -154,7 +183,7 @@ if command apt-get -v > /dev/null 2>&1; then else printf "\n\033[91mFailed to install PSQL Client.\033[39m\n" - echo "Please review the logs and try to manually install it. - 'sudo apt-get install -y postgresql-client'." + echo "Please review the logs and try to manually install it. - 'sudo apt install -y postgresql-client'." exit 1; fi @@ -486,6 +515,12 @@ if ! command docker -v > /dev/null 2>&1 || ! command docker-compose -v > /dev/nu IS_PSQL_CLIENT_INSTALLED=true fi + + if command yq --version > /dev/null 2>&1; then + + IS_YQ_CLIENT_INSTALLED=true + + fi printf "\n\033[93mNote: HollaEx CLI requires Docker, Docker-Compose, and jq to operate.\033[39m\n\n" @@ -554,6 +589,17 @@ if ! command docker -v > /dev/null 2>&1 || ! command docker-compose -v > /dev/nu fi + # yq installation status check + if [[ "$IS_YQ_INSTALLED" ]]; then + + printf "\033[92myq: Installed\033[39m\n" + + else + + printf "\033[91myq: Not Installed\033[39m\n" + + fi + printf "\n\033[93mPlease install the missing one before you proceed to run exchange.\033[39m\n" else From c9dc4459d51cac59955e62fd09aa9dc6c44385bf Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 15 May 2024 14:37:19 +0900 Subject: [PATCH 053/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-6386c19 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index c75abf0e2d..9a8a6a0095 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a64772d + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6386c19 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a64772d + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6386c19 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a64772d + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6386c19 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 781bae0fa5..f0c6b975ee 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-a64772d +dockerTag: 2.10.0-cli-deprecation-6386c19 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index c2f15b2078..0f7521bc7e 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-a64772d-web +dockerTag: 2.10.0-cli-deprecation-6386c19-web imagePullSecrets: - name: docker-registry-secret stable: From 922dacb2469d277125836c526a683fd417be030a Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 15 May 2024 14:43:40 +0900 Subject: [PATCH 054/115] Update install.sh --- install.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 2b3f89e200..f8b99ffc5f 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -export ARCH=$(echo uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/s390x/s390x/) +export ARCH=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/amd64/ | sed s/s390x/s390x/) # Dependencies installer for Debian (Ubuntu) based Linux. if command apt -v > /dev/null 2>&1; then @@ -115,12 +115,6 @@ if command apt -v > /dev/null 2>&1; then printf "\n\033[93mHollaEx CLI requires yq to operate. Installing it now...\033[39m\n" - if [[ ! $IS_APT_UPDATED ]]; then - - echo "Updating APT list" - sudo apt update - fi - if command sudo curl -L https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_$(uname -s)_$ARCH -o /usr/local/bin/yq; then chmod +x /usr/local/bin/yq From 96c5fa4271a341e5802018cd81208bd38d37dfde Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 15 May 2024 14:45:02 +0900 Subject: [PATCH 055/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-02c1694 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 9a8a6a0095..64c64ca87b 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6386c19 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-02c1694 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6386c19 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-02c1694 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6386c19 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-02c1694 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index f0c6b975ee..f6c0ebba3b 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-6386c19 +dockerTag: 2.10.0-cli-deprecation-02c1694 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 0f7521bc7e..c650e0052e 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-6386c19-web +dockerTag: 2.10.0-cli-deprecation-02c1694-web imagePullSecrets: - name: docker-registry-secret stable: From 9528d746bb47681acd73d81e6f5f7af04713d286 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 15 May 2024 15:14:02 +0900 Subject: [PATCH 056/115] Update install.sh --- install.sh | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/install.sh b/install.sh index f8b99ffc5f..2384c12331 100644 --- a/install.sh +++ b/install.sh @@ -62,7 +62,7 @@ if command apt -v > /dev/null 2>&1; then if ! command docker compose version > /dev/null 2>&1; then - printf "\n\033[93mHollaEx CLI requires Docker-Compose v2 to operate. Installing it now...\033[39m\n" + printf "\n\033[93mHollaEx CLI requires docker compose v2 to operate. Installing it now...\033[39m\n" if [[ ! $IS_APT_UPDATED ]]; then @@ -70,16 +70,16 @@ if command apt -v > /dev/null 2>&1; then sudo apt update fi - if command sudo apt install -y docker-compose-v2; then + if command sudo apt install -y docker compose-v2; then - printf "\n\033[92mDocker-Compose v2 has been successfully installed!\033[39m\n" + printf "\n\033[92mdocker compose v2 has been successfully installed!\033[39m\n" echo "Info: $(docker compose version)" else - printf "\n\033[91mFailed to install Docker-Compose v2.\033[39m\n" - echo "Please review the logs and try to manually install it. - 'sudo apt install -y docker-compose'." + printf "\n\033[91mFailed to install docker compose v2.\033[39m\n" + echo "Please review the logs and try to manually install it. - 'sudo apt install -y docker compose'." exit 1; fi @@ -125,7 +125,7 @@ if command apt -v > /dev/null 2>&1; then else - printf "\n\033[91mFailed to install jq.\033[39m\n" + printf "\n\033[91mFailed to install yq.\033[39m\n" echo "Please review the logs and try to manually install it. - 'sudo apt install -y jq'." fi @@ -251,9 +251,9 @@ elif command brew -v > /dev/null 2>&1; then fi - if ! command docker-compose -v > /dev/null 2>&1; then + if ! command docker compose version > /dev/null 2>&1; then - printf "\n\033[93mHollaEx CLI requires Docker-Compose to operate. Installing it now...\033[39m\n" + printf "\n\033[93mHollaEx CLI requires docker compose to operate. Installing it now...\033[39m\n" if [[ ! $IS_BREW_UPDATED ]]; then @@ -261,16 +261,16 @@ elif command brew -v > /dev/null 2>&1; then brew update fi - if command brew install docker-compose; then + if command brew install docker compose; then - printf "\n\033[92mDocker-Compose has been successfully installed!\033[39m\n" + printf "\n\033[92mdocker compose has been successfully installed!\033[39m\n" - echo "Info: $(docker-compose -v)" + echo "Info: $(docker compose version)" else - printf "\n\033[91mFailed to install Docker-Compose.\033[39m\n" - echo "Please review the logs and try to manually install it. - 'brew install docker-compose'." + printf "\n\033[91mFailed to install docker compose.\033[39m\n" + echo "Please review the logs and try to manually install it. - 'brew install docker compose'." exit 1; fi @@ -389,21 +389,21 @@ elif command yum --version > /dev/null 2>&1; then fi - if ! command docker-compose -v > /dev/null 2>&1; then + if ! command docker compose version > /dev/null 2>&1; then - printf "\n\033[93mHollaEx CLI requires Docker-Compose to operate. Installing it now...\033[39m\n" + printf "\n\033[93mHollaEx CLI requires docker compose to operate. Installing it now...\033[39m\n" - if command sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose; then + if command sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker compose; then - sudo chmod +x /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker compose - printf "\n\033[92mDocker-Compose has been successfully installed!\033[39m\n" + printf "\n\033[92mdocker compose has been successfully installed!\033[39m\n" - echo "Info: $(docker-compose -v)" + echo "Info: $(docker compose version)" else - printf "\n\033[91mFailed to install Docker-Compose.\033[39m\n" + printf "\n\033[91mFailed to install docker compose.\033[39m\n" echo "Please review the logs and try to manually install it. - 'https://github.com/docker/compose/releases'." exit 1; @@ -472,7 +472,7 @@ elif command yum --version > /dev/null 2>&1; then fi -if ! command docker -v > /dev/null 2>&1 || ! command docker-compose -v > /dev/null 2>&1 || ! command curl --version > /dev/null 2>&1 || ! command jq --version > /dev/null 2>&1 || ! command nslookup -version > /dev/null 2>&1 || ! command psql --version > /dev/null 2>&1; then +if ! command docker -v > /dev/null 2>&1 || ! command docker compose version > /dev/null 2>&1 || ! command curl --version > /dev/null 2>&1 || ! command jq --version > /dev/null 2>&1 || ! command nslookup -version > /dev/null 2>&1 || ! command psql --version > /dev/null 2>&1; then if command docker -v > /dev/null 2>&1; then @@ -480,7 +480,7 @@ if ! command docker -v > /dev/null 2>&1 || ! command docker-compose -v > /dev/nu fi - if command docker-compose -v > /dev/null 2>&1; then + if command docker compose version > /dev/null 2>&1; then IS_DOCKER_COMPOSE_INSTALLED=true @@ -516,7 +516,7 @@ if ! command docker -v > /dev/null 2>&1 || ! command docker-compose -v > /dev/nu fi - printf "\n\033[93mNote: HollaEx CLI requires Docker, Docker-Compose, and jq to operate.\033[39m\n\n" + printf "\n\033[93mNote: HollaEx CLI requires Docker, docker compose, and jq to operate.\033[39m\n\n" # Docker installation status chekc if [[ "$IS_DOCKER_INSTALLED" ]]; then @@ -529,14 +529,14 @@ if ! command docker -v > /dev/null 2>&1 || ! command docker-compose -v > /dev/nu fi - # Docker-compose installation status check + # docker compose installation status check if [[ "$IS_DOCKER_COMPOSE_INSTALLED" ]]; then - printf "\033[92mDocker-Compose: Installed\033[39m\n" + printf "\033[92mdocker compose: Installed\033[39m\n" else - printf "\033[91mDocker-Compose: Not Installed\033[39m\n" + printf "\033[91mdocker compose: Not Installed\033[39m\n" fi From 8c96b328bce3fbd4b1a94a7cf485c596d5c0c1e0 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 15 May 2024 15:15:21 +0900 Subject: [PATCH 057/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-f0691bf --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 64c64ca87b..ab7182bcec 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-02c1694 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-f0691bf build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-02c1694 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-f0691bf build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-02c1694 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-f0691bf build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index f6c0ebba3b..c81ec50aa0 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-02c1694 +dockerTag: 2.10.0-cli-deprecation-f0691bf imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index c650e0052e..3a3b136e40 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-02c1694-web +dockerTag: 2.10.0-cli-deprecation-f0691bf-web imagePullSecrets: - name: docker-registry-secret stable: From 7cee7e776914cfd521d7796187c382d6a80a559b Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 15 May 2024 15:16:45 +0900 Subject: [PATCH 058/115] Update install.sh --- install.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/install.sh b/install.sh index 2384c12331..db0472fcbf 100644 --- a/install.sh +++ b/install.sh @@ -302,6 +302,31 @@ elif command brew -v > /dev/null 2>&1; then fi + if ! command yq --version > /dev/null 2>&1; then + + printf "\n\033[93mHollaEx CLI requires yq to operate. Installing it now...\033[39m\n" + + if [[ ! $IS_BREW_UPDATED ]]; then + + echo "Updating Homebrew list" + brew update + fi + + if command brew install yq; then + + printf "\n\033[92myq has been successfully installed!\033[39m\n" + + echo "Info: $(yq --version)" + + else + + printf "\n\033[91mFailed to install yq.\033[39m\n" + echo "Please review the logs and try to manually install it. - 'brew install yq'." + + fi + + fi + if ! command psql --version > /dev/null 2>&1; then printf "\n\033[93mHollaEx CLI requires PSQL Client to operate. Installing it now...\033[39m\n" @@ -430,6 +455,27 @@ elif command yum --version > /dev/null 2>&1; then fi + if ! command yq --version > /dev/null 2>&1; then + + printf "\n\033[93mHollaEx CLI requires yq to operate. Installing it now...\033[39m\n" + + if command sudo curl -L https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_$(uname -s)_$ARCH -o /usr/local/bin/yq; then + + chmod +x /usr/local/bin/yq + + printf "\n\033[92myq has been successfully installed!\033[39m\n" + + echo "Info: $(yq --version)" + + else + + printf "\n\033[91mFailed to install yq.\033[39m\n" + echo "Please review the logs and try to manually install it. - 'sudo apt install -y jq'." + + fi + + fi + if ! command nslookup -version > /dev/null 2>&1; then printf "\n\033[93mHollaEx CLI requires nslookup to operate. Installing it now...\033[39m\n" From f7939b1b7ce6480883eb7afe832e5151b44fd818 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 15 May 2024 15:21:28 +0900 Subject: [PATCH 059/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-28205af --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index ab7182bcec..56fa21027f 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-f0691bf + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-28205af build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-f0691bf + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-28205af build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-f0691bf + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-28205af build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index c81ec50aa0..4e64da0277 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-f0691bf +dockerTag: 2.10.0-cli-deprecation-28205af imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 3a3b136e40..343452ec2f 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-f0691bf-web +dockerTag: 2.10.0-cli-deprecation-28205af-web imagePullSecrets: - name: docker-registry-secret stable: From 787156f6c41d9a9f4dd5fb0c5a0ad1184eb6e17a Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Wed, 15 May 2024 17:17:40 +0900 Subject: [PATCH 060/115] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index db0472fcbf..5e8996ce39 100644 --- a/install.sh +++ b/install.sh @@ -70,7 +70,7 @@ if command apt -v > /dev/null 2>&1; then sudo apt update fi - if command sudo apt install -y docker compose-v2; then + if command sudo apt install -y docker-compose-v2; then printf "\n\033[92mdocker compose v2 has been successfully installed!\033[39m\n" From e04ccbad96850f4a39eb3509ebe9c066c181d2eb Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Wed, 15 May 2024 17:18:47 +0900 Subject: [PATCH 061/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-9670ec7 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 56fa21027f..c153d67459 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-28205af + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9670ec7 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-28205af + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9670ec7 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-28205af + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9670ec7 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 4e64da0277..30d6fc6c84 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-28205af +dockerTag: 2.10.0-cli-deprecation-9670ec7 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 343452ec2f..5b12124af3 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-28205af-web +dockerTag: 2.10.0-cli-deprecation-9670ec7-web imagePullSecrets: - name: docker-registry-secret stable: From 1628b573586d71912294d4bd35103d083c85049d Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 16 May 2024 23:09:33 +0900 Subject: [PATCH 062/115] docker compose prefix update --- nginx/docker-compose.yaml | 2 +- web/docker-compose.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml index 837cd2e6f9..af3afd9241 100644 --- a/nginx/docker-compose.yaml +++ b/nginx/docker-compose.yaml @@ -1,6 +1,6 @@ version: '3' +name: "server" services: - hollaex-kit-prod-nginx: image: nginx-with-certbot build: diff --git a/web/docker-compose.yaml b/web/docker-compose.yaml index 51f4d33626..bb5bdd09b2 100644 --- a/web/docker-compose.yaml +++ b/web/docker-compose.yaml @@ -1,4 +1,5 @@ version: '3' +name: "client" services: hollaex-kit-web: image: hollaex-kit-web From 0b57c7a5b7157c651875ee1fd832327aea835b56 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Thu, 16 May 2024 23:10:50 +0900 Subject: [PATCH 063/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-1628b57 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index c153d67459..6b54054b77 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9670ec7 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-1628b57 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9670ec7 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-1628b57 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9670ec7 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-1628b57 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 30d6fc6c84..09ef31a9a7 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-9670ec7 +dockerTag: 2.10.0-cli-deprecation-1628b57 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 5b12124af3..bd394973dd 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-9670ec7-web +dockerTag: 2.10.0-cli-deprecation-1628b57-web imagePullSecrets: - name: docker-registry-secret stable: From 89be5455a4111a759c5b64575fe7af11cf675684 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 21 May 2024 21:55:27 +0900 Subject: [PATCH 064/115] patch --- server/tools/kubernetes/env/secret.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-postgres/values.yaml | 2 +- settings/configmap | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/tools/kubernetes/env/secret.yaml b/server/tools/kubernetes/env/secret.yaml index 102e30b980..7c155c6374 100644 --- a/server/tools/kubernetes/env/secret.yaml +++ b/server/tools/kubernetes/env/secret.yaml @@ -8,15 +8,15 @@ stringData: ACTIVATION_CODE: '' API_KEY: '' API_SECRET: '' - DB_HOST: 'hollaex-kit-db' + DB_HOST: 'hollaex-kit-prod-db' DB_NAME: 'hollaex' DB_PASSWORD: 'my-secure-db-password' DB_PORT: '5432' DB_USERNAME: 'hollaex' - PUBSUB_HOST: 'hollaex-kit-redis' + PUBSUB_HOST: 'hollaex-kit-prod-redis' PUBSUB_PASSWORD: 'my-secure-redis-password' PUBSUB_PORT: '6379' - REDIS_HOST: 'hollaex-kit-redis' + REDIS_HOST: 'hollaex-kit-prod-redis' REDIS_PASSWORD: 'my-secure-redis-password' REDIS_PORT: '6379' SECRET: 'my-secure-secret' diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml index bab2b082ad..be44aeb9ab 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-postgres/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. pvc: create: true - size: 3Gi + size: 4Gi name: hollaex-postgres-volume secretName: hollaex-kit-secret diff --git a/settings/configmap b/settings/configmap index 12fda4d941..8039bbacdc 100644 --- a/settings/configmap +++ b/settings/configmap @@ -2,7 +2,7 @@ #### All HollaEx CLI commands rely on ENVIRONMENT_EXCHANGE_NAME below. DO NOT MODIFY IT. #### ######################################################################################### -ENVIRONMENT_EXCHANGE_NAME=hollaex +ENVIRONMENT_EXCHANGE_NAME=hollaex-kit ################################ #### GENERAL CONFIGURATIONS #### From b9ad482a9c5429f773ef94788342814ca261ffb3 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Tue, 21 May 2024 21:56:29 +0900 Subject: [PATCH 065/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-89be545 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 6b54054b77..80f1e8de0c 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-1628b57 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-89be545 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-1628b57 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-89be545 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-1628b57 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-89be545 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 09ef31a9a7..225de4c6d4 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-1628b57 +dockerTag: 2.10.0-cli-deprecation-89be545 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index bd394973dd..e0c86c7360 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-1628b57-web +dockerTag: 2.10.0-cli-deprecation-89be545-web imagePullSecrets: - name: docker-registry-secret stable: From ea755903dafbbcf9e9d019f37387bafc3550fffe Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Tue, 21 May 2024 22:33:40 +0900 Subject: [PATCH 066/115] Update upstream.conf --- nginx/conf.d/upstream.conf | 4 ---- 1 file changed, 4 deletions(-) diff --git a/nginx/conf.d/upstream.conf b/nginx/conf.d/upstream.conf index e0c1544c30..74e8d74166 100644 --- a/nginx/conf.d/upstream.conf +++ b/nginx/conf.d/upstream.conf @@ -10,8 +10,4 @@ upstream plugins { server hollaex-kit-server-plugins:10011; - } - - upstream web { - server hollaex-kit-web:80; } \ No newline at end of file From a4d103d443cb3e047978dafd709bcabd31260943 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Tue, 21 May 2024 22:34:54 +0900 Subject: [PATCH 067/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-88e2d49 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 80f1e8de0c..43047450fe 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-89be545 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-88e2d49 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-89be545 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-88e2d49 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-89be545 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-88e2d49 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 225de4c6d4..cf6afa3a1b 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-89be545 +dockerTag: 2.10.0-cli-deprecation-88e2d49 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index e0c86c7360..67ab83aae9 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-89be545-web +dockerTag: 2.10.0-cli-deprecation-88e2d49-web imagePullSecrets: - name: docker-registry-secret stable: From 0accf0ffefb1b8571cf4a054aa58b1e2129cf753 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 23 May 2024 23:26:52 +0900 Subject: [PATCH 068/115] Update install.sh --- install.sh | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/install.sh b/install.sh index 5e8996ce39..4609d693c6 100644 --- a/install.sh +++ b/install.sh @@ -669,4 +669,85 @@ if [[ "$DOCKER_USERGROUP_ADDED" ]]; then fi + +function kit_cross_compatibility_converter() { + + # Detects whether the old-styled exchange is already running + if command docker ps | grep $ENVIRONMENT_EXCHANGE_NAME > /dev/null 2>&1; then + + # Message to ask user to shutdown the exchange and start over to finish the migration flow + echo "Warning: Your exchange is running with the files generated by HollaEx CLI v2, which requires a migration to the CLI v3 format." + echo "Please stop and start back your exchange by running 'hollaex stop' and 'hollaex start' to continue." + + fi + + # File conversion + if [[ -f "$(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME.env.local" ]]; then + + echo "Env file generated with HollaEx CLI v2 has been detected!" + echo "Converting it to the v3 format..." + mv $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME.env.local $(pwd)/server/hollaex-kit.env + + fi + + + if [[ -f "$(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml" ]]; then + + echo "Docker-compose file generated with HollaEx CLI v2 has been detected!" + echo "Converting the Docker-Compose file..." + yq "del(.services.$ENVIRONMENT_EXCHANGE_NAME-nginx)" $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml > $(pwd)/server/docker-compose-prod.yaml + yq e -i '.services.*.env_file[] = "hollaex-kit.env"' $(pwd)/server/docker-compose-prod.yaml + + fi + + if [[ -f "$(pwd)/templates/local/nginx/conf.d/upstream.conf" ]]; then + + echo "Nginx configuration files generated with HollaEx CLI v2 has been detected!" + echo "Copying the existing Nginx files to the new directory..." + mv $(pwd)/templates/local/nginx/conf.d/* $(pwd)/nginx/conf.d + mv $(pwd)/templates/local/nginx/nginx.conf $(pwd)/nginx/nginx.conf + + fi + + # Local web docker-compose + + if [[ -f "$(pwd)/templates/local/${ENVIRONMENT_EXCHANGE_NAME}-docker-compose-web.yaml" ]]; then + + echo "Web doker-compose file generated with HollaEx CLI v2 has been detected." + echo "Converting it..." + mv $(pwd)/templates/local/${ENVIRONMENT_EXCHANGE_NAME}-docker-compose-web.yaml $(pwd)/web/docker-compose.yaml + + fi + + # Kubernetes + # Ingress, Configmap, Secret conversion + if [[ -f "$(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-configmap.yaml" ]]; then + + echo "Kubernetes configmap generated with HollaEx CLI v2 has been detected." + echo "Converting it..." + mv $(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-configmap.yaml $(pwd)/server/tools/kubernetes/env/configmap.yaml + + fi + + if [[ -f "$(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-secret.yaml" ]]; then + + echo "Kubernetes configmap generated with HollaEx CLI v2 has been detected." + echo "Converting it..." + mv $(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-secret.yaml $(pwd)/server/tools/kubernetes/env/secret.yaml + + fi + + if [[ -f "$(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-ingress.yaml" ]]; then + + echo "Kubernetes configmap generated with HollaEx CLI v2 has been detected." + echo "Converting it..." + mv $(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-ingress.yaml $(pwd)/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml + + fi + +} + +kit_cross_compatibility_converter; + + exit 0; \ No newline at end of file From 12f115fba9f95a353618d84066b4631728b04919 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 23 May 2024 23:32:40 +0900 Subject: [PATCH 069/115] Update install.sh --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 4609d693c6..662ce38106 100644 --- a/install.sh +++ b/install.sh @@ -672,6 +672,12 @@ fi function kit_cross_compatibility_converter() { + CONFIG_FILE_PATH=$(pwd)/settings/* + + for i in ${CONFIG_FILE_PATH[@]}; do + source $i + done; + # Detects whether the old-styled exchange is already running if command docker ps | grep $ENVIRONMENT_EXCHANGE_NAME > /dev/null 2>&1; then From 2d7f705d8819c47990b35ab34b39de796ac9eaa8 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Thu, 23 May 2024 23:33:46 +0900 Subject: [PATCH 070/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-12f115f --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 43047450fe..c1b148989a 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-88e2d49 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-12f115f build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-88e2d49 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-12f115f build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-88e2d49 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-12f115f build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index cf6afa3a1b..4fac82e72a 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-88e2d49 +dockerTag: 2.10.0-cli-deprecation-12f115f imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 67ab83aae9..82f3ba942a 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-88e2d49-web +dockerTag: 2.10.0-cli-deprecation-12f115f-web imagePullSecrets: - name: docker-registry-secret stable: From b61a11cf5a581ee2e6ed96804bd82df349fac965 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 24 May 2024 00:05:29 +0900 Subject: [PATCH 071/115] Update install.sh --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 662ce38106..b3a79d0266 100644 --- a/install.sh +++ b/install.sh @@ -699,11 +699,17 @@ function kit_cross_compatibility_converter() { if [[ -f "$(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml" ]]; then + echo "Stopping the exchange..." + sleep 5 + docker compose -f "$(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml" stop + echo "Docker-compose file generated with HollaEx CLI v2 has been detected!" echo "Converting the Docker-Compose file..." yq "del(.services.$ENVIRONMENT_EXCHANGE_NAME-nginx)" $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml > $(pwd)/server/docker-compose-prod.yaml yq e -i '.services.*.env_file[] = "hollaex-kit.env"' $(pwd)/server/docker-compose-prod.yaml + echo "name: 'local'" >> $(pwd)/server/docker-compose-prod.yaml + fi if [[ -f "$(pwd)/templates/local/nginx/conf.d/upstream.conf" ]]; then From 0164b26c595e2068a0e19d0bde5ea6735d77d403 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 24 May 2024 00:07:39 +0900 Subject: [PATCH 072/115] Update install.sh --- install.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install.sh b/install.sh index b3a79d0266..4193f5964f 100644 --- a/install.sh +++ b/install.sh @@ -699,10 +699,6 @@ function kit_cross_compatibility_converter() { if [[ -f "$(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml" ]]; then - echo "Stopping the exchange..." - sleep 5 - docker compose -f "$(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml" stop - echo "Docker-compose file generated with HollaEx CLI v2 has been detected!" echo "Converting the Docker-Compose file..." yq "del(.services.$ENVIRONMENT_EXCHANGE_NAME-nginx)" $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml > $(pwd)/server/docker-compose-prod.yaml From cf10bbc0fc900bddf7fad8ff0ef1ef56f1923725 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Fri, 24 May 2024 00:08:49 +0900 Subject: [PATCH 073/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-0164b26 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index c1b148989a..4ab54c6ce5 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-12f115f + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-0164b26 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-12f115f + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-0164b26 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-12f115f + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-0164b26 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 4fac82e72a..354a9de3f1 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-12f115f +dockerTag: 2.10.0-cli-deprecation-0164b26 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 82f3ba942a..e9861f306d 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-12f115f-web +dockerTag: 2.10.0-cli-deprecation-0164b26-web imagePullSecrets: - name: docker-registry-secret stable: From c8b5050e9b951b15505d0f6ccf679f4d9d4b615b Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 24 May 2024 01:10:41 +0900 Subject: [PATCH 074/115] Update install.sh --- install.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 4193f5964f..940315d761 100644 --- a/install.sh +++ b/install.sh @@ -678,15 +678,6 @@ function kit_cross_compatibility_converter() { source $i done; - # Detects whether the old-styled exchange is already running - if command docker ps | grep $ENVIRONMENT_EXCHANGE_NAME > /dev/null 2>&1; then - - # Message to ask user to shutdown the exchange and start over to finish the migration flow - echo "Warning: Your exchange is running with the files generated by HollaEx CLI v2, which requires a migration to the CLI v3 format." - echo "Please stop and start back your exchange by running 'hollaex stop' and 'hollaex start' to continue." - - fi - # File conversion if [[ -f "$(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME.env.local" ]]; then @@ -725,6 +716,8 @@ function kit_cross_compatibility_converter() { echo "Converting it..." mv $(pwd)/templates/local/${ENVIRONMENT_EXCHANGE_NAME}-docker-compose-web.yaml $(pwd)/web/docker-compose.yaml + echo "name: 'client'" >> $(pwd)/web/docker-compose.yaml + fi # Kubernetes From 2dcdb944222643296724f9b4cdb98bcecd033c99 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Fri, 24 May 2024 01:11:56 +0900 Subject: [PATCH 075/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-fe27bdb --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 4ab54c6ce5..85771899d2 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-0164b26 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-fe27bdb build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-0164b26 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-fe27bdb build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-0164b26 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-fe27bdb build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 354a9de3f1..32baca1a56 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-0164b26 +dockerTag: 2.10.0-cli-deprecation-fe27bdb imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index e9861f306d..88550f857c 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-0164b26-web +dockerTag: 2.10.0-cli-deprecation-fe27bdb-web imagePullSecrets: - name: docker-registry-secret stable: From 973448ff5430a8cd7180c632a256efaf674b6167 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 24 May 2024 01:29:35 +0900 Subject: [PATCH 076/115] Update install.sh --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index 940315d761..f3cded577c 100644 --- a/install.sh +++ b/install.sh @@ -697,6 +697,8 @@ function kit_cross_compatibility_converter() { echo "name: 'local'" >> $(pwd)/server/docker-compose-prod.yaml + rm $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml + fi if [[ -f "$(pwd)/templates/local/nginx/conf.d/upstream.conf" ]]; then From ef2f7819556eecd6c543c8037bf23022f1a5a77b Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Fri, 24 May 2024 19:26:57 +0900 Subject: [PATCH 077/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-9cda5d7 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 85771899d2..91776311c1 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-fe27bdb + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9cda5d7 build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-fe27bdb + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9cda5d7 build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-fe27bdb + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9cda5d7 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 32baca1a56..0a38b93469 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-fe27bdb +dockerTag: 2.10.0-cli-deprecation-9cda5d7 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 88550f857c..5e5a97cde9 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-fe27bdb-web +dockerTag: 2.10.0-cli-deprecation-9cda5d7-web imagePullSecrets: - name: docker-registry-secret stable: From b89f6fad00471451e487b53251dfb413d8b73636 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 24 May 2024 22:54:35 +0900 Subject: [PATCH 078/115] Update install.sh --- install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.sh b/install.sh index f3cded577c..0f458ab671 100644 --- a/install.sh +++ b/install.sh @@ -691,6 +691,10 @@ function kit_cross_compatibility_converter() { if [[ -f "$(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml" ]]; then echo "Docker-compose file generated with HollaEx CLI v2 has been detected!" + + echo "Stopping the server to start the v3 conversion process..." + docker compose -f $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml stop + echo "Converting the Docker-Compose file..." yq "del(.services.$ENVIRONMENT_EXCHANGE_NAME-nginx)" $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml > $(pwd)/server/docker-compose-prod.yaml yq e -i '.services.*.env_file[] = "hollaex-kit.env"' $(pwd)/server/docker-compose-prod.yaml @@ -708,6 +712,10 @@ function kit_cross_compatibility_converter() { mv $(pwd)/templates/local/nginx/conf.d/* $(pwd)/nginx/conf.d mv $(pwd)/templates/local/nginx/nginx.conf $(pwd)/nginx/nginx.conf + echo "Updating the Nginx file to have an existing docker network bind..." + yq e -i ".services.*.networks[] = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\"" $(pwd)/nginx/docker-compose.yaml + yq e -i ".networks |= with_entries(select(.key == \"local_hollaex-kit\") | .key = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\")" $(pwd)/nginx/docker-compose.yaml + fi # Local web docker-compose From 1328975fd8cd738d493c7efcedaefc32253e64d4 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Fri, 24 May 2024 22:55:49 +0900 Subject: [PATCH 079/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-65d7d8c --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 91776311c1..a18deb6e2a 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -42,7 +42,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9cda5d7 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-65d7d8c build: context: . dockerfile: tools/Dockerfile @@ -69,7 +69,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9cda5d7 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-65d7d8c build: context: . dockerfile: tools/Dockerfile @@ -97,7 +97,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-9cda5d7 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-65d7d8c build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 0a38b93469..7b90a4003c 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-9cda5d7 +dockerTag: 2.10.0-cli-deprecation-65d7d8c imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 5e5a97cde9..48536b9353 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-9cda5d7-web +dockerTag: 2.10.0-cli-deprecation-65d7d8c-web imagePullSecrets: - name: docker-registry-secret stable: From 7ac36a89d4e00424f6f4561edb2364c997971985 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 25 May 2024 15:02:18 +0900 Subject: [PATCH 080/115] Update docker-compose-prod.yaml --- server/docker-compose-prod.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 91776311c1..efa6dd8cad 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -1,5 +1,6 @@ # Prod HollaEx Kit Docker-Copmose version: '3' +name: "local" services: hollaex-kit-prod-redis: image: redis:7.2.0-alpine From 3610d54b5a261e4a31b1bfea00c2cc3188e06803 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sat, 25 May 2024 15:03:23 +0900 Subject: [PATCH 081/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-a13ca94 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 07bcef572b..a551db53e9 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-65d7d8c + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a13ca94 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-65d7d8c + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a13ca94 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-65d7d8c + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a13ca94 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 7b90a4003c..047e265ebe 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-65d7d8c +dockerTag: 2.10.0-cli-deprecation-a13ca94 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 48536b9353..9f29d169e8 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-65d7d8c-web +dockerTag: 2.10.0-cli-deprecation-a13ca94-web imagePullSecrets: - name: docker-registry-secret stable: From 05174083b0b596be8460d1062f4aa4775c2f2629 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 25 May 2024 16:44:33 +0900 Subject: [PATCH 082/115] docker networks update --- nginx/docker-compose.yaml | 4 ++-- web/docker-compose.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml index af3afd9241..d6f394d280 100644 --- a/nginx/docker-compose.yaml +++ b/nginx/docker-compose.yaml @@ -22,10 +22,10 @@ services: - -c - ip -4 route list match 0/0 | awk '{print $$3 " host.access"}' >> /etc/hosts && nginx -g "daemon off;" networks: - - server_hollaex-kit + - local_hollaex-kit networks: - server_hollaex-kit: + local_hollaex-kit: external: true diff --git a/web/docker-compose.yaml b/web/docker-compose.yaml index bb5bdd09b2..c1d6edc1b4 100644 --- a/web/docker-compose.yaml +++ b/web/docker-compose.yaml @@ -12,9 +12,9 @@ services: ports: - 8080:80 networks: - - server_hollaex-kit + - local_hollaex-kit networks: - server_hollaex-kit: + local_hollaex-kit: external: true From 904f609f7fbe8b296b3bff2564f53d98ddfc77c3 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sat, 25 May 2024 16:45:40 +0900 Subject: [PATCH 083/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-4e1be9a --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index a551db53e9..235f828f7d 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a13ca94 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-4e1be9a build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a13ca94 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-4e1be9a build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a13ca94 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-4e1be9a build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 047e265ebe..993f2024f0 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-a13ca94 +dockerTag: 2.10.0-cli-deprecation-4e1be9a imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 9f29d169e8..71cc43fd78 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-a13ca94-web +dockerTag: 2.10.0-cli-deprecation-4e1be9a-web imagePullSecrets: - name: docker-registry-secret stable: From 861a0c5620841ce0d0a28ed9e89517394e4655d9 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 25 May 2024 17:36:14 +0900 Subject: [PATCH 084/115] Update nginx.conf --- nginx/nginx.conf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index bbb140a7d2..64cb08d7e1 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -43,6 +43,9 @@ server { include /etc/nginx/conf.d/plugin*.conf; + location / { + proxy_pass http://web; + } location /api { proxy_pass http://api; @@ -70,10 +73,6 @@ server { proxy_pass http://socket; } - location / { - proxy_pass http://web; - } - error_page 429 /429.html; location = /429.html { root /usr/share/nginx/html; From f1a8b94ccffe577ee300affad108c69cdfc935d6 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sat, 25 May 2024 17:44:10 +0900 Subject: [PATCH 085/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-10abcf5 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 235f828f7d..ed8788c84e 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-4e1be9a + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-10abcf5 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-4e1be9a + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-10abcf5 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-4e1be9a + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-10abcf5 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 993f2024f0..f764059f1e 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-4e1be9a +dockerTag: 2.10.0-cli-deprecation-10abcf5 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 71cc43fd78..040626de10 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-4e1be9a-web +dockerTag: 2.10.0-cli-deprecation-10abcf5-web imagePullSecrets: - name: docker-registry-secret stable: From 539f1659946ba93572932ba0818ce659e1b0325c Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 25 May 2024 19:34:29 +0900 Subject: [PATCH 086/115] deployment files cleanup --- install.sh | 4 +--- nginx/docker-compose.yaml | 2 +- nginx/nginx.conf | 14 +------------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/install.sh b/install.sh index 0f458ab671..fd9a0e3eb4 100644 --- a/install.sh +++ b/install.sh @@ -692,9 +692,6 @@ function kit_cross_compatibility_converter() { echo "Docker-compose file generated with HollaEx CLI v2 has been detected!" - echo "Stopping the server to start the v3 conversion process..." - docker compose -f $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml stop - echo "Converting the Docker-Compose file..." yq "del(.services.$ENVIRONMENT_EXCHANGE_NAME-nginx)" $(pwd)/templates/local/$ENVIRONMENT_EXCHANGE_NAME-docker-compose.yaml > $(pwd)/server/docker-compose-prod.yaml yq e -i '.services.*.env_file[] = "hollaex-kit.env"' $(pwd)/server/docker-compose-prod.yaml @@ -713,6 +710,7 @@ function kit_cross_compatibility_converter() { mv $(pwd)/templates/local/nginx/nginx.conf $(pwd)/nginx/nginx.conf echo "Updating the Nginx file to have an existing docker network bind..." + yq e -i ".services |= with_entries(select(.key == \"hollaex-kit-prod-nginx\") | .key = \"$ENVIRONMENT_EXCHANGE_NAME-nginx\")" $(pwd)/nginx/docker-compose.yaml yq e -i ".services.*.networks[] = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\"" $(pwd)/nginx/docker-compose.yaml yq e -i ".networks |= with_entries(select(.key == \"local_hollaex-kit\") | .key = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\")" $(pwd)/nginx/docker-compose.yaml diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml index d6f394d280..eebc87cf70 100644 --- a/nginx/docker-compose.yaml +++ b/nginx/docker-compose.yaml @@ -1,5 +1,5 @@ version: '3' -name: "server" +name: "local" services: hollaex-kit-prod-nginx: image: nginx-with-certbot diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 64cb08d7e1..a09cb4ed6b 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -18,10 +18,6 @@ http { log_format main '$remote_addr - $remote_user [$time_local] $status ' '"$request" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; - - log_format filter '$remote_addr - $remote_user [$time_local] $status ' - '"$req_filtered" $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; limit_req_zone $remote_addr zone=api:1m rate=4r/s; limit_req_zone $remote_addr zone=order:1m rate=5r/s; @@ -31,15 +27,7 @@ server { listen 80; server_name _; #Server domain - set $req_filtered $request; - if ($req_filtered ~ (.*)key=[^&]*(.*)) { - set $req_filtered $1key=****$2; - } - if ($req_filtered ~ (.*)secret=[^&]*(.*)) { - set $req_filtered $1secret=****$2; - } - - access_log /var/log/hollaex.access.log filter; + access_log /var/log/hollaex.access.log main; include /etc/nginx/conf.d/plugin*.conf; From e0814924f8a321227fd27d0022b8b4c06a39c701 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 25 May 2024 19:37:26 +0900 Subject: [PATCH 087/115] update --- server/docker-compose-prod.yaml | 4 ++-- settings/secret | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index ed8788c84e..f620751d1a 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -2,7 +2,7 @@ version: '3' name: "local" services: - hollaex-kit-prod-redis: + hollaex-kit-redis: image: redis:7.2.0-alpine restart: unless-stopped depends_on: @@ -22,7 +22,7 @@ services: memory: 100M networks: - hollaex-kit - hollaex-kit-prod-db: + hollaex-kit-db: image: postgres:14.9-alpine restart: unless-stopped volumes: diff --git a/settings/secret b/settings/secret index 169070c2ed..239714d511 100644 --- a/settings/secret +++ b/settings/secret @@ -8,18 +8,18 @@ HOLLAEX_SECRET_ACTIVATION_CODE= #### ADVANCED SECRET CONFIGURATIONS #### ######################################## -HOLLAEX_SECRET_REDIS_HOST=$ENVIRONMENT_EXCHANGE_NAME-prod-redis +HOLLAEX_SECRET_REDIS_HOST=$ENVIRONMENT_EXCHANGE_NAME-redis HOLLAEX_SECRET_REDIS_PORT=6379 HOLLAEX_SECRET_REDIS_PASSWORD= -HOLLAEX_SECRET_PUBSUB_HOST=$ENVIRONMENT_EXCHANGE_NAME-prod-redis +HOLLAEX_SECRET_PUBSUB_HOST=$ENVIRONMENT_EXCHANGE_NAME-redis HOLLAEX_SECRET_PUBSUB_PORT=6379 HOLLAEX_SECRET_PUBSUB_PASSWORD= HOLLAEX_SECRET_DB_NAME=hollaex HOLLAEX_SECRET_DB_USERNAME=hollaex HOLLAEX_SECRET_DB_PASSWORD= -HOLLAEX_SECRET_DB_HOST=$ENVIRONMENT_EXCHANGE_NAME-prod-db +HOLLAEX_SECRET_DB_HOST=$ENVIRONMENT_EXCHANGE_NAME-db HOLLAEX_SECRET_DB_PORT=5432 ENVIRONMENT_KUBERNETES_DOCKER_REGISTRY_HOST=docker.io From a59e5416af1b2e808ca7fef9d926b5ae7a16be80 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sat, 25 May 2024 20:40:31 +0900 Subject: [PATCH 088/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-e081492 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index f620751d1a..498d6b6152 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-10abcf5 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-e081492 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-10abcf5 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-e081492 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-10abcf5 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-e081492 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index f764059f1e..ebeae4697e 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-10abcf5 +dockerTag: 2.10.0-cli-deprecation-e081492 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 040626de10..a2f78ed897 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-10abcf5-web +dockerTag: 2.10.0-cli-deprecation-e081492-web imagePullSecrets: - name: docker-registry-secret stable: From ccad9b4f41075d969ebf68965a8d6432c38b9bc8 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sat, 25 May 2024 20:45:41 +0900 Subject: [PATCH 089/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-a59e541 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 498d6b6152..2427316bc2 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-e081492 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a59e541 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-e081492 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a59e541 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-e081492 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a59e541 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index ebeae4697e..31e52c5316 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-e081492 +dockerTag: 2.10.0-cli-deprecation-a59e541 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index a2f78ed897..674d00038a 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-e081492-web +dockerTag: 2.10.0-cli-deprecation-a59e541-web imagePullSecrets: - name: docker-registry-secret stable: From 3ec2a6a77ae14c4c70051fd4ab4c8a5e0415c38e Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 25 May 2024 20:47:02 +0900 Subject: [PATCH 090/115] env update --- server/hollaex-kit.env | 6 +++--- server/tools/kubernetes/env/secret.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/hollaex-kit.env b/server/hollaex-kit.env index 7ba81707d3..60dabd76a1 100644 --- a/server/hollaex-kit.env +++ b/server/hollaex-kit.env @@ -36,15 +36,15 @@ ACTIVATION_CODE= API_KEY= API_SECRET= -DB_HOST=hollaex-kit-prod-db +DB_HOST=hollaex-kit-db DB_NAME=hollaex DB_PASSWORD=my-secure-db-password DB_PORT=5432 DB_USERNAME=hollaex -PUBSUB_HOST=hollaex-kit-prod-redis +PUBSUB_HOST=hollaex-kit-redis PUBSUB_PASSWORD=my-secure-redis-password PUBSUB_PORT=6379 -REDIS_HOST=hollaex-kit-prod-redis +REDIS_HOST=hollaex-kit-redis REDIS_PASSWORD=my-secure-redis-password REDIS_PORT=6379 SECRET=my-secure-secret diff --git a/server/tools/kubernetes/env/secret.yaml b/server/tools/kubernetes/env/secret.yaml index 7c155c6374..102e30b980 100644 --- a/server/tools/kubernetes/env/secret.yaml +++ b/server/tools/kubernetes/env/secret.yaml @@ -8,15 +8,15 @@ stringData: ACTIVATION_CODE: '' API_KEY: '' API_SECRET: '' - DB_HOST: 'hollaex-kit-prod-db' + DB_HOST: 'hollaex-kit-db' DB_NAME: 'hollaex' DB_PASSWORD: 'my-secure-db-password' DB_PORT: '5432' DB_USERNAME: 'hollaex' - PUBSUB_HOST: 'hollaex-kit-prod-redis' + PUBSUB_HOST: 'hollaex-kit-redis' PUBSUB_PASSWORD: 'my-secure-redis-password' PUBSUB_PORT: '6379' - REDIS_HOST: 'hollaex-kit-prod-redis' + REDIS_HOST: 'hollaex-kit-redis' REDIS_PASSWORD: 'my-secure-redis-password' REDIS_PORT: '6379' SECRET: 'my-secure-secret' From a3b75c01e8d66cf1b1f6dcbe7208210d854e51ad Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sat, 25 May 2024 20:51:09 +0900 Subject: [PATCH 091/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-ac780f8 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 2427316bc2..cc0c3e9eb3 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a59e541 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-ac780f8 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a59e541 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-ac780f8 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-prod-redis - hollaex-kit-prod-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-a59e541 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-ac780f8 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 31e52c5316..4b2292d73c 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-a59e541 +dockerTag: 2.10.0-cli-deprecation-ac780f8 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 674d00038a..370c304d2b 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-a59e541-web +dockerTag: 2.10.0-cli-deprecation-ac780f8-web imagePullSecrets: - name: docker-registry-secret stable: From 10163bd48017fc84a5faa9b0a980ff9d736aa6d9 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 26 May 2024 20:19:53 +0900 Subject: [PATCH 092/115] Update docker-compose-prod.yaml --- server/docker-compose-prod.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index cc0c3e9eb3..98b3eccc83 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -6,7 +6,7 @@ services: image: redis:7.2.0-alpine restart: unless-stopped depends_on: - - hollaex-kit-prod-db + - hollaex-kit-db ports: - 6379:6379 env_file: @@ -67,8 +67,8 @@ services: networks: - hollaex-kit depends_on: - - hollaex-kit-prod-redis - - hollaex-kit-prod-db + - hollaex-kit-redis + - hollaex-kit-db hollaex-kit-server-stream: image: hollaex/hollaex-kit:2.10.0-cli-deprecation-ac780f8 build: @@ -95,8 +95,8 @@ services: - hollaex-kit depends_on: - hollaex-kit-server-api - - hollaex-kit-prod-redis - - hollaex-kit-prod-db + - hollaex-kit-redis + - hollaex-kit-db hollaex-kit-server-plugins: image: hollaex/hollaex-kit:2.10.0-cli-deprecation-ac780f8 build: @@ -122,8 +122,8 @@ services: - hollaex-kit depends_on: - hollaex-kit-server-api - - hollaex-kit-prod-redis - - hollaex-kit-prod-db + - hollaex-kit-redis + - hollaex-kit-db networks: hollaex-kit: volumes: From 2a30ac302601ef78359d1aab7ab89391e54e7933 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 1 Jun 2024 13:07:14 +0900 Subject: [PATCH 093/115] Update install.sh --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index fd9a0e3eb4..c871ba4744 100644 --- a/install.sh +++ b/install.sh @@ -714,6 +714,12 @@ function kit_cross_compatibility_converter() { yq e -i ".services.*.networks[] = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\"" $(pwd)/nginx/docker-compose.yaml yq e -i ".networks |= with_entries(select(.key == \"local_hollaex-kit\") | .key = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\")" $(pwd)/nginx/docker-compose.yaml + if command docker ps | grep local.*-nginx > /dev/null ; then + + docker compose -f $(pwd)/nginx/docker-compose.yaml up -d + + fi + fi # Local web docker-compose From 63a61989d859bc665e0820755f561420eb932708 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sat, 1 Jun 2024 13:08:12 +0900 Subject: [PATCH 094/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-2a30ac3 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 98b3eccc83..1ecdf3b7c0 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-ac780f8 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-2a30ac3 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-ac780f8 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-2a30ac3 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-ac780f8 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-2a30ac3 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 4b2292d73c..c4c12b4e87 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-ac780f8 +dockerTag: 2.10.0-cli-deprecation-2a30ac3 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 370c304d2b..4704feaf75 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-ac780f8-web +dockerTag: 2.10.0-cli-deprecation-2a30ac3-web imagePullSecrets: - name: docker-registry-secret stable: From 6d774af759c4528d256d76063f38d1a295b62009 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 2 Jun 2024 00:46:11 +0900 Subject: [PATCH 095/115] Update nginx.conf --- nginx/nginx.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index a09cb4ed6b..4a1f20862c 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -46,7 +46,6 @@ server { } - location /api/plugins { proxy_pass http://plugins; From 1b90a97216ea39ef90528159fd629a9047a47582 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 2 Jun 2024 00:46:37 +0900 Subject: [PATCH 096/115] Update nginx.conf --- nginx/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 4a1f20862c..b9cd903b17 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -46,7 +46,7 @@ server { } - location /api/plugins { + location /api/plugins { proxy_pass http://plugins; rewrite /api(/|$)(.*) /$2 break; From 8be85c2e8c97777c856afa52511bd4c1b8e2d1e5 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sun, 2 Jun 2024 00:47:09 +0900 Subject: [PATCH 097/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-6d774af --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 1ecdf3b7c0..af1a871d5f 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-2a30ac3 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6d774af build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-2a30ac3 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6d774af build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-2a30ac3 + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6d774af build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index c4c12b4e87..6f1bac0386 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-2a30ac3 +dockerTag: 2.10.0-cli-deprecation-6d774af imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 4704feaf75..d4785a098b 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-2a30ac3-web +dockerTag: 2.10.0-cli-deprecation-6d774af-web imagePullSecrets: - name: docker-registry-secret stable: From 9ce3ac3e5bc7cc8e417056b73ba3ba48f574d838 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sun, 2 Jun 2024 00:58:20 +0900 Subject: [PATCH 098/115] HollaEx Network Testnet Build - 2.10.0-cli-deprecation-c315fe2 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index af1a871d5f..cf5ed827b0 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6d774af + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c315fe2 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6d774af + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c315fe2 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-6d774af + image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c315fe2 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 6f1bac0386..d2bf9ec4e9 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-6d774af +dockerTag: 2.10.0-cli-deprecation-c315fe2 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index d4785a098b..2629db449f 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-6d774af-web +dockerTag: 2.10.0-cli-deprecation-c315fe2-web imagePullSecrets: - name: docker-registry-secret stable: From d06657df91ba939a178c9b20e85d55e4e4783463 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 2 Jun 2024 15:04:08 +0900 Subject: [PATCH 099/115] Update install.sh --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index c871ba4744..9120f46502 100644 --- a/install.sh +++ b/install.sh @@ -709,6 +709,8 @@ function kit_cross_compatibility_converter() { mv $(pwd)/templates/local/nginx/conf.d/* $(pwd)/nginx/conf.d mv $(pwd)/templates/local/nginx/nginx.conf $(pwd)/nginx/nginx.conf + mv $(pwd)/templates/local/letsencrypt $(pwd)/nginx/ + echo "Updating the Nginx file to have an existing docker network bind..." yq e -i ".services |= with_entries(select(.key == \"hollaex-kit-prod-nginx\") | .key = \"$ENVIRONMENT_EXCHANGE_NAME-nginx\")" $(pwd)/nginx/docker-compose.yaml yq e -i ".services.*.networks[] = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\"" $(pwd)/nginx/docker-compose.yaml From 2b4c6b0188534db4da9d3dadc24c7b9eaab022ad Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 2 Jun 2024 15:06:12 +0900 Subject: [PATCH 100/115] Update version --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index 10c2c0c3d6..55f001e46c 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.10.0 +2.10.4 \ No newline at end of file From c61605a3182ade4301bc8c5d6901d2136791554f Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 2 Jun 2024 15:07:16 +0900 Subject: [PATCH 101/115] Update docker-compose-prod.yaml --- server/docker-compose-prod.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index cf5ed827b0..465845ea17 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c315fe2 + image: hollaex/hollaex-kit:2.10.2 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c315fe2 + image: hollaex/hollaex-kit:2.10.2 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.0-cli-deprecation-c315fe2 + image: hollaex/hollaex-kit:2.10.2 build: context: . dockerfile: tools/Dockerfile From 253aeb6e65d12e0d2d7715ef8fef91a5d611083b Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sun, 2 Jun 2024 15:10:41 +0900 Subject: [PATCH 102/115] HollaEx Network Testnet Build - 2.10.4-cli-deprecation-c61605a --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 465845ea17..66da467bbd 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.2 + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-c61605a build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.2 + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-c61605a build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.2 + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-c61605a build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index d2bf9ec4e9..8b3dcd1392 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.0-cli-deprecation-c315fe2 +dockerTag: 2.10.4-cli-deprecation-c61605a imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 2629db449f..56d58bf08e 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.0-cli-deprecation-c315fe2-web +dockerTag: 2.10.4-cli-deprecation-c61605a-web imagePullSecrets: - name: docker-registry-secret stable: From ed9ebf7d5403bbcfe4b717642209349d4411a3f9 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sun, 2 Jun 2024 15:16:02 +0900 Subject: [PATCH 103/115] HollaEx Network Testnet Build - 2.10.4-cli-deprecation-253aeb6 --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 66da467bbd..1b57d6a04b 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-c61605a + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-253aeb6 build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-c61605a + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-253aeb6 build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-c61605a + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-253aeb6 build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index 8b3dcd1392..c7f72cbd21 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.4-cli-deprecation-c61605a +dockerTag: 2.10.4-cli-deprecation-253aeb6 imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 56d58bf08e..56d9ed7d18 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.4-cli-deprecation-c61605a-web +dockerTag: 2.10.4-cli-deprecation-253aeb6-web imagePullSecrets: - name: docker-registry-secret stable: From f58866f53bd2be2c1aef93cf316c24991aa9a785 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 30 Jun 2024 20:26:51 +0900 Subject: [PATCH 104/115] Update install.sh --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 9120f46502..0639a10602 100644 --- a/install.sh +++ b/install.sh @@ -718,6 +718,7 @@ function kit_cross_compatibility_converter() { if command docker ps | grep local.*-nginx > /dev/null ; then + docker compose -f $(pwd)/nginx/docker-compose.yaml down docker compose -f $(pwd)/nginx/docker-compose.yaml up -d fi From 3e0de0cd9c54f8798cc281fc8dffdac4576e23fe Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sun, 30 Jun 2024 20:30:34 +0900 Subject: [PATCH 105/115] HollaEx Network Testnet Build - 2.10.4-cli-deprecation-f58866f --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 1b57d6a04b..30072f9079 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-253aeb6 + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-f58866f build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-253aeb6 + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-f58866f build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-253aeb6 + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-f58866f build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index c7f72cbd21..a2eb3ffdd7 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.4-cli-deprecation-253aeb6 +dockerTag: 2.10.4-cli-deprecation-f58866f imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 56d9ed7d18..5286313fa7 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.4-cli-deprecation-253aeb6-web +dockerTag: 2.10.4-cli-deprecation-f58866f-web imagePullSecrets: - name: docker-registry-secret stable: From 1da3368a92c14066566da67db684e95c41b5d916 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sun, 30 Jun 2024 21:47:25 +0900 Subject: [PATCH 106/115] Update install.sh --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 0639a10602..36de662e50 100644 --- a/install.sh +++ b/install.sh @@ -749,7 +749,7 @@ function kit_cross_compatibility_converter() { if [[ -f "$(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-secret.yaml" ]]; then - echo "Kubernetes configmap generated with HollaEx CLI v2 has been detected." + echo "Kubernetes secret generated with HollaEx CLI v2 has been detected." echo "Converting it..." mv $(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-secret.yaml $(pwd)/server/tools/kubernetes/env/secret.yaml @@ -757,7 +757,7 @@ function kit_cross_compatibility_converter() { if [[ -f "$(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-ingress.yaml" ]]; then - echo "Kubernetes configmap generated with HollaEx CLI v2 has been detected." + echo "Kubernetes ingress yamls generated with HollaEx CLI v2 has been detected." echo "Converting it..." mv $(pwd)/templates/kubernetes/config/${ENVIRONMENT_EXCHANGE_NAME}-ingress.yaml $(pwd)/server/tools/kubernetes/ingress/hollaex-kit-ingress.yaml From 714238d32580bc305cd798a0daee3e5b740a9c10 Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sun, 30 Jun 2024 21:48:29 +0900 Subject: [PATCH 107/115] HollaEx Network Testnet Build - 2.10.4-cli-deprecation-fa4d7ba --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 30072f9079..54044c23a1 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-f58866f + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-fa4d7ba build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-f58866f + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-fa4d7ba build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-f58866f + image: hollaex/hollaex-kit:2.10.4-cli-deprecation-fa4d7ba build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index a2eb3ffdd7..b977f3dacb 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.4-cli-deprecation-f58866f +dockerTag: 2.10.4-cli-deprecation-fa4d7ba imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index 5286313fa7..ef5ba32302 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.4-cli-deprecation-f58866f-web +dockerTag: 2.10.4-cli-deprecation-fa4d7ba-web imagePullSecrets: - name: docker-registry-secret stable: From 53acb45128729420a49918db988c782503ff9ff0 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Thu, 4 Jul 2024 06:22:49 +0900 Subject: [PATCH 108/115] Update job.yaml --- .../helm-chart/hollaex-kit-server/templates/job.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/job.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/job.yaml index 959e5e0b54..6b5b0ea887 100644 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/job.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/templates/job.yaml @@ -62,6 +62,16 @@ spec: args: - node tools/dbs/setSecurity.js; +{{- else if eq .Values.job.mode "hollaex_setup" }} + + args: + - sequelize db:migrate; + node tools/dbs/runTriggers.js; + sequelize db:seed:all; + node tools/dbs/setActivationCode.js; + node tools/dbs/checkConfig.js; + node tools/dbs/setKitVersion.js; + {{- else if eq .Values.job.mode "hollaex_upgrade" }} args: From 2e43329297a6132bd4e744a014e7f7eb1238e50d Mon Sep 17 00:00:00 2001 From: fetok12 Date: Thu, 4 Jul 2024 11:16:56 +0300 Subject: [PATCH 109/115] withdrawal-block-ui-refinements --- web/src/containers/Admin/User/AboutData.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/containers/Admin/User/AboutData.js b/web/src/containers/Admin/User/AboutData.js index 40745062a2..1c25d6807c 100644 --- a/web/src/containers/Admin/User/AboutData.js +++ b/web/src/containers/Admin/User/AboutData.js @@ -1095,7 +1095,7 @@ const AboutData = ({ backgroundColor: '#27339D', marginTop: 60, }} - width={610} + width={650} visible={displayWithdrawalBlock} footer={null} onCancel={() => { @@ -1140,7 +1140,10 @@ const AboutData = ({ }} value={null} > - None (it follows the users tier withdrawal limit) + None{' '} + + (it follows the users tier withdrawal limit) + Date: Sun, 7 Jul 2024 06:44:09 +0900 Subject: [PATCH 110/115] version update --- server/api/swagger/swagger.js | 2 +- server/package.json | 2 +- version | 2 +- web/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/api/swagger/swagger.js b/server/api/swagger/swagger.js index f3f33ccac2..207ca4a840 100644 --- a/server/api/swagger/swagger.js +++ b/server/api/swagger/swagger.js @@ -4,7 +4,7 @@ const definition = { swagger: '2.0', info: { title: 'HollaEx Kit', - version: '2.11.3' + version: '2.11.4' }, host: 'api.hollaex.com', basePath: '/v2', diff --git a/server/package.json b/server/package.json index 8db8837863..0e23244708 100644 --- a/server/package.json +++ b/server/package.json @@ -1,5 +1,5 @@ { - "version": "2.11.3", + "version": "2.11.4", "private": false, "description": "HollaEx Kit", "keywords": [ diff --git a/version b/version index ac569006a9..e13ec79f55 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.11.3 \ No newline at end of file +2.11.4 \ No newline at end of file diff --git a/web/package.json b/web/package.json index e6a6df4b78..8a911e6a90 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "hollaex-kit", - "version": "2.11.3", + "version": "2.11.4", "private": true, "dependencies": { "@ant-design/compatible": "1.0.5", From 0f1fdade14c758832677f2ad7bcccac84d619c1c Mon Sep 17 00:00:00 2001 From: bitHolla-Hollacloud Date: Sun, 7 Jul 2024 17:03:12 +0900 Subject: [PATCH 111/115] HollaEx Network Testnet Build - 2.11.4-cli-deprecation-46ea26c --- server/docker-compose-prod.yaml | 6 +++--- .../kubernetes/helm-chart/hollaex-kit-server/values.yaml | 2 +- web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 54044c23a1..4b54049dce 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -43,7 +43,7 @@ services: networks: - hollaex-kit hollaex-kit-server-api: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-fa4d7ba + image: hollaex/hollaex-kit:2.11.4-cli-deprecation-46ea26c build: context: . dockerfile: tools/Dockerfile @@ -70,7 +70,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-stream: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-fa4d7ba + image: hollaex/hollaex-kit:2.11.4-cli-deprecation-46ea26c build: context: . dockerfile: tools/Dockerfile @@ -98,7 +98,7 @@ services: - hollaex-kit-redis - hollaex-kit-db hollaex-kit-server-plugins: - image: hollaex/hollaex-kit:2.10.4-cli-deprecation-fa4d7ba + image: hollaex/hollaex-kit:2.11.4-cli-deprecation-46ea26c build: context: . dockerfile: tools/Dockerfile diff --git a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml index b977f3dacb..45793f7852 100755 --- a/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml +++ b/server/tools/kubernetes/helm-chart/hollaex-kit-server/values.yaml @@ -1,5 +1,5 @@ imageRegistry: hollaex/hollaex-kit -dockerTag: 2.10.4-cli-deprecation-fa4d7ba +dockerTag: 2.11.4-cli-deprecation-46ea26c imagePullSecrets: - name: docker-registry-secret envName: hollaex-kit-configmap diff --git a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml index ef5ba32302..7f3f602b80 100755 --- a/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml +++ b/web/tools/kubernetes/helm-chart/hollaex-kit-web/values.yaml @@ -1,5 +1,5 @@ imageRegistry: bitholla/hollaex-core-kit-testnet -dockerTag: 2.10.4-cli-deprecation-fa4d7ba-web +dockerTag: 2.11.4-cli-deprecation-46ea26c-web imagePullSecrets: - name: docker-registry-secret stable: From 19d9582f3de6318d43c3bb52939b4dfaadb7b9ca Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 2 Aug 2024 20:33:07 +0900 Subject: [PATCH 112/115] Docker-compose default network name update --- nginx/docker-compose.yaml | 2 +- server/docker-compose-prod.yaml | 12 ++++++------ web/docker-compose.yaml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml index eebc87cf70..c7a80bcdf6 100644 --- a/nginx/docker-compose.yaml +++ b/nginx/docker-compose.yaml @@ -25,7 +25,7 @@ services: - local_hollaex-kit networks: - local_hollaex-kit: + local_hollaex-kit-network: external: true diff --git a/server/docker-compose-prod.yaml b/server/docker-compose-prod.yaml index 4b54049dce..bd161b7489 100644 --- a/server/docker-compose-prod.yaml +++ b/server/docker-compose-prod.yaml @@ -21,7 +21,7 @@ services: cpus: "0.1" memory: 100M networks: - - hollaex-kit + - hollaex-kit-network hollaex-kit-db: image: postgres:14.9-alpine restart: unless-stopped @@ -41,7 +41,7 @@ services: memory: 100M command: ["sh", "-c", "export POSTGRES_DB=$${DB_NAME} && export POSTGRES_USER=$${DB_USERNAME} && export POSTGRES_PASSWORD=$${DB_PASSWORD} && ln -sf /usr/local/bin/docker-entrypoint.sh ./docker-entrypoint.sh && ./docker-entrypoint.sh postgres"] networks: - - hollaex-kit + - hollaex-kit-network hollaex-kit-server-api: image: hollaex/hollaex-kit:2.11.4-cli-deprecation-46ea26c build: @@ -65,7 +65,7 @@ services: ports: - 10010:10010 networks: - - hollaex-kit + - hollaex-kit-network depends_on: - hollaex-kit-redis - hollaex-kit-db @@ -92,7 +92,7 @@ services: ports: - 10080:10080 networks: - - hollaex-kit + - hollaex-kit-network depends_on: - hollaex-kit-server-api - hollaex-kit-redis @@ -119,12 +119,12 @@ services: - plugins/index.js - 10011:10011 networks: - - hollaex-kit + - hollaex-kit-network depends_on: - hollaex-kit-server-api - hollaex-kit-redis - hollaex-kit-db networks: - hollaex-kit: + hollaex-kit-network: volumes: hollaex_db_vol: diff --git a/web/docker-compose.yaml b/web/docker-compose.yaml index c1d6edc1b4..31d971ac54 100644 --- a/web/docker-compose.yaml +++ b/web/docker-compose.yaml @@ -12,9 +12,9 @@ services: ports: - 8080:80 networks: - - local_hollaex-kit + - local_hollaex-kit-network networks: - local_hollaex-kit: + local_hollaex-kit-network: external: true From 80b7c9b4f5725b1d19e99a720b24f5843b45e6eb Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 2 Aug 2024 20:56:13 +0900 Subject: [PATCH 113/115] Update docker-compose.yaml --- nginx/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/docker-compose.yaml b/nginx/docker-compose.yaml index c7a80bcdf6..1fdaf29848 100644 --- a/nginx/docker-compose.yaml +++ b/nginx/docker-compose.yaml @@ -22,7 +22,7 @@ services: - -c - ip -4 route list match 0/0 | awk '{print $$3 " host.access"}' >> /etc/hosts && nginx -g "daemon off;" networks: - - local_hollaex-kit + - local_hollaex-kit-network networks: local_hollaex-kit-network: From b9e9eb32ee66457c0a817a4a71c6bc2691155b49 Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Fri, 2 Aug 2024 21:48:00 +0900 Subject: [PATCH 114/115] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 36de662e50..395bead857 100644 --- a/install.sh +++ b/install.sh @@ -714,7 +714,7 @@ function kit_cross_compatibility_converter() { echo "Updating the Nginx file to have an existing docker network bind..." yq e -i ".services |= with_entries(select(.key == \"hollaex-kit-prod-nginx\") | .key = \"$ENVIRONMENT_EXCHANGE_NAME-nginx\")" $(pwd)/nginx/docker-compose.yaml yq e -i ".services.*.networks[] = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\"" $(pwd)/nginx/docker-compose.yaml - yq e -i ".networks |= with_entries(select(.key == \"local_hollaex-kit\") | .key = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\")" $(pwd)/nginx/docker-compose.yaml + yq e -i ".networks |= with_entries(select(.key == \"local_hollaex-kit-network\") | .key = \"local_$ENVIRONMENT_EXCHANGE_NAME-network\")" $(pwd)/nginx/docker-compose.yaml if command docker ps | grep local.*-nginx > /dev/null ; then From e252f4404d8fb9c0c9918883571a37bf4d5c1a5a Mon Sep 17 00:00:00 2001 From: Yechan Kim Date: Sat, 3 Aug 2024 10:44:44 +0900 Subject: [PATCH 115/115] version update --- settings/configmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/configmap b/settings/configmap index 8039bbacdc..6c968a55ab 100644 --- a/settings/configmap +++ b/settings/configmap @@ -76,7 +76,7 @@ ENVIRONMENT_KUBERNETES_REDIS_NODESELECTOR="{}" ENVIRONMENT_KUBERNETES_EXCHANGE_STATEFUL_NODESELECTOR="{}" ENVIRONMENT_KUBERNETES_EXCHANGE_STATELESS_NODESELECTOR="{}" -ENVIRONMENT_DOCKER_IMAGE_VERSION=2.10.2 +ENVIRONMENT_DOCKER_IMAGE_VERSION=2.11.3 ENVIRONMENT_DOCKER_IMAGE_POSTGRESQL_REGISTRY=postgres ENVIRONMENT_DOCKER_IMAGE_POSTGRESQL_VERSION=14.9-alpine