From 1fefb895a9393713e95431fb74e011f9aa4eff12 Mon Sep 17 00:00:00 2001 From: Alexandru Giurgiu Date: Mon, 6 Mar 2017 15:53:32 +0200 Subject: [PATCH 1/3] Added fluentd instructions for Docker Compose --- deployment/docker-compose.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/deployment/docker-compose.md b/deployment/docker-compose.md index 9a1e168..fddcb6c 100644 --- a/deployment/docker-compose.md +++ b/deployment/docker-compose.md @@ -52,6 +52,17 @@ Weave Cloud (hosted platform). Get a token by [registering here](http://cloud.we +##### *(Optional)* Run with Fluentd logging + +If you want to run the application using a more advanced logging setup based on Fluentd + ELK stack, you can add the logging compose file +to override some settings and add some extra containers: + +``` +docker-compose -f deploy/docker-compose/docker-compose.yml -f deploy/docker-compose/docker-compose.logging.yml up -d +``` + +Once deployed, you should be able to reach Kibana on http://localhost:5601. + ### Run tests There's a load test provided as a service in this compose file. For more information see [Load Test](#loadtest). From 21c0d0e5ba441e1284fffaface7580dcbac7a959 Mon Sep 17 00:00:00 2001 From: Alexandru Giurgiu Date: Mon, 6 Mar 2017 16:17:52 +0200 Subject: [PATCH 2/3] added fluentd insutrctions for minikube --- deployment/kubernetes-minikube.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/deployment/kubernetes-minikube.md b/deployment/kubernetes-minikube.md index 2054e51..d685c1e 100644 --- a/deployment/kubernetes-minikube.md +++ b/deployment/kubernetes-minikube.md @@ -27,6 +27,34 @@ minikube start Check if it's running with `minikube status`, and make sure the Kubernetes dashboard is running on http://192.168.99.100:30000. + +##### *(Optional)* Run with Fluentd + ELK based logging + +If you want to run the application using a more advanced logging setup based on Fluentd + ELK stack, there are 2 requirements: +* assign at least 6 GB of memory to the minikube VM +* increase vm.max_map_count to 262144 or higher (Required because Elasticsearch will not start if it detects a value lower than 262144). + +``` +minikube delete +minikube config set memory 6144 +minikube start +minikube ssh +``` + +Once logged into the VM: + +``` +$ sudo sysctl -w vm.max_map_count=262144 +``` + +After these settings are done you can start the logging manifests. + +``` +kubectl create -f deploy/kubernetes/manifests-logging +``` + +You should be able to see the Kibana dashboard at http://192.168.99.100:31601. + ### Deploy Sock Shop Deploy the Sock Shop application on Minikube From b54665f27389cae50532fde24f3ba06144163df7 Mon Sep 17 00:00:00 2001 From: Alexandru Giurgiu Date: Mon, 6 Mar 2017 16:24:56 +0200 Subject: [PATCH 3/3] added instructions for kubernetes --- deployment/kubernetes.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/deployment/kubernetes.md b/deployment/kubernetes.md index 0809798..601a509 100644 --- a/deployment/kubernetes.md +++ b/deployment/kubernetes.md @@ -119,6 +119,16 @@ There are two options for running Weave Scope, either you can run the UI locally ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml?service-token=' ``` +### *(Optional)* Setup Fluentd + ELK based logging +* Copy the logging manifests +* Start Fluentd, Elasticsearch and Kibana + +``` + master_ip=$(terraform output -json | jq -r '.master_address.value') + scp -i ~/.ssh/deploy-docs-k8s.pem -rp deploy/kubernetes/manifests-logging ubuntu@$master_ip:/tmp/ + ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f /tmp/manifests-logging/ +``` + ### Deploy Sock Shop * SSH into the master node * Deploy the sock shop @@ -146,7 +156,7 @@ If you cause enough load on the application you should see the various services Run `terraform output` command to see the load balancer and node URLs The sock shop is available at the sock_shop_address as displayed below. The scope app is accessible via the master and -any of the node urls on port 30001. It may take a few moments for the apps to get running. +any of the node urls on port 30001, while the same applies for Kibana if you deployed it, but using port 31601. It may take a few moments for the apps to get running. ``` Outputs: