注:配置chartmuseum 可以从官方查看说文档
https://chartmuseum.com/docs/#prometheus-metrics
此次主要介绍二进制的部署配置方式:
第一步,下载chartmuseum二进制文件,操作如下(本文介绍 linux):
# on Linux
curl -LO https://s3.amazonaws.com/chartmuseum/release/latest/bin/linux/amd64/chartmuseum
# on macOS
curl -LO https://s3.amazonaws.com/chartmuseum/release/latest/bin/darwin/amd64/chartmuseum
# on Windows
curl -LO https://s3.amazonaws.com/chartmuseum/release/latest/bin/windows/amd64/chartmuseum
chmod +x ./chartmuseum
mv ./chartmuseum /usr/local/bin
第二步,编辑chartmuseum.service文件,配置systemd服务管理,内容如下:
cat /etc/systemd/system/chartmuseum.service
[Unit]
Description=chartmuseum
Requires=network-online.target
After=network-online.target
[Service]
EnvironmentFile=/etc/chartmuseum/chartmuseum.config
User=root
Restart=always
ExecStart=/usr/local/bin/chartmuseum $ARGS
#ExecStop=/usr/local/bin/chartmuseum step-down
ExecStop=/bin/kill -s HUP $MAINPID
[Install]
WantedBy=multi-user.target
第三步,编写chartmuseum服务启动配置
cat /etc/chartmuseum/chartmuseum.config
ARGS=--port=8081 --storage="local" --storage-local-rootdir="/data/chartmuseum/" --log-json --basic-auth-user=admin --basic-auth-pass="123456"
配置了用户密码,安全。
第四步,当然是启动服务
systemctl daemon-reload
systemctl start chartmuseum.service
systemctl enable chartmuseum.service
netstat -apntu|grep 8081
第五步,添加helm仓库
helm repo add clife_repo http://111.230.173.94:8081 --username admin --password 123456
helm repo ls