Просмотр исходного кода

Merge branch 'master' of github.com:kubecost/cost-model into AjayTripathy-remote-write

AjayTripathy 6 лет назад
Родитель
Сommit
827105446d
3 измененных файлов с 30 добавлено и 10 удалено
  1. 13 0
      CONTRIBUTING.md
  2. 3 10
      README.md
  3. 14 0
      deploying-as-a-pod.md

+ 13 - 0
CONTRIBUTING.md

@@ -7,6 +7,19 @@ Thanks for your help improving the project!
 If you have a question about Kubecost or have encountered problems using it,
 you can start by asking a question on [Slack](https://join.slack.com/t/kubecost/shared_invite/enQtNTA2MjQ1NDUyODE5LTg0MzYyMDIzN2E4M2M5OTE3NjdmODJlNzBjZGY1NjQ3MThlODVjMGY3NWZlNjQ5NjIwNDc2NGU3MWNiM2E5Mjc) or via email at [team@kubecost.com](team@kubecost.com)
 
+## Building ## 
+
+Follow these steps to build from source and deploy:
+
+1. `docker build --rm -f "Dockerfile" -t <repo>/kubecost-cost-model:<tag> .`
+2. Edit the [pulled image](https://github.com/kubecost/cost-model/blob/master/kubernetes/deployment.yaml#L22) in the deployment.yaml to <repo>/kubecost-cost-model:<tag>
+3. Set [this environment variable](https://github.com/kubecost/cost-model/blob/master/kubernetes/deployment.yaml#L30) to the address of your prometheus server
+4. `kubectl create namespace cost-model`
+5. `kubectl apply -f kubernetes/ --namespace cost-model`
+6. `kubectl port-forward --namespace cost-model service/cost-model 9003`
+
+To test, build the cost-model docker container and then push it to a Kubernetes cluster with a running Prometheus.
+
 ## Certification of Origin ##
 
 By contributing to this project you certify that your contribution was created in whole or in part by you and that you have the right to submit it under the open source license indicated in the project. In other words, please confirm that you, as a contributor, have the legal right to make the contribution. 

+ 3 - 10
README.md

@@ -42,15 +42,8 @@ Note: the following dependencies mentioned above are required for this installat
 
 ## Contributing
 
-We :heart: pull requests! See [`CONTRIBUTING.md`](CONTRIBUTING.md) for info on
-contributing changes. To test, you'll need to build the cost-model docker container then push it to a kubernetes cluster with a running prometheus.
-
-1. `docker build --rm -f "Dockerfile" -t <repo>/kubecost-cost-model:<tag> .`
-2. Edit the [pulled image](https://github.com/kubecost/cost-model/blob/master/kubernetes/deployment.yaml#L22) in the deployment.yaml to <repo>/kubecost-cost-model:<tag>
-3. Set [this environment variable](https://github.com/kubecost/cost-model/blob/master/kubernetes/deployment.yaml#L30) to the address of your prometheus server
-4. `kubectl create namespace cost-model`
-5. `kubectl apply -f kubernetes/ --namespace cost-model`
-6. `kubectl port-forward --namespace cost-model service/cost-model 9003`
+We :heart: pull requests! See [`CONTRIBUTING.md`](CONTRIBUTING.md) for information on buiding the project from source
+and contributing changes. 
 
 ## Licensing
 
@@ -62,7 +55,7 @@ Golang application.
 Prometheus. 
 Kubernetes. 
 
-## Questions
+## Frequently Asked Questions
 
 ***How do you measure the cost of CPU/RAM/GPU/storage for a container, pod, deployment, etc.***
 

+ 14 - 0
deploying-as-a-pod.md

@@ -0,0 +1,14 @@
+## Deploying as a pod
+
+See this page for all [Kubecost install options](http://docs.kubecost.com/install).
+
+If you would like to deploy the cost model (w/o dashboards) directly a pod on your cluster, complete the listed below. 
+
+1. Set [this environment variable](https://github.com/kubecost/cost-model/blob/master/kubernetes/deployment.yaml#L30) to the address of your prometheus server
+2. `kubectl create namespace cost-model`
+3. `kubectl apply -f kubernetes/ --namespace cost-model`
+4. `kubectl port-forward --namespace cost-model service/cost-model 9003`
+
+To test that the server is running, you can hit [http://localhost:9003/costDataModel?timeWindow=1d](http://localhost:9003/costDataModel?timeWindow=1d)
+
+**Note:** This approach provides less functionality compared to other install options referenced above. Also, Prometheus and kube-state-metrics are external dependencies for this installation path.