kubernetes-ipfs是一个基于Kubernetes集群系统运行IPFS服务的项目,能够在Kubernetes管理界面进行规模的快速伸缩,能够经过Prometheus/Grafana动态监控运行状况。node
kubernetes-ipfs 能够在全功能的kubernetes部署上运行,也能够在 minikube 上运行。git
./reset-minikube.sh
设置 minikube到初始状态。github
./init.sh
在minikube上建立 go-ipfs 和 grafana deployments。web
go run main.go tests/simple-add-and-cat.yml
浏览器
go application 返回 0
当知足指望结果时, 1
为失败。app
下面的步骤说明如何访问在本地机器上的Grafana web UI。ide
运行 init.sh
脚本以前, 确保 grafana-core
deployment 在 prometheus-manifests.yml
中,已经有下面的变量设置:测试
- name: GF_AUTH_BASIC_ENABLED value: "false" - name: GF_AUTH_ANONYMOUS_ENABLED value: "true" - name: GF_AUTH_ANONYMOUS_ORG_ROLE value: Admin
这容许你访问Grafana interface,而不须要其余的受权操做。ui
而后, 运行 init.sh
以后, 你须要告诉Kubernetes 转发 local ports 到 Grafana interface的port。能够:this
获得包含 grafana-core deployment的pod。命令以下:
$ kubectl get pods --namespace=monitoring | grep grafana-core | awk '{print $1}' grafana-core-2701824778-j52cq
告诉 kubectl
转发全部本地 local port 3000 到port 3000,这是在上面操做发现的 grafana-core pod。这里 3000 是grafana的内部端口,以下:
kubectl port-forward --namespace=monitoring grafana-core-2701824778-j52cq 3000:3000
到这里, 你已经能够访问 Grafana's web UI,在浏览器输入 localhost:3000
。
The tests are specified in a .yml file for each test.
Each step contains a few flags that specify how they will be run, and a cmd
which is the command to run on the node
should_be_equal_to
Specify that a line number of stdout should be equal to a line you have used save_to on. On success, adds a success count, on fail, adds a failure count.