Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit 05373fd

Browse files
Merge pull request #50 from microservices-demo/fluentd-instructions
Fluentd instructions
2 parents 6eb2a89 + b54665f commit 05373fd

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

deployment/docker-compose.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ Weave Cloud (hosted platform). Get a token by [registering here](http://cloud.we
5252

5353
<!-- deploy-doc-end -->
5454

55+
##### *(Optional)* Run with Fluentd logging
56+
57+
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
58+
to override some settings and add some extra containers:
59+
60+
```
61+
docker-compose -f deploy/docker-compose/docker-compose.yml -f deploy/docker-compose/docker-compose.logging.yml up -d
62+
```
63+
64+
Once deployed, you should be able to reach Kibana on http://localhost:5601.
65+
5566
### Run tests
5667

5768
There's a load test provided as a service in this compose file. For more information see [Load Test](#loadtest).

deployment/kubernetes-minikube.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,34 @@ minikube start
2727

2828
Check if it's running with `minikube status`, and make sure the Kubernetes dashboard is running on http://192.168.99.100:30000.
2929

30+
31+
##### *(Optional)* Run with Fluentd + ELK based logging
32+
33+
If you want to run the application using a more advanced logging setup based on Fluentd + ELK stack, there are 2 requirements:
34+
* assign at least 6 GB of memory to the minikube VM
35+
* increase vm.max_map_count to 262144 or higher (Required because Elasticsearch will not start if it detects a value lower than 262144).
36+
37+
```
38+
minikube delete
39+
minikube config set memory 6144
40+
minikube start
41+
minikube ssh
42+
```
43+
44+
Once logged into the VM:
45+
46+
```
47+
$ sudo sysctl -w vm.max_map_count=262144
48+
```
49+
50+
After these settings are done you can start the logging manifests.
51+
52+
```
53+
kubectl create -f deploy/kubernetes/manifests-logging
54+
```
55+
56+
You should be able to see the Kibana dashboard at http://192.168.99.100:31601.
57+
3058
### Deploy Sock Shop
3159

3260
Deploy the Sock Shop application on Minikube

deployment/kubernetes.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,16 @@ There are two options for running Weave Scope, either you can run the UI locally
119119
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f 'https://cloud.weave.works/launch/k8s/weavescope.yaml?service-token=<token>'
120120
```
121121

122+
### *(Optional)* Setup Fluentd + ELK based logging
123+
* Copy the logging manifests
124+
* Start Fluentd, Elasticsearch and Kibana
125+
126+
```
127+
master_ip=$(terraform output -json | jq -r '.master_address.value')
128+
scp -i ~/.ssh/deploy-docs-k8s.pem -rp deploy/kubernetes/manifests-logging ubuntu@$master_ip:/tmp/
129+
ssh -i ~/.ssh/deploy-docs-k8s.pem ubuntu@$master_ip kubectl apply -f /tmp/manifests-logging/
130+
```
131+
122132
### Deploy Sock Shop
123133
* SSH into the master node
124134
* Deploy the sock shop
@@ -146,7 +156,7 @@ If you cause enough load on the application you should see the various services
146156
Run `terraform output` command to see the load balancer and node URLs
147157

148158
The sock shop is available at the sock_shop_address as displayed below. The scope app is accessible via the master and
149-
any of the node urls on port 30001. It may take a few moments for the apps to get running.
159+
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.
150160

151161
```
152162
Outputs:

0 commit comments

Comments
 (0)