Skip to content

Commit

Permalink
add 4 cores and 6 GB Ram min requirements
Browse files Browse the repository at this point in the history
Signed-off-by: Tarun Pothulapati <[email protected]>
  • Loading branch information
Pothulapati committed Jun 7, 2022
1 parent 64a05b0 commit 3dfbe2b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

set -eux -o pipefile

# check for minimum requirements
REQUIRED_MEM_KB=$((6 * 1024 * 1024))
total_mem_kb=$(cat /proc/meminfo | awk '/MemTotal:/ {print $2}')
if [ $total_mem_kb -lt $((REQUIRED_MEM_KB)) ]; then
echo "Preview installation of Gitpod requires a system with at least 6GB of memory"
exit 1
fi

REQUIRED_CORES=4
total_cores=$(nproc)
if [ $total_cores -lt $((REQUIRED_CORES)) ]; then
echo "Preview installation of Gitpod requires a system with at least 4 CPU Cores"
exit 1
fi

# Get container's IP address
NODE_IP=$(hostname -i)
DOMAIN_STRING=${NODE_IP//[.]/-}
Expand Down

0 comments on commit 3dfbe2b

Please sign in to comment.