https://github.com/alibaba/Sentinel/tree/release-1.8
Sentinel 官网下载了1.8.6版本源码上传到了自己的git上。
通过jenkins 的pipeline 自动构建项目到k8s上。可以自己改改初始密码啥的。
#spring settings server.servlet.encoding.force=true server.servlet.encoding.charset=UTF-8 server.servlet.encoding.enabled=true #cookie name setting server.servlet.session.cookie.name=sentinel_dashboard_cookie #logging settings logging.level.org.springframework.web=INFO logging.file.name=${user.home}/logs/csp/sentinel-dashboard.log logging.pattern.file= %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n #logging.pattern.console= %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n #auth settings auth.filter.exclude-urls=/,/auth/login,/auth/logout,/registry/machine,/version auth.filter.exclude-url-suffixes=htm,html,js,css,map,ico,ttf,woff,png # If auth.enabled=false, Sentinel console disable login auth.username=sentinel auth.password=sentinel # Inject the dashboard version. It's required to enable # filtering in pom.xml for this resource file. sentinel.dashboard.version=@project.version@
dockerfile 启动项添加下端口啥的--当然这里可以通过前面配置参数来传递,看自己怎么处理了
FROM openjdk:8-jdk-alpine #构建参数 ARG JAR_FILE ARG WORK_PATH="/opt/demo" # 环境变量 ENV JAVA_OPTS="" \ JAR_FILE=${JAR_FILE} #设置时区 RUN apk update && apk add ca-certificates && \ apk add tzdata && \ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ echo "Asia/Shanghai" > /etc/timezone COPY target/$JAR_FILE $WORK_PATH/ WORKDIR $WORK_PATH ENTRYPOINT exec java -Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject.name=sentinel-dashboard $JAVA_OPTS -jar $JAR_FILE
乐享:知识积累,快乐无限。