Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

Adding Volumes, and Readme updated #16

Merged
merged 17 commits into from Apr 10, 2018
Merged

Adding Volumes, and Readme updated #16

merged 17 commits into from Apr 10, 2018

Conversation

carlioth
Copy link
Contributor

@carlioth carlioth commented Apr 5, 2018

  • Volumes fixed
  • Created scripts to make it easier for the documentation
  • Documentation big re-write

Fixes #25, fixes #20

Copy link
Contributor

@gabbaxx gabbaxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Contributor

@peol peol left a 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.

@FredrikFolkesson
Copy link
Contributor

@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

Copy link
Contributor

@FredrikFolkesson FredrikFolkesson left a 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 .
Copy link
Contributor

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}"
Copy link
Contributor

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.
Copy link
Contributor

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>
Copy link
Contributor

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 .
Copy link
Contributor

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.
Copy link
Contributor

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
Copy link
Contributor

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

@FredrikFolkesson
Copy link
Contributor

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

@peol
Copy link
Contributor

peol commented Apr 5, 2018

@FredrikFolkesson Probably line endings... LF/CRLF, .qvf needs to be added as binary in .gitattributes before qvf is added in a commit.

@FredrikFolkesson
Copy link
Contributor

FredrikFolkesson commented Apr 5, 2018

@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..

Copy link
Contributor

@FredrikFolkesson FredrikFolkesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great work!

@carlioth carlioth merged commit c887dcc into master Apr 10, 2018
@FredrikFolkesson FredrikFolkesson deleted the volumes branch May 28, 2018 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants