Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2886] improvement(ci): optimize Docker container to suite CI framework #2887

Merged
merged 2 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions dev/docker/doris/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ DISK_FREE=`df -BG | grep '/$' | tr -s ' ' | cut -d ' ' -f4 | grep -o '[0-9]*'`
if [ "$DISK_FREE" -le "$THRESHOLD" ]
then
echo "ERROR: Doris FE (version < 2.1.0) can not start with less than ${THRESHOLD}G disk space."
exit 1
fi

# comment a code snippet about max_map_count, it's not necessary for IT environment
Expand All @@ -37,6 +36,7 @@ PRIORITY_NETWORKS=$(echo "${CONTAINER_IP}" | awk -F '.' '{print$1"."$2"."$3".0/2
echo "add priority_networks = ${PRIORITY_NETWORKS} to fe.conf & be.conf"
echo "priority_networks = ${PRIORITY_NETWORKS}" >> ${DORIS_FE_HOME}/conf/fe.conf
echo "priority_networks = ${PRIORITY_NETWORKS}" >> ${DORIS_BE_HOME}/conf/be.conf
echo "report_disk_state_interval_seconds = 10" >> ${DORIS_BE_HOME}/conf/be.conf

# start doris fe and be in daemon mode
${DORIS_FE_HOME}/bin/start_fe.sh --daemon
Expand All @@ -62,10 +62,7 @@ for i in {1..10}; do
done

if [ "$fe_started" = false ]; then
echo "Doris fe failed to start"

cat ${DORIS_FE_HOME}/log/fe.*
exit 1
echo "ERROR: Doris fe failed to start"
fi

# check for be started
Expand All @@ -88,10 +85,7 @@ for i in {1..10}; do
done

if [ "$be_started" = false ]; then
echo "Doris be failed to start"

cat ${DORIS_BE_HOME}/log/*
exit 1
echo "ERROR: Doris be failed to start"
fi


Expand All @@ -113,11 +107,8 @@ for i in {1..10}; do
done

if [ "$be_added" = false ]; then
echo "Doris BE failed to add to FE"
cat ${DORIS_FE_HOME}/log/fe.* ${DORIS_BE_HOME}/log/*

exit 1
echo "ERROR: Doris BE failed to add to FE"
fi

# persist the container
tail -f ${DORIS_FE_HOME}/log/fe.log ${DORIS_BE_HOME}/log/be.INFO
tail -f /dev/null
22 changes: 13 additions & 9 deletions docs/docker-image-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,21 @@ You can use this image to test Apache Doris.

Changelog

- gravitino-ci-doris:0.1.3
- To adapt to the CI framework, don't exit container when start failed, logs are no longer printed to stdout.
- Add `report_disk_state_interval_seconds` config to decrease report interval.

- gravitino-ci-doris:0.1.2
- Add a check for the status of Doris BE, add retry for adding BE nodes.
- Add a check for the status of Doris BE, add retry for adding BE nodes.

- gravitino-ci-doris:0.1.1
- Optimize `start.sh`, add disk space check before starting Doris, exit when FE or BE start failed, add log to stdout
- Optimize `start.sh`, add disk space check before starting Doris, exit when FE or BE start failed, add log to stdout

- gravitino-ci-doris:0.1.0
- Docker image `datastrato/gravitino-ci-doris:0.1.0`
- Start Doris BE & FE in one container
- Please set table properties `"replication_num" = "1"` when creating a table in Doris, because the default replication number is 3, but the Doris container only has one BE.
- Username: `root`, Password: N/A (password is empty)
- Expose ports:
- `8030` Doris FE HTTP port
- `9030` Doris FE MySQL server port
- Docker image `datastrato/gravitino-ci-doris:0.1.0`
- Start Doris BE & FE in one container
- Please set table properties `"replication_num" = "1"` when creating a table in Doris, because the default replication number is 3, but the Doris container only has one BE.
- Username: `root`, Password: N/A (password is empty)
- Expose ports:
- `8030` Doris FE HTTP port
- `9030` Doris FE MySQL server port
Loading