Comments (10)
from docker-apollo.
Portal依赖admin
提供服务,但会先访问config
的Eureka,所以确保至少有一个admin
服务注册到了Eureka中.
建议先看看官方的wiki,再按照官方的指导部署一遍,大致理解了Apollo的运行原理,就知道怎么回事了,再用这个镜像就知道那些env参数干什么用的.
from docker-apollo.
还有一个疑问,想问下,已经部署了dev环境,现在想增加一个fat环境,portal共用,只需要部署fat_config吗? 如下:
#fat_config配置
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
app: apollo-fat
name: apollo-fat
namespace: config
spec:
# 根据client数量配置实例数
replicas: 3
revisionHistoryLimit: 3
selector:
matchLabels:
app: apollo-fat
template:
metadata:
labels:
app: apollo-fat
spec:
# 部署标签work节点apollo的
nodeSelector:
node: "apollo"
containers:
- name: apollo-fat
image: 192.168.3.10:5001/third_party/idoop-apollo:v1.2.0
imagePullPolicy: IfNotPresent
ports:
- name: config-port
containerPort: 8081
readinessProbe:
httpGet:
path: /
port: config-port
# 启动较慢,可以适量改大,如果同时要开启admin,或者同时开启其他环境服务,比如uat或pro,则设置的预备时间值翻倍
initialDelaySeconds: 60
periodSeconds: 20
timeoutSeconds: 3
livenessProbe:
# 同预备时间相似,但如果要同时启动admin或启动多个环境的服务,则等待时长必须要大于全部服务启动完的时长
# 因为一旦没能启动完成,则健康检查失败将会陷入无限重启的状态
# 如果只有一个环境并设置了ONLY_CONFIG,则健康检查可以替换为httpGet方式.
initialDelaySeconds: 50
periodSeconds: 10
exec:
command:
- healthcheck
env:
# 如果想在容器中同时运行admin,则不要配置ONLY_CONFIG
- name: ONLY_CONFIG
value: "TRUE"
# 如果mysql也在k8s集群中,则地址可以直接配置MySQL服务名.
- name: FAT_DB
value: jdbc:mysql://xxxxxx:3306/fatapolloconfigdb?characterEncoding=utf8
- name: FAT_DB_USER
value: test_apollo
- name: FAT_DB_PWD
value: Apollo_2018
# 如果设置了ONLY_CONFIG,则可以不配置LB
# - name: DEV_LB
# value: apollo-fat
terminationGracePeriodSeconds: 5
---
kind: Service
apiVersion: v1
metadata:
labels:
app: apollo-fat
name: apollo-fat
namespace: config
spec:
ports:
- name: config-port
port: 8081
targetPort: 8081
selector:
app: apollo-fat
Portal env 还用增加一个fat连接吗?
- name: FAT_DB
value: jdbc:mysql://rm-wz954l5bqan12zwta147.mysql.rds.aliyuncs.com:3306/fatapolloconfigdb?characterEncoding=utf8
- name: FAT_DB_USER
value: test_apollo
- name: FAT_DB_PWD
value: Apollo_2018
from docker-apollo.
只需在Portal的yaml文件中添加FAT_URL
键值即可,并且确保有admin
服务向这个地址的config
服务中的Eureka注册.
from docker-apollo.
- name: FAT_DB
value: jdbc:mysql://xxxxx:3306/fatapolloconfigdb?characterEncoding=utf8- name: FAT_DB_USER
value: test_apollo - name: FAT_DB_PWD
value: Apollo_2018
- name: FAT_DB_USER
from docker-apollo.
FAT_URL
这个参数是给portal用的.请看一下主页的env参数的说明,里面介绍的很详细了.
from docker-apollo.
加了这个url之后,admin 8091没有起来,参数像是不生效,
fat confi服务需要调整什么吗?
现fat 配置如下
#fat_config配置
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
app: apollo-fat
name: apollo-fat
namespace: config
spec:
# 根据client数量配置实例数
replicas: 3
revisionHistoryLimit: 3
selector:
matchLabels:
app: apollo-fat
template:
metadata:
labels:
app: apollo-fat
spec:
# 部署标签work节点apollo的
nodeSelector:
node: "apollo"
containers:
- name: apollo-fat
image: 192.168.3.10:5001/third_party/idoop-apollo:v1.2.0
imagePullPolicy: IfNotPresent
ports:
- name: config-port
containerPort: 8081
readinessProbe:
httpGet:
path: /
port: config-port
# 启动较慢,可以适量改大,如果同时要开启admin,或者同时开启其他环境服务,比如uat或pro,则设置的预备时间值翻倍
initialDelaySeconds: 60
periodSeconds: 20
timeoutSeconds: 3
livenessProbe:
# 同预备时间相似,但如果要同时启动admin或启动多个环境的服务,则等待时长必须要大于全部服务启动完的时长
# 因为一旦没能启动完成,则健康检查失败将会陷入无限重启的状态
# 如果只有一个环境并设置了ONLY_CONFIG,则健康检查可以替换为httpGet方式.
initialDelaySeconds: 50
periodSeconds: 10
exec:
command:
- healthcheck
env:
# 如果想在容器中同时运行admin,则不要配置ONLY_CONFIG
- name: ONLY_CONFIG
value: "TRUE"
# 如果mysql也在k8s集群中,则地址可以直接配置MySQL服务名.
- name: FAT_DB
value: jdbc:mysql://xxxxxx:3306/fatapolloconfigdb?characterEncoding=utf8
- name: FAT_DB_USER
value: test_apollo
- name: FAT_DB_PWD
value: Apollo_2018
# 如果设置了ONLY_CONFIG,则可以不配置LB
# - name: DEV_LB
# value: apollo-fat
terminationGracePeriodSeconds: 5
---
kind: Service
apiVersion: v1
metadata:
labels:
app: apollo-fat
name: apollo-fat
namespace: config
spec:
ports:
- name: config-port
port: 8081
targetPort: 8081
selector:
app: apollo-fat
from docker-apollo.
注释掉ONLY_CONFIG
.
from docker-apollo.
- name: DEV_LB
value: apollo-fat
需要开启吗?
from docker-apollo.
看主页的参数介绍已经很详细了,部署的例子wiki里写了多个,有不懂的就自己多试几遍,Apollo的问题请到官方提问,我关闭这个issue了.
from docker-apollo.
Related Issues (20)
- wiki的部署portal中部署有问题 HOT 4
- docker-compose.yaml 部署/启动失败 HOT 4
- k8s部署dev,启用了admin,但portal访问不到apollo-dev HOT 4
- invalid config port env in Dockerfile HOT 1
- Cannot execute request on any known server. HOT 19
- K8S部署了portal之后外网如何访问 HOT 3
- 1.4.0了 求更新 HOT 1
- 外网访问怎么配置 HOT 3
- 是否可以支持jvm参数优化 HOT 3
- eureka返回内网地址,导致本地测试无法连接 HOT 4
- config server地址问题 HOT 8
- EUREKA_INSTANCE_HOME_PAGE_URL环境变量设置 HOT 2
- how to config eureka.instance.ip-address in yml HOT 1
- 是否有文件包含漏洞
- please add the latest version
- 不支持自定义环境 HOT 1
- 启动之后,无法访问,且没有端口占用 HOT 3
- 什么时候升级到1.8.1啊? HOT 1
- 启用[访问密钥后],客户端不加验证依然可以访问 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-apollo.