Skip to content

Commit

Permalink
Merge branch 'hotfix/v2.0.1' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySafronov committed Jan 15, 2024
2 parents 5a643d2 + 6c29cf7 commit 4563d15
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
11 changes: 11 additions & 0 deletions config/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -575,5 +575,16 @@
"region": "us-east-1",
"tableName": ""
}
},
"webhooks": {
"blacklist": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.168.0.0/16"
]
}
}
33 changes: 14 additions & 19 deletions install/common/product-configuration
Original file line number Diff line number Diff line change
Expand Up @@ -647,30 +647,25 @@ change_elasticsearch_config(){
sed -i "s/ingest.geoip.downloader.enabled.*/ingest.geoip.downloader.enabled: false/" ${ELASTIC_SEARCH_CONF_PATH}
fi

ELASTIC_SYSTEMD_DIR="${SYSTEMD_DIR}/elasticsearch.service.d"
mkdir -p "${ELASTIC_SYSTEMD_DIR}"

if [ ! -e "${ELASTIC_SYSTEMD_DIR}/overwrite.conf" ]; then
echo "[Service]" > "${ELASTIC_SYSTEMD_DIR}/overwrite.conf"
echo "TimeoutStartSec=600" >> "${ELASTIC_SYSTEMD_DIR}/overwrite.conf"
systemctl daemon-reload >/dev/null 2>&1
fi

local TOTAL_MEMORY=$(free -m | grep -oP '\d+' | head -n 1);
local MEMORY_REQUIREMENTS=12228; #RAM ~4*3Gb

if [ ${TOTAL_MEMORY} -gt ${MEMORY_REQUIREMENTS} ]; then
if ! grep -q "[-]Xms1g" ${ELASTIC_SEARCH_JAVA_CONF_PATH}; then
echo "-Xms4g" >> ${ELASTIC_SEARCH_JAVA_CONF_PATH}
else
sed -i "s/-Xms1g/-Xms4g/" ${ELASTIC_SEARCH_JAVA_CONF_PATH}
fi
ELASTICSEATCH_MEMORY="4g"
else
ELASTICSEATCH_MEMORY="1g"
fi

if ! grep -q "[-]Xmx1g" ${ELASTIC_SEARCH_JAVA_CONF_PATH}; then
echo "-Xmx4g" >> ${ELASTIC_SEARCH_JAVA_CONF_PATH}
else
sed -i "s/-Xmx1g/-Xmx4g/" ${ELASTIC_SEARCH_JAVA_CONF_PATH}
fi
if grep -qE "^[^#]*-Xms[0-9]g" "${ELASTIC_SEARCH_JAVA_CONF_PATH}"; then
sed -i "s/-Xms[0-9]g/-Xms${ELASTICSEATCH_MEMORY}/" "${ELASTIC_SEARCH_JAVA_CONF_PATH}"
else
echo "-Xms${ELASTICSEATCH_MEMORY}" >> "${ELASTIC_SEARCH_JAVA_CONF_PATH}"
fi

if grep -qE "^[^#]*-Xmx[0-9]g" "${ELASTIC_SEARCH_JAVA_CONF_PATH}"; then
sed -i "s/-Xmx[0-9]g/-Xmx${ELASTICSEATCH_MEMORY}/" "${ELASTIC_SEARCH_JAVA_CONF_PATH}"
else
echo "-Xmx${ELASTICSEATCH_MEMORY}" >> "${ELASTIC_SEARCH_JAVA_CONF_PATH}"
fi

if [ -d /etc/elasticsearch/ ]; then
Expand Down
2 changes: 1 addition & 1 deletion run/WebStudio.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\server\web\ASC.Web.Studio\bin\Debug\ASC.Web.Studio.exe urls=http://0.0.0.0:5003 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=web.studio pathToConf=%cd%\buildtools\config core:products:folder=%cd%\server\products
set servicepath=%cd%\server\web\ASC.Web.Studio\bin\Debug\ASC.Web.Studio.exe urls=http://0.0.0.0:5003 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=web.studio pathToConf=%cd%\buildtools\config core:products:folder=%cd%\server\products core:eventBus:subscriptionClientName=asc_event_bus_webstudio_queue

0 comments on commit 4563d15

Please sign in to comment.