Skip to content

Commit

Permalink
handle VOLUME_TYPE - and hardcode instance type for easier management
Browse files Browse the repository at this point in the history
  • Loading branch information
rhanka committed Dec 9, 2023
1 parent 4815a89 commit 13b3fd4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ jobs:
make deploy-remote FILES_TO_PROCESS=$FILES_TO_PROCESS_DEV GIT_BRANCH=$GIT_BRANCH NGINX_USER=$NGINX_USER NGINX_HOST=$NGINX_HOST SMTP_TLS_SELFSIGNED=$SMTP_TLS_SELFSIGNED SMTP_HOST=$SMTP_HOST SMTP_PORT=$SMTP_PORT remote_http_proxy=$remote_http_proxy remote_https_proxy=$remote_https_proxy remote_no_proxy=$remote_no_proxy GOOGLE_ANALYTICS_ID=$GOOGLE_ANALYTICS_ID GOOGLE_ADSENSE_ID=$GOOGLE_ADSENSE_ID LOG_BAN_IP=$LOG_BAN_IP MMDB_TOKEN=$MMDB_TOKEN NEW_RELIC_API_KEY=${NEW_RELIC_API_KEY} NEW_RELIC_ACCOUNT_ID=${NEW_RELIC_ACCOUNT_ID} NEW_RELIC_INGEST_KEY=${NEW_RELIC_INGEST_KEY};
fi;
if [[ ( "$GIT_BRANCH" == "master" ) ]]; then
make deploy-remote BACKEND_CONCURRENCY=$BACKEND_CONCURRENCY_MASTER ES_MEM=$ES_MEM_MASTER SCW_FLAVOR=$SCW_FLAVOR_MASTER GIT_BACKEND_BRANCH=master GIT_BRANCH=$GIT_BRANCH NGINX_USER=$NGINX_USER NGINX_HOST=$NGINX_HOST SMTP_TLS_SELFSIGNED=$SMTP_TLS_SELFSIGNED SMTP_HOST=$SMTP_HOST SMTP_PORT=$SMTP_PORT remote_http_proxy=$remote_http_proxy remote_https_proxy=$remote_https_proxy remote_no_proxy=$remote_no_proxy GOOGLE_ANALYTICS_ID=$GOOGLE_ANALYTICS_ID GOOGLE_ADSENSE_ID=$GOOGLE_ADSENSE_ID LOG_BAN_IP=$LOG_BAN_IP MMDB_TOKEN=$MMDB_TOKEN NEW_RELIC_API_KEY=${NEW_RELIC_API_KEY} NEW_RELIC_ACCOUNT_ID=${NEW_RELIC_ACCOUNT_ID} NEW_RELIC_INGEST_KEY=${NEW_RELIC_INGEST_KEY};
make deploy-remote BACKEND_CONCURRENCY=$BACKEND_CONCURRENCY_MASTER ES_MEM=$ES_MEM_MASTER SCW_FLAVOR=$SCW_FLAVOR_MASTER SCW_VOLUME_SIZE=$SCW_VOLUME_SIZE_MASTER SCW_VOLUME_TYPE=$SCW_VOLUME_TYPE_MASTER GIT_BACKEND_BRANCH=master GIT_BRANCH=$GIT_BRANCH NGINX_USER=$NGINX_USER NGINX_HOST=$NGINX_HOST SMTP_TLS_SELFSIGNED=$SMTP_TLS_SELFSIGNED SMTP_HOST=$SMTP_HOST SMTP_PORT=$SMTP_PORT remote_http_proxy=$remote_http_proxy remote_https_proxy=$remote_https_proxy remote_no_proxy=$remote_no_proxy GOOGLE_ANALYTICS_ID=$GOOGLE_ANALYTICS_ID GOOGLE_ADSENSE_ID=$GOOGLE_ADSENSE_ID LOG_BAN_IP=$LOG_BAN_IP MMDB_TOKEN=$MMDB_TOKEN NEW_RELIC_API_KEY=${NEW_RELIC_API_KEY} NEW_RELIC_ACCOUNT_ID=${NEW_RELIC_ACCOUNT_ID} NEW_RELIC_INGEST_KEY=${NEW_RELIC_INGEST_KEY};
fi;
env:
FILES_TO_PROCESS_DEV: deces-2020-m[0-1][0-9].txt.gz
BACKEND_CONCURRENCY_MASTER: ${{ secrets.BACKEND_CONCURRENCY_MASTER }}
ES_MEM_MASTER: ${{ secrets.ES_MEM_MASTER }}
ES_MEM_BULK: ${{ secrets.ES_MEM_BULK }}
SCW_FLAVOR_MASTER: ${{ secrets.SCW_FLAVOR_MASTER }}
SCW_FLAVOR_BULK: ${{ secrets.SCW_FLAVOR_BULK }}
BACKEND_CONCURRENCY_MASTER: 4
ES_MEM_MASTER: 8192m
SCW_FLAVOR_MASTER: GP1-XS
SCW_VOLUME_SIZE_MASTER: 60000000000
SCW_VOLUME_TYPE_MASTER: l_ssd
GOOGLE_ANALYTICS_ID: ${{ secrets.GOOGLE_ANALYTICS_ID }}
GOOGLE_ADSENSE_ID: ${{ secrets.GOOGLE_ADSENSE_ID }}
NGINX_USER: ${{ secrets.NGINX_USER }}
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ vm_max_count := $(shell cat /etc/sysctl.conf | egrep vm.max_map_count


export STORAGE_BUCKET=${DATASET}
export SCW_VOLUME_SIZE=20000000000
export SCW_VOLUME_TYPE=l_ssd

#prebuild image with docker and nginx-node-elasticsearch docker images
#export SCW_IMAGE_ID=5944cb49-190d-49f1-b208-ab2fa2da5bac
export SCW_IMAGE_ID=f3a3ef5b-ea03-4260-b122-3998cd34871b
export SCW_VOLUME_SIZE=50000000000
export SCW_IMAGE_ID=7a1d4022-766c-42b0-866e-d9c3cbd9d3b4

dummy := $(shell touch artifacts)
include ./artifacts
Expand Down Expand Up @@ -531,7 +532,8 @@ deploy-remote-instance: config-minimal backend-config ${DATAPREP_VERSION_FILE} $
${MAKE} -C ${APP_PATH}/${GIT_TOOLS} remote-config\
CLOUD_TAG=ui:${APP_VERSION}-backend:$${BACKEND_APP_VERSION}-data:$${DATAPREP_VERSION}-$${DATA_VERSION}\
APP=${APP} APP_VERSION=${APP_VERSION} DC_IMAGE_NAME=${DC_PREFIX}\
SCW_IMAGE_ID=${SCW_IMAGE_ID} SCW_VOLUME_SIZE=${SCW_VOLUME_SIZE} GIT_BRANCH=${GIT_BRANCH} ${MAKEOVERRIDES}
SCW_IMAGE_ID=${SCW_IMAGE_ID} SCW_VOLUME_SIZE=${SCW_VOLUME_SIZE} SCW_VOLUME_TYPE=${SCW_VOLUME_TYPE} \
GIT_BRANCH=${GIT_BRANCH} ${MAKEOVERRIDES}

deploy-remote-services:
@\
Expand Down

0 comments on commit 13b3fd4

Please sign in to comment.