ChartMuseum的安装和基本配置
ChartMuseum的安装和基本配置
使用docker-compose安装
一. 安装docker-compose
# curl -L https://github.com/docker/compose/releases/download/1.29.0/docker-compose-uname -s
-uname -m
-o /usr/local/bin/docker-compose
上条命令自动安装版本为1.29.0 的docker-compose
二. 安装chartmuseum 和chartmuseumui
# mkdir /opt/chartmuseum
# cd /opt/chartmuseum/
# vim docker-compose.yaml
version: '3.0'
services:
ui:
#build: ./
image: idobry/chartmuseumui:latest
environment:
CHART_MUSESUM_URL: http://chartmuseum:8080
ports:
- 1999:8080
chartmuseum:
image: chartmuseum/chartmuseum:latest
volumes:
- ./charts:/charts
restart: always
environment:
PORT: 8080
STORAGE: local
STORAGE_LOCAL_ROOTDIR: /charts
ports:
- 8080:8080
# docker-compose up -d
# docker-compose ps
Name Command State Ports
-------------------------------------------------------------------------------------------
chartmuseum_chartmuseum_1 /chartmuseum Up 0.0.0.0:8080->8080/tcp
chartmuseum_ui_1 /bin/sh -c (cd $APP_DIR && ... Up 0.0.0.0:1999->8080/tcp
##### 三. 可能会出现的问题
volumes:
- ./charts:/charts
就上面这docker挂载没有权限,进入docker里看/charts 目录是什么用户和组,然后退出容器就给宿主机./charts 权限。
#### 四. API
##### [HELM CHART REPOSITORY](https://chartmuseum.com/docs/#helm-chart-repository)
- GET /index.yaml
- retrieved when you run helm repo add chartmuseum http://localhost:8080/
- GET /charts/mychart-0.1.0.tgz
- retrieved when you run helm install chartmuseum/mychart
- GET /charts/mychart-0.1.0.tgz.prov
- retrieved when you run helm install
with the --verify
flag
##### [CHART MANIPULATION](https://chartmuseum.com/docs/#chart-manipulation)
- POST /api/charts
- upload a new chart version
- POST /api/prov
- upload a new provenance file
- DELETE /api/charts/<name>/<version>
- delete a chart version (and corresponding provenance file)
- GET /api/charts
- list all charts
- GET /api/charts/<name>
- list all versions of a chart
- GET /api/charts/<name>/<version>
- describe a chart version
##### [SERVER INFO](https://chartmuseum.com/docs/#server-info)
- GET /
- HTML welcome page
- GET /health
- returns 200 OK