Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一套配置中心服务端配置3个环境的配置,是否支持?如何操作?自测貌似不行 #582

Closed
myfreeway opened this issue Apr 6, 2017 · 2 comments

Comments

@myfreeway
Copy link

操作步骤:
1、数据库配置了apollo.portal.envs=dev,fat,uat
2、打包时,scripts/build.sh是这样的:

# meta server url
dev_meta=http://localhost:8080
fat_meta=http://localhost:8080
uat_meta=http://localhost:8080
pro_meta=http://localhost:8080

3、上portal后台,依次点击dev/fat/uat三个环境,使用文本模式创建key一样的三套配置,并发布
4、自己应用集成客户端,并用此参数启动-Denv=dev -Ddev_meta=http://10.20.100.79:8080。
5、问题来了:当变化env为其他两个环境名启动时,发现每次获取的配置都是最后一次发布的配置。不能根据环境来获取配置。
请问如何解决?是否只能一套服务端只能使用一个环境?
重点:每套环境的配置项key名都是一样的,只是内容不一样。
多谢!

@nobodyiam
Copy link
Member

每个环境的meta server,config service,admin service和apolloconfigdb都是不同的。你的例子里面不同的环境其实是同一套配置环境,自然是不对的,可以参考一下分布式部署指南-环境

@myfreeway
Copy link
Author

感谢非常及时的回复。按照参考已经搞定。果然要配置多套service,共一套portal。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants