Adding Volumes, and Readme updated #16
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but there's a lot of information here that is non-technical/more about following commands like in a tutorial—should probably reduce that info in this repo and move it over to the documentation repo in the future instead.
@peol basically all of this documentation should be moved to the documentation repo I think, since it as you say is how you use this demo/example and not how you would continue to develop on it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
Some small comments.
Chown must happen after seeding with the app though, otherwise it wont change owner to the nobody user
|
||
After the script finished you should be able to query the Kubernetes cluster. To see some metric execute the following commands: | ||
|
||
Node metrics: | ||
|
||
```bash | ||
kubectl get --raw "/apis/metrics.k8s.io/v1beta1/nodes" | jq . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note that you need jq
?
settings.config
Outdated
@@ -0,0 +1,11 @@ | |||
GCLOUD_PROJECT="${GCLOUD_PROJECT}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GCLOUD_PROJECT="${GCLOUD_PROJECT:-your-project-name-here}"
README.md
Outdated
### Option 2 - Setting up Custom Metrics Server step by step | ||
|
||
Now we can scale on the built-in metrics which is CPU and Memory, but in order to scale based on custom metrics you need to have two components. | ||
One component that collects metrics from your applications and stores them the [Prometheus](https://prometheus.io) in a time series database. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and stores them USING? Prometheus...
@@ -42,7 +65,7 @@ Take the output of the above command and increase priveleges: | |||
kubectl create clusterrolebinding myname-cluster-admin-binding --clusterrole=cluster-admin --user=<ACCOUNT FROM ABOVE> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a note that sometimes the case does not match. I.E
gcloud info | grep Account
gives me fredrik.folkesson...
but the actual user is Fredrik.Folkesson...
and the rolebinding must thus match that.
@@ -96,24 +121,27 @@ Get the total qix_active_sessions from the custom metrics API: | |||
kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/default/pods/*/qix_active_sessions" | jq . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a note that this will give 404 for some time (15-30 seconds) before the metrics are up an running
@@ -96,24 +121,27 @@ Get the total qix_active_sessions from the custom metrics API: | |||
kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/default/pods/*/qix_active_sessions" | jq . | |||
``` | |||
|
|||
Check that the Horizontal Pod Autoscaler is active and check that you have 0 sessions on your engines. | |||
Check that the HPA (Horizontal Pod Autoscaler), which is responsible for the scaling, is active and check that you have 0 sessions on your engines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add that this will be <unknown> / 10
for a while before the hpa gets metrics for the first time
README.md
Outdated
|
||
```bash | ||
kubectl create -f ./ingress | ||
./doc-seed.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the seeding must happen before the engine starts since the engine extra container does the chowning at start up
For me the .qvf file is corrupted, tried downloading it again and same error (Engine fails loading it complaining that the file is corrupted) tried with the drugcases.qvf and it worked. Someone else should probably do the whole tutorial to see if the error is with my computer somehow or the qvf |
@FredrikFolkesson Probably line endings... LF/CRLF, |
@peol tried taking it from an internal repo and using the file from there, same problem O.o EDIT: when taking the old one I had from my disc it worked.. |
…otherwise engine wont own the app (#24)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great work!
Fixes #25, fixes #20