Skip to content

Commit ffdee88

Browse files
authored
feat: Support arm64 platform (#26)
1. Upgrade all Higress images to v1.1.1 2. Show an error message when user tries to use built-in nacos on arm64 platform
1 parent 01d856a commit ffdee88

3 files changed

Lines changed: 25 additions & 2 deletions

File tree

bin/configure.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ source "$ROOT/bin/base.sh"
3131

3232
source "$COMPOSE_ROOT/.env"
3333

34+
initArch() {
35+
ARCH=$(uname -m)
36+
case $ARCH in
37+
armv5*) ARCH="armv5";;
38+
armv6*) ARCH="armv6";;
39+
armv7*) ARCH="arm";;
40+
aarch64) ARCH="arm64";;
41+
x86) ARCH="386";;
42+
x86_64) ARCH="amd64";;
43+
i686) ARCH="386";;
44+
i386) ARCH="386";;
45+
esac
46+
}
47+
3448
initOS() {
3549
OS="$(uname|tr '[:upper:]' '[:lower:]')"
3650
case "$OS" in
@@ -218,6 +232,10 @@ configureNacosByArgs() {
218232

219233
if [ "$USE_BUILTIN_NACOS" == "Y" ] || [ -n "$CONFIG_URL" ]; then
220234
if [ "$USE_BUILTIN_NACOS" == "Y" ]; then
235+
if [ "$ARCH" != "amd64" ]; then
236+
echo "Sorry, built-in Nacos service doesn't support your platform. Please use a standalone Nacos service instead."
237+
exit -1
238+
fi
221239
COMPOSE_PROFILES="nacos"
222240
NACOS_SERVER_URL="$BUILTIN_NACOS_SERVER_URL"
223241
else
@@ -322,6 +340,10 @@ configureNacos() {
322340
readNonEmpty "Use built-in Nacos service (Y/N): "
323341
enableBuiltInNacos=$input
324342
if [ "$enableBuiltInNacos" == "Y" ] || [ "$enableBuiltInNacos" == "y" ]; then
343+
if [ "$ARCH" != "amd64" ]; then
344+
echo "Sorry, built-in Nacos service doesn't support your platform."
345+
continue
346+
fi
325347
USE_BUILTIN_NACOS="Y"
326348
COMPOSE_PROFILES="nacos"
327349
NACOS_SERVER_URL="${BUILTIN_NACOS_SERVER_URL}"
@@ -655,6 +677,7 @@ run() {
655677
bash $ROOT/bin/startup.sh
656678
}
657679

680+
initArch
658681
initOS
659682
parseArgs "$@"
660683
CONFIGURED_MARK="$COMPOSE_ROOT/.configured"

compose/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ HIGRESS_RUNNER_TAG='0.0.3'
1111
HIGRESS_API_SERVER_TAG='0.0.8'
1212
HIGRESS_CONTROLLER_TAG='1.1.1'
1313
HIGRESS_PILOT_TAG='1.1.1'
14-
HIGRESS_GATEWAY_TAG='1.1.0'
14+
HIGRESS_GATEWAY_TAG='1.1.1'
1515
HIGRESS_CONSOLE_TAG='1.1.1'
1616
HIGRESS_CONSOLE_PASSWORD='admin'
1717
NACOS_HTTP_PORT='8848'

src/get-higress.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ runAsRoot() {
143143
# verifySupported checks that the os/arch combination is supported for
144144
# binary builds, as well whether or not necessary tools are present.
145145
verifySupported() {
146-
local supported="darwin-amd64\nlinux-amd64\nwindows-amd64\n"
146+
local supported="darwin-amd64\nlinux-amd64\nwindows-amd64\ndarwin-arm64\nlinux-arm64\nwindows-arm64\n"
147147
if ! echo "${supported}" | grep -q "${OS}-${ARCH}"; then
148148
echo "${OS}-${ARCH} platform isn't supported at the moment."
149149
echo "Stay tuned for updates on https://github.com/alibaba/higress."

0 commit comments

Comments
 (0)