Skip to content

Commit

Permalink
[ISSUE polarismesh#737] Install standalone limiter (polarismesh#746)
Browse files Browse the repository at this point in the history
* fix issue polarismesh#629 (polarismesh#693)

* docs:优化错误信息描述

* Update zh.toml

* fix:修复eureka心跳协议错误码不兼容问题

* fix:修复eureka心跳协议错误码不兼容问题

* unit:添加单元测试

* test:调整测试配置文件位置

* fix:issue polarismesh#692

* fix:issue polarismesh#692

* fix:issue polarismesh#692

* fix:issue polarismesh#692

* docs:add error code desc

* fix:code style

* fix:修复zh.toml中的错误码描述 (polarismesh#742)

* fix:修复zh.toml中的错误码描述 (polarismesh#742)

* install:支持单机docker镜像部署limiter

* fix:修复limiter单机docker镜像问题

* fix:修复limiter单机docker镜像问题

* fix:修复limiter单机docker镜像问题

* fix:修复limiter单机docker镜像问题

* fix:修复limiter单机docker镜像问题

* fix:修复limiter单机docker镜像问题
  • Loading branch information
chuntaojun authored and hoErYu committed Oct 17, 2022
1 parent 2c0ba19 commit a2a0c88
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 10 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/docker-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
console_version:
description: "tag version for polaris-console"
required: true
limiter_version:
description: "tag version for polaris-limiter"
required: true

jobs:
release:
Expand Down Expand Up @@ -47,12 +50,13 @@ jobs:
GOARCH: ${{ matrix.goarch }}
SERVER_VERSION: ${{ github.event.inputs.server_version }}
CONSOLE_VERSION: ${{ github.event.inputs.console_version }}
LIMITER_VERSION: ${{ github.event.inputs.limiter_version }}
run: |
set -e
cd deploy/standalone
POLARIS_GIT_PATH=https://github.com/polarismesh
DIR_NAME=polaris-standalone-release_${SERVER_VERSION}.${GOOS}
rm -rf ${DIR_NAME}
mkdir ${DIR_NAME}
Expand All @@ -66,6 +70,8 @@ jobs:
wget -T10 -t3 ${POLARIS_GIT_PATH}/polaris/releases/download/${SERVER_VERSION}/${SERVER_PKG_NAME} --no-check-certificate
CONSOLE_PKG_NAME=polaris-console-release_${CONSOLE_VERSION}.${GOOS}.${GOARCH}.zip
wget -T10 -t3 ${POLARIS_GIT_PATH}/polaris-console/releases/download/${CONSOLE_VERSION}/${CONSOLE_PKG_NAME} --no-check-certificate
LIMITER_PKG_NAME=polaris-limiter-release_${LIMITER_VERSION}.${GOOS}.${GOARCH}.zip
wget -T10 -t3 ${POLARIS_GIT_PATH}/polaris-limiter/releases/download/${LIMITER_VERSION}/${LIMITER_PKG_NAME} --no-check-certificate
wget -T10 -t3 https://github.com/prometheus/prometheus/releases/download/v2.28.0/prometheus-2.28.0.${GOOS}-${GOARCH}.tar.gz
wget -T10 -t3 https://github.com/prometheus/pushgateway/releases/download/v1.4.1/pushgateway-1.4.1.${GOOS}-${GOARCH}.tar.gz
Expand All @@ -74,22 +80,23 @@ jobs:
done
platforms=${platforms::-1}
cp ../vm/install-${GOOS}.sh ./install.sh
cp ../vm/uninstall-${GOOS}.sh ./uninstall.sh
cp ../vm/prometheus-help.sh ./prometheus-help.sh
cp ../vm/port.properties ./port.properties
cp ../vm/Dockerfile ./Dockerfile
echo "#!/bin/bash" >"run.sh"
echo "" >>"run.sh"
echo "bash install.sh" >>"run.sh"
echo "while ((1))" >>"run.sh"
echo "do" >>"run.sh"
echo " sleep 1" >>"run.sh"
echo "done" >>"run.sh"
docker_repository="polarismesh"
docker_image="polaris-server-standalone"
docker_tag=${SERVER_VERSION}
docker buildx build --network=host --build-arg SERVER_VERSION="${SERVER_VERSION}" --build-arg CONSOLE_VERSION="${CONSOLE_VERSION}" -t ${docker_repository}/${docker_image}:${docker_tag} -t ${docker_repository}/${docker_image}:latest --platform ${platforms} --push ./
docker buildx build --network=host --build-arg SERVER_VERSION="${SERVER_VERSION}" --build-arg CONSOLE_VERSION="${CONSOLE_VERSION}" --build-arg LIMITER_VERSION="${LIMITER_VERSION}" -t ${docker_repository}/${docker_image}:${docker_tag} -t ${docker_repository}/${docker_image}:latest --platform ${platforms} --push ./
2 changes: 2 additions & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

[![Build Status](https://github.com/polarismesh/polaris/actions/workflows/codecov.yaml/badge.svg)](https://github.com/PolarisMesh/polaris/actions/workflows/codecov.yaml)
[![codecov.io](https://codecov.io/gh/polarismesh/polaris/branch/main/graph/badge.svg)](https://codecov.io/gh/polarismesh/polaris?branch=main)
[![Docker Pulls](https://img.shields.io/docker/pulls/polarismesh/polaris-server)](https://hub.docker.com/repository/docker/polarismesh/polaris-server/general)
[![Contributors](https://img.shields.io/github/contributors/polarismesh/polaris)](https://github.com/polarismesh/polaris/graphs/contributors)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/polarismesh/polaris?style=flat-square)](https://github.com/polarismesh/polaris)

<img src="logo.svg" width="10%" height="10%" />

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

[![Build Status](https://github.com/polarismesh/polaris/actions/workflows/codecov.yaml/badge.svg)](https://github.com/PolarisMesh/polaris/actions/workflows/codecov.yaml)
[![codecov.io](https://codecov.io/gh/polarismesh/polaris/branch/main/graph/badge.svg)](https://codecov.io/gh/polarismesh/polaris?branch=main)
[![Docker Pulls](https://img.shields.io/docker/pulls/polarismesh/polaris-server)](https://hub.docker.com/repository/docker/polarismesh/polaris-server/general)
[![Contributors](https://img.shields.io/github/contributors/polarismesh/polaris)](https://github.com/polarismesh/polaris/graphs/contributors)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/polarismesh/polaris?style=flat-square)](https://github.com/polarismesh/polaris)

<img src="logo.svg" width="10%" height="10%" />

Expand Down
1 change: 1 addition & 0 deletions deploy/helm/templates/polaris-server-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ data:
listenIP: "0.0.0.0"
listenPort: {{ .Values.service.httpPort }}
enablePprof: true # debug pprof
enableSwagger: true
connLimit:
openConnLimit: false
maxConnPerHost: 128
Expand Down
23 changes: 23 additions & 0 deletions deploy/standalone/docker-compose/server/polaris-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,28 @@ bootstrap:
# - stdout
# errorOutputPaths:
# - stderr
healthcheck:
rotateOutputPath: log/polaris-healthcheck.log
errorRotateOutputPath: log/polaris-healthcheck-error.log
rotationMaxSize: 100
rotationMaxBackups: 10
rotationMaxAge: 7
outputLevel: info
# outputPaths:
# - stdout
# errorOutputPaths:
# - stderr
xdsv3:
rotateOutputPath: log/polaris-xdsv3.log
errorRotateOutputPath: log/polaris-xdsv3-error.log
rotationMaxSize: 100
rotationMaxBackups: 10
rotationMaxAge: 7
outputLevel: info
# outputPaths:
# - stdout
# errorOutputPaths:
# - stderr
default:
rotateOutputPath: log/polaris-default.log
errorRotateOutputPath: log/polaris-default-error.log
Expand Down Expand Up @@ -104,6 +126,7 @@ apiservers:
listenIP: "0.0.0.0"
listenPort: 8090
enablePprof: true # debug pprof
enableSwagger: true # debug pprof
connLimit:
openConnLimit: false
maxConnPerHost: 128
Expand Down
1 change: 1 addition & 0 deletions deploy/standalone/k8s/02-polaris-server-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ data:
listenIP: "0.0.0.0"
listenPort: 8090
enablePprof: true # debug pprof
enableSwagger: true # debug pprof
connLimit:
openConnLimit: false
maxConnPerHost: 128
Expand Down
9 changes: 6 additions & 3 deletions deploy/standalone/vm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM centos:centos7.9.2009

ARG SERVER_VERSION=v1.10.0
ARG CONSOLE_VERSION=v1.7.1
ARG SERVER_VERSION=v1.12.0
ARG CONSOLE_VERSION=v1.9.0
ARG LIMITER_VERSION=v1.0.2
ARG GOOS=linux
ARG TARGETARCH=amd64

Expand All @@ -12,13 +13,15 @@ RUN yum install -y lsof curl unzip vixie-cron crontabs

COPY polaris-server-release_${SERVER_VERSION}.${GOOS}.${TARGETARCH}.zip /root/polaris-server-release_${SERVER_VERSION}.${GOOS}.${TARGETARCH}.zip
COPY polaris-console-release_${CONSOLE_VERSION}.${GOOS}.${TARGETARCH}.zip /root/polaris-console-release_${CONSOLE_VERSION}.${GOOS}.${TARGETARCH}.zip
COPY polaris-limiter-release_${LIMITER_VERSION}.${GOOS}.${TARGETARCH}.zip /root/polaris-limiter-release_${LIMITER_VERSION}.${GOOS}.${TARGETARCH}.zip
COPY prometheus-2.28.0.${GOOS}-${TARGETARCH}.tar.gz /root/prometheus-2.28.0.${GOOS}-${TARGETARCH}.tar.gz
COPY install.sh /root/install.sh
COPY prometheus-help.sh /root/prometheus-help.sh
COPY port.properties /root/port.properties
COPY run.sh /root/run.sh

WORKDIR /root

EXPOSE 8091 8090 8761 8093 8080 9000 8761 15010 9090
EXPOSE 8091 8090 8761 8093 8080 8100 8101 9000 8761 15010 9090

CMD ["/bin/bash", "run.sh"]

0 comments on commit a2a0c88

Please sign in to comment.