인프라
confd
BUST
2018. 11. 19. 22:32
confd
- configuration management tool
- guide
- docs & sample
backend
- configuration 데이터를 가지고 오는 backend
- etcd
- consul
- vault
- environment variables
- file
- redis
- zookeeper
- dynamodb
- rancher
- ssm
create the confdir
- confd를 사용하기 위한 폴더를 생성
sudo mkdir -p /etc/confd/{conf.d,templates}
create a template resource config
- template의 설정 파일
- 파일의 template 설정과 저장될 데이터의 위치를 정할수 있다.
/etc/confd/conf.d/myconfig.toml
[template]
src = "myconfig.conf.tmpl"
dest = "/tmp/myconfig.conf"
keys = [
"/myapp/database/url",
"/myapp/database/user",
]
Create the source template
/etc/confd/templates/myconfig.conf.tmpl
[myconfig]
database_url = {{getv "/myapp/database/url"}}
database_user = {{getv "/myapp/database/user"}}
Proces the template
env
confd -onetime -backend env