Skip to content

Commit

Permalink
Update server address params in docker entrypoint for atlas-applicati…
Browse files Browse the repository at this point in the history
…on.properties file
  • Loading branch information
hritvikpatel4 committed Jun 22, 2022
1 parent 37633e3 commit b99f46d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# Setup log size to be 2 GiB
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=1073741824
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=2147483648

# - name: Log in to Docker Hub
# if: github.event_name != 'pull_request'
Expand Down
14 changes: 11 additions & 3 deletions docker/docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ start_atlas(){
echo "--------------------------------------------------------"

$ATLAS_INSTALL_LOCATION/bin/atlas_start.py
sleep 45

echo "Sleeping for 120 seconds"
sleep 120
echo "--------------------------------------------------------"

tail -f $ATLAS_INSTALL_LOCATION/logs/application.log
}

Expand All @@ -58,9 +62,13 @@ if [ -n "$*" ]; then
echo "--------------------------------------------------------"
patch -u -b $ATLAS_PROPERTIES_FILE -i $ATLAS_INSTALL_LOCATION/conf/patches/atlas_HA_conf.patch

LOCALHOST_NAME="$(hostname):21000"

sed -i -e "s/ATLAS_ZK_QUORUM/$ATLAS_ZK_QUORUM/" $ATLAS_PROPERTIES_FILE
sed -i -e "s/SERVER1_ADDR/$SERVER1_ADDR/" $ATLAS_PROPERTIES_FILE
sed -i -e "s/SERVER2_ADDR/$SERVER2_ADDR/" $ATLAS_PROPERTIES_FILE
# sed -i -e "s/SERVER1_ADDR/$SERVER1_ADDR/" $ATLAS_PROPERTIES_FILE
sed -i -e "s/SERVER1_ADDR/$LOCALHOST_NAME/" $ATLAS_PROPERTIES_FILE
# sed -i -e "s/SERVER2_ADDR/$SERVER2_ADDR/" $ATLAS_PROPERTIES_FILE
sed -i -e "s/SERVER2_ADDR/$SERVER_ADDR/" $ATLAS_PROPERTIES_FILE

sed -i -e "s/HA_ZOOKEEPER_RETRY_SLEEPTIME/$HA_ZOOKEEPER_RETRY_SLEEPTIME/" $ATLAS_PROPERTIES_FILE
sed -i -e "s/HA_ZOOKEEPER_SESSION_TIMEOUT/$HA_ZOOKEEPER_SESSION_TIMEOUT/" $ATLAS_PROPERTIES_FILE
Expand Down

0 comments on commit b99f46d

Please sign in to comment.